From 6461b7e26a9afb2710353c0a84a67e4935504da4 Mon Sep 17 00:00:00 2001 From: Milosz Marcinkowski <38698566+miloszmarcinkowski@users.noreply.github.com> Date: Thu, 2 Jan 2025 14:30:47 +0100 Subject: [PATCH] Add `consistent-type-imports` eslint rule in `obs-ux-infra_services-team` owned plugins (#204549) Closes #204412 ## Summary This PR enforces `consistent-type-imports` eslint rule in `x-pack/solutions/observability/plugins/*` plugins owned by `obs-ux-infra_services-team`. Detailed list of plugins: - `x-pack/solutions/observability/plugins/apm`, - `x-pack/solutions/observability/plugins/apm_data_access`, - `x-pack/solutions/observability/plugins/infra`, - `x-pack/solutions/observability/plugins/inventory`, - `x-pack/solutions/observability/plugins/metrics_data_access`, - `x-pack/solutions/observability/plugins/profiling`, - `x-pack/solutions/observability/plugins/profiling_data_access` Script for fixing eslint rules in above plugins: ```bash yarn eslint --no-error-on-unmatched-pattern --quiet --fix "x-pack/solutions/observability/plugins/apm/**/*.{js,mjs,ts,tsx}" "x-pack/solutions/observability/plugins/apm_data_access/**/*.{js,mjs,ts,tsx}" "x-pack/solutions/observability/plugins/infra/**/*.{js,mjs,ts,tsx}" "x-pack/solutions/observability/plugins/inventory/**/*.{js,mjs,ts,tsx}" "x-pack/solutions/observability/plugins/metrics_data_access/**/*.{js,mjs,ts,tsx}" "x-pack/solutions/observability/plugins/profiling/**/*.{js,mjs,ts,tsx}" "x-pack/solutions/observability/plugins/profiling_data_access/**/*.{js,mjs,ts,tsx}" ``` ## Results The affected plugins have been profiled using `node scripts/build_kibana_platform_plugins.js --dist --profile --focus=apm --no-cache` command and bundle size checked manually (`du -s` command). #### APM plugin Zero benefits in terms of size. Screenshot 2024-12-19 at 12 18 36 #### Infra plugin Zero benefits in terms of size. Screenshot 2024-12-19 at 12 56 08 #### Profiling plugin Zero benefits in terms of size. image ## Conclusions - Using [type-only imports](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) in Kibana doesn't provide any benefits in terms of bundle size, - Possible safeguarding against edge-case TS errors - avoiding unintentional side effects ([source](https://typescript-eslint.io/blog/consistent-type-imports-and-exports-why-and-how/#avoiding-unintentional-side-effects)) - circular dependency reference error [(source)](https://stackoverflow.com/questions/40982927/using-import-type-statement-to-fix-circular-dependency-reference-error) - Better ground for incoming tooling (improving performance, reliability with type definition analysis), - Clearer code intent. --- .eslintrc.js | 14 ++++ .../configuration_types.d.ts | 4 +- .../agent_configuration_intake_rt.ts | 2 +- .../runtime_types/duration_rt.ts | 6 +- .../setting_definitions/general_settings.ts | 2 +- .../setting_definitions/index.test.ts | 4 +- .../setting_definitions/index.ts | 4 +- .../setting_definitions/java_settings.ts | 2 +- .../setting_definitions/mobile_settings.ts | 2 +- .../setting_definitions/types.d.ts | 4 +- .../common/anomaly_detection/apm_ml_job.ts | 4 +- ...eferred_service_anomaly_timeseries.test.ts | 4 +- ...et_preferred_service_anomaly_timeseries.ts | 6 +- .../apm/common/anomaly_detection/index.ts | 2 +- .../service_anomaly_timeseries.ts | 4 +- .../plugins/apm/common/connections.ts | 4 +- .../failed_transactions_correlations/types.ts | 4 +- .../latency_correlations/types.ts | 2 +- .../plugins/apm/common/correlations/types.ts | 4 +- .../critical_path/get_critical_path.test.ts | 7 +- .../common/critical_path/get_critical_path.ts | 2 +- .../common/custom_link/custom_link.test.ts | 2 +- .../common/custom_link/custom_link_types.d.ts | 4 +- .../plugins/apm/common/custom_link/index.ts | 2 +- .../apm/common/environment_filter_values.ts | 2 +- .../apm/common/es_fields/es_fields.test.ts | 8 +- .../plugins/apm/common/license_check.ts | 2 +- .../plugins/apm/common/rules/schema.ts | 5 +- .../plugins/apm/common/service_inventory.ts | 4 +- .../plugins/apm/common/service_map.ts | 6 +- .../plugins/apm/common/span_links.ts | 4 +- .../plugins/apm/common/tutorial/tutorials.ts | 2 +- .../common/utils/array_union_to_callable.ts | 2 +- .../apm/common/utils/environment_query.ts | 2 +- .../apm/common/utils/flatten_object.ts | 2 +- .../apm/common/utils/formatters/duration.ts | 4 +- .../apm/common/utils/formatters/formatters.ts | 2 +- .../apm/common/utils/formatters/size.ts | 2 +- .../apm/common/utils/join_by_key/index.ts | 2 +- .../offset_previous_period_coordinate.test.ts | 2 +- .../offset_previous_period_coordinate.ts | 2 +- .../plugins/apm/common/waterfall/typings.ts | 10 +-- .../generate_many_dependencies.ts | 3 +- .../generate_span_links_data.ts | 2 +- .../apm/ftr_e2e/cypress/support/commands.ts | 2 +- .../apm/ftr_e2e/cypress_test_runner.ts | 2 +- .../plugins/apm/ftr_e2e/ftr_config.ts | 4 +- .../apm/ftr_e2e/ftr_provider_context.d.ts | 2 +- .../plugins/apm/public/application/index.tsx | 7 +- .../get_apm_timeseries.tsx | 2 +- .../apm/public/assistant_functions/index.ts | 2 +- .../rule_types/anomaly_rule_type/index.tsx | 6 +- .../select_anomaly_detector.tsx | 5 +- .../select_anomaly_severity.tsx | 6 +- .../error_count_rule_type/index.stories.tsx | 9 ++- .../error_count_rule_type/index.tsx | 9 ++- .../rule_types/register_apm_rule_types.ts | 2 +- .../index.stories.tsx | 12 +-- .../transaction_duration_rule_type/index.tsx | 9 ++- .../index.stories.tsx | 12 +-- .../index.tsx | 9 ++- .../alert_details_app_section/constants.ts | 2 +- .../failed_transaction_chart.tsx | 8 +- .../alert_details_app_section/index.tsx | 4 +- .../latency_chart.tsx | 9 ++- .../throughput_chart.tsx | 14 +--- .../ui_components/alerting_flyout/index.tsx | 4 +- .../ui_components/apm_rule_kql_filter.tsx | 8 +- .../apm_rule_params_container/index.test.tsx | 3 +- .../apm_rule_params_container/index.tsx | 3 +- .../apm_rule_unified_search_bar.tsx | 11 +-- .../chart_preview/chart_preview_helper.tsx | 5 +- .../ui_components/chart_preview/index.tsx | 9 +-- .../utils/get_alerting_capabilities.test.ts | 4 +- .../utils/get_alerting_capabilities.ts | 4 +- .../utils/get_initial_alert_values.ts | 2 +- .../components/alerting/utils/helper.ts | 2 +- .../components/app/alerts_overview/index.tsx | 6 +- .../components/app/breadcrumb/index.tsx | 2 +- .../context_popover/field_stats_popover.tsx | 6 +- .../app/correlations/correlations_table.tsx | 3 +- .../failed_transactions_correlations.tsx | 6 +- ...get_transaction_distribution_chart_data.ts | 6 +- .../latency_correlations.test.tsx | 7 +- .../app/correlations/latency_correlations.tsx | 10 +-- ..._failed_transactions_correlations.test.tsx | 5 +- .../use_failed_transactions_correlations.ts | 2 +- .../use_latency_correlations.test.tsx | 5 +- .../correlations/use_latency_correlations.ts | 2 +- ...d_transactions_correlation_impact_label.ts | 2 +- .../index.tsx | 9 +-- .../dependency_operation_detail_link.tsx | 4 +- ...ependency_operation_distribution_chart.tsx | 2 +- .../index.tsx | 2 +- ..._redirect_to_available_span_sample.test.ts | 4 +- ...maybe_redirect_to_available_span_sample.ts | 4 +- .../app/diagnostics/apm_documents_tab.tsx | 12 +-- .../context/diagnostics_context.tsx | 2 +- .../app/diagnostics/data_stream_tab.tsx | 7 +- .../app/diagnostics/import_export_tab.tsx | 2 +- .../index_pattern_settings_tab.tsx | 2 +- .../app/diagnostics/index_templates_tab.tsx | 5 +- .../app/diagnostics/indices_tab.tsx | 2 +- .../summary_tab/data_streams_status.tsx | 2 +- .../app/diagnostics/summary_tab/index.tsx | 2 +- .../summary_tab/index_templates_status.tsx | 2 +- .../summary_tab/indicies_status.tsx | 2 +- .../entities/entity_link/entity_link.test.tsx | 4 +- .../app/entities/entity_link/index.tsx | 2 +- .../distribution/index.stories.tsx | 3 +- .../distribution/index.tsx | 4 +- .../error_sample_contextual_insight.tsx | 4 +- .../error_sampler/error_sample_detail.tsx | 13 ++-- .../error_sampler/error_tabs.tsx | 2 +- .../error_ui_actions_context_menu.tsx | 10 +-- .../exception_stacktrace.stories.tsx | 5 +- .../exception_stacktrace.test.tsx | 2 +- .../error_sampler/exception_stacktrace.tsx | 2 +- .../error_sampler/index.tsx | 3 +- .../error_sampler/sample_summary.tsx | 2 +- .../app/error_group_details/index.tsx | 2 +- .../top_erroneous_transactions/index.tsx | 11 +-- .../error_group_list.stories.tsx | 9 ++- .../error_group_list/index.tsx | 11 +-- .../use_error_group_list_data.tsx | 4 +- .../app/help_popover/help_popover.tsx | 14 +--- .../infra_tabs/use_tabs.test.tsx | 5 +- .../infra_overview/infra_tabs/use_tabs.tsx | 4 +- .../metrics/jvm_metrics_overview/index.tsx | 3 +- .../serverless_active_instances.tsx | 7 +- .../serverless_functions.tsx | 13 +--- .../app/metrics/static_dashboard/helper.ts | 2 +- .../app/metrics/static_dashboard/index.tsx | 17 ++--- .../app/mobile/charts/sessions_chart.tsx | 2 +- .../shared/distribution/index.stories.tsx | 3 +- .../shared/distribution/index.tsx | 5 +- .../crash_group_list.stories.tsx | 5 +- .../crash_group_list/index.tsx | 5 +- .../crashes_overview.tsx | 2 +- .../error_group_list.stories.tsx | 5 +- .../error_group_list/index.tsx | 5 +- .../errors_overview.tsx | 2 +- .../components/app/mobile/search_bar.tsx | 3 +- .../mobile/service_overview/filters/index.tsx | 3 +- .../geo_map/embedded_map.test.tsx | 2 +- .../service_overview/geo_map/embedded_map.tsx | 8 +- .../mobile/service_overview/geo_map/index.tsx | 4 +- .../get_http_requests_map_layer_list.ts | 8 +- .../geo_map/map_layers/get_layer_list.ts | 4 +- .../geo_map/map_layers/get_map_layer_style.ts | 4 +- .../map_layers/get_session_map_layer_list.ts | 8 +- .../app/mobile/service_overview/index.tsx | 11 +-- .../most_used_charts/index.tsx | 5 +- .../most_used_charts/sunburst_chart.tsx | 3 +- .../service_overview/stats/location_stats.tsx | 3 +- .../service_overview/stats/metric_item.tsx | 3 +- .../mobile/service_overview/stats/stats.tsx | 3 +- .../app_version_tab.tsx | 2 +- .../transaction_overview_tabs/devices_tab.tsx | 2 +- .../os_version_tab.tsx | 2 +- .../stats_list/get_columns.tsx | 6 +- .../stats_list/index.tsx | 2 +- .../transactions_tab.tsx | 2 +- .../app/onboarding/agent_config_table.tsx | 10 +-- .../onboarding/agent_status_instructions.tsx | 2 +- .../components/app/onboarding/index.tsx | 4 +- .../app/onboarding/instruction_variants.ts | 2 +- .../onboarding/instructions/django_agent.tsx | 5 +- .../onboarding/instructions/dotnet_agent.tsx | 5 +- .../onboarding/instructions/flask_agent.tsx | 5 +- .../app/onboarding/instructions/go_agent.tsx | 5 +- .../onboarding/instructions/java_agent.tsx | 5 +- .../onboarding/instructions/node_agent.tsx | 5 +- .../onboarding/instructions/otel_agent.tsx | 8 +- .../app/onboarding/instructions/php_agent.tsx | 5 +- .../onboarding/instructions/rack_agent.tsx | 5 +- .../onboarding/instructions/rails_agent.tsx | 5 +- .../app/onboarding/instructions_set.tsx | 4 +- .../app/onboarding/serverless_instructions.ts | 5 +- .../app/profiling_overview/index.tsx | 8 +- .../profiling_hosts_callout.tsx | 2 +- .../profiling_hosts_flamegraph.tsx | 4 +- .../profiling_hosts_top_functions.tsx | 4 +- .../actions/edit_dashboard.tsx | 2 +- .../actions/goto_dashboard.tsx | 4 +- .../actions/link_dashboard.tsx | 2 +- .../actions/save_dashboard_modal.tsx | 4 +- .../actions/unlink_dashboard.tsx | 2 +- .../service_dashboards/dashboard_selector.tsx | 2 +- .../app/service_dashboards/index.tsx | 11 +-- .../service_dependencies_breakdown_chart.tsx | 2 +- .../refresh_service_groups_subscriber.tsx | 3 +- .../service_group_save/save_modal.tsx | 2 +- .../service_list_preview.tsx | 7 +- .../service_group_card.tsx | 4 +- .../service_groups_list.tsx | 4 +- .../service_groups_list/service_stat.tsx | 3 +- .../service_groups_list/sort.tsx | 2 +- .../app/service_inventory/index.tsx | 7 +- .../service_inventory.stories.tsx | 6 +- .../__fixtures__/service_api_mock_data.ts | 2 +- .../service_list/apm_services_table.tsx | 26 +++---- .../service_list/health_badge.tsx | 2 +- .../service_list/order_service_items.ts | 6 +- .../service_list/service_list.stories.tsx | 7 +- .../service_list/service_list.test.tsx | 2 +- .../components/app/service_logs/index.tsx | 4 +- .../__stories__/cytoscape.stories.tsx | 5 +- .../cytoscape_example_data.stories.tsx | 2 +- .../app/service_map/controls.test.tsx | 3 +- .../components/app/service_map/controls.tsx | 2 +- .../components/app/service_map/cytoscape.tsx | 11 +-- .../app/service_map/cytoscape_options.ts | 6 +- .../app/service_map/empty_banner.test.tsx | 3 +- .../components/app/service_map/icons.ts | 2 +- .../components/app/service_map/index.tsx | 5 +- .../service_map/popover/anomaly_detection.tsx | 3 +- .../popover/dependency_contents.tsx | 10 +-- .../app/service_map/popover/edge_contents.tsx | 4 +- .../popover/externals_list_contents.tsx | 6 +- .../app/service_map/popover/index.tsx | 15 +--- .../service_map/popover/popover.stories.tsx | 2 +- .../service_map/popover/resource_contents.tsx | 2 +- .../service_map/popover/service_contents.tsx | 4 +- .../app/service_map/popover/stats_list.tsx | 4 +- .../use_cytoscape_event_handlers.ts | 2 +- .../service_overview/apm_overview/index.tsx | 12 +-- .../service_overview.stories.tsx | 4 +- .../index.tsx | 3 +- .../index.tsx | 9 ++- .../get_columns.tsx | 10 ++- .../index.tsx | 12 +-- .../instance_actions_menu/index.tsx | 6 +- .../instance_actions_menu/menu_sections.ts | 12 +-- .../instance_details.test.tsx | 2 +- .../intance_details.tsx | 5 +- .../get_throughput_screen_context.ts | 2 +- .../app/service_tab_empty_state/constants.ts | 6 +- .../app/service_tab_empty_state/index.tsx | 12 ++- .../service_tab_empty_state.stories.tsx | 3 +- .../index.stories.tsx | 10 +-- .../agent_configuration_create_edit/index.tsx | 6 +- .../service_page/form_row_select.tsx | 8 +- .../form_row_suggestions_select.tsx | 3 +- .../service_page/service_page.tsx | 4 +- .../settings_page/save_config.ts | 4 +- .../settings_page/setting_form_row.tsx | 2 +- .../settings_page/settings_page.tsx | 4 +- .../list/confirm_delete_modal.tsx | 5 +- .../agent_configurations/list/index.tsx | 5 +- .../agent_explorer_docs_link/index.tsx | 2 +- .../agent_contextual_information/index.tsx | 6 +- .../agent_instances_details/index.tsx | 9 ++- .../agent_explorer/agent_instances/index.tsx | 2 +- .../agent_latest_version/index.tsx | 2 +- .../agent_explorer/agent_list/index.tsx | 9 ++- .../app/settings/agent_explorer/index.tsx | 2 +- .../agent_keys/agent_keys_table.stories.tsx | 9 ++- .../settings/agent_keys/agent_keys_table.tsx | 5 +- .../agent_keys/confirm_delete_modal.tsx | 2 +- .../agent_keys/create_agent_key.stories.tsx | 7 +- .../settings/agent_keys/create_agent_key.tsx | 2 +- .../app/settings/agent_keys/index.tsx | 4 +- .../prompts/api_keys_not_enabled.stories.tsx | 2 +- .../prompts/permission_denied.stories.tsx | 2 +- .../anomaly_detection/add_environments.tsx | 4 +- .../settings/anomaly_detection/create_jobs.ts | 2 +- .../app/settings/anomaly_detection/index.tsx | 2 +- .../settings/anomaly_detection/jobs_list.tsx | 5 +- .../app/settings/apm_indices/index.tsx | 5 +- .../delete_button.test.tsx | 3 +- .../delete_button.tsx | 2 +- .../filters_section.tsx | 2 +- .../helper.test.ts | 4 +- .../create_edit_custom_link_flyout/helper.ts | 4 +- .../create_edit_custom_link_flyout/index.tsx | 2 +- .../link_preview.stories.tsx | 5 +- .../link_preview.tsx | 4 +- .../link_section.tsx | 2 +- .../save_custom_link.ts | 4 +- .../custom_link/custom_link_table.tsx | 5 +- .../app/settings/custom_link/index.test.tsx | 5 +- .../app/settings/custom_link/index.tsx | 2 +- .../schema/confirm_switch_modal.stories.tsx | 3 +- .../components/app/settings/schema/index.tsx | 5 +- .../app/settings/schema/schema.stories.tsx | 9 ++- .../app/settings/schema/schema_overview.tsx | 2 +- .../get_storage_explorer_links.ts | 2 +- .../storage_explorer/services_table/index.tsx | 9 ++- .../index_stats_per_service.tsx | 12 +-- .../storage_details_per_service.tsx | 5 +- .../app/storage_explorer/storage_chart.tsx | 2 +- .../app/storage_explorer/summary_stats.tsx | 2 +- .../app/top_traces_overview/trace_list.tsx | 12 +-- .../components/app/trace_explorer/index.tsx | 5 +- .../trace_explorer_waterfall.tsx | 2 +- .../trace_explorer/trace_search_box/index.tsx | 6 +- .../components/app/trace_link/index.tsx | 2 +- .../app/trace_link/trace_link.test.tsx | 5 +- .../aggregated_critical_path_tab.tsx | 2 +- .../distribution/index.test.tsx | 7 +- .../distribution/index.tsx | 6 +- .../failed_transactions_correlations_tab.tsx | 2 +- .../latency_correlations_tab.tsx | 2 +- .../app/transaction_details/profiling_tab.tsx | 2 +- .../transaction_details/top_errors/index.tsx | 2 +- .../transaction_details/trace_samples_tab.tsx | 2 +- .../transaction_details_tabs.tsx | 8 +- .../use_waterfall_fetcher.ts | 2 +- .../waterfall_with_summary/index.tsx | 7 +- .../maybe_view_trace_link.tsx | 6 +- .../transaction_tabs.tsx | 4 +- .../marks/get_agent_marks.test.ts | 2 +- .../marks/get_agent_marks.ts | 4 +- .../marks/get_error_marks.test.ts | 2 +- .../marks/get_error_marks.ts | 6 +- .../waterfall/accordion_waterfall.tsx | 7 +- .../waterfall/badge/span_links_badge.tsx | 2 +- .../waterfall/badge/sync_badge.stories.tsx | 3 +- .../waterfall/badge/sync_badge.tsx | 2 +- .../waterfall/context/waterfall_context.tsx | 16 ++-- .../waterfall/failure_badge.tsx | 2 +- .../waterfall/flyout_top_level_properties.tsx | 2 +- .../waterfall_container/waterfall/index.tsx | 4 +- .../waterfall/responsive_flyout.tsx | 3 +- .../waterfall/span_flyout/index.tsx | 6 +- .../waterfall/span_flyout/span_db.tsx | 2 +- .../span_flyout/span_flyout.stories.tsx | 13 ++-- .../span_flyout/sticky_span_properties.tsx | 4 +- .../span_flyout/truncate_height_section.tsx | 3 +- .../dropped_spans_warning.tsx | 2 +- .../waterfall/transaction_flyout/index.tsx | 4 +- .../transaction_flyout.stories.tsx | 11 +-- .../waterfall/waterfall_flyout.tsx | 4 +- .../waterfall_helpers.test.ts | 22 +++--- .../waterfall_helpers/waterfall_helpers.ts | 7 +- .../waterfall/waterfall_item.tsx | 7 +- .../waterfall_container.stories.tsx | 11 +-- .../waterfall_container/waterfall_legends.tsx | 6 +- .../transaction_overview.test.tsx | 5 +- .../agent_instructions_accordion.tsx | 7 +- .../apm_agents/agent_instructions_mappings.ts | 6 +- .../fleet_integration/apm_agents/index.tsx | 2 +- .../apm_agents/render_mustache.ts | 2 +- .../runtime_attachment/discovery_rule.tsx | 4 +- .../edit_discovery_rule.tsx | 3 +- .../apm_agents/runtime_attachment/index.tsx | 6 +- .../java_agent_version_input.tsx | 4 +- .../runtime_attachment.stories.tsx | 4 +- .../runtime_attachment/runtime_attachment.tsx | 7 +- .../java_runtime_attachment.tsx | 3 +- .../apm_custom_assets_extension.tsx | 5 +- .../apm_enrollment_flyout_extension.tsx | 4 +- .../create_apm_policy_form.tsx | 2 +- .../edit_apm_policy_form.stories.tsx | 6 +- .../apm_policy_form/edit_apm_policy_form.tsx | 2 +- .../apm_policy_form/index.tsx | 5 +- .../agent_authorization_settings.ts | 2 +- .../settings_definition/apm_settings.ts | 2 +- .../settings_definition/debug_settings.ts | 2 +- .../settings_definition/rum_settings.ts | 2 +- .../tail_sampling_settings.tsx | 2 +- .../settings_definition/tls_settings.ts | 2 +- .../settings_form/form_row_setting.tsx | 4 +- .../apm_policy_form/settings_form/index.tsx | 2 +- .../settings_form/utils.test.ts | 2 +- .../apm_policy_form/settings_form/utils.ts | 2 +- .../apm_policy_form/typings.ts | 6 +- .../lazy_apm_agents_tab_extension.tsx | 2 +- .../lazy_apm_policy_create_extension.tsx | 2 +- .../lazy_apm_policy_edit_extension.tsx | 2 +- .../components/routing/apm_error_boundary.tsx | 2 +- .../add_data_context_menu.tsx | 14 ++-- .../alerting_popover_flyout.tsx | 8 +- .../anomaly_detection_setup_link.test.tsx | 2 +- .../anomaly_detection_setup_link.tsx | 2 +- .../labs/labs_flyout.tsx | 2 +- .../components/routing/app_root/index.tsx | 8 +- .../index.tsx | 2 +- .../index.test.tsx | 3 +- .../redirect_with_offset/index.test.tsx | 3 +- .../app_root/redirect_with_offset/index.tsx | 6 +- .../app_root/scroll_to_top_on_path_change.tsx | 2 +- .../public/components/routing/home/index.tsx | 3 +- .../components/routing/home/page_template.tsx | 4 +- .../public/components/routing/redirect_to.tsx | 5 +- .../routing/service_detail/index.tsx | 2 +- .../entities_inventory_callout.tsx | 2 +- .../templates/apm_main_template/index.tsx | 7 +- .../analyze_data_button.stories.tsx | 2 +- .../templates/apm_service_template/index.tsx | 3 +- .../apm_service_template/use_tabs.test.tsx | 11 +-- .../apm_service_template/use_tabs.tsx | 5 +- .../mobile_service_template/index.tsx | 3 +- .../templates/service_group_template.tsx | 9 +-- .../templates/settings_template.stories.tsx | 3 +- .../routing/templates/settings_template.tsx | 8 +- .../shared/add_data_buttons/buttons.tsx | 11 ++- .../public/components/shared/beta_badge.tsx | 3 +- .../shared/charts/breakdown_chart/index.tsx | 9 +-- .../duration_distribution_chart/index.tsx | 12 +-- .../index.tsx | 12 ++- .../failed_transaction_rate_chart/index.tsx | 2 +- .../shared/charts/flamegraph/index.tsx | 2 +- .../helper/get_chart_anomaly_timeseries.tsx | 4 +- .../shared/charts/helper/helper.test.ts | 4 +- .../components/shared/charts/helper/helper.ts | 6 +- .../shared/charts/helper/timezone.test.ts | 2 +- .../shared/charts/helper/timezone.ts | 2 +- .../custom_tooltip.stories.tsx | 4 +- .../custom_tooltip.tsx | 7 +- .../index.tsx | 14 ++-- ...ces_latency_distribution_chart.stories.tsx | 6 +- .../latency_chart/latency_chart.stories.tsx | 5 +- .../charts/log_rates/log_error_rate_chart.tsx | 2 +- .../charts/log_rates/log_rate_chart.tsx | 2 +- .../charts/log_rates/tooltip_content.tsx | 3 +- .../shared/charts/metrics_chart/index.tsx | 6 +- .../shared/charts/spark_plot/index.tsx | 4 +- .../shared/charts/timeline/index.tsx | 4 +- .../timeline/marker/agent_marker.test.tsx | 2 +- .../charts/timeline/marker/agent_marker.tsx | 2 +- .../timeline/marker/error_marker.test.tsx | 5 +- .../charts/timeline/marker/error_marker.tsx | 2 +- .../charts/timeline/marker/index.test.tsx | 4 +- .../shared/charts/timeline/marker/index.tsx | 4 +- .../shared/charts/timeline/plot_utils.ts | 2 +- .../shared/charts/timeline/timeline.test.tsx | 5 +- .../shared/charts/timeline/timeline_axis.tsx | 4 +- .../shared/charts/timeline/vertical_lines.tsx | 4 +- .../shared/charts/timeseries_chart.tsx | 19 +++-- .../charts/timeseries_chart_with_context.tsx | 15 ++-- .../charts/transaction_charts/helper.test.ts | 2 +- .../charts/transaction_charts/helper.tsx | 4 +- .../charts/transaction_charts/index.tsx | 2 +- .../index.tsx | 2 +- .../shared/charts/treemap_chart/index.tsx | 5 +- .../critical_path_to_flamegraph.ts | 6 +- .../shared/critical_path_flamegraph/index.tsx | 6 +- .../shared/date_picker/date_picker.test.tsx | 3 +- .../components/shared/date_picker/index.tsx | 2 +- .../get_span_metric_columns.tsx | 7 +- .../shared/dependencies_table/index.tsx | 8 +- ...pendency_failed_transaction_rate_chart.tsx | 4 +- .../dependency_latency_chart.tsx | 4 +- .../dependency_metric_charts_route_params.ts | 4 +- .../dependency_throughput_chart.tsx | 4 +- .../shared/dependency_metric_charts/index.tsx | 2 +- .../components/shared/empty_message.tsx | 3 +- .../shared/environment_filter/index.tsx | 2 +- .../shared/environment_select/index.tsx | 5 +- .../shared/errors_table/get_columns.tsx | 9 ++- .../explore_logs_button.tsx | 3 +- .../logs_explorer_locator_config.ts | 6 +- .../components/shared/get_bool_filter.ts | 4 +- .../shared/is_route_with_time_range.ts | 2 +- .../shared/key_value_table/index.tsx | 8 +- .../key_value_table/key_value_table.test.tsx | 2 +- .../components/shared/kuery_bar/index.tsx | 4 +- .../components/shared/kuery_bar/utils.ts | 2 +- .../license_prompt/license_prompt.stories.tsx | 9 +-- .../links/apm/agent_configuration_links.tsx | 4 +- .../shared/links/apm/apm_link.test.tsx | 2 +- .../components/shared/links/apm/apm_link.tsx | 8 +- .../shared/links/apm/error_detail_link.tsx | 3 +- .../shared/links/apm/error_overview_link.tsx | 4 +- .../components/shared/links/apm/home_link.tsx | 3 +- .../shared/links/apm/metric_overview_link.tsx | 5 +- .../links/apm/mobile/crash_detail_link.tsx | 4 +- .../links/apm/mobile/error_detail_link.tsx | 4 +- .../links/apm/mobile/error_overview_link.tsx | 4 +- .../links/apm/service_inventory_link.tsx | 2 +- .../shared/links/apm/service_link/index.tsx | 6 +- .../apm/service_link/service_link.stories.tsx | 5 +- .../shared/links/apm/service_map_link.tsx | 3 +- .../apm/service_node_metric_overview_link.tsx | 5 +- .../links/apm/service_node_overview_link.tsx | 2 +- .../service_transactions_overview_link.tsx | 5 +- .../shared/links/apm/trace_overview_link.tsx | 2 +- .../transaction_detail_link/index.test.tsx | 2 +- .../apm/transaction_detail_link/index.tsx | 5 +- .../links/apm/transaction_overview_link.tsx | 3 +- .../shared/links/dependency_link.stories.tsx | 5 +- .../shared/links/dependency_link.tsx | 4 +- .../discover_error_button.test.tsx | 5 +- .../discover_error_link.test.tsx | 5 +- .../discover_links/discover_error_link.tsx | 3 +- .../links/discover_links/discover_link.tsx | 4 +- .../discover_links.integration.test.tsx | 8 +- .../discover_links/discover_span_link.tsx | 3 +- .../discover_transaction_button.test.tsx | 2 +- .../discover_transaction_link.test.tsx | 2 +- .../discover_transaction_link.tsx | 5 +- .../shared/links/elastic_docs_link.tsx | 3 +- .../shared/links/infra_link.test.tsx | 2 +- .../components/shared/links/infra_link.tsx | 7 +- .../public/components/shared/links/kibana.ts | 2 +- .../mlexplorer_link.test.tsx | 2 +- .../mlexplorer_link.tsx | 3 +- .../mlmanage_jobs_link.test.tsx | 2 +- .../mlsingle_metric_link.test.tsx | 2 +- .../mlsingle_metric_link.tsx | 3 +- .../components/shared/links/rison_helpers.ts | 2 +- .../components/shared/links/url_helpers.ts | 2 +- .../public/components/shared/list_metric.tsx | 3 +- .../components/shared/managed_table/index.tsx | 6 +- .../metadata_table/error_metadata/index.tsx | 3 +- .../shared/metadata_table/index.tsx | 2 +- .../metadata_table/metadata_table.test.tsx | 3 +- .../metadata_table/span_metadata/index.tsx | 2 +- .../transaction_metadata/index.tsx | 2 +- .../not_available_apm_metrics.tsx | 2 +- .../shared/overview_table_container/index.tsx | 3 +- .../profiling/flamegraph/flamegraph_link.tsx | 3 +- .../top_functions/top_functions_link.tsx | 3 +- .../shared/search_bar/search_bar.test.tsx | 5 +- .../shared/search_bar/search_bar.tsx | 5 +- .../shared/select_with_placeholder/index.tsx | 3 +- .../shared/service_icons/cloud_details.tsx | 5 +- .../service_icons/container_details.tsx | 5 +- .../shared/service_icons/icon_popover.tsx | 2 +- .../shared/service_icons/index.test.tsx | 7 +- .../components/shared/service_icons/index.tsx | 13 ++-- .../shared/service_icons/otel_details.tsx | 5 +- .../service_icons/serverless_details.tsx | 5 +- .../shared/service_icons/service_details.tsx | 5 +- .../service_icons/service_icons.stories.tsx | 7 +- .../components/shared/span_links/index.tsx | 13 +--- .../span_links/span_links_tab_content.tsx | 4 +- .../shared/span_links/span_links_table.tsx | 4 +- .../shared/stacktrace/cause_stacktrace.tsx | 2 +- .../components/shared/stacktrace/context.tsx | 2 +- .../shared/stacktrace/frame_heading.test.tsx | 2 +- .../shared/stacktrace/frame_heading.tsx | 7 +- .../c_sharp_frame_heading_renderer.tsx | 2 +- .../default_frame_heading_renderer.tsx | 2 +- .../frame_heading_renderers/index.ts | 4 +- .../java_frame_heading_renderer.tsx | 2 +- .../java_script_frame_heading_renderer.tsx | 2 +- .../php_frame_heading_renderer.tsx | 2 +- .../ruby_frame_heading_renderer.tsx | 2 +- .../components/shared/stacktrace/index.tsx | 2 +- .../shared/stacktrace/library_stacktrace.tsx | 2 +- .../shared/stacktrace/stackframe.test.tsx | 5 +- .../shared/stacktrace/stackframe.tsx | 2 +- .../shared/stacktrace/stacktrace.test.ts | 2 +- .../shared/stacktrace/variables.tsx | 2 +- .../shared/suggestions_select/index.tsx | 3 +- .../suggestions_select.stories.tsx | 6 +- .../summary/__fixtures__/transactions.ts | 2 +- .../components/shared/summary/index.tsx | 2 +- .../shared/summary/transaction_summary.tsx | 2 +- .../summary/user_agent_summary_item.tsx | 2 +- .../shared/technical_preview_badge.tsx | 3 +- .../get_comparison_chart_theme.ts | 2 +- .../get_comparison_enabled.test.ts | 2 +- .../time_comparison/get_comparison_enabled.ts | 2 +- .../time_comparison/get_comparison_options.ts | 4 +- .../shared/time_comparison/index.test.tsx | 3 +- .../shared/timestamp_tooltip/index.tsx | 3 +- .../__fixtures__/mock_data.ts | 2 +- .../custom_link_flyout.tsx | 4 +- .../custom_link_list.test.tsx | 4 +- .../custom_link_list.tsx | 4 +- .../custom_link_toolbar.test.tsx | 5 +- .../custom_link_menu_section/index.test.tsx | 5 +- .../custom_link_menu_section/index.tsx | 4 +- .../transaction_action_menu/sections.test.ts | 9 ++- .../transaction_action_menu/sections.ts | 15 ++-- .../sections_helper.ts | 2 +- .../transaction_action_menu.test.tsx | 8 +- .../transaction_action_menu.tsx | 2 +- .../shared/transaction_type_select.tsx | 3 +- .../shared/transactions_table/get_columns.tsx | 12 +-- .../shared/transactions_table/index.tsx | 11 ++- .../shared/unified_search_bar/index.tsx | 17 ++--- .../unified_search_bar.test.tsx | 7 +- .../annotations/annotations_context.tsx | 2 +- .../anomaly_detection_jobs_context.tsx | 14 ++-- .../context/apm_plugin/apm_plugin_context.tsx | 2 +- .../apm_plugin/mock_apm_plugin_context.tsx | 13 ++-- .../apm_plugin/mock_apm_plugin_storybook.tsx | 11 ++- .../apm_service/apm_service_context.tsx | 7 +- .../use_service_entity_summary_fetcher.ts | 2 +- .../use_service_transaction_types_fetcher.tsx | 4 +- .../public/context/breadcrumbs/context.tsx | 5 +- .../context/breadcrumbs/use_breadcrumb.ts | 3 +- .../chart_pointer_event_context.tsx | 5 +- .../use_chart_pointer_event_context.tsx | 4 +- .../environments_context.tsx | 2 +- .../context/kibana_context/use_kibana.tsx | 2 +- .../context/license/license_context.tsx | 2 +- .../service_anomaly_timeseries_context.tsx | 2 +- ...k_time_range_metadata_context_provider.tsx | 2 +- .../time_range_metadata_context.tsx | 7 +- .../context/url_params_context/helpers.ts | 2 +- .../mock_url_params_context_provider.tsx | 2 +- .../url_params_context/resolve_url_params.ts | 4 +- .../context/url_params_context/types.ts | 2 +- .../url_params_context.test.tsx | 2 +- .../url_params_context/url_params_context.tsx | 15 ++-- .../react_embeddable_factory.tsx | 4 +- .../react_embeddable_factory.tsx | 4 +- .../alerting_throughput_chart/chart.tsx | 2 +- .../react_embeddable_factory.tsx | 4 +- .../embeddable/alerting/testing/fixtures.ts | 6 +- .../apm/public/embeddable/alerting/types.ts | 2 +- .../alerting/use_alerting_props.tsx | 2 +- .../public/embeddable/embeddable_context.tsx | 5 +- .../embeddable/register_embeddables.tsx | 6 +- .../hooks/create_shared_use_fetcher.tsx | 3 +- .../public/hooks/use_adhoc_apm_data_view.ts | 4 +- .../apm/public/hooks/use_apm_feature_flag.ts | 2 +- .../apm/public/hooks/use_apm_params.ts | 7 +- .../apm/public/hooks/use_apm_route_path.ts | 5 +- .../apm/public/hooks/use_breakpoints.test.tsx | 3 +- .../apm/public/hooks/use_current_user.ts | 4 +- .../public/hooks/use_dashboards_fetcher.ts | 4 +- .../public/hooks/use_date_range_redirect.ts | 2 +- .../public/hooks/use_default_environment.ts | 2 +- .../public/hooks/use_default_time_range.ts | 2 +- ...dependency_detail_operations_breadcrumb.ts | 2 +- .../public/hooks/use_environments_fetcher.tsx | 4 +- .../apm/public/hooks/use_fetcher.test.tsx | 2 +- .../plugins/apm/public/hooks/use_fetcher.tsx | 3 +- ...e_preferred_data_source_and_bucket_size.ts | 2 +- ...se_preferred_service_anomaly_timeseries.ts | 2 +- .../apm/public/hooks/use_processor_event.ts | 2 +- .../public/hooks/use_progressive_fetcher.tsx | 3 +- .../hooks/use_sample_chart_selection.ts | 2 +- .../apm/public/hooks/use_time_range.test.ts | 3 +- .../use_transaction_latency_chart_fetcher.ts | 2 +- .../observability/plugins/apm/public/index.ts | 5 +- .../plugins/apm/public/locator/helpers.ts | 3 +- .../apm/public/locator/onboarding_locator.ts | 2 +- .../locator/service_detail_locator.test.ts | 4 +- .../public/locator/service_detail_locator.ts | 4 +- .../plugins/apm/public/plugin.ts | 41 +++++----- .../selectors/latency_chart_selector.test.ts | 3 +- .../selectors/latency_chart_selectors.ts | 6 +- .../apm/public/services/call_api.test.ts | 2 +- .../apm/public/services/call_apm_api.test.ts | 2 +- .../apm_observability_overview_fetchers.ts | 2 +- .../apm/public/services/rest/call_api.ts | 4 +- .../services/rest/create_call_apm_api.ts | 9 ++- .../services/telemetry/telemetry_client.ts | 6 +- .../services/telemetry/telemetry_events.ts | 3 +- .../services/telemetry/telemetry_service.ts | 4 +- .../plugins/apm/public/set_help_extension.ts | 2 +- .../agent_config_instructions.test.tsx | 3 +- .../config_agent/agent_config_table.tsx | 3 +- .../config_agent/config_agent.stories.tsx | 6 +- .../config_agent/get_policy_options.test.ts | 2 +- .../config_agent/get_policy_options.ts | 2 +- .../tutorial/config_agent/index.test.tsx | 2 +- .../public/tutorial/config_agent/index.tsx | 7 +- .../opentelemetry_instructions.tsx | 4 +- .../tutorial/config_agent/policy_selector.tsx | 5 +- .../tutorial/config_agent/rum_script.tsx | 2 +- .../tutorial_fleet_instructions/index.tsx | 4 +- .../tutorial_fleet_instructions.stories.tsx | 4 +- .../plugins/apm/public/update_badge.ts | 2 +- .../plugins/apm/public/utils/test_helpers.tsx | 7 +- .../create_functional_tests_archive/index.ts | 2 +- .../diagnostics_bundle/diagnostics_bundle.ts | 5 +- .../scripts/infer_route_return_types/index.ts | 8 +- .../apm/scripts/shared/get_http_auth.ts | 2 +- .../get_apm_downstream_dependencies.ts | 2 +- .../get_apm_services_list.ts | 2 +- .../assistant_functions/get_apm_timeseries.ts | 7 +- .../apm/server/assistant_functions/index.ts | 2 +- .../server/deprecations/apm_user_role.test.ts | 2 +- .../apm/server/deprecations/apm_user_role.ts | 2 +- .../plugins/apm/server/deprecations/index.ts | 4 +- .../plugins/apm/server/feature.ts | 7 +- .../observability/plugins/apm/server/index.ts | 5 +- .../lib/anomaly_detection/anomaly_search.ts | 2 +- .../anomaly_detection/apm_ml_anomaly_query.ts | 8 +- .../anomaly_detection/apm_ml_jobs_query.ts | 4 +- .../create_anomaly_detection_jobs.ts | 8 +- .../get_anomaly_detection_jobs.ts | 2 +- .../get_anomaly_timeseries.ts | 2 +- .../get_ml_jobs_with_apm_group.ts | 8 +- .../collect_data_telemetry/index.ts | 7 +- .../collect_data_telemetry/tasks.test.ts | 2 +- .../collect_data_telemetry/tasks.ts | 16 ++-- .../apm/server/lib/apm_telemetry/index.ts | 16 ++-- .../apm/server/lib/apm_telemetry/schema.ts | 9 ++- .../lib/apm_telemetry/telemetry_client.ts | 6 +- .../apm/server/lib/apm_telemetry/types.ts | 4 +- .../exclude_rum_exit_spans_query.ts | 2 +- ...ection_stats_items_with_relative_impact.ts | 5 +- .../get_destination_map.ts | 11 +-- .../get_connection_stats/get_stats.ts | 6 +- .../connections/get_connection_stats/index.ts | 8 +- .../apm/server/lib/deprecations/index.ts | 2 +- .../create_entities_es_client.ts | 6 +- .../create_infra_metrics_client.ts | 4 +- .../create_internal_es_client/index.ts | 2 +- .../lib/helpers/get_apm_alerts_client.test.ts | 5 +- .../lib/helpers/get_apm_alerts_client.ts | 8 +- .../helpers/get_apm_data_access_services.ts | 4 +- .../lib/helpers/get_apm_event_client.ts | 4 +- .../server/lib/helpers/get_error_name.test.ts | 2 +- .../apm/server/lib/helpers/get_error_name.ts | 4 +- .../server/lib/helpers/get_es_capabilities.ts | 2 +- .../get_internal_saved_objects_client.ts | 2 +- .../apm/server/lib/helpers/get_ml_client.ts | 4 +- .../lib/helpers/get_random_sampler/index.ts | 2 +- ...et_is_using_service_destination_metrics.ts | 4 +- .../lib/helpers/transaction_error_rate.ts | 2 +- .../get_is_using_transaction_events.test.ts | 3 +- .../get_is_using_transaction_events.ts | 4 +- .../server/lib/helpers/transactions/index.ts | 6 +- .../apm/server/lib/service_group_query.ts | 4 +- .../lib/service_group_query_with_overflow.ts | 4 +- .../transaction_groups/get_coldstart_rate.ts | 4 +- .../get_failed_transaction_rate.ts | 10 +-- .../plugins/apm/server/plugin.ts | 23 ++++-- .../fetch_agents_latest_version.ts | 6 +- .../agent_explorer/get_agent_instances.ts | 2 +- .../get_agent_url_repository.ts | 2 +- .../routes/agent_explorer/get_agents.ts | 6 +- .../routes/agent_explorer/get_agents_items.ts | 6 +- .../apm/server/routes/agent_explorer/route.ts | 12 +-- .../routes/agent_keys/create_agent_key.ts | 4 +- .../routes/agent_keys/get_agent_keys.ts | 4 +- .../agent_keys/get_agent_keys_privileges.ts | 4 +- .../routes/agent_keys/invalidate_agent_key.ts | 2 +- .../apm/server/routes/agent_keys/route.ts | 12 ++- .../routes/alerts/alerting_es_client.ts | 4 +- .../routes/alerts/register_apm_rule_types.ts | 15 ++-- .../plugins/apm/server/routes/alerts/route.ts | 2 +- .../register_anomaly_rule_type.test.ts | 4 +- .../anomaly/register_anomaly_rule_type.ts | 22 +++--- .../get_error_count_chart_preview.ts | 10 +-- .../register_error_count_rule_type.ts | 19 +++-- .../rule_types/get_apm_alert_source_fields.ts | 2 +- .../average_or_percentile_agg.ts | 2 +- .../get_transaction_duration_chart_preview.ts | 14 ++-- ...register_transaction_duration_rule_type.ts | 24 +++--- ...et_transaction_error_rate_chart_preview.ts | 12 ++- ...gister_transaction_error_rate_rule_type.ts | 22 +++--- .../get_filtered_series_for_preview_chart.ts | 2 +- .../server/routes/alerts/test_utils/index.ts | 13 ++-- .../apm_routes/create_apm_server_route.ts | 4 +- .../get_global_apm_server_route_repository.ts | 2 +- .../register_apm_server_routes.test.ts | 11 +-- .../apm_routes/register_apm_server_routes.ts | 19 +++-- .../get_apm_downstream_dependencies/index.ts | 4 +- .../get_apm_service_list/index.ts | 10 +-- .../get_apm_service_summary/get_anomalies.ts | 4 +- .../get_apm_service_summary/index.ts | 13 ++-- .../get_apm_timeseries/fetch_timeseries.ts | 10 +-- .../get_exit_span_latency.ts | 4 +- .../get_transaction_latency.ts | 6 +- .../get_apm_timeseries/index.ts | 2 +- .../get_changepoints/index.ts | 5 +- .../get_log_categories/index.ts | 9 ++- .../get_log_rate_analysis_for_alert/index.ts | 4 +- .../get_apm_errors.ts | 2 +- .../get_container_id_from_signals.ts | 12 +-- .../get_downstream_dependency_name.ts | 2 +- .../get_service_name_from_signals.ts | 8 +- .../index.ts | 13 ++-- .../queries/fetch_duration_correlation.ts | 2 +- ...tch_duration_correlation_with_histogram.ts | 4 +- .../fetch_duration_field_candidates.ts | 4 +- .../queries/fetch_duration_fractions.ts | 4 +- .../fetch_duration_histogram_range_steps.ts | 6 +- .../queries/fetch_duration_percentiles.ts | 6 +- .../queries/fetch_duration_ranges.ts | 6 +- ...etch_failed_events_correlation_p_values.ts | 6 +- .../queries/fetch_field_value_pairs.ts | 4 +- .../correlations/queries/fetch_p_values.ts | 4 +- .../queries/fetch_significant_correlations.ts | 2 +- .../fetch_field_value_field_stats.ts | 10 +-- .../queries/get_common_correlations_query.ts | 4 +- .../apm/server/routes/correlations/route.ts | 20 +++-- .../get_custom_dashboards.ts | 6 +- .../get_entities_with_dashboards.ts | 6 +- .../get_services_with_dashboards.ts | 6 +- .../remove_service_dashboard.ts | 2 +- .../server/routes/custom_dashboards/route.ts | 2 +- .../save_service_dashboard.ts | 6 +- .../data_view/create_static_data_view.test.ts | 10 +-- .../data_view/create_static_data_view.ts | 9 ++- .../apm/server/routes/data_view/route.ts | 3 +- .../server/routes/debug_telemetry/route.ts | 2 +- .../apm/server/routes/default_api_types.ts | 2 +- .../get_dependency_latency_distribution.ts | 6 +- .../get_error_rate_charts_for_dependency.ts | 2 +- .../get_latency_charts_for_dependency.ts | 2 +- .../get_metadata_for_dependency.ts | 2 +- .../get_throughput_charts_for_dependency.ts | 2 +- .../dependencies/get_top_dependencies.ts | 8 +- .../get_top_dependency_operations.ts | 4 +- .../dependencies/get_top_dependency_spans.ts | 6 +- .../get_upstream_services_for_dependency.ts | 6 +- .../apm/server/routes/dependencies/route.ts | 39 ++++------ .../diagnostics/bundle/get_apm_events.ts | 5 +- .../diagnostics/bundle/get_data_streams.ts | 2 +- .../bundle/get_existing_index_templates.ts | 2 +- .../diagnostics/bundle/get_field_caps.ts | 2 +- .../diagnostics/bundle/get_index_template.ts | 4 +- .../get_index_templates_by_index_pattern.ts | 4 +- .../routes/diagnostics/bundle/get_indices.ts | 2 +- .../diagnostics/bundle/get_indices_states.ts | 2 +- .../bundle/get_non_data_stream_indices.ts | 2 +- .../diagnostics/get_diagnostics_bundle.ts | 2 +- .../diagnostics/get_elasticsearch_version.ts | 2 +- .../diagnostics/get_fleet_package_info.ts | 2 +- .../helpers/get_apm_index_template_names.ts | 2 +- .../helpers/get_diagnostic_privileges.ts | 2 +- .../apm/server/routes/diagnostics/route.ts | 4 +- .../entities/utils/merge_entities.test.ts | 4 +- .../routes/entities/utils/merge_entities.ts | 2 +- .../environments/get_all_environments.test.ts | 3 +- .../environments/get_all_environments.ts | 2 +- .../routes/environments/get_environments.ts | 4 +- .../apm/server/routes/environments/route.ts | 2 +- .../routes/errors/distribution/get_buckets.ts | 2 +- .../errors/distribution/get_distribution.ts | 4 +- .../errors/distribution/queries.test.ts | 3 +- .../get_top_erroneous_transactions.ts | 2 +- .../get_error_group_detailed_statistics.ts | 4 +- .../get_error_group_main_statistics.ts | 4 +- .../get_error_group_sample_ids.ts | 2 +- .../get_error_sample_details.ts | 6 +- .../plugins/apm/server/routes/errors/route.ts | 33 +++----- .../add_api_keys_to_policies_if_missing.ts | 8 +- .../fleet/api_keys/create_apm_api_keys.ts | 2 +- .../fleet/create_cloud_apm_package_policy.ts | 10 +-- .../apm/server/routes/fleet/get_agents.ts | 8 +- .../routes/fleet/get_apm_package_policies.ts | 4 +- .../get_apm_package_policy_definition.ts | 6 +- .../fleet/get_cloud_apm_package_policy.ts | 8 +- .../routes/fleet/get_latest_apm_package.ts | 4 +- .../fleet/get_package_policy_decorators.ts | 6 +- .../get_unsupported_apm_server_schema.test.ts | 2 +- .../get_unsupported_apm_server_schema.ts | 2 +- .../apm/server/routes/fleet/is_superuser.ts | 2 +- .../fleet/merge_package_policy_with_apm.ts | 8 +- .../fleet/register_fleet_policy_callbacks.ts | 6 +- .../plugins/apm/server/routes/fleet/route.ts | 16 ++-- .../routes/fleet/run_migration_check.ts | 4 +- .../server/routes/fleet/source_maps.test.ts | 3 +- .../apm/server/routes/fleet/source_maps.ts | 8 +- ...c_agent_configs_to_apm_package_policies.ts | 10 +-- .../has_historical_agent_data.ts | 2 +- .../has_historical_entities_data.ts | 4 +- .../routes/infrastructure/get_host_names.ts | 2 +- .../infrastructure/get_infrastructure_data.ts | 2 +- .../get_overall_latency_distribution.ts | 6 +- .../get_percentile_threshold_value.ts | 6 +- .../routes/latency_distribution/route.ts | 4 +- .../server/routes/metrics/by_agent/default.ts | 4 +- .../gc/fetch_and_transform_gc_metrics.test.ts | 6 +- .../java/gc/fetch_and_transform_gc_metrics.ts | 6 +- .../by_agent/java/gc/get_gc_rate_chart.ts | 6 +- .../by_agent/java/gc/get_gc_time_chart.ts | 6 +- .../by_agent/java/heap_memory/index.ts | 6 +- .../routes/metrics/by_agent/java/index.ts | 4 +- .../by_agent/java/non_heap_memory/index.ts | 6 +- .../metrics/by_agent/java/otel_cpu/index.ts | 6 +- .../by_agent/java/thread_count/index.ts | 6 +- .../metrics/by_agent/shared/cpu/index.ts | 6 +- .../metrics/by_agent/shared/memory/index.ts | 6 +- .../metrics/fetch_and_transform_metrics.ts | 12 +-- .../get_metrics_chart_data_by_agent.ts | 6 +- .../routes/metrics/get_service_nodes.ts | 2 +- .../server/routes/metrics/has_otel_metrics.ts | 2 +- .../apm/server/routes/metrics/queries.test.ts | 3 +- .../apm/server/routes/metrics/route.ts | 5 +- .../get_active_instances_overview.ts | 4 +- .../get_active_instances_timeseries.ts | 6 +- .../serverless/get_cold_start_count_chart.ts | 6 +- .../get_cold_start_duration_chart.ts | 6 +- .../serverless/get_compute_usage_chart.ts | 6 +- .../get_serverless_agent_metrics_chart.ts | 8 +- .../get_serverless_function_latency_chart.ts | 13 ++-- .../get_serverless_functions_overview.ts | 2 +- .../serverless/get_serverless_summary.ts | 2 +- .../routes/metrics/serverless/helper.ts | 2 +- .../server/routes/metrics/serverless/route.ts | 23 ++---- .../apm/server/routes/metrics/types.ts | 2 +- .../crashes/distribution/get_buckets.ts | 2 +- .../crashes/distribution/get_distribution.ts | 4 +- .../crashes/distribution/queries.test.ts | 3 +- .../get_crash_group_main_statistics.ts | 4 +- ..._mobile_crash_group_detailed_statistics.ts | 4 +- .../apm/server/routes/mobile/crashes/route.ts | 15 ++-- ..._mobile_error_group_detailed_statistics.ts | 4 +- .../get_mobile_error_group_main_statistics.ts | 4 +- .../get_mobile_errors_terms_by_field.ts | 2 +- .../mobile/errors/get_mobile_http_errors.ts | 4 +- .../apm/server/routes/mobile/errors/route.ts | 21 ++---- .../server/routes/mobile/get_device_os_app.ts | 2 +- .../mobile/get_mobile_average_launch_time.ts | 6 +- .../routes/mobile/get_mobile_crash_rate.ts | 6 +- .../mobile/get_mobile_crashes_by_location.ts | 2 +- ...get_mobile_detailed_statistics_by_field.ts | 4 +- .../routes/mobile/get_mobile_filters.ts | 5 +- .../routes/mobile/get_mobile_http_requests.ts | 6 +- .../get_mobile_http_requests_by_location.ts | 2 +- .../mobile/get_mobile_launches_by_location.ts | 2 +- .../mobile/get_mobile_location_stats.ts | 4 +- .../get_mobile_main_statistics_by_field.ts | 2 +- .../get_mobile_most_used_charts/index.ts | 5 +- .../routes/mobile/get_mobile_sessions.ts | 6 +- .../mobile/get_mobile_sessions_by_location.ts | 2 +- .../server/routes/mobile/get_mobile_stats.ts | 4 +- .../mobile/get_mobile_terms_by_field.ts | 2 +- .../apm/server/routes/mobile/get_nct.ts | 2 +- .../plugins/apm/server/routes/mobile/route.ts | 38 +++++----- .../get_observability_overview_data.ts | 2 +- .../get_service_count.ts | 2 +- .../get_transactions_per_minute.ts | 2 +- .../routes/observability_overview/has_data.ts | 2 +- .../routes/observability_overview/route.ts | 9 +-- .../routes/profiling/fetch_flamegraph.ts | 4 +- .../routes/profiling/fetch_functions.ts | 4 +- .../service_groups/delete_service_group.ts | 2 +- .../service_groups/get_service_group.ts | 9 +-- .../get_service_group_alerts.ts | 10 +-- .../service_groups/get_service_groups.ts | 5 +- .../service_groups/get_services_counts.ts | 6 +- .../routes/service_groups/lookup_services.ts | 4 +- .../apm/server/routes/service_groups/route.ts | 6 +- .../service_groups/save_service_group.ts | 9 +-- .../fetch_service_paths_from_trace_ids.ts | 4 +- .../service_map/get_service_anomalies.ts | 2 +- .../routes/service_map/get_service_map.ts | 14 ++-- .../get_service_map_dependency_node_info.ts | 4 +- .../get_service_map_from_trace_ids.test.ts | 2 +- .../get_service_map_from_trace_ids.ts | 6 +- .../get_service_map_service_node_info.ts | 4 +- .../routes/service_map/get_service_stats.ts | 2 +- .../service_map/get_trace_sample_ids.ts | 4 +- .../service_map/group_resource_nodes.test.ts | 2 +- .../service_map/group_resource_nodes.ts | 6 +- .../apm/server/routes/service_map/route.ts | 14 ++-- .../transform_service_map_responses.test.ts | 6 +- .../transform_service_map_responses.ts | 11 +-- .../get_derived_service_annotations.ts | 5 +- .../annotations/get_stored_annotations.ts | 9 ++- .../routes/services/annotations/index.ts | 8 +- .../routes/services/get_service_agent.ts | 5 +- .../services/get_service_dependencies.ts | 6 +- .../get_service_dependencies_breakdown.ts | 4 +- ...get_service_instance_container_metadata.ts | 4 +- .../get_service_instance_metadata_details.ts | 16 ++-- .../detailed_statistics.ts | 6 +- ...vice_instances_system_metric_statistics.ts | 4 +- ...ervice_instances_transaction_statistics.ts | 6 +- .../get_service_instances/main_statistics.ts | 6 +- .../services/get_service_metadata_details.ts | 6 +- .../services/get_service_metadata_icons.ts | 8 +- .../services/get_service_node_metadata.ts | 6 +- ...get_service_overview_container_metadata.ts | 2 +- ...e_transaction_group_detailed_statistics.ts | 10 +-- .../get_service_transaction_groups.ts | 8 +- .../get_service_transaction_groups_alerts.ts | 2 +- .../services/get_service_transaction_types.ts | 6 +- .../get_services/get_health_statuses.ts | 8 +- .../get_services/get_service_alerts.ts | 4 +- .../get_service_names_from_terms_enum.ts | 4 +- .../get_service_transaction_stats.ts | 12 +-- .../get_services/get_services_items.ts | 19 ++--- .../get_services_without_transactions.ts | 10 +-- .../get_services/merge_service_stats.test.ts | 2 +- .../get_services/merge_service_stats.ts | 12 +-- ...service_transaction_detailed_statistics.ts | 8 +- .../get_services_detailed_statistics/index.ts | 8 +- .../server/routes/services/get_throughput.ts | 10 +-- .../apm/server/routes/services/route.ts | 75 +++++++++---------- .../convert_settings_to_string.ts | 2 +- .../create_agent_config_index.ts | 5 +- .../create_or_update_configuration.ts | 4 +- .../delete_configuration.ts | 2 +- .../find_exact_configuration.ts | 6 +- .../get_agent_config_etag_metrics.ts | 2 +- .../get_agent_name_by_service.ts | 2 +- .../get_existing_environments_for_service.ts | 2 +- .../get_environments/index.ts | 4 +- .../list_configurations.ts | 8 +- .../mark_applied_by_agent.ts | 4 +- .../agent_configuration/queries.test.ts | 3 +- .../settings/agent_configuration/route.ts | 9 ++- .../search_configurations.ts | 4 +- .../settings/anomaly_detection/route.ts | 4 +- .../anomaly_detection/update_to_v3.ts | 8 +- .../settings/apm_indices/get_apm_indices.ts | 2 +- .../routes/settings/apm_indices/route.ts | 5 +- .../custom_link/create_custom_link_index.ts | 5 +- .../create_or_update_custom_link.test.ts | 4 +- .../create_or_update_custom_link.ts | 4 +- .../custom_link/delete_custom_link.ts | 2 +- .../custom_link/get_transaction.test.ts | 3 +- .../settings/custom_link/get_transaction.ts | 6 +- .../routes/settings/custom_link/helper.ts | 2 +- .../custom_link/list_custom_links.test.ts | 3 +- .../settings/custom_link/list_custom_links.ts | 10 +-- .../routes/settings/custom_link/route.ts | 4 +- .../bulk_create_apm_source_maps.ts | 6 +- .../source_maps/create_apm_source_map.ts | 8 +- .../create_apm_source_map_index_template.ts | 4 +- .../source_maps/delete_apm_sourcemap.ts | 2 +- .../apm/server/routes/source_maps/route.ts | 8 +- .../schedule_source_map_migration.ts | 14 ++-- .../routes/source_maps/sourcemap_utils.ts | 5 +- .../routes/span_links/get_linked_children.ts | 2 +- .../routes/span_links/get_linked_parents.ts | 6 +- .../span_links/get_span_links_details.ts | 8 +- .../apm/server/routes/span_links/route.ts | 2 +- .../get_service_statistics.ts | 8 +- .../storage_explorer/get_size_timeseries.ts | 6 +- .../storage_explorer/get_storage_details.ts | 12 +-- .../get_storage_details_per_service.ts | 6 +- .../get_summary_statistics.ts | 6 +- .../get_total_transactions_per_service.ts | 4 +- .../has_storage_explorer_privileges.ts | 4 +- .../storage_explorer/indices_stats_helpers.ts | 6 +- .../is_cross_cluster_search.test.ts | 2 +- .../is_cross_cluster_search.ts | 2 +- .../server/routes/storage_explorer/route.ts | 18 ++--- ...suggestions_with_terms_aggregation.test.ts | 2 +- .../get_suggestions_with_terms_aggregation.ts | 2 +- .../get_suggestions_with_terms_enum.ts | 2 +- .../routes/time_range_metadata/route.ts | 2 +- .../traces/get_aggregated_critical_path.ts | 10 +-- .../traces/get_top_traces_primary_stats.ts | 6 +- .../server/routes/traces/get_trace_items.ts | 12 +-- .../traces/get_trace_samples_by_query.ts | 4 +- .../apm/server/routes/traces/queries.test.ts | 3 +- .../plugins/apm/server/routes/traces/route.ts | 19 ++--- .../transactions/breakdown/index.test.ts | 2 +- .../routes/transactions/breakdown/index.ts | 4 +- .../get_failed_transaction_rate_periods.ts | 10 +-- .../transactions/get_latency_charts/index.ts | 12 +-- .../routes/transactions/get_span/index.ts | 8 +- .../transactions/get_transaction/index.ts | 2 +- .../get_transaction_by_name/index.ts | 4 +- .../get_transaction_by_trace/index.ts | 2 +- .../routes/transactions/queries.test.ts | 3 +- .../apm/server/routes/transactions/route.ts | 39 ++++------ .../transactions/trace_samples/index.ts | 4 +- .../plugins/apm/server/routes/typings.ts | 2 +- .../saved_objects/apm_custom_dashboards.ts | 2 +- .../saved_objects/apm_server_settings.ts | 2 +- .../saved_objects/apm_service_groups.ts | 2 +- .../apm/server/saved_objects/apm_telemetry.ts | 2 +- .../create_apm_users/helpers/call_kibana.ts | 5 +- .../helpers/create_custom_role.ts | 5 +- .../helpers/create_or_update_user.ts | 2 +- .../create_apm_users/helpers/get_version.ts | 2 +- .../apm/server/tutorial/envs/elastic_cloud.ts | 5 +- .../apm/server/tutorial/envs/on_prem.ts | 3 +- .../on_prem_apm_server_instruction_set.ts | 3 +- .../plugins/apm/server/tutorial/index.ts | 7 +- .../observability/plugins/apm/server/types.ts | 16 ++-- .../server/utils/create_typed_es_client.ts | 4 +- .../plugins/apm/server/utils/test_helpers.tsx | 8 +- .../plugins/apm/typings/apm_rum_react.d.ts | 2 +- .../plugins/apm/typings/timeseries.ts | 4 +- .../common/time_range_metadata.ts | 2 +- .../utils/get_bucket_size/calculate_auto.ts | 3 +- ...ferred_bucket_size_and_data_source.test.ts | 2 +- ...t_preferred_bucket_size_and_data_source.ts | 2 +- .../plugins/apm_data_access/server/index.ts | 5 +- .../server/lib/check_privileges.ts | 6 +- .../create_es_client/call_async_with_debug.ts | 2 +- .../create_apm_event_client/index.test.ts | 2 +- .../create_apm_event_client/index.ts | 2 +- .../server/lib/helpers/transactions/index.ts | 2 +- .../plugins/apm_data_access/server/plugin.ts | 9 ++- .../server/saved_objects/apm_indices.ts | 6 +- ...grate_legacy_apm_indices_to_space_aware.ts | 2 +- .../saved_objects/save_apm_indices.test.ts | 2 +- .../get_document_sources.ts | 4 +- .../services/get_document_sources/index.ts | 2 +- .../get_document_type_config/index.ts | 2 +- .../server/services/get_host_names/index.ts | 2 +- .../services/get_host_services/index.ts | 4 +- .../server/services/get_services.ts | 2 +- .../plugins/apm_data_access/server/types.ts | 4 +- .../server/utils/unflatten_known_fields.ts | 6 +- .../server/utils/with_apm_span.ts | 3 +- .../logs/log_threshold/query_helpers.ts | 3 +- .../alerting/metrics/alert_link.test.ts | 4 +- .../common/alerting/metrics/alert_link.ts | 4 +- .../infra/common/alerting/metrics/types.ts | 10 +-- .../plugins/infra/common/constants.ts | 3 +- .../plugins/infra/common/custom_dashboards.ts | 2 +- .../formatters/get_custom_metric_label.ts | 2 +- .../plugins/infra/common/formatters/index.ts | 2 +- .../v1/create_inventory_view.ts | 3 +- .../inventory_views/v1/get_inventory_view.ts | 2 +- .../v1/update_inventory_view.ts | 3 +- .../v1/create_metrics_explorer_view.ts | 6 +- .../v1/get_metrics_explorer_view.ts | 2 +- .../v1/update_metrics_explorer_view.ts | 6 +- .../common/log_analysis/job_parameters.ts | 2 +- .../log_search_result/log_search_result.ts | 3 +- .../log_search_summary/log_search_summary.ts | 2 +- .../common/metrics_explorer_views/defaults.ts | 7 +- .../infra/common/metrics_sources/index.ts | 2 +- .../plugins/infra/common/saved_views/types.ts | 2 +- .../common/source_configuration/defaults.ts | 2 +- .../plugins/infra/common/time/time_scale.ts | 3 +- .../plugins/infra/common/typed_json.ts | 2 +- .../infra/common/url_state_storage_service.ts | 5 +- .../components/metrics_alert_dropdown.tsx | 2 +- .../common/components/threshold.stories.tsx | 5 +- .../common/components/threshold.test.tsx | 3 +- .../alerting/common/components/threshold.tsx | 2 +- .../criterion_preview_chart.tsx | 8 +- .../threshold_annotations.tsx | 3 +- .../group_by_expression.tsx | 2 +- .../common/group_by_expression/selector.tsx | 2 +- .../inventory/components/alert_flyout.tsx | 4 +- .../inventory/components/expression.test.tsx | 10 ++- .../inventory/components/expression.tsx | 34 +++------ .../inventory/components/expression_chart.tsx | 6 +- .../manage_alerts_context_menu_item.tsx | 2 +- .../alerting/inventory/components/metric.tsx | 8 +- .../inventory/components/node_type.tsx | 2 +- .../inventory/components/validation.tsx | 7 +- .../hooks/use_inventory_alert_prefill.ts | 4 +- .../infra/public/alerting/inventory/index.ts | 10 +-- .../inventory/rule_data_formatters.ts | 2 +- .../components/log_rate_analysis.tsx | 17 +++-- .../threhsold_chart/create_lens_definition.ts | 5 +- .../log_threshold_count_chart.tsx | 8 +- .../log_threshold_ratio_chart.tsx | 8 +- .../alert_details_app_section/index.tsx | 2 +- .../log_rate_analysis_query.ts | 4 +- .../alert_details_app_section/types.ts | 6 +- .../components/expression_editor/criteria.tsx | 6 +- .../expression_editor/criterion.tsx | 4 +- .../criterion_preview_chart.tsx | 17 ++--- .../components/expression_editor/editor.tsx | 26 ++++--- .../hooks/use_chart_preview_data.tsx | 12 +-- .../expression_editor/log_view_switcher.tsx | 2 +- .../expression_editor/threshold.tsx | 4 +- .../expression_editor/type_switcher.tsx | 4 +- .../log_threshold/log_threshold_rule_type.tsx | 12 ++- .../alerting/log_threshold/validation.ts | 10 ++- .../components/alert_details_app_section.tsx | 8 +- .../components/alert_flyout.tsx | 4 +- .../custom_equation_editor.stories.tsx | 14 ++-- .../custom_equation_editor.tsx | 12 +-- .../custom_equation/metric_row_with_agg.tsx | 9 ++- .../custom_equation/metric_row_with_count.tsx | 5 +- .../components/custom_equation/types.ts | 6 +- .../components/expression.test.tsx | 4 +- .../components/expression.tsx | 16 ++-- .../components/expression_chart.test.tsx | 9 ++- .../components/expression_chart.tsx | 25 ++----- .../components/expression_row.test.tsx | 7 +- .../components/expression_row.tsx | 9 ++- .../components/validation.tsx | 7 +- .../use_metric_threshold_alert_prefill.ts | 2 +- .../hooks/use_metrics_explorer_chart_data.ts | 8 +- .../public/alerting/metric_threshold/index.ts | 14 ++-- .../lib/generate_unique_key.test.ts | 2 +- .../lib/generate_unique_key.ts | 2 +- .../lib/transform_metrics_explorer_data.ts | 4 +- .../mocks/metric_threshold_rule.ts | 5 +- .../metric_threshold/rule_data_formatters.ts | 4 +- .../public/alerting/metric_threshold/types.ts | 6 +- .../infra/public/apps/common_providers.tsx | 11 +-- .../plugins/infra/public/apps/logs_app.tsx | 11 +-- .../plugins/infra/public/apps/metrics_app.tsx | 10 +-- .../__stories__/context/fixtures/anomalies.ts | 2 +- .../__stories__/context/fixtures/metadata.ts | 2 +- .../__stories__/context/fixtures/processes.ts | 2 +- .../asset_details/__stories__/decorator.tsx | 5 +- .../add_metrics_callout/constants.ts | 6 +- .../add_metrics_callout/index.tsx | 11 ++- .../components/asset_details/charts/chart.tsx | 3 +- .../asset_details/charts/chart_utils.test.ts | 5 +- .../asset_details/charts/chart_utils.ts | 9 ++- .../asset_details/charts/docker_charts.tsx | 2 +- .../asset_details/charts/host_charts.tsx | 2 +- .../charts/kubernetes_charts.tsx | 2 +- .../components/metadata_explanation.tsx | 2 +- .../asset_details/content/callouts.tsx | 2 +- .../callouts/legacy_metric_callout.tsx | 4 +- .../asset_details/context_providers.tsx | 2 +- .../use_container_metrics_charts.test.ts | 2 +- .../hooks/use_container_metrics_charts.ts | 2 +- .../asset_details/hooks/use_date_picker.ts | 2 +- .../hooks/use_host_metrics_charts.test.ts | 2 +- .../hooks/use_host_metrics_charts.ts | 2 +- .../hooks/use_intersecting_state.ts | 3 +- .../asset_details/hooks/use_log_charts.ts | 2 +- .../asset_details/hooks/use_metadata.ts | 2 +- .../asset_details/hooks/use_metadata_state.ts | 2 +- .../links/link_to_apm_service.tsx | 2 +- .../actions/save_dashboard_modal.tsx | 2 +- .../tabs/dashboards/dashboard_selector.tsx | 2 +- .../tabs/dashboards/dashboards.tsx | 7 +- .../asset_details/tabs/logs/logs.tsx | 7 +- .../tabs/metadata/add_pin_to_row.tsx | 3 +- .../tabs/metadata/build_metadata_filter.ts | 3 +- .../asset_details/tabs/metadata/table.tsx | 9 +-- .../tabs/metrics/host_metrics.tsx | 2 +- .../tabs/metrics/metrics_template.tsx | 2 +- .../metadata_summary_list.tsx | 2 +- .../tabs/overview/metrics/metrics.tsx | 2 +- .../asset_details/tabs/overview/overview.tsx | 2 +- .../tabs/processes/process_row.tsx | 2 +- .../tabs/processes/process_row_charts.tsx | 8 +- .../tabs/processes/processes.tsx | 2 +- .../asset_details/tabs/processes/types.ts | 2 +- .../tabs/profiling/profiling_links.tsx | 2 +- .../asset_details/template/page.tsx | 2 +- .../public/components/asset_details/types.ts | 4 +- .../autocomplete_field/autocomplete_field.tsx | 2 +- .../autocomplete_field/suggestion_item.tsx | 3 +- .../components/empty_states/no_indices.tsx | 2 +- .../public/components/fixed_datepicker.tsx | 3 +- .../public/components/help_center_content.tsx | 3 +- .../public/components/lens/lens_chart.tsx | 4 +- .../public/components/lens/lens_wrapper.tsx | 4 +- .../metric_explanation/tooltip_content.tsx | 3 +- .../loading/__examples__/index.stories.tsx | 2 +- .../components/loading_overlay_wrapper.tsx | 3 +- .../infra/public/components/loading_page.tsx | 3 +- .../log_stream_react_embeddable.tsx | 11 +-- .../public/components/log_stream/types.ts | 8 +- .../logging/inline_log_view_splash_page.tsx | 2 +- .../notices_section.tsx | 2 +- .../quality_warning_notices.stories.tsx | 2 +- .../quality_warning_notices.tsx | 4 +- .../recreate_job_callout.tsx | 3 +- .../datasets_selector.tsx | 3 +- .../log_analysis_setup/create_job_button.tsx | 3 +- .../analysis_setup_indices_form.tsx | 6 +- .../analysis_setup_timerange_form.tsx | 5 +- .../index_setup_dataset_filter.tsx | 4 +- .../index_setup_row.tsx | 4 +- .../initial_configuration_step.tsx | 9 +-- .../initial_configuration_step/validation.tsx | 5 +- .../log_analysis_setup/manage_jobs_button.tsx | 3 +- .../missing_setup_privileges_tooltip.tsx | 3 +- .../process_step/process_step.tsx | 4 +- .../setup_flyout/module_list_card.tsx | 2 +- .../setup_flyout/setup_flyout.tsx | 6 +- .../user_management_link.tsx | 3 +- .../components/logging/log_datepicker.tsx | 9 +-- .../log_entry_examples/log_entry_examples.tsx | 3 +- .../logging/log_minimap/density_chart.tsx | 2 +- .../logging/log_minimap/log_minimap.tsx | 2 +- .../logging/log_minimap/search_marker.tsx | 5 +- .../log_minimap/search_marker_tooltip.tsx | 3 +- .../logging/log_minimap/search_markers.tsx | 5 +- .../log_search_buttons.tsx | 2 +- .../log_search_controls.tsx | 2 +- .../logging/log_text_scale_controls.tsx | 3 +- .../components/logs_deprecation_callout.tsx | 5 +- .../anomalies_table/annomaly_summary.tsx | 2 +- .../anomalies_table/anomalies_table.tsx | 19 ++--- .../ml/anomaly_detection/job_setup_screen.tsx | 3 +- .../saved_views/manage_views_flyout.tsx | 4 +- .../saved_views/toolbar_control.tsx | 4 +- .../components/saved_views/upsert_modal.tsx | 4 +- .../shared/alerts/alerts_overview.tsx | 4 +- .../shared/alerts/alerts_status_filter.tsx | 3 +- .../alerts/links/link_to_alerts_page.test.tsx | 3 +- .../shared/templates/infra_page_template.tsx | 5 +- .../shared/templates/no_data_config.ts | 4 +- .../infra/public/components/try_it_button.tsx | 5 +- .../header_action_menu_provider.tsx | 5 +- .../containers/kbn_url_state_context.ts | 4 +- .../get_latest_categories_datasets_stats.ts | 8 +- .../logs/log_analysis/api/ml_cleanup.ts | 2 +- .../api/ml_get_jobs_summary_api.ts | 2 +- .../logs/log_analysis/api/validate_indices.ts | 2 +- .../log_analysis_capabilities.tsx | 6 +- .../log_analysis/log_analysis_cleanup.tsx | 2 +- .../logs/log_analysis/log_analysis_module.tsx | 6 +- .../log_analysis_module_configuration.ts | 6 +- .../log_analysis_module_definition.tsx | 8 +- .../log_analysis_module_status.tsx | 17 ++--- .../log_analysis/log_analysis_module_types.ts | 14 ++-- .../log_analysis/log_analysis_setup_state.ts | 8 +- .../log_entry_categories/module_descriptor.ts | 10 ++- .../use_log_entry_categories_module.tsx | 4 +- .../use_log_entry_categories_quality.ts | 10 +-- .../log_entry_rate/module_descriptor.ts | 7 +- .../use_log_entry_rate_module.tsx | 4 +- .../view_log_in_context.ts | 2 +- .../containers/logs/with_log_textview.tsx | 7 +- .../containers/metrics_source/source.tsx | 2 +- .../containers/ml/infra_ml_capabilities.tsx | 6 +- .../public/containers/ml/infra_ml_cleanup.tsx | 2 +- .../public/containers/ml/infra_ml_module.tsx | 2 +- .../ml/infra_ml_module_configuration.ts | 4 +- .../ml/infra_ml_module_definition.tsx | 6 +- .../containers/ml/infra_ml_module_status.tsx | 15 ++-- .../containers/ml/infra_ml_module_types.ts | 12 +-- .../ml/modules/metrics_hosts/module.tsx | 2 +- .../metrics_hosts/module_descriptor.ts | 12 +-- .../ml/modules/metrics_k8s/module.tsx | 2 +- .../modules/metrics_k8s/module_descriptor.ts | 12 +-- .../containers/plugin_config_context.ts | 2 +- .../containers/react_query_provider.tsx | 3 +- .../containers/triggers_actions_context.tsx | 5 +- .../containers/with_kuery_autocompletion.tsx | 11 +-- .../public/hooks/use_alerts_count.test.ts | 7 +- .../infra/public/hooks/use_alerts_count.ts | 4 +- .../infra/public/hooks/use_document_title.tsx | 2 +- .../infra/public/hooks/use_fetcher.tsx | 9 ++- .../infra/public/hooks/use_inventory_views.ts | 6 +- .../infra/public/hooks/use_is_dark_mode.ts | 2 +- .../plugins/infra/public/hooks/use_kibana.tsx | 21 ++---- .../hooks/use_kibana_index_patterns.mock.tsx | 11 +-- .../hooks/use_kibana_timefilter_time.tsx | 2 +- .../infra/public/hooks/use_lazy_ref.ts | 3 +- .../public/hooks/use_lens_attributes.test.ts | 2 +- .../infra/public/hooks/use_lens_attributes.ts | 2 +- .../public/hooks/use_log_view_reference.ts | 3 +- .../public/hooks/use_logs_breadcrumbs.tsx | 2 +- .../public/hooks/use_metrics_breadcrumbs.tsx | 2 +- .../hooks/use_metrics_explorer_views.ts | 8 +- .../infra/public/hooks/use_observable.ts | 10 +-- .../hooks/use_parent_breadcrumb_resolver.ts | 2 +- .../infra/public/hooks/use_sorting.tsx | 2 +- .../public/hooks/use_timeline_chart_theme.ts | 2 +- .../infra/public/hooks/use_tracked_promise.ts | 3 +- .../infra/public/hooks/use_trial_status.tsx | 2 +- .../plugins/infra/public/index.ts | 4 +- .../public/metrics_overview_fetchers.test.ts | 4 +- .../infra/public/metrics_overview_fetchers.ts | 8 +- .../plugins/infra/public/mocks.tsx | 2 +- .../state/src/initial_parameters_service.ts | 12 +-- .../log_stream_page/state/src/selectors.ts | 6 +- .../state/src/state_machine.ts | 11 +-- .../log_stream_page/state/src/types.ts | 12 +-- .../src/notifications.ts | 2 +- .../src/state_machine.ts | 10 ++- .../log_stream_position_state/src/types.ts | 6 +- .../src/url_state_storage_service.ts | 7 +- .../src/notifications.ts | 4 +- .../src/search_bar_state_service.ts | 2 +- .../src/state_machine.ts | 12 +-- .../src/time_filter_state_service.ts | 9 ++- .../log_stream_query_state/src/types.ts | 13 +++- .../src/url_state_storage_service.ts | 7 +- .../src/validate_query_service.ts | 5 +- .../public/pages/link_to/link_to_logs.tsx | 3 +- .../public/pages/link_to/link_to_metrics.tsx | 3 +- .../public/pages/link_to/query_params.ts | 2 +- .../redirect_to_host_detail_via_ip.tsx | 2 +- .../pages/link_to/redirect_to_inventory.tsx | 5 +- .../pages/link_to/redirect_to_node_logs.tsx | 5 +- .../pages/link_to/use_host_ip_to_name.ts | 2 +- .../log_entry_categories/page_providers.tsx | 3 +- .../page_results_content.tsx | 10 +-- .../analyze_dataset_in_ml_action.tsx | 2 +- .../anomaly_severity_indicator_list.tsx | 2 +- .../top_categories/category_details_row.tsx | 4 +- .../category_example_message.tsx | 6 +- .../top_categories/datasets_action_list.tsx | 4 +- .../sections/top_categories/datasets_list.tsx | 2 +- .../log_entry_count_sparkline.tsx | 4 +- .../single_metric_sparkline.tsx | 2 +- .../top_categories/top_categories_section.tsx | 8 +- .../top_categories/top_categories_table.tsx | 13 ++-- .../get_log_entry_category_datasets.ts | 4 +- .../get_log_entry_category_examples.ts | 4 +- .../get_top_log_entry_categories.ts | 6 +- .../use_log_entry_categories_results.ts | 8 +- .../use_log_entry_category_examples.tsx | 6 +- .../logs/log_entry_rate/page_providers.tsx | 3 +- .../log_entry_rate/page_results_content.tsx | 4 +- .../anomalies_swimlane_visualisation.tsx | 4 +- .../sections/anomalies/expanded_row.tsx | 9 +-- .../sections/anomalies/index.tsx | 6 +- .../sections/anomalies/log_entry_example.tsx | 11 +-- .../sections/anomalies/table.tsx | 9 +-- .../service_calls/get_log_entry_anomalies.ts | 6 +- .../get_log_entry_anomalies_datasets.ts | 4 +- .../service_calls/get_log_entry_examples.ts | 4 +- .../log_entry_rate/use_dataset_filtering.ts | 2 +- .../use_log_entry_anomalies_results.ts | 8 +- .../log_entry_rate/use_log_entry_examples.ts | 6 +- .../use_log_entry_rate_results_url_state.tsx | 2 +- .../plugins/infra/public/pages/logs/page.tsx | 2 +- .../infra/public/pages/logs/page_content.tsx | 8 +- .../public/pages/logs/page_providers.tsx | 3 +- .../logs/settings/add_log_column_popover.tsx | 12 +-- .../pages/logs/settings/form_elements.tsx | 4 +- .../pages/logs/settings/form_field_props.tsx | 4 +- .../index_names_configuration_panel.tsx | 6 +- .../index_pattern_configuration_panel.tsx | 6 +- .../logs/settings/index_pattern_selector.tsx | 3 +- .../indices_configuration_form_state.ts | 8 +- .../indices_configuration_panel.stories.tsx | 14 ++-- .../settings/indices_configuration_panel.tsx | 11 +-- .../log_columns_configuration_form_state.tsx | 5 +- .../log_columns_configuration_panel.tsx | 14 ++-- .../name_configuration_form_state.tsx | 3 +- .../settings/name_configuration_panel.tsx | 4 +- .../source_configuration_form_errors.tsx | 2 +- .../source_configuration_form_state.tsx | 2 +- .../pages/logs/settings/validation_errors.ts | 2 +- .../call_get_log_analysis_id_formats.ts | 2 +- .../pages/logs/shared/page_log_view_error.tsx | 3 +- .../pages/logs/shared/page_template.tsx | 2 +- .../shared/use_log_ml_job_id_formats_shim.tsx | 2 +- .../components/stream_page_template.tsx | 3 +- .../public/pages/logs/stream/page_content.tsx | 10 +-- .../pages/logs/stream/page_logs_content.tsx | 21 +++--- .../pages/logs/stream/page_providers.tsx | 7 +- .../logs/stream/page_view_log_in_context.tsx | 2 +- .../components/chart/metric_chart_wrapper.tsx | 3 +- .../metrics/hosts/components/hosts_table.tsx | 3 +- .../search_bar/control_panels_config.ts | 2 +- .../search_bar/controls_content.tsx | 6 +- .../components/search_bar/limit_options.tsx | 4 +- .../search_bar/unified_search_bar.tsx | 2 +- .../add_data_troubleshooting_popover.tsx | 6 +- .../tabs/alerts/alerts_tab_content.tsx | 5 +- .../tabs/logs/logs_link_to_stream.tsx | 3 +- .../components/tabs/logs/logs_tab_content.tsx | 2 +- .../public/pages/metrics/hosts/constants.ts | 2 +- .../hosts/hooks/use_host_count.test.ts | 2 +- .../hosts/hooks/use_hosts_table.test.ts | 2 +- .../metrics/hosts/hooks/use_hosts_table.tsx | 10 +-- .../metrics/hosts/hooks/use_hosts_view.ts | 6 +- .../metrics/hosts/hooks/use_unified_search.ts | 5 +- .../hooks/use_unified_search_url_state.ts | 3 +- .../infra/public/pages/metrics/hosts/types.ts | 2 +- .../infra/public/pages/metrics/index.tsx | 8 +- .../components/bottom_drawer.tsx | 4 +- .../components/dropdown_button.tsx | 5 +- .../components/kubernetes_tour.tsx | 3 +- .../inventory_view/components/layout.tsx | 14 ++-- .../inventory_view/components/layout_view.tsx | 2 +- .../components/nodes_overview.tsx | 6 +- .../inventory_view/components/table_view.tsx | 9 ++- .../components/timeline/timeline.tsx | 16 ++-- .../toolbars/aws_ec2_toolbar_items.tsx | 2 +- .../metrics_and_groupby_toolbar_items.tsx | 2 +- .../components/toolbars/toolbar.tsx | 4 +- .../components/toolbars/toolbar_wrapper.tsx | 2 +- .../components/toolbars/types.ts | 8 +- .../waffle/conditional_tooltip.test.tsx | 7 +- .../components/waffle/conditional_tooltip.tsx | 11 +-- .../components/waffle/custom_field_panel.tsx | 2 +- .../components/waffle/gradient_legend.tsx | 2 +- .../components/waffle/group_name.tsx | 5 +- .../components/waffle/group_of_groups.tsx | 4 +- .../components/waffle/group_of_nodes.tsx | 4 +- .../components/waffle/legend.tsx | 4 +- .../components/waffle/legend_controls.tsx | 7 +- .../inventory_view/components/waffle/map.tsx | 9 ++- .../metric_control/custom_metric_form.tsx | 6 +- .../waffle/metric_control/index.tsx | 8 +- .../metric_control/metrics_context_menu.tsx | 10 ++- .../metric_control/metrics_edit_mode.tsx | 2 +- .../waffle/metric_control/mode_switcher.tsx | 4 +- .../inventory_view/components/waffle/node.tsx | 4 +- .../components/waffle/node_context_menu.tsx | 7 +- .../components/waffle/node_square.tsx | 5 +- .../waffle/stepped_gradient_legend.tsx | 2 +- .../components/waffle/steps_legend.tsx | 4 +- .../components/waffle/view_switcher.tsx | 3 +- .../waffle/waffle_accounts_controls.tsx | 5 +- .../waffle/waffle_group_by_controls.tsx | 12 ++- .../waffle/waffle_inventory_switcher.tsx | 5 +- .../waffle/waffle_region_controls.tsx | 3 +- .../waffle/waffle_sort_controls.tsx | 15 ++-- .../waffle/waffle_time_controls.tsx | 5 +- .../hooks/use_metrics_hosts_anomalies.ts | 12 +-- .../hooks/use_metrics_k8s_anomalies.ts | 10 ++- .../inventory_view/hooks/use_snaphot.ts | 4 +- .../inventory_view/hooks/use_timeline.ts | 2 +- .../hooks/use_waffle_filters.test.ts | 7 +- .../hooks/use_waffle_options.test.ts | 3 +- .../hooks/use_waffle_options.ts | 2 +- .../hooks/use_waffle_view_state.ts | 2 +- .../lib/apply_wafflemap_layout.ts | 2 +- .../lib/calculate_bounds_from_nodes.test.ts | 2 +- .../lib/calculate_bounds_from_nodes.ts | 4 +- .../inventory_view/lib/color_from_value.ts | 8 +- .../lib/convert_bounds_to_percents.ts | 2 +- .../lib/create_inventory_metric_formatter.ts | 8 +- .../inventory_view/lib/get_color_palette.ts | 2 +- .../inventory_view/lib/navigate_to_uptime.ts | 8 +- .../inventory_view/lib/nodes_to_wafflemap.ts | 4 +- .../inventory_view/lib/sort_nodes.test.ts | 2 +- .../metrics/inventory_view/lib/sort_nodes.ts | 4 +- .../metrics/inventory_view/lib/type_guards.ts | 2 +- .../components/chart_section_vis.tsx | 5 +- .../components/gauges_section_vis.tsx | 7 +- .../metric_detail/components/helpers.ts | 10 +-- .../metric_detail/components/layout.tsx | 4 +- .../components/metadata_details.tsx | 2 +- .../components/node_details_page.tsx | 9 ++- .../metric_detail/components/page_body.tsx | 6 +- .../components/page_error.test.tsx | 2 +- .../metric_detail/components/page_error.tsx | 2 +- .../metric_detail/components/section.tsx | 14 ++-- .../metric_detail/components/series_chart.tsx | 14 +--- .../metric_detail/components/side_nav.tsx | 2 +- .../metric_detail/components/sub_section.tsx | 7 +- .../components/time_controls.test.tsx | 2 +- .../components/time_controls.tsx | 5 +- .../containers/metadata_context.ts | 2 +- .../metric_detail/hooks/metrics_time.test.tsx | 3 +- .../metric_detail/lib/get_filtered_metrics.ts | 4 +- .../pages/metrics/metric_detail/types.ts | 6 +- .../components/aggregation.tsx | 6 +- .../metrics_explorer/components/chart.tsx | 18 ++--- .../components/chart_context_menu.test.tsx | 12 +-- .../components/chart_context_menu.tsx | 16 ++-- .../components/chart_options.tsx | 4 +- .../components/chart_title.tsx | 2 +- .../metrics_explorer/components/charts.tsx | 4 +- .../metrics_explorer/components/group_by.tsx | 2 +- .../components/helpers/calculate_domain.ts | 4 +- .../helpers/calculate_domian.test.ts | 4 +- .../helpers/create_formatter_for_metric.ts | 2 +- .../create_formatter_for_metrics.test.ts | 2 +- .../helpers/create_metric_label.test.ts | 2 +- .../components/helpers/create_metric_label.ts | 2 +- .../helpers/create_tsvb_link.test.ts | 2 +- .../components/helpers/create_tsvb_link.ts | 8 +- .../components/helpers/get_metric_id.ts | 2 +- .../helpers/metric_to_format.test.ts | 2 +- .../components/helpers/metric_to_format.ts | 2 +- .../metrics_explorer/components/kuery_bar.tsx | 2 +- .../metrics_explorer/components/metrics.tsx | 14 +--- .../components/saved_views.tsx | 2 +- .../components/series_chart.tsx | 18 ++--- .../metrics_explorer/components/toolbar.tsx | 4 +- .../hooks/use_metric_explorer_state.ts | 2 +- .../hooks/use_metrics_explorer_data.test.tsx | 16 ++-- .../hooks/use_metrics_explorer_data.ts | 13 ++-- .../use_metrics_explorer_options.test.tsx | 6 +- .../hooks/use_metrics_explorer_options.ts | 3 +- .../settings/features_configuration_panel.tsx | 4 +- .../indices_configuration_form_state.ts | 3 +- .../settings/indices_configuration_panel.tsx | 5 +- .../pages/metrics/settings/input_fields.tsx | 3 +- .../settings/ml_configuration_panel.tsx | 2 +- .../settings/name_configuration_panel.tsx | 2 +- .../source_configuration_form_state.tsx | 2 +- .../source_configuration_settings.tsx | 2 +- .../plugins/infra/public/plugin.ts | 14 ++-- .../inventory_views_client.mock.ts | 2 +- .../inventory_views/inventory_views_client.ts | 16 ++-- .../inventory_views_service.mock.ts | 2 +- .../metrics_explorer_views_client.mock.ts | 2 +- .../metrics_explorer_views_client.ts | 16 ++-- .../metrics_explorer_views_service.mock.ts | 2 +- .../telemetry/telemetry_client.mock.ts | 2 +- .../services/telemetry/telemetry_client.ts | 4 +- .../services/telemetry/telemetry_events.ts | 3 +- .../infra/public/test_utils/entries.ts | 2 +- .../plugins/infra/public/test_utils/index.ts | 2 +- .../test_utils/use_global_storybook_theme.tsx | 3 +- .../plugins/infra/public/types.ts | 26 +++---- .../flatten_data_search_response.ts | 2 +- .../normalize_data_search_responses.ts | 7 +- .../infra/public/utils/data_search/types.ts | 4 +- .../use_data_search_request.test.tsx | 4 +- .../data_search/use_data_search_request.ts | 5 +- .../use_data_search_response_state.ts | 4 +- ...test_partial_data_search_response.test.tsx | 4 +- ...use_latest_partial_data_search_response.ts | 9 ++- .../plugins/infra/public/utils/data_view.ts | 3 +- .../plugins/infra/public/utils/datemath.ts | 5 +- .../utils/filters/create_alerts_es_query.ts | 3 +- .../public/utils/fixtures/metrics_explorer.ts | 10 ++- .../plugins/infra/public/utils/kuery.ts | 2 +- .../utils/log_column_render_configuration.tsx | 4 +- .../public/utils/logs_overview_fetchers.ts | 4 +- .../utils/logs_overview_fetches.test.ts | 4 +- ...picker_quickranges_to_datepicker_ranges.ts | 4 +- .../utils/redirect_with_query_params.tsx | 3 +- .../public/utils/source_configuration.ts | 2 +- .../public/utils/theme_utils/with_attrs.tsx | 2 +- .../plugins/infra/public/utils/url_state.tsx | 5 +- .../plugins/infra/server/config.ts | 6 +- .../plugins/infra/server/index.ts | 2 +- .../plugins/infra/server/infra_server.ts | 2 +- .../lib/adapters/framework/adapter_types.ts | 42 +++++------ .../framework/kibana_framework_adapter.ts | 22 ++++-- .../lib/adapters/metrics/adapter_types.ts | 8 +- .../metrics/kibana_metrics_adapter.ts | 14 ++-- .../adapters/metrics/lib/check_valid_node.ts | 2 +- .../server/lib/alerting/common/messages.ts | 6 +- .../infra/server/lib/alerting/common/utils.ts | 16 ++-- .../evaluate_condition.ts | 14 ++-- ...nventory_metric_threshold_executor.test.ts | 12 +-- .../inventory_metric_threshold_executor.ts | 22 +++--- .../lib/calculate_from_based_on_metric.ts | 6 +- .../lib/convert_metric_value.ts | 2 +- .../lib/create_bucket_selector.test.ts | 2 +- .../lib/create_bucket_selector.ts | 6 +- .../lib/create_condition_script.ts | 2 +- .../lib/create_log_rate_aggs.ts | 2 +- .../lib/create_metric_aggregations.ts | 7 +- .../lib/create_rate_agg_with_interface.ts | 2 +- .../lib/create_rate_aggs.ts | 2 +- .../lib/create_request.ts | 9 ++- .../lib/get_data.ts | 8 +- .../lib/is_rate.test.ts | 4 +- .../inventory_metric_threshold/lib/is_rate.ts | 4 +- ...er_inventory_metric_threshold_rule_type.ts | 25 +++---- .../log_threshold_chart_preview.ts | 12 +-- .../log_threshold_executor.test.ts | 6 +- .../log_threshold/log_threshold_executor.ts | 34 +++++---- .../log_threshold_references_manager.test.ts | 3 +- .../log_threshold_references_manager.ts | 3 +- .../lib/alerting/log_threshold/mocks/index.ts | 2 +- .../log_threshold/reason_formatters.ts | 10 +-- .../register_log_threshold_rule_type.ts | 2 +- .../lib/check_missing_group.ts | 4 +- ...onvert_strings_to_missing_groups_record.ts | 2 +- .../lib/create_bucket_selector.ts | 3 +- .../metric_threshold/lib/evaluate_rule.ts | 11 +-- .../alerting/metric_threshold/lib/get_data.ts | 9 ++- .../lib/metric_expression_params.ts | 2 +- .../metric_threshold/lib/metric_query.test.ts | 3 +- .../metric_threshold/lib/metric_query.ts | 3 +- .../metric_threshold/lib/wrap_in_period.ts | 2 +- .../metric_threshold_executor.test.ts | 12 +-- .../metric_threshold_executor.ts | 23 +++--- .../register_metric_threshold_rule_type.ts | 2 +- .../lib/alerting/register_rule_types.ts | 9 ++- .../server/lib/cancel_request_on_abort.ts | 2 +- .../lib/create_custom_metrics_aggregations.ts | 4 +- .../infra/server/lib/create_search_client.ts | 4 +- .../server/lib/domains/metrics_domain.ts | 9 ++- .../lib/helpers/get_infra_alerts_client.ts | 2 +- .../helpers/get_infra_metrics_client.test.ts | 10 +-- .../server/lib/host_details/process_list.ts | 7 +- .../lib/host_details/process_list_chart.ts | 4 +- .../infra/server/lib/infra_ml/common.ts | 6 +- .../lib/infra_ml/metrics_hosts_anomalies.ts | 12 +-- .../lib/infra_ml/metrics_k8s_anomalies.ts | 12 +-- .../queries/metrics_host_anomalies.test.ts | 2 +- .../queries/metrics_hosts_anomalies.ts | 6 +- .../queries/metrics_k8s_anomalies.test.ts | 2 +- .../infra_ml/queries/metrics_k8s_anomalies.ts | 6 +- .../plugins/infra/server/lib/infra_types.ts | 14 ++-- .../infra/server/lib/log_analysis/common.ts | 6 +- .../lib/log_analysis/log_entry_anomalies.ts | 17 +++-- .../log_entry_categories_analysis.ts | 10 +-- .../log_entry_categories_datasets_stats.ts | 6 +- .../log_analysis/log_entry_rate_analysis.ts | 10 +-- .../queries/log_entry_anomalies.ts | 2 +- .../queries/top_log_entry_categories.ts | 2 +- .../lib/log_analysis/resolve_id_formats.ts | 4 +- .../plugins/infra/server/lib/metrics/index.ts | 6 +- .../calculate_bucket_size/calculate_auto.ts | 3 +- .../lib/convert_buckets_to_metrics_series.ts | 2 +- .../lib/metrics/lib/create_aggregations.ts | 2 +- .../plugins/infra/server/lib/metrics/types.ts | 2 +- .../plugins/infra/server/lib/source_status.ts | 2 +- .../infra/server/lib/sources/has_data.ts | 2 +- ...7_13_0_convert_log_alias_to_log_indices.ts | 4 +- ...t_inventory_default_view_reference.test.ts | 2 +- ...xtract_inventory_default_view_reference.ts | 4 +- ...cs_explorer_default_view_reference.test.ts | 2 +- ...metrics_explorer_default_view_reference.ts | 4 +- ...0_add_new_indexing_strategy_index_names.ts | 4 +- .../migrations/compose_migrations.test.ts | 2 +- .../sources/migrations/compose_migrations.ts | 2 +- .../create_test_source_configuration.ts | 4 +- .../sources/saved_object_references.test.ts | 2 +- .../lib/sources/saved_object_references.ts | 6 +- .../server/lib/sources/saved_object_type.ts | 2 +- .../infra/server/lib/sources/sources.test.ts | 2 +- .../infra/server/lib/sources/sources.ts | 9 +-- .../plugins/infra/server/mocks.ts | 2 +- .../plugins/infra/server/plugin.ts | 17 +++-- .../delete_custom_dashboard.ts | 2 +- .../custom_dashboards/get_custom_dashboard.ts | 2 +- .../lib/check_custom_dashboards_enabled.ts | 2 +- .../save_custom_dashboard.ts | 4 +- .../update_custom_dashboard.ts | 4 +- .../routes/entities/get_data_stream_types.ts | 2 +- .../routes/entities/get_has_metrics_data.ts | 2 +- .../infra/server/routes/entities/index.ts | 2 +- .../server/routes/infra/lib/helpers/query.ts | 9 +-- .../routes/infra/lib/host/get_apm_hosts.ts | 4 +- .../infra/lib/host/get_filtered_hosts.ts | 4 +- .../infra/lib/host/get_hosts_alerts_count.ts | 2 +- .../routes/infra/lib/host/get_hosts_count.ts | 4 +- .../infra/server/routes/infra/lib/types.ts | 8 +- .../infra/server/routes/infra/lib/utils.ts | 2 +- .../results/metrics_hosts_anomalies.ts | 10 ++- .../infra_ml/results/metrics_k8s_anomalies.ts | 10 ++- .../server/routes/inventory_metadata/index.ts | 2 +- .../lib/get_cloud_metadata.ts | 10 +-- .../server/routes/inventory_views/index.ts | 2 +- .../infra/server/routes/ip_to_hostname.ts | 2 +- .../routes/log_alerts/chart_preview_data.ts | 2 +- .../server/routes/log_analysis/id_formats.ts | 2 +- .../results/log_entry_anomalies.ts | 4 +- .../results/log_entry_examples.ts | 2 +- .../log_analysis/validation/datasets.ts | 2 +- .../routes/log_analysis/validation/indices.ts | 2 +- .../infra/server/routes/metadata/index.ts | 9 +-- .../metadata/lib/get_cloud_metric_metadata.ts | 6 +- .../metadata/lib/get_metric_metadata.ts | 8 +- .../routes/metadata/lib/get_node_info.ts | 8 +- .../routes/metadata/lib/get_pod_node_name.ts | 4 +- .../routes/metadata/lib/pick_feature_name.ts | 2 +- .../routes/metrics_explorer_views/index.ts | 2 +- .../server/routes/metrics_sources/index.ts | 8 +- .../infra/server/routes/node_details/index.ts | 4 +- .../infra/server/routes/overview/index.ts | 2 +- ...nvert_es_response_to_top_nodes_response.ts | 6 +- .../overview/lib/create_top_nodes_query.ts | 4 +- .../lib/get_matadata_from_node_bucket.ts | 2 +- .../routes/overview/lib/get_top_nodes.ts | 8 +- .../infra/server/routes/process_list/index.ts | 2 +- .../infra/server/routes/services/index.ts | 4 +- .../infra/server/routes/services/lib/utils.ts | 2 +- .../infra/server/routes/snapshot/index.ts | 4 +- .../lib/apply_metadata_to_last_path.ts | 2 +- .../snapshot/lib/copy_missing_metrics.ts | 2 +- .../lib/create_timerange_with_interval.ts | 5 +- .../snapshot/lib/get_dataset_for_field.ts | 2 +- .../snapshot/lib/get_metrics_aggregations.ts | 11 +-- .../server/routes/snapshot/lib/get_nodes.ts | 6 +- .../routes/snapshot/lib/query_all_data.ts | 2 +- .../lib/transform_metrics_ui_response.ts | 2 +- ...orm_request_to_metrics_api_request.test.ts | 4 +- ...ransform_request_to_metrics_api_request.ts | 8 +- .../custom_dashboards_saved_object.ts | 4 +- .../server/saved_objects/references.test.ts | 9 +-- .../infra/server/saved_objects/references.ts | 2 +- .../inventory_views_client.test.ts | 8 +- .../inventory_views/inventory_views_client.ts | 4 +- .../metrics_explorer_views_client.test.ts | 8 +- .../metrics_explorer_views_client.ts | 4 +- .../server/services/rules/rule_data_client.ts | 7 +- .../server/services/rules/rules_service.ts | 6 +- .../infra/server/services/rules/types.ts | 5 +- .../plugins/infra/server/types.ts | 9 ++- .../infra/server/usage/usage_collector.ts | 4 +- .../server/utils/calculate_metric_interval.ts | 4 +- .../server/utils/get_original_action_group.ts | 6 +- .../utils/map_source_to_log_view.test.ts | 2 +- .../server/utils/map_source_to_log_view.ts | 6 +- .../infra/server/utils/request_context.ts | 2 +- .../infra/server/utils/serialized_query.ts | 2 +- .../.storybook/get_mock_inventory_context.tsx | 2 +- .../.storybook/storybook_decorator.tsx | 2 +- .../inventory/e2e/cypress_test_runner.ts | 2 +- .../plugins/inventory/e2e/ftr_config.ts | 4 +- .../inventory/e2e/ftr_provider_context.d.ts | 2 +- .../plugins/inventory/public/application.tsx | 4 +- .../add_data_action_menu.tsx | 8 +- .../public/components/app_root/index.tsx | 6 +- .../components/empty_states/empty_state.tsx | 2 +- .../entities_grid/entities_grid.stories.tsx | 5 +- .../components/entities_grid/grid_columns.tsx | 3 +- .../public/components/entities_grid/index.tsx | 11 +-- .../grouped_entities_grid.tsx | 2 +- .../mock/inventory_component_wrapper_mock.tsx | 2 +- .../search_bar/entity_types_multi_select.tsx | 2 +- .../shared/add_data_buttons/buttons.tsx | 6 +- .../index.tsx | 2 +- .../public/hooks/use_adhoc_data_view.ts | 2 +- .../hooks/use_inventory_abortable_async.ts | 2 +- .../public/hooks/use_inventory_route_path.ts | 3 +- .../public/hooks/use_inventory_router.ts | 2 +- .../plugins/inventory/public/plugin.ts | 7 +- .../services/telemetry/telemetry_client.ts | 2 +- .../services/telemetry/telemetry_events.ts | 3 +- .../telemetry/telemetry_service.test.ts | 2 +- .../public/services/telemetry/types.ts | 2 +- .../inventory/public/services/types.ts | 2 +- .../plugins/inventory/public/types.ts | 2 +- .../utils/group_entity_types_by_status.ts | 2 +- .../create_alerts_client.ts | 6 +- .../create_entities_es_client.ts | 4 +- .../plugins/inventory/server/plugin.ts | 2 +- .../entities/get_group_by_terms_agg.test.ts | 2 +- .../routes/entities/get_group_by_terms_agg.ts | 2 +- .../entities/get_latest_entities_alerts.ts | 4 +- .../inventory/server/routes/entities/route.ts | 3 +- .../plugins/inventory/server/types.ts | 4 +- .../common/http_api/metrics_api.ts | 2 +- .../common/inventory_models/aws_ec2/index.ts | 2 +- .../inventory_models/aws_ec2/metrics/index.ts | 2 +- .../aws_ec2/metrics/snapshot/cpu.ts | 2 +- .../metrics/snapshot/disk_io_read_bytes.ts | 2 +- .../metrics/snapshot/disk_io_write_bytes.ts | 2 +- .../aws_ec2/metrics/snapshot/rx.ts | 2 +- .../aws_ec2/metrics/snapshot/tx.ts | 2 +- .../common/inventory_models/aws_rds/index.ts | 2 +- .../inventory_models/aws_rds/metrics/index.ts | 2 +- .../aws_rds/metrics/snapshot/cpu.ts | 2 +- .../snapshot/rds_active_transactions.ts | 2 +- .../metrics/snapshot/rds_connections.ts | 2 +- .../aws_rds/metrics/snapshot/rds_latency.ts | 2 +- .../metrics/snapshot/rds_queries_executed.ts | 2 +- .../common/inventory_models/aws_s3/index.ts | 2 +- .../inventory_models/aws_s3/metrics/index.ts | 2 +- .../aws_s3/metrics/snapshot/s3_bucket_size.ts | 2 +- .../metrics/snapshot/s3_download_bytes.ts | 2 +- .../metrics/snapshot/s3_number_of_objects.ts | 2 +- .../metrics/snapshot/s3_total_requests.ts | 2 +- .../metrics/snapshot/s3_upload_bytes.ts | 2 +- .../common/inventory_models/aws_sqs/index.ts | 2 +- .../inventory_models/aws_sqs/metrics/index.ts | 2 +- .../metrics/snapshot/sqs_messages_delayed.ts | 2 +- .../metrics/snapshot/sqs_messages_empty.ts | 2 +- .../metrics/snapshot/sqs_messages_sent.ts | 2 +- .../metrics/snapshot/sqs_messages_visible.ts | 2 +- .../metrics/snapshot/sqs_oldest_message.ts | 2 +- .../inventory_models/container/index.ts | 2 +- .../container/metrics/charts/cpu.ts | 2 +- .../container/metrics/charts/disk.ts | 2 +- .../container/metrics/charts/memory.ts | 2 +- .../container/metrics/charts/network.ts | 2 +- .../container/metrics/index.ts | 4 +- .../container/metrics/snapshot/cpu.ts | 2 +- .../container/metrics/snapshot/memory.ts | 2 +- .../inventory_models/create_tsvb_model.ts | 2 +- .../common/inventory_models/host/index.ts | 2 +- .../host/metrics/charts/cpu.ts | 2 +- .../host/metrics/charts/disk.ts | 2 +- .../host/metrics/charts/logs.ts | 2 +- .../host/metrics/charts/memory.ts | 2 +- .../host/metrics/charts/network.ts | 2 +- .../inventory_models/host/metrics/index.ts | 2 +- .../host/metrics/snapshot/cpu.ts | 2 +- .../host/metrics/snapshot/cpu_v2.ts | 2 +- .../host/metrics/snapshot/disk_latency.ts | 2 +- .../host/metrics/snapshot/disk_space_usage.ts | 2 +- .../host/metrics/snapshot/load.ts | 2 +- .../host/metrics/snapshot/log_rate.ts | 2 +- .../host/metrics/snapshot/memory.ts | 2 +- .../host/metrics/snapshot/memory_free.ts | 2 +- .../host/metrics/snapshot/memory_total.ts | 2 +- .../metrics/snapshot/normalized_load_1m.ts | 2 +- .../host/metrics/snapshot/rx.ts | 2 +- .../host/metrics/snapshot/rx_v2.ts | 2 +- .../host/metrics/snapshot/tx.ts | 2 +- .../host/metrics/snapshot/tx_v2.ts | 2 +- .../common/inventory_models/index.ts | 4 +- .../kubernetes/node/metrics/charts/node.ts | 2 +- .../inventory_models/kubernetes/pod/index.ts | 2 +- .../kubernetes/pod/metrics/index.ts | 2 +- .../kubernetes/pod/metrics/snapshot/cpu.ts | 2 +- .../kubernetes/pod/metrics/snapshot/memory.ts | 2 +- .../pod/metrics/tsvb/pod_cpu_usage.ts | 2 +- .../pod/metrics/tsvb/pod_log_usage.ts | 2 +- .../pod/metrics/tsvb/pod_memory_usage.ts | 2 +- .../pod/metrics/tsvb/pod_network_traffic.ts | 2 +- .../pod/metrics/tsvb/pod_overview.ts | 2 +- .../inventory_models/shared/metrics/index.ts | 2 +- .../shared/metrics/required_metrics.ts | 2 +- .../shared/metrics/snapshot/count.ts | 2 +- .../metrics/snapshot/network_traffic.ts | 2 +- .../network_traffic_with_interfaces.ts | 2 +- .../shared/metrics/snapshot/rate.ts | 2 +- .../metrics/tsvb/aws_cpu_utilization.ts | 2 +- .../shared/metrics/tsvb/aws_diskio_bytes.ts | 2 +- .../shared/metrics/tsvb/aws_diskio_ops.ts | 2 +- .../shared/metrics/tsvb/aws_network_bytes.ts | 2 +- .../metrics/tsvb/aws_network_packets.ts | 2 +- .../shared/metrics/tsvb/aws_overview.ts | 2 +- .../metrics/tsvb/nginx_active_connections.ts | 2 +- .../shared/metrics/tsvb/nginx_hits.ts | 2 +- .../shared/metrics/tsvb/nginx_request_rate.ts | 2 +- .../tsvb/nginx_requests_per_connection.ts | 2 +- .../common/inventory_models/types.ts | 2 +- .../public/apps/common_providers.tsx | 2 +- .../components/empty_states/no_indices.tsx | 2 +- .../container_metrics_table.stories.tsx | 2 +- .../container_metrics_table.test.tsx | 2 +- .../container/container_metrics_table.tsx | 3 +- .../create_lazy_container_metrics_table.tsx | 4 +- .../host/create_lazy_host_metrics_table.tsx | 4 +- .../host/host_metrics_table.stories.tsx | 2 +- .../host/host_metrics_table.tsx | 3 +- .../pod/create_lazy_pod_metrics_table.tsx | 4 +- .../pod/pod_metrics_table.stories.tsx | 2 +- .../pod/pod_metrics_table.tsx | 3 +- .../hooks/metrics_to_api_options.test.ts | 7 +- .../shared/hooks/metrics_to_api_options.ts | 2 +- .../hooks/use_infrastructure_node_metrics.ts | 4 +- .../test_helpers.ts | 4 +- .../public/hooks/use_kibana.tsx | 9 +-- .../metrics_data_access/public/index.ts | 4 +- .../public/lib/metrics_client.ts | 4 +- .../link_to/use_asset_details_redirect.ts | 3 +- .../metrics_data_access/public/plugin.ts | 6 +- .../metrics_data_access/public/types.ts | 2 +- .../public/utils/use_tracked_promise.ts | 3 +- .../server/client/client.test.ts | 2 +- .../server/client/client.ts | 8 +- .../metrics_data_access/server/client_mock.ts | 2 +- .../metrics_data_access/server/index.ts | 2 +- .../lib/adapters/framework/adapter_types.ts | 30 ++++---- .../framework/kibana_framework_adapter.ts | 8 +- .../lib/adapters/metrics/adapter_types.ts | 2 +- .../lib/create_custom_metrics_aggregations.ts | 4 +- .../server/lib/create_search_client.ts | 6 +- .../server/lib/metrics/index.ts | 8 +- .../calculate_bucket_size/calculate_auto.ts | 3 +- .../lib/calculate_bucket_size/index.ts | 2 +- .../lib/calculate_date_histogram_offset.ts | 2 +- .../lib/metrics/lib/calculate_interval.ts | 4 +- .../convert_buckets_to_metrics_series.test.ts | 2 +- .../lib/convert_buckets_to_metrics_series.ts | 4 +- .../metrics/lib/create_aggregations.test.ts | 2 +- .../lib/metrics/lib/create_aggregations.ts | 4 +- .../lib/create_metrics_aggregations.test.ts | 2 +- .../lib/create_metrics_aggregations.ts | 4 +- .../server/lib/metrics/types.ts | 2 +- .../metrics_data_access/server/plugin.ts | 4 +- .../server/routes/metric_indices/index.ts | 10 +-- .../server/routes/metrics_explorer/index.ts | 4 +- ...nvert_metric_to_metrics_api_metric.test.ts | 2 +- .../convert_metric_to_metrics_api_metric.ts | 2 +- ...ert_request_to_metrics_api_options.test.ts | 2 +- .../convert_request_to_metrics_api_options.ts | 7 +- .../lib/find_interval_for_metrics.ts | 4 +- .../lib/get_dataset_for_field.ts | 2 +- .../lib/query_total_grouping.test.ts | 2 +- .../lib/query_total_groupings.ts | 4 +- .../metrics_explorer/lib/transform_series.ts | 2 +- .../server/routes/types.ts | 4 +- .../metrics_data_access/server/types.ts | 4 +- .../server/utils/calculate_metric_interval.ts | 4 +- .../common/__fixtures__/base_flamegraph.ts | 2 +- .../profiling/common/columnar_view_model.ts | 2 +- .../plugins/profiling/common/topn.ts | 2 +- .../profiling/e2e/cypress_test_runner.ts | 4 +- .../plugins/profiling/e2e/ftr_config.ts | 2 +- .../plugins/profiling/e2e/ftr_config_open.ts | 4 +- .../profiling/e2e/ftr_config_runner.ts | 4 +- .../profiling/e2e/ftr_provider_context.d.ts | 2 +- .../plugins/profiling/public/app.tsx | 6 +- .../public/components/async_component.tsx | 13 +--- .../public/components/chart_grid.tsx | 2 +- .../contexts/license/license_context.tsx | 2 +- .../mock_profiling_dependencies_storybook.tsx | 11 ++- .../profiling_dependencies_context.tsx | 9 ++- .../profiling_setup_status_context.tsx | 2 +- .../route_breadcrumbs_context/index.tsx | 5 +- .../use_route_breadcrumb.ts | 3 +- .../components/cpu_label_with_hint/index.tsx | 11 +-- .../get_columns.tsx | 2 +- .../get_compare_frame_action.tsx | 16 ++-- .../index.tsx | 18 ++--- .../flamegraph/flame_graph_legend.tsx | 3 +- .../public/components/flamegraph/index.tsx | 19 ++--- .../apm_transactions.tsx | 3 +- .../frame_information_ai_assistant.tsx | 2 +- .../frame_information_tooltip.tsx | 3 +- .../get_impact_rows.tsx | 6 +- .../frame_information_window/index.tsx | 2 +- .../missing_symbols_callout.stories.tsx | 2 +- .../missing_symbols_callout.tsx | 3 +- .../frames_summary/summary_item.tsx | 2 +- .../components/label_with_hint/index.tsx | 11 +-- .../primary_and_comparison_search_bar.tsx | 4 +- .../profiling_app_page_template/index.tsx | 4 +- .../profiling_search_bar.tsx | 4 +- .../redirect_with_default_date_range.tsx | 2 +- .../public/components/stack_traces/index.tsx | 7 +- .../components/stacked_bar_chart/index.tsx | 4 +- .../profiling/public/components/subchart.tsx | 6 +- .../topn_functions/function_row.tsx | 12 +-- .../components/topn_functions/index.tsx | 14 ++-- .../topn_functions/topn_functions.stories.tsx | 2 +- .../components/topn_functions/utils.test.ts | 2 +- .../public/components/topn_functions/utils.ts | 2 +- .../flamegraph/embeddable_flamegraph.tsx | 9 +-- .../public/embeddables/flamegraph/index.tsx | 2 +- .../functions/embeddable_functions.tsx | 8 +- .../functions/embeddable_functions_grid.tsx | 5 +- .../public/embeddables/functions/index.tsx | 2 +- .../profiling_embeddable_provider.tsx | 9 ++- .../embeddables/register_embeddables.ts | 2 +- .../search_bar/embeddable_search_bar.tsx | 8 +- .../public/embeddables/search_bar/index.tsx | 2 +- .../stack_traces/embeddable_stack_traces.tsx | 9 +-- .../public/embeddables/stack_traces/index.tsx | 2 +- .../embeddables/stack_traces/stack_traces.tsx | 3 +- .../profiling/public/hooks/use_async.ts | 3 +- .../hooks/use_auto_aborted_http_client.ts | 4 +- .../hooks/use_profiling_charts_theme.ts | 2 +- .../public/hooks/use_profiling_params.ts | 7 +- .../public/hooks/use_profiling_route_path.ts | 5 +- .../public/hooks/use_profiling_router.ts | 5 +- .../profiling/public/hooks/use_time_range.ts | 2 +- .../public/hooks/use_time_range_async.ts | 3 +- .../plugins/profiling/public/plugin.ts | 8 +- .../public/routing/route_breadcrumb.tsx | 2 +- .../public/routing/router_error_boundary.tsx | 2 +- .../plugins/profiling/public/services.ts | 8 +- .../plugins/profiling/public/types.ts | 10 +-- .../utils/get_flamegraph_model/index.ts | 6 +- .../differential_flame_graph_search_panel.tsx | 2 +- .../differential_flamegraphs/index.tsx | 3 +- .../public/views/flamegraphs/index.tsx | 2 +- .../functions/differential_topn/index.tsx | 13 +--- .../public/views/functions/index.tsx | 2 +- .../public/views/functions/topn/index.tsx | 5 +- .../get_stack_traces_tabs.ts | 6 +- .../public/views/stack_traces_view/utils.ts | 4 +- .../grouped_index_details_chart.tsx | 3 +- .../data_breakdown/storage_details_table.tsx | 11 +-- .../storage_explorer/data_breakdown/utils.ts | 2 +- .../host_breakdown/hosts_table.tsx | 5 +- .../public/views/storage_explorer/summary.tsx | 2 +- .../plugins/profiling/server/index.ts | 3 +- .../server/lib/setup/cluster_settings.ts | 2 +- .../server/lib/setup/fleet_policies.test.ts | 2 +- .../server/lib/setup/fleet_policies.ts | 4 +- .../lib/setup/get_has_setup_privileges.ts | 4 +- .../profiling/server/lib/setup/types.ts | 4 +- .../plugins/profiling/server/plugin.ts | 12 ++- .../plugins/profiling/server/routes/apm.ts | 6 +- .../plugins/profiling/server/routes/compat.ts | 2 +- .../server/routes/downsampling.test.ts | 3 +- .../profiling/server/routes/downsampling.ts | 4 +- .../profiling/server/routes/flamechart.ts | 3 +- .../profiling/server/routes/functions.ts | 6 +- .../plugins/profiling/server/routes/index.ts | 6 +- .../plugins/profiling/server/routes/query.ts | 2 +- .../server/routes/search_stacktraces.ts | 4 +- .../setup/get_cloud_setup_instructions.ts | 4 +- .../setup/get_self_managed_instructions.ts | 2 +- .../profiling/server/routes/setup/route.ts | 4 +- .../server/routes/setup/setup_cloud.ts | 4 +- .../server/routes/setup/setup_self_managed.ts | 5 +- .../get_daily_data_generation.size.ts | 4 +- .../get_host_breakdown_size_timeseries.ts | 4 +- .../storage_explorer/get_host_details.ts | 4 +- .../get_host_distinct_probabilistic_count.ts | 2 +- .../storage_explorer/get_indices_stats.ts | 2 +- .../get_profiling_hosts_details_by_id.ts | 2 +- .../get_storage_details_grouped_by_index.ts | 8 +- .../get_storage_details_per_index.ts | 8 +- .../server/routes/storage_explorer/route.ts | 8 +- .../profiling/server/routes/topn.test.ts | 4 +- .../plugins/profiling/server/routes/topn.ts | 8 +- .../plugins/profiling/server/types.ts | 16 ++-- .../utils/create_profiling_es_client.ts | 4 +- .../utils/handle_route_error_handler.ts | 4 +- .../server/utils/with_profiling_span.ts | 3 +- .../common/cloud_setup.test.ts | 7 +- .../common/cloud_setup.ts | 8 +- .../common/cluster_settings.ts | 2 +- .../common/fleet_policies.ts | 5 +- .../common/has_profiling_data.ts | 2 +- .../common/profiling_es_client.ts | 2 +- .../common/setup.test.ts | 8 +- .../profiling_data_access/common/setup.ts | 4 +- .../profiling_data_access/server/index.ts | 3 +- .../profiling_data_access/server/plugin.ts | 4 +- .../server/services/fetch_flamechart/index.ts | 6 +- .../server/services/functions/es_functions.ts | 14 ++-- .../server/services/functions/index.ts | 6 +- .../server/services/register_services.ts | 8 +- .../services/search_stack_traces/index.ts | 4 +- .../services/setup_state/cloud_setup_state.ts | 7 +- .../server/services/setup_state/index.ts | 8 +- .../setup_state/self_managed_setup_state.ts | 8 +- .../server/services/status/index.ts | 6 +- .../profiling_data_access/server/types.ts | 4 +- .../utils/create_profiling_es_client.ts | 4 +- .../server/utils/with_profiling_span.ts | 3 +- 2080 files changed, 5255 insertions(+), 5154 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 049fa5c987773..c7bff5e229d74 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1024,6 +1024,20 @@ module.exports = { ], }, }, + { + files: [ + 'x-pack/solutions/observability/plugins/apm/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/apm_data_access/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/infra/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/inventory/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/metrics_data_access/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/profiling/**/*.{js,mjs,ts,tsx}', + 'x-pack/solutions/observability/plugins/profiling_data_access/**/*.{js,mjs,ts,tsx}', + ], + rules: { + '@typescript-eslint/consistent-type-imports': 'error', + }, + }, /** * Fleet overrides diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/configuration_types.d.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/configuration_types.d.ts index db0b4163f174d..69bd7887a41b4 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/configuration_types.d.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/configuration_types.d.ts @@ -5,8 +5,8 @@ * 2.0. */ -import t from 'io-ts'; -import { agentConfigurationIntakeRt } from './runtime_types/agent_configuration_intake_rt'; +import type t from 'io-ts'; +import type { agentConfigurationIntakeRt } from './runtime_types/agent_configuration_intake_rt'; export type AgentConfigurationIntake = t.TypeOf; diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/agent_configuration_intake_rt.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/agent_configuration_intake_rt.ts index 7d5b6ad12a388..518aeeacb2dbe 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/agent_configuration_intake_rt.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/agent_configuration_intake_rt.ts @@ -7,7 +7,7 @@ import * as t from 'io-ts'; import { settingDefinitions } from '../setting_definitions'; -import { SettingValidation } from '../setting_definitions/types'; +import type { SettingValidation } from '../setting_definitions/types'; // retrieve validation from config definitions settings and validate on the server const knownSettings = settingDefinitions.reduce>( diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/duration_rt.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/duration_rt.ts index c968a7cacebc4..1b78248ed7304 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/duration_rt.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/runtime_types/duration_rt.ts @@ -7,8 +7,10 @@ import * as t from 'io-ts'; import { either } from 'fp-ts/lib/Either'; -import moment, { unitOfTime } from 'moment'; -import { amountAndUnitToObject, AmountAndUnit } from '../amount_and_unit'; +import type { unitOfTime } from 'moment'; +import moment from 'moment'; +import type { AmountAndUnit } from '../amount_and_unit'; +import { amountAndUnitToObject } from '../amount_and_unit'; import { getRangeTypeMessage } from './get_range_type_message'; function toMilliseconds({ amount, unit }: AmountAndUnit) { diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts index 07db609558346..8f134814d8b30 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/general_settings.ts @@ -10,7 +10,7 @@ import { captureBodyRt } from '../runtime_types/capture_body_rt'; import { logLevelRt } from '../runtime_types/log_level_rt'; import { logEcsReformattingRt } from '../runtime_types/log_ecs_reformatting_rt'; import { traceContinuationStrategyRt } from '../runtime_types/trace_continuation_strategy_rt'; -import { RawSettingDefinition } from './types'; +import type { RawSettingDefinition } from './types'; export const generalSettings: RawSettingDefinition[] = [ // API Request Size diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts index 8f64a88a5dc0e..341026bd094b7 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.test.ts @@ -7,8 +7,8 @@ import { omit } from 'lodash'; import { filterByAgent, settingDefinitions } from '.'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; -import { SettingDefinition } from './types'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { SettingDefinition } from './types'; describe('filterByAgent', () => { describe('when `excludeAgents` is dotnet and nodejs', () => { diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.ts index ce675efa094e5..561c822307bec 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/index.ts @@ -9,13 +9,13 @@ import * as t from 'io-ts'; import { sortBy } from 'lodash'; import { isRight } from 'fp-ts/lib/Either'; import { PathReporter } from 'io-ts/lib/PathReporter'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { booleanRt } from '../runtime_types/boolean_rt'; import { getIntegerRt } from '../runtime_types/integer_rt'; import { isRumOrMobileAgentName } from '../../agent_name'; import { floatThreeDecimalPlacesRt } from '../runtime_types/float_three_decimal_places_rt'; import { floatFourDecimalPlacesRt } from '../runtime_types/float_four_decimal_places_rt'; -import { RawSettingDefinition, SettingDefinition } from './types'; +import type { RawSettingDefinition, SettingDefinition } from './types'; import { generalSettings } from './general_settings'; import { javaSettings } from './java_settings'; import { mobileSettings } from './mobile_settings'; diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts index efba2ca061e73..b7b3e0f6016e4 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/java_settings.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { RawSettingDefinition } from './types'; +import type { RawSettingDefinition } from './types'; export const javaSettings: RawSettingDefinition[] = [ { diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/mobile_settings.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/mobile_settings.ts index b171614f7fb2a..94b446e03e345 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/mobile_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/mobile_settings.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { RawSettingDefinition } from './types'; +import type { RawSettingDefinition } from './types'; export const mobileSettings: RawSettingDefinition[] = [ // Session sample rate diff --git a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/types.d.ts b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/types.d.ts index 213e8c7cf86fc..1a1bcb0d079c3 100644 --- a/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/types.d.ts +++ b/x-pack/solutions/observability/plugins/apm/common/agent_configuration/setting_definitions/types.d.ts @@ -5,8 +5,8 @@ * 2.0. */ -import * as t from 'io-ts'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type * as t from 'io-ts'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; // TODO: is it possible to get rid of `any`? export type SettingValidation = t.Type; diff --git a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/apm_ml_job.ts b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/apm_ml_job.ts index b2091433e0c5f..ded3de81f6193 100644 --- a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/apm_ml_job.ts +++ b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/apm_ml_job.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { DATAFEED_STATE, JOB_STATE } from '@kbn/ml-plugin/common'; -import { Environment } from '../environment_rt'; +import type { DATAFEED_STATE, JOB_STATE } from '@kbn/ml-plugin/common'; +import type { Environment } from '../environment_rt'; export interface ApmMlJob { environment: Environment; diff --git a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.test.ts b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.test.ts index 1b24efd98f2a0..165ba04f18b57 100644 --- a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.test.ts @@ -6,10 +6,10 @@ */ import { v4 as uuidv4 } from 'uuid'; import { ENVIRONMENT_ALL } from '../environment_filter_values'; -import { Environment } from '../environment_rt'; +import type { Environment } from '../environment_rt'; import { AnomalyDetectorType } from './apm_ml_detectors'; import { getPreferredServiceAnomalyTimeseries } from './get_preferred_service_anomaly_timeseries'; -import { ServiceAnomalyTimeseries } from './service_anomaly_timeseries'; +import type { ServiceAnomalyTimeseries } from './service_anomaly_timeseries'; const PROD = 'production' as Environment; const DEV = 'development' as Environment; diff --git a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.ts b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.ts index 0f1ff8c4f30a6..34ff0467a6625 100644 --- a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/get_preferred_service_anomaly_timeseries.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Environment } from '../environment_rt'; -import { AnomalyDetectorType } from './apm_ml_detectors'; -import { ServiceAnomalyTimeseries } from './service_anomaly_timeseries'; +import type { Environment } from '../environment_rt'; +import type { AnomalyDetectorType } from './apm_ml_detectors'; +import type { ServiceAnomalyTimeseries } from './service_anomaly_timeseries'; export function getPreferredServiceAnomalyTimeseries({ preferredEnvironment, diff --git a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/index.ts b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/index.ts index 68b6aa72fca58..1789d28b1f892 100644 --- a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/index.ts +++ b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/index.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { getSeverityType } from '@kbn/ml-anomaly-utils/get_severity_type'; import { getSeverityColor as mlGetSeverityColor } from '@kbn/ml-anomaly-utils/get_severity_color'; import { ML_ANOMALY_SEVERITY } from '@kbn/ml-anomaly-utils/anomaly_severity'; -import { ServiceHealthStatus } from '../service_health_status'; +import type { ServiceHealthStatus } from '../service_health_status'; export interface ServiceAnomalyStats { transactionType?: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/service_anomaly_timeseries.ts b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/service_anomaly_timeseries.ts index 40fcf198441d8..21a7d75527225 100644 --- a/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/service_anomaly_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/common/anomaly_detection/service_anomaly_timeseries.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Coordinate } from '../../typings/timeseries'; -import { AnomalyDetectorType } from './apm_ml_detectors'; +import type { Coordinate } from '../../typings/timeseries'; +import type { AnomalyDetectorType } from './apm_ml_detectors'; export interface ServiceAnomalyTimeseries { jobId: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/connections.ts b/x-pack/solutions/observability/plugins/apm/common/connections.ts index 10a10e96e5190..1253d10a94842 100644 --- a/x-pack/solutions/observability/plugins/apm/common/connections.ts +++ b/x-pack/solutions/observability/plugins/apm/common/connections.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { AgentName } from '../typings/es_schemas/ui/fields/agent'; -import { Coordinate } from '../typings/timeseries'; +import type { AgentName } from '../typings/es_schemas/ui/fields/agent'; +import type { Coordinate } from '../typings/timeseries'; export enum NodeType { service = 'service', diff --git a/x-pack/solutions/observability/plugins/apm/common/correlations/failed_transactions_correlations/types.ts b/x-pack/solutions/observability/plugins/apm/common/correlations/failed_transactions_correlations/types.ts index 27bdbb294aea0..0dc8b62bdde43 100644 --- a/x-pack/solutions/observability/plugins/apm/common/correlations/failed_transactions_correlations/types.ts +++ b/x-pack/solutions/observability/plugins/apm/common/correlations/failed_transactions_correlations/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { FieldValuePair, HistogramItem } from '../types'; +import type { FieldValuePair, HistogramItem } from '../types'; -import { CORRELATIONS_IMPACT_THRESHOLD } from './constants'; +import type { CORRELATIONS_IMPACT_THRESHOLD } from './constants'; export interface FailedTransactionsCorrelation extends FieldValuePair { doc_count: number; diff --git a/x-pack/solutions/observability/plugins/apm/common/correlations/latency_correlations/types.ts b/x-pack/solutions/observability/plugins/apm/common/correlations/latency_correlations/types.ts index 80067337a8b33..81ee264e58504 100644 --- a/x-pack/solutions/observability/plugins/apm/common/correlations/latency_correlations/types.ts +++ b/x-pack/solutions/observability/plugins/apm/common/correlations/latency_correlations/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FieldValuePair, HistogramItem } from '../types'; +import type { FieldValuePair, HistogramItem } from '../types'; export interface LatencyCorrelation extends FieldValuePair { correlation: number; diff --git a/x-pack/solutions/observability/plugins/apm/common/correlations/types.ts b/x-pack/solutions/observability/plugins/apm/common/correlations/types.ts index a03ce73b76db6..766afb38e4176 100644 --- a/x-pack/solutions/observability/plugins/apm/common/correlations/types.ts +++ b/x-pack/solutions/observability/plugins/apm/common/correlations/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Environment } from '../environment_rt'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { Environment } from '../environment_rt'; export interface FieldValuePair { fieldName: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.test.ts b/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.test.ts index 61720dba3d472..b7b01a768aa22 100644 --- a/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.test.ts +++ b/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.test.ts @@ -4,10 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { apm, ApmFields, dedot } from '@kbn/apm-synthtrace-client'; +import type { ApmFields } from '@kbn/apm-synthtrace-client'; +import { apm, dedot } from '@kbn/apm-synthtrace-client'; import { getWaterfall } from '../../public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; -import { Span } from '../../typings/es_schemas/ui/span'; -import { Transaction } from '../../typings/es_schemas/ui/transaction'; +import type { Span } from '../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../typings/es_schemas/ui/transaction'; import { getCriticalPath } from './get_critical_path'; describe('getCriticalPath', () => { diff --git a/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.ts b/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.ts index f881362b39078..60e5fd0691d97 100644 --- a/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.ts +++ b/x-pack/solutions/observability/plugins/apm/common/critical_path/get_critical_path.ts @@ -9,7 +9,7 @@ import type { IWaterfall, IWaterfallSpanOrTransaction, } from '../../public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; -import { CriticalPath, CriticalPathSegment } from './types'; +import type { CriticalPath, CriticalPathSegment } from './types'; export function getCriticalPath(waterfall: IWaterfall): CriticalPath { const segments: CriticalPathSegment[] = []; diff --git a/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link.test.ts b/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link.test.ts index c9bebede12afc..c3e7f1a151801 100644 --- a/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link.test.ts +++ b/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { extractTemplateVariableNames, getEncodedCustomLinkUrl } from '.'; -import { Transaction } from '../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../typings/es_schemas/ui/transaction'; describe('Custom link', () => { describe('extractTemplateVariableNames', () => { diff --git a/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link_types.d.ts b/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link_types.d.ts index b9c4effc80ae1..446bfb62d403f 100644 --- a/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link_types.d.ts +++ b/x-pack/solutions/observability/plugins/apm/common/custom_link/custom_link_types.d.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { SERVICE_NAME, SERVICE_ENVIRONMENT, TRANSACTION_NAME, TRANSACTION_TYPE, } from '../es_fields/apm'; -import { FILTER_OPTIONS } from './custom_link_filter_options'; +import type { FILTER_OPTIONS } from './custom_link_filter_options'; export interface CustomLinkES { id?: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/custom_link/index.ts b/x-pack/solutions/observability/plugins/apm/common/custom_link/index.ts index cc8d206f9b2b7..4e030e7c3813c 100644 --- a/x-pack/solutions/observability/plugins/apm/common/custom_link/index.ts +++ b/x-pack/solutions/observability/plugins/apm/common/custom_link/index.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; import { set } from '@kbn/safer-lodash-set'; import Mustache from 'mustache'; -import { Transaction } from '../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../typings/es_schemas/ui/transaction'; export const INVALID_LICENSE = i18n.translate('xpack.apm.settings.customLink.license.text', { defaultMessage: diff --git a/x-pack/solutions/observability/plugins/apm/common/environment_filter_values.ts b/x-pack/solutions/observability/plugins/apm/common/environment_filter_values.ts index 3aabf455d674d..d8486c034822a 100644 --- a/x-pack/solutions/observability/plugins/apm/common/environment_filter_values.ts +++ b/x-pack/solutions/observability/plugins/apm/common/environment_filter_values.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { escapeKuery } from '@kbn/es-query'; import { SERVICE_ENVIRONMENT } from './es_fields/apm'; -import { Environment } from './environment_rt'; +import type { Environment } from './environment_rt'; export const ENVIRONMENT_ALL_VALUE = 'ENVIRONMENT_ALL' as const; const ENVIRONMENT_NOT_DEFINED_VALUE = 'ENVIRONMENT_NOT_DEFINED' as const; diff --git a/x-pack/solutions/observability/plugins/apm/common/es_fields/es_fields.test.ts b/x-pack/solutions/observability/plugins/apm/common/es_fields/es_fields.test.ts index 12537d35afefe..4556e20c27479 100644 --- a/x-pack/solutions/observability/plugins/apm/common/es_fields/es_fields.test.ts +++ b/x-pack/solutions/observability/plugins/apm/common/es_fields/es_fields.test.ts @@ -6,10 +6,10 @@ */ import { get } from 'lodash'; -import { AllowUnknownProperties } from '../../typings/common'; -import { APMError } from '../../typings/es_schemas/ui/apm_error'; -import { Span } from '../../typings/es_schemas/ui/span'; -import { Transaction } from '../../typings/es_schemas/ui/transaction'; +import type { AllowUnknownProperties } from '../../typings/common'; +import type { APMError } from '../../typings/es_schemas/ui/apm_error'; +import type { Span } from '../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../typings/es_schemas/ui/transaction'; import * as allApmFieldNames from './apm'; import * as infraMetricsFieldNames from './infra_metrics'; diff --git a/x-pack/solutions/observability/plugins/apm/common/license_check.ts b/x-pack/solutions/observability/plugins/apm/common/license_check.ts index 6d732dc7917e2..15bc14968c64c 100644 --- a/x-pack/solutions/observability/plugins/apm/common/license_check.ts +++ b/x-pack/solutions/observability/plugins/apm/common/license_check.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; +import type { ILicense, LicenseType } from '@kbn/licensing-plugin/common/types'; function isActiveLicense(licenseType: LicenseType, license?: ILicense) { return license && license.isActive && license.hasAtLeast(licenseType); diff --git a/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts b/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts index 0e6b0c166a688..29a1c36675c11 100644 --- a/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts +++ b/x-pack/solutions/observability/plugins/apm/common/rules/schema.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { ML_ANOMALY_SEVERITY } from '@kbn/ml-anomaly-utils/anomaly_severity'; -import { ApmRuleType } from '@kbn/rule-data-utils'; +import type { ApmRuleType } from '@kbn/rule-data-utils'; import { AnomalyDetectorType } from '../anomaly_detection/apm_ml_detectors'; import { AggregationType } from './apm_rule_types'; diff --git a/x-pack/solutions/observability/plugins/apm/common/service_inventory.ts b/x-pack/solutions/observability/plugins/apm/common/service_inventory.ts index f758bc083cf78..7ffc1b3d31cb8 100644 --- a/x-pack/solutions/observability/plugins/apm/common/service_inventory.ts +++ b/x-pack/solutions/observability/plugins/apm/common/service_inventory.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { AgentName } from '@kbn/elastic-agent-utils'; -import { ServiceHealthStatus } from './service_health_status'; +import type { AgentName } from '@kbn/elastic-agent-utils'; +import type { ServiceHealthStatus } from './service_health_status'; export interface ServiceListItem { serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/service_map.ts b/x-pack/solutions/observability/plugins/apm/common/service_map.ts index c4ac295206396..254bcdb710315 100644 --- a/x-pack/solutions/observability/plugins/apm/common/service_map.ts +++ b/x-pack/solutions/observability/plugins/apm/common/service_map.ts @@ -6,9 +6,9 @@ */ import { i18n } from '@kbn/i18n'; -import cytoscape from 'cytoscape'; -import { Coordinate } from '../typings/timeseries'; -import { ServiceAnomalyStats } from './anomaly_detection'; +import type cytoscape from 'cytoscape'; +import type { Coordinate } from '../typings/timeseries'; +import type { ServiceAnomalyStats } from './anomaly_detection'; // These should be imported, but until TypeScript 4.2 we're inlining them here. // All instances of "agent.name", "service.name", "service.environment", "span.type", diff --git a/x-pack/solutions/observability/plugins/apm/common/span_links.ts b/x-pack/solutions/observability/plugins/apm/common/span_links.ts index cd5ce48e6802a..cd350e7ceaf6c 100644 --- a/x-pack/solutions/observability/plugins/apm/common/span_links.ts +++ b/x-pack/solutions/observability/plugins/apm/common/span_links.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { AgentName } from '../typings/es_schemas/ui/fields/agent'; -import { Environment } from './environment_rt'; +import type { AgentName } from '../typings/es_schemas/ui/fields/agent'; +import type { Environment } from './environment_rt'; export interface SpanLinkDetails { traceId: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/tutorial/tutorials.ts b/x-pack/solutions/observability/plugins/apm/common/tutorial/tutorials.ts index 32578351a4431..1c83564f9ed3a 100644 --- a/x-pack/solutions/observability/plugins/apm/common/tutorial/tutorials.ts +++ b/x-pack/solutions/observability/plugins/apm/common/tutorial/tutorials.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { CustomIntegration } from '@kbn/custom-integrations-plugin/common'; +import type { CustomIntegration } from '@kbn/custom-integrations-plugin/common'; const APM_INTEGRATION_CATEGORIES = ['observability', 'apm']; diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/array_union_to_callable.ts b/x-pack/solutions/observability/plugins/apm/common/utils/array_union_to_callable.ts index f376f7cd4ef21..3282b8d5b6dd2 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/array_union_to_callable.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/array_union_to_callable.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; // work around a TypeScript limitation described in https://stackoverflow.com/posts/49511416 diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/environment_query.ts b/x-pack/solutions/observability/plugins/apm/common/utils/environment_query.ts index 9d2f179cca7e8..b31f1730d08b1 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/environment_query.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/environment_query.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { SERVICE_ENVIRONMENT, SERVICE_NODE_NAME } from '../es_fields/apm'; import { ENVIRONMENT_ALL, ENVIRONMENT_NOT_DEFINED } from '../environment_filter_values'; import { SERVICE_NODE_NAME_MISSING } from '../service_nodes'; diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/flatten_object.ts b/x-pack/solutions/observability/plugins/apm/common/utils/flatten_object.ts index 4171800826d1d..d8c132017843b 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/flatten_object.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/flatten_object.ts @@ -6,7 +6,7 @@ */ import { compact, isObject } from 'lodash'; -import { Maybe } from '../../typings/common'; +import type { Maybe } from '../../typings/common'; export interface KeyValuePair { key: string; diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/formatters/duration.ts b/x-pack/solutions/observability/plugins/apm/common/utils/formatters/duration.ts index 62cc4935f8f6e..20993e47f3991 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/formatters/duration.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/formatters/duration.ts @@ -10,8 +10,8 @@ import moment from 'moment'; import { memoize } from 'lodash'; import { NOT_AVAILABLE_LABEL } from '../../i18n'; import { asDecimalOrInteger, asInteger, asDecimal } from './formatters'; -import { TimeUnit } from './datetime'; -import { Maybe } from '../../../typings/common'; +import type { TimeUnit } from './datetime'; +import type { Maybe } from '../../../typings/common'; import { isFiniteNumber } from '../is_finite_number'; interface FormatterOptions { diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/formatters/formatters.ts b/x-pack/solutions/observability/plugins/apm/common/utils/formatters/formatters.ts index 7c07bd89a9a4d..8c6636b30749d 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/formatters/formatters.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/formatters/formatters.ts @@ -7,7 +7,7 @@ import { asPercent as obltAsPercent } from '@kbn/observability-plugin/common'; import numeral from '@elastic/numeral'; -import { Maybe } from '../../../typings/common'; +import type { Maybe } from '../../../typings/common'; import { NOT_AVAILABLE_LABEL } from '../../i18n'; import { isFiniteNumber } from '../is_finite_number'; diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/formatters/size.ts b/x-pack/solutions/observability/plugins/apm/common/utils/formatters/size.ts index cf33462e26d82..7b4bab10c0cc2 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/formatters/size.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/formatters/size.ts @@ -7,7 +7,7 @@ import { memoize } from 'lodash'; import { asDecimal } from './formatters'; -import { Maybe } from '../../../typings/common'; +import type { Maybe } from '../../../typings/common'; function asKilobytes(value: number) { return `${asDecimal(value / 1000)} KB`; diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/join_by_key/index.ts b/x-pack/solutions/observability/plugins/apm/common/utils/join_by_key/index.ts index b44186b9e11e9..f02723abce6de 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/join_by_key/index.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/join_by_key/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { UnionToIntersection, ValuesType } from 'utility-types'; +import type { UnionToIntersection, ValuesType } from 'utility-types'; import { merge, castArray } from 'lodash'; import stableStringify from 'json-stable-stringify'; diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.test.ts b/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.test.ts index f965751333838..135c89f395241 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.test.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Coordinate } from '../../typings/timeseries'; +import type { Coordinate } from '../../typings/timeseries'; import { offsetPreviousPeriodCoordinates } from './offset_previous_period_coordinate'; const currentPeriodTimeseries: Coordinate[] = [ diff --git a/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.ts b/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.ts index a84a19ab14778..56bbe4c58fe48 100644 --- a/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.ts +++ b/x-pack/solutions/observability/plugins/apm/common/utils/offset_previous_period_coordinate.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { Coordinate } from '../../typings/timeseries'; +import type { Coordinate } from '../../typings/timeseries'; export function offsetPreviousPeriodCoordinates({ currentPeriodTimeseries, diff --git a/x-pack/solutions/observability/plugins/apm/common/waterfall/typings.ts b/x-pack/solutions/observability/plugins/apm/common/waterfall/typings.ts index 2fd0be94a5c5f..7d48428976b57 100644 --- a/x-pack/solutions/observability/plugins/apm/common/waterfall/typings.ts +++ b/x-pack/solutions/observability/plugins/apm/common/waterfall/typings.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { Exception } from '../../typings/es_schemas/raw/error_raw'; -import { EventOutcome } from '../../typings/es_schemas/raw/fields/event_outcome'; -import { SpanLink } from '../../typings/es_schemas/raw/fields/span_links'; -import { TimestampUs } from '../../typings/es_schemas/raw/fields/timestamp_us'; -import { AgentName } from '../../typings/es_schemas/ui/fields/agent'; +import type { Exception } from '../../typings/es_schemas/raw/error_raw'; +import type { EventOutcome } from '../../typings/es_schemas/raw/fields/event_outcome'; +import type { SpanLink } from '../../typings/es_schemas/raw/fields/span_links'; +import type { TimestampUs } from '../../typings/es_schemas/raw/fields/timestamp_us'; +import type { AgentName } from '../../typings/es_schemas/ui/fields/agent'; export interface WaterfallTransaction { timestamp: TimestampUs; diff --git a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/dependencies/generate_many_dependencies.ts b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/dependencies/generate_many_dependencies.ts index 27ce71db2e2c4..bf9d1802ba6f9 100644 --- a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/dependencies/generate_many_dependencies.ts +++ b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/dependencies/generate_many_dependencies.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { apm, Instance, timerange } from '@kbn/apm-synthtrace-client'; +import type { Instance } from '@kbn/apm-synthtrace-client'; +import { apm, timerange } from '@kbn/apm-synthtrace-client'; const MAX_DEPENDENCIES = 10000; const MAX_DEPENDENCIES_PER_SERVICE = 500; diff --git a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts index 4f4985224be6f..085d0ece47736 100644 --- a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts +++ b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/e2e/transaction_details/generate_span_links_data.ts @@ -5,7 +5,7 @@ * 2.0. */ import { apm, timerange } from '@kbn/apm-synthtrace-client'; -import { SpanLink } from '@kbn/apm-plugin/typings/es_schemas/raw/fields/span_links'; +import type { SpanLink } from '@kbn/apm-plugin/typings/es_schemas/raw/fields/span_links'; import { synthtrace } from '../../../synthtrace'; function getProducerInternalOnly() { diff --git a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/support/commands.ts b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/support/commands.ts index 5085fe7d171f3..aeab0d3683acf 100644 --- a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/support/commands.ts +++ b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/support/commands.ts @@ -5,7 +5,7 @@ * 2.0. */ import 'cypress-real-events/support'; -import { Interception } from 'cypress/types/net-stubbing'; +import type { Interception } from 'cypress/types/net-stubbing'; import 'cypress-axe'; import moment from 'moment'; import '@frsource/cypress-plugin-visual-regression-diff'; diff --git a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress_test_runner.ts b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress_test_runner.ts index f33e4aa5b72e1..2d6804917f0ae 100644 --- a/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress_test_runner.ts +++ b/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress_test_runner.ts @@ -10,7 +10,7 @@ import cypress from 'cypress'; import path from 'path'; import Url from 'url'; import { createApmUsers } from '@kbn/apm-plugin/server/test_helpers/create_apm_users/create_apm_users'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; export async function cypressTestRunner({ getService }: FtrProviderContext) { const config = getService('config'); diff --git a/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_config.ts b/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_config.ts index 58cf601c33c43..5be4a8630f374 100644 --- a/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_config.ts +++ b/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_config.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { FtrConfigProviderContext } from '@kbn/test'; +import type { FtrConfigProviderContext } from '@kbn/test'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { commonFunctionalServices } from '@kbn/ftr-common-functional-services'; import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services'; import { cypressTestRunner } from './cypress_test_runner'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; async function ftrConfig({ readConfigFile }: FtrConfigProviderContext) { const kibanaCommonTestsConfig = await readConfigFile( diff --git a/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_provider_context.d.ts b/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_provider_context.d.ts index b87f35adcccf2..30a5f1fe518da 100644 --- a/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_provider_context.d.ts +++ b/x-pack/solutions/observability/plugins/apm/ftr_e2e/ftr_provider_context.d.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { GenericFtrProviderContext } from '@kbn/test'; +import type { GenericFtrProviderContext } from '@kbn/test'; export type FtrProviderContext = GenericFtrProviderContext<{}, {}>; diff --git a/x-pack/solutions/observability/plugins/apm/public/application/index.tsx b/x-pack/solutions/observability/plugins/apm/public/application/index.tsx index f9785a136b06e..aa2aa97453ad0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/application/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/application/index.tsx @@ -8,11 +8,12 @@ import React from 'react'; import ReactDOM from 'react-dom'; import type { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public'; -import { AppMountParameters, CoreStart, APP_WRAPPER_CLASS } from '@kbn/core/public'; +import type { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { APP_WRAPPER_CLASS } from '@kbn/core/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; -import { ConfigSchema } from '..'; -import { ApmPluginSetupDeps, ApmPluginStartDeps, ApmServices } from '../plugin'; +import type { ConfigSchema } from '..'; +import type { ApmPluginSetupDeps, ApmPluginStartDeps, ApmServices } from '../plugin'; import { createCallApmApi } from '../services/rest/create_call_apm_api'; import { setHelpExtension } from '../set_help_extension'; import { setReadonlyBadge } from '../update_badge'; diff --git a/x-pack/solutions/observability/plugins/apm/public/assistant_functions/get_apm_timeseries.tsx b/x-pack/solutions/observability/plugins/apm/public/assistant_functions/get_apm_timeseries.tsx index 9c29bb936db8a..ef96fe9141a4b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/assistant_functions/get_apm_timeseries.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/assistant_functions/get_apm_timeseries.tsx @@ -19,7 +19,7 @@ import type { GetApmTimeseriesFunctionArguments, GetApmTimeseriesFunctionResponse, } from '../../server/assistant_functions/get_apm_timeseries'; -import { Coordinate, TimeSeries } from '../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../typings/timeseries'; import { ChartType, getTimeSeriesColor, diff --git a/x-pack/solutions/observability/plugins/apm/public/assistant_functions/index.ts b/x-pack/solutions/observability/plugins/apm/public/assistant_functions/index.ts index 773d2fbfba27f..32ad04141edc4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/assistant_functions/index.ts +++ b/x-pack/solutions/observability/plugins/apm/public/assistant_functions/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RegisterRenderFunctionDefinition } from '@kbn/observability-ai-assistant-plugin/public/types'; +import type { RegisterRenderFunctionDefinition } from '@kbn/observability-ai-assistant-plugin/public/types'; import { registerGetApmTimeseriesFunction } from './get_apm_timeseries'; export async function registerAssistantFunctions({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/index.tsx index ca9e4e1182c92..a2a6072db01a1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/index.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { defaults, omit } from 'lodash'; import React, { useEffect } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; import { ML_ANOMALY_SEVERITY } from '@kbn/ml-anomaly-utils/anomaly_severity'; @@ -17,7 +17,7 @@ import { EuiText } from '@elastic/eui'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import { createCallApmApi } from '../../../../services/rest/create_call_apm_api'; import { EnvironmentField, ServiceField, TransactionTypeField } from '../../utils/fields'; -import { AlertMetadata } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; import { ApmRuleParamsContainer } from '../../ui_components/apm_rule_params_container'; import { PopoverExpression } from '../../ui_components/popover_expression'; import { AnomalySeverity, SelectAnomalySeverity } from './select_anomaly_severity'; @@ -26,7 +26,7 @@ import { ANOMALY_DETECTOR_SELECTOR_OPTIONS, getApmMlDetectorLabel, } from '../../../../../common/rules/apm_rule_types'; -import { AnomalyDetectorType } from '../../../../../common/anomaly_detection/apm_ml_detectors'; +import type { AnomalyDetectorType } from '../../../../../common/anomaly_detection/apm_ml_detectors'; export interface AlertParams { anomalySeverityType?: diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_detector.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_detector.tsx index d0800b7ecf63a..a3469b6f2c2b9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_detector.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_detector.tsx @@ -6,9 +6,10 @@ */ import React, { useCallback } from 'react'; -import { EuiSelectable, EuiSelectableOption } from '@elastic/eui'; +import type { EuiSelectableOption } from '@elastic/eui'; +import { EuiSelectable } from '@elastic/eui'; import { ANOMALY_DETECTOR_SELECTOR_OPTIONS } from '../../../../../common/rules/apm_rule_types'; -import { AnomalyDetectorType } from '../../../../../common/anomaly_detection/apm_ml_detectors'; +import type { AnomalyDetectorType } from '../../../../../common/anomaly_detection/apm_ml_detectors'; interface Props { values: AnomalyDetectorType[]; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_severity.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_severity.tsx index 1e36b104a099e..3ea2146acdd24 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_severity.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/anomaly_rule_type/select_anomaly_severity.tsx @@ -9,10 +9,8 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiHealth, EuiSpacer, EuiSuperSelect, EuiText } from '@elastic/eui'; import { getSeverityColor } from '../../../../../common/anomaly_detection'; -import { - AnomalyAlertSeverityType, - ANOMALY_ALERT_SEVERITY_TYPES, -} from '../../../../../common/rules/apm_rule_types'; +import type { AnomalyAlertSeverityType } from '../../../../../common/rules/apm_rule_types'; +import { ANOMALY_ALERT_SEVERITY_TYPES } from '../../../../../common/rules/apm_rule_types'; export function AnomalySeverity({ type }: { type: AnomalyAlertSeverityType }) { const selectedOption = ANOMALY_ALERT_SEVERITY_TYPES.find((option) => option.type === type)!; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.stories.tsx index 4437a05a3c731..a81c0722c6baa 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.stories.tsx @@ -5,16 +5,17 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import React, { useState } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; -import { ErrorCountRuleParams, ErrorCountRuleType } from '.'; +import type { ErrorCountRuleParams } from '.'; +import { ErrorCountRuleType } from '.'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import { createCallApmApi } from '../../../../services/rest/create_call_apm_api'; -import { AlertMetadata } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; const coreMock = { http: { get: async () => ({}) }, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx index e657fbd11d12e..2b9b252495837 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/error_count_rule_type/index.tsx @@ -8,13 +8,13 @@ import { i18n } from '@kbn/i18n'; import { defaults, omit } from 'lodash'; import React, { useCallback, useEffect } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { ForLastExpression, TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; import { EuiFormRow } from '@elastic/eui'; import { EuiSpacer } from '@elastic/eui'; -import { EuiSwitchEvent } from '@elastic/eui'; -import { SearchConfigurationType } from '../../../../../common/rules/schema'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import type { SearchConfigurationType } from '../../../../../common/rules/schema'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import { asInteger } from '../../../../../common/utils/formatters'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; @@ -26,7 +26,8 @@ import { IsAboveField, ServiceField, } from '../../utils/fields'; -import { AlertMetadata, getIntervalAndTimeRange } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; +import { getIntervalAndTimeRange } from '../../utils/helper'; import { ApmRuleParamsContainer } from '../../ui_components/apm_rule_params_container'; import { APMRuleGroupBy } from '../../ui_components/apm_rule_group_by'; import { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/register_apm_rule_types.ts b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/register_apm_rule_types.ts index 57200ec72a7e9..633308babcf10 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/register_apm_rule_types.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/register_apm_rule_types.ts @@ -16,7 +16,7 @@ import { transactionDurationMessage, transactionErrorRateMessage, } from '../../../../common/rules/default_action_message'; -import { AlertParams } from './anomaly_rule_type'; +import type { AlertParams } from './anomaly_rule_type'; // copied from elasticsearch_fieldnames.ts to limit page load bundle size const SERVICE_ENVIRONMENT = 'service.environment'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.stories.tsx index c6418d70fc080..3208c3fb52152 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.stories.tsx @@ -5,13 +5,15 @@ * 2.0. */ -import { Story } from '@storybook/react'; -import React, { ComponentType, useState } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { Story } from '@storybook/react'; +import type { ComponentType } from 'react'; +import React, { useState } from 'react'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { TransactionDurationRuleParams, TransactionDurationRuleType } from '.'; +import type { TransactionDurationRuleParams } from '.'; +import { TransactionDurationRuleType } from '.'; import { AggregationType } from '../../../../../common/rules/apm_rule_types'; -import { AlertMetadata } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; const KibanaReactContext = createKibanaReactContext({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx index f2f2ab0e50510..1c8e3de75cc0c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_duration_rule_type/index.tsx @@ -9,13 +9,13 @@ import { EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { defaults, map, omit } from 'lodash'; import React, { useCallback, useEffect } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { ForLastExpression, TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; import { EuiFormRow } from '@elastic/eui'; import { EuiSpacer } from '@elastic/eui'; -import { EuiSwitchEvent } from '@elastic/eui'; -import { SearchConfigurationType } from '../../../../../common/rules/schema'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import type { SearchConfigurationType } from '../../../../../common/rules/schema'; import { AggregationType } from '../../../../../common/rules/apm_rule_types'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import { getDurationFormatter } from '../../../../../common/utils/formatters'; @@ -33,7 +33,8 @@ import { TransactionTypeField, TransactionNameField, } from '../../utils/fields'; -import { AlertMetadata, getIntervalAndTimeRange } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; +import { getIntervalAndTimeRange } from '../../utils/helper'; import { ApmRuleParamsContainer } from '../../ui_components/apm_rule_params_container'; import { PopoverExpression } from '../../ui_components/popover_expression'; import { APMRuleGroupBy } from '../../ui_components/apm_rule_group_by'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.stories.tsx index 7b8a073417a40..fc044ba58402a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.stories.tsx @@ -5,12 +5,14 @@ * 2.0. */ -import { Story } from '@storybook/react'; -import React, { ComponentType, useState } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { Story } from '@storybook/react'; +import type { ComponentType } from 'react'; +import React, { useState } from 'react'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { ErrorRateRuleParams, TransactionErrorRateRuleType } from '.'; -import { AlertMetadata } from '../../utils/helper'; +import type { ErrorRateRuleParams } from '.'; +import { TransactionErrorRateRuleType } from '.'; +import type { AlertMetadata } from '../../utils/helper'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; const KibanaReactContext = createKibanaReactContext({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx index 35a64ed9d8c2a..c023df1cf9a60 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/rule_types/transaction_error_rate_rule_type/index.tsx @@ -8,13 +8,13 @@ import { defaults, omit } from 'lodash'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useEffect } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { ForLastExpression, TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; import { EuiFormRow } from '@elastic/eui'; import { EuiSpacer } from '@elastic/eui'; -import { EuiSwitchEvent } from '@elastic/eui'; -import { SearchConfigurationType } from '../../../../../common/rules/schema'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import type { SearchConfigurationType } from '../../../../../common/rules/schema'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import { asPercent } from '../../../../../common/utils/formatters'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; @@ -27,7 +27,8 @@ import { TransactionTypeField, TransactionNameField, } from '../../utils/fields'; -import { AlertMetadata, getIntervalAndTimeRange } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; +import { getIntervalAndTimeRange } from '../../utils/helper'; import { ApmRuleParamsContainer } from '../../ui_components/apm_rule_params_container'; import { APMRuleGroupBy } from '../../ui_components/apm_rule_group_by'; import { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/constants.ts b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/constants.ts index bd333b40e5a69..2c66c59f2c5e1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/constants.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/constants.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SettingsSpec } from '@elastic/charts'; +import type { SettingsSpec } from '@elastic/charts'; export const DEFAULT_DATE_FORMAT = 'HH:mm:ss'; export const CHART_SETTINGS: Partial = { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx index b917d6226465c..bb01fdb084669 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/failed_transaction_chart.tsx @@ -7,27 +7,27 @@ /* Error Rate */ import React from 'react'; +import type { RecursivePartial } from '@elastic/eui'; import { EuiFlexItem, EuiPanel, EuiFlexGroup, EuiTitle, EuiIconTip, - RecursivePartial, useEuiTheme, transparentize, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; -import { Theme } from '@elastic/charts'; +import type { Theme } from '@elastic/charts'; import { AlertActiveTimeRangeAnnotation, AlertAnnotation } from '@kbn/observability-alert-details'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { CHART_SETTINGS, DEFAULT_DATE_FORMAT } from './constants'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { ChartType } from '../../../shared/charts/helper/get_timeseries_color'; import * as get_timeseries_color from '../../../shared/charts/helper/get_timeseries_color'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { errorRateI18n } from '../../../shared/charts/failed_transaction_rate_chart'; import { TimeseriesChart } from '../../../shared/charts/timeseries_chart'; import { yLabelFormat } from './helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/index.tsx index ada563851bdcc..2d7bb9aab2662 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/index.tsx @@ -22,7 +22,7 @@ import { ALERT_START, } from '@kbn/rule-data-utils'; import { EuiCallOut } from '@elastic/eui'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { SERVICE_ENVIRONMENT, SERVICE_NAME, @@ -36,7 +36,7 @@ import FailedTransactionChart from './failed_transaction_chart'; import { getAggsTypeFromRule } from './helpers'; import LatencyChart from './latency_chart'; import ThroughputChart from './throughput_chart'; -import { AlertDetailsAppSectionProps } from './types'; +import type { AlertDetailsAppSectionProps } from './types'; import { createCallApmApi } from '../../../../services/rest/create_call_apm_api'; export function AlertDetailsAppSection({ rule, alert, timeZone }: AlertDetailsAppSectionProps) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx index 74468c5152ec5..33b7233732c7d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import { Theme } from '@elastic/charts'; -import { RecursivePartial } from '@elastic/eui'; -import React, { useMemo, ReactElement } from 'react'; +import type { Theme } from '@elastic/charts'; +import type { RecursivePartial } from '@elastic/eui'; +import type { ReactElement } from 'react'; +import React, { useMemo } from 'react'; import { EuiFlexItem, EuiPanel, EuiFlexGroup, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { getDurationFormatter } from '@kbn/observability-plugin/common'; import { ALERT_RULE_TYPE_ID, ALERT_EVALUATION_THRESHOLD, ALERT_END } from '@kbn/rule-data-utils'; import type { TopAlert } from '@kbn/observability-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/throughput_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/throughput_chart.tsx index f70de0861bb28..3a610e9fdd2a4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/throughput_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alert_details_app_section/throughput_chart.tsx @@ -6,16 +6,10 @@ */ import React from 'react'; -import { Theme } from '@elastic/charts'; -import { BoolQuery } from '@kbn/es-query'; -import { - RecursivePartial, - EuiFlexItem, - EuiPanel, - EuiFlexGroup, - EuiTitle, - EuiIconTip, -} from '@elastic/eui'; +import type { Theme } from '@elastic/charts'; +import type { BoolQuery } from '@kbn/es-query'; +import type { RecursivePartial } from '@elastic/eui'; +import { EuiFlexItem, EuiPanel, EuiFlexGroup, EuiTitle, EuiIconTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { CHART_SETTINGS } from './constants'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alerting_flyout/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alerting_flyout/index.tsx index 5736389277b0b..b56b12f883c96 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alerting_flyout/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/alerting_flyout/index.tsx @@ -11,10 +11,10 @@ import { ApmRuleType } from '@kbn/rule-data-utils'; import type { RuleTypeParams } from '@kbn/alerting-plugin/common'; import { APM_SERVER_FEATURE_ID } from '../../../../../common/rules/apm_rule_types'; import { getInitialAlertValues } from '../../utils/get_initial_alert_values'; -import { ApmPluginStartDeps } from '../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../plugin'; import { useServiceName } from '../../../../hooks/use_service_name'; import { useApmParams } from '../../../../hooks/use_apm_params'; -import { AlertMetadata } from '../../utils/helper'; +import type { AlertMetadata } from '../../utils/helper'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import { useTimeRange } from '../../../../hooks/use_time_range'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_kql_filter.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_kql_filter.tsx index 8715f4f145579..84e8af9a4f5a2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_kql_filter.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_kql_filter.tsx @@ -10,10 +10,10 @@ import React from 'react'; import { EuiSwitch } from '@elastic/eui'; import { EuiFormRow } from '@elastic/eui'; import { EuiSpacer } from '@elastic/eui'; -import { EuiSwitchEvent } from '@elastic/eui'; -import { TransactionDurationRuleParams } from '../rule_types/transaction_duration_rule_type'; -import { ErrorRateRuleParams } from '../rule_types/transaction_error_rate_rule_type'; -import { ErrorCountRuleParams } from '../rule_types/error_count_rule_type'; +import type { EuiSwitchEvent } from '@elastic/eui'; +import type { TransactionDurationRuleParams } from '../rule_types/transaction_duration_rule_type'; +import type { ErrorRateRuleParams } from '../rule_types/transaction_error_rate_rule_type'; +import type { ErrorCountRuleParams } from '../rule_types/error_count_rule_type'; import { ApmRuleUnifiedSearchBar } from './apm_rule_unified_search_bar'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.test.tsx index d6f05635b86ef..e3e927b4291b9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.test.tsx @@ -6,7 +6,8 @@ */ import { render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ApmRuleParamsContainer } from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.tsx index 74a22c7c32d3c..9c5e7974bfd0c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_params_container/index.tsx @@ -9,7 +9,8 @@ import { EuiCallOut, EuiFlexGrid, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; import moment from 'moment'; -import { getTimeUnitLabel, TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; +import type { TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; +import { getTimeUnitLabel } from '@kbn/triggers-actions-ui-plugin/public'; interface MinimumWindowSize { value: number; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_unified_search_bar.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_unified_search_bar.tsx index 393492cfae9a0..36f1c8bb68f99 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_unified_search_bar.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/apm_rule_unified_search_bar.tsx @@ -7,13 +7,14 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFormErrorText } from '@elastic/eui'; -import { Query, fromKueryExpression } from '@kbn/es-query'; +import type { Query } from '@kbn/es-query'; +import { fromKueryExpression } from '@kbn/es-query'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ApmPluginStartDeps } from '../../../plugin'; +import type { ApmPluginStartDeps } from '../../../plugin'; import { useAdHocApmDataView } from '../../../hooks/use_adhoc_apm_data_view'; -import { TransactionDurationRuleParams } from '../rule_types/transaction_duration_rule_type'; -import { ErrorRateRuleParams } from '../rule_types/transaction_error_rate_rule_type'; -import { ErrorCountRuleParams } from '../rule_types/error_count_rule_type'; +import type { TransactionDurationRuleParams } from '../rule_types/transaction_duration_rule_type'; +import type { ErrorRateRuleParams } from '../rule_types/transaction_error_rate_rule_type'; +import type { ErrorCountRuleParams } from '../rule_types/error_count_rule_type'; export function ApmRuleUnifiedSearchBar({ placeholder, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/chart_preview_helper.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/chart_preview_helper.tsx index e82e14350cc7d..4c58a79d7cf0d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/chart_preview_helper.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/chart_preview_helper.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { EuiLoadingChart } from '@elastic/eui'; import { EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { Coordinate } from '../../../../../typings/timeseries'; +import type { Coordinate } from '../../../../../typings/timeseries'; export const TIME_LABELS = { s: i18n.translate('xpack.apm.alerts.timeLabels.seconds', { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/index.tsx index c895be7294a2c..845253da4afa7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/ui_components/chart_preview/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { RectAnnotationDatum, TickFormatter } from '@elastic/charts'; import { AnnotationDomainType, Axis, @@ -13,22 +14,20 @@ import { LineAnnotation, Position, RectAnnotation, - RectAnnotationDatum, ScaleType, Settings, - TickFormatter, Tooltip, niceTimeFormatter, } from '@elastic/charts'; import { EuiSpacer, useEuiTheme } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { IUiSettingsClient } from '@kbn/core/public'; -import { TimeUnitChar } from '@kbn/observability-plugin/common'; +import type { IUiSettingsClient } from '@kbn/core/public'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import moment from 'moment'; import { i18n } from '@kbn/i18n'; import { useElasticChartsTheme } from '@kbn/charts-theme'; -import { Coordinate } from '../../../../../typings/timeseries'; +import type { Coordinate } from '../../../../../typings/timeseries'; import { getTimeZone } from '../../../shared/charts/helper/timezone'; import { TimeLabelForData, TIME_LABELS, getDomain } from './chart_preview_helper'; import { ALERT_PREVIEW_BUCKET_SIZE } from '../../utils/helper'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.test.ts index 6427d23b7f2d6..c69f946142efe 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Capabilities } from '@kbn/core/public'; -import { ApmPluginSetupDeps } from '../../../plugin'; +import type { Capabilities } from '@kbn/core/public'; +import type { ApmPluginSetupDeps } from '../../../plugin'; import { getAlertingCapabilities } from './get_alerting_capabilities'; describe('getAlertingCapabilities', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.ts b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.ts index 7af8eb7a2c8aa..9a71f29663a17 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_alerting_capabilities.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Capabilities } from '@kbn/core/public'; -import { ApmPluginSetupDeps } from '../../../plugin'; +import type { Capabilities } from '@kbn/core/public'; +import type { ApmPluginSetupDeps } from '../../../plugin'; export const getAlertingCapabilities = ( plugins: ApmPluginSetupDeps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_initial_alert_values.ts b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_initial_alert_values.ts index 4a5e53f436e1a..c4b481733792b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_initial_alert_values.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/get_initial_alert_values.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ApmRuleType } from '@kbn/rule-data-utils'; +import type { ApmRuleType } from '@kbn/rule-data-utils'; import { RULE_TYPES_CONFIG } from '../../../../common/rules/apm_rule_types'; export function getInitialAlertValues( diff --git a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/helper.ts b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/helper.ts index e2becc4f4ec1b..88ca49d596f6d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/helper.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/alerting/utils/helper.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; +import type { TIME_UNITS } from '@kbn/triggers-actions-ui-plugin/public'; import type { RuleTypeMetaData } from '@kbn/alerting-plugin/common'; import moment from 'moment'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/alerts_overview/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/alerts_overview/index.tsx index a14731db9efac..455b19d9d164f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/alerts_overview/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/alerts_overview/index.tsx @@ -8,16 +8,16 @@ import React, { useState, useMemo, useEffect, useCallback } from 'react'; import { useHistory } from 'react-router-dom'; import { ObservabilityAlertSearchBar } from '@kbn/observability-plugin/public'; -import { AlertStatus } from '@kbn/observability-plugin/common/typings'; +import type { AlertStatus } from '@kbn/observability-plugin/common/typings'; import { EuiPanel, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { AlertConsumers } from '@kbn/rule-data-utils'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { APM_ALERTING_CONSUMERS, APM_ALERTING_RULE_TYPE_IDS, } from '../../../../common/alerting/config/apm_alerting_feature_ids'; -import { ApmPluginStartDeps } from '../../../plugin'; +import type { ApmPluginStartDeps } from '../../../plugin'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { getEnvironmentKuery } from '../../../../common/environment_filter_values'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/breadcrumb/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/breadcrumb/index.tsx index 24c4b7e88fb1b..e178d40e04449 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/breadcrumb/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/breadcrumb/index.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import type React from 'react'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useBreadcrumb } from '../../../context/breadcrumbs/use_breadcrumb'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx index 387c517d8b24a..8983e2f2836c1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/context_popover/field_stats_popover.tsx @@ -8,12 +8,12 @@ import { EuiButtonIcon, EuiToolTip, useEuiTheme } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { - FieldStats, +import type { FieldStatsServices, FieldStatsProps, FieldStatsState, } from '@kbn/unified-field-list/src/components/field_stats'; +import { FieldStats } from '@kbn/unified-field-list/src/components/field_stats'; import { FieldPopover, FieldPopoverHeader, @@ -26,7 +26,7 @@ import { } from '@kbn/unified-field-list/src/components/field_stats'; import { EuiHorizontalRule, EuiText, EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; import numeral from '@elastic/numeral'; import { css } from '@emotion/react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/correlations_table.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/correlations_table.tsx index 8524a29fb4b60..077eafbd33bf6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/correlations_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/correlations_table.tsx @@ -7,7 +7,8 @@ import React, { useCallback, useMemo, useState } from 'react'; import { debounce } from 'lodash'; -import { EuiBasicTable, EuiBasicTableColumn, useEuiTheme } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import type { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; import type { Criteria } from '@elastic/eui/src/components/basic_table/basic_table'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx index e6c6ce65dfffd..be1678cb7ac52 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/failed_transactions_correlations.tsx @@ -9,8 +9,8 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { orderBy } from 'lodash'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { - EuiBasicTableColumn, EuiFlexGroup, EuiFlexItem, EuiSpacer, @@ -30,7 +30,7 @@ import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { FieldStatsPopover } from './context_popover/field_stats_popover'; import { asPercent, asPreciseDecimal } from '../../../../common/utils/formatters'; -import { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; +import type { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useLocalStorage } from '../../../hooks/use_local_storage'; @@ -45,7 +45,7 @@ import { DurationDistributionChart } from '../../shared/charts/duration_distribu import { CorrelationsEmptyStatePrompt } from './empty_state_prompt'; import { CrossClusterSearchCompatibilityWarning } from './cross_cluster_search_warning'; import { CorrelationsProgressControls } from './progress_controls'; -import { OnAddFilter } from './context_popover/field_stats_popover'; +import type { OnAddFilter } from './context_popover/field_stats_popover'; import { useFailedTransactionsCorrelations } from './use_failed_transactions_correlations'; import { getTransactionDistributionChartData } from './get_transaction_distribution_chart_data'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/get_transaction_distribution_chart_data.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/get_transaction_distribution_chart_data.ts index a9be40a81579c..9906c60ed00b7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/get_transaction_distribution_chart_data.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/get_transaction_distribution_chart_data.ts @@ -8,9 +8,9 @@ import { i18n } from '@kbn/i18n'; import type { EuiThemeComputed } from '@elastic/eui'; import type { HistogramItem } from '../../../../common/correlations/types'; -import { DurationDistributionChartData } from '../../shared/charts/duration_distribution_chart'; -import { LatencyCorrelation } from '../../../../common/correlations/latency_correlations/types'; -import { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; +import type { DurationDistributionChartData } from '../../shared/charts/duration_distribution_chart'; +import type { LatencyCorrelation } from '../../../../common/correlations/latency_correlations/types'; +import type { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; export function getTransactionDistributionChartData({ euiTheme, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.test.tsx index 483befd6e3d86..94969f2d97e68 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.test.tsx @@ -7,12 +7,13 @@ import { render, screen, waitFor } from '@testing-library/react'; import { createMemoryHistory } from 'history'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { of } from 'rxjs'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { merge } from 'lodash'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import type { IKibanaSearchResponse } from '@kbn/search-types'; @@ -20,7 +21,7 @@ import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import type { LatencyCorrelationsResponse } from '../../../../common/correlations/latency_correlations/types'; import { MockUrlParamsContextProvider } from '../../../context/url_params_context/mock_url_params_context_provider'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.tsx index 92a1e996f65ad..e3de5f794a15f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/latency_correlations.tsx @@ -9,8 +9,8 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { orderBy } from 'lodash'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { - EuiBasicTableColumn, EuiFlexGroup, EuiFlexItem, EuiSpacer, @@ -19,8 +19,8 @@ import { EuiIconTip, useEuiTheme, } from '@elastic/eui'; -import { Direction } from '@elastic/eui/src/services/sort/sort_direction'; -import { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; +import type { Direction } from '@elastic/eui/src/services/sort/sort_direction'; +import type { EuiTableSortingType } from '@elastic/eui/src/components/basic_table/table_types'; import { i18n } from '@kbn/i18n'; @@ -30,7 +30,7 @@ import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { FieldStatsPopover } from './context_popover/field_stats_popover'; import { asPreciseDecimal } from '../../../../common/utils/formatters'; -import { LatencyCorrelation } from '../../../../common/correlations/latency_correlations/types'; +import type { LatencyCorrelation } from '../../../../common/correlations/latency_correlations/types'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; @@ -45,7 +45,7 @@ import { getOverallHistogram } from './utils/get_overall_histogram'; import { CorrelationsEmptyStatePrompt } from './empty_state_prompt'; import { CrossClusterSearchCompatibilityWarning } from './cross_cluster_search_warning'; import { CorrelationsProgressControls } from './progress_controls'; -import { OnAddFilter } from './context_popover/field_stats_popover'; +import type { OnAddFilter } from './context_popover/field_stats_popover'; import { useLatencyCorrelations } from './use_latency_correlations'; import { getTransactionDistributionChartData } from './get_transaction_distribution_chart_data'; import { ChartTitleToolTip } from './chart_title_tool_tip'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx index 4b93123b589bf..81db547aa3202 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.test.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import React, { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; +import React from 'react'; import { merge } from 'lodash'; import { createMemoryHistory } from 'history'; import { act, waitFor, renderHook } from '@testing-library/react'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts index b5b99b49f8ec6..d946f9433e96c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_failed_transactions_correlations.ts @@ -24,11 +24,11 @@ import { LatencyDistributionChartType } from '../../../../common/latency_distrib import { callApmApi } from '../../../services/rest/create_call_apm_api'; +import type { CorrelationsProgress } from './utils/analysis_hook_utils'; import { getInitialResponse, getFailedTransactionsCorrelationsSortedByScore, getReducer, - CorrelationsProgress, } from './utils/analysis_hook_utils'; import { useFetchParams } from './use_fetch_params'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx index e76420e3c1a92..797a958a658ba 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.test.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import React, { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; +import React from 'react'; import { merge } from 'lodash'; import { createMemoryHistory } from 'history'; import { act, waitFor, renderHook } from '@testing-library/react'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.ts index 65d5edb441e99..6207c13af5146 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/use_latency_correlations.ts @@ -24,11 +24,11 @@ import { LatencyDistributionChartType } from '../../../../common/latency_distrib import { callApmApi } from '../../../services/rest/create_call_apm_api'; +import type { CorrelationsProgress } from './utils/analysis_hook_utils'; import { getInitialResponse, getLatencyCorrelationsSortedByCorrelation, getReducer, - CorrelationsProgress, } from './utils/analysis_hook_utils'; import { useFetchParams } from './use_fetch_params'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/utils/get_failed_transactions_correlation_impact_label.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/utils/get_failed_transactions_correlation_impact_label.ts index 556c13d7467bb..1f4950532d746 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/utils/get_failed_transactions_correlation_impact_label.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/correlations/utils/get_failed_transactions_correlation_impact_label.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { FailedTransactionsCorrelation, FailedTransactionsCorrelationsImpactThreshold, } from '../../../../../common/correlations/failed_transactions_correlations/types'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx index 9d77e1807c2f5..eb3211ff4798d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_detail_operations/dependency_detail_operations_list/index.tsx @@ -14,12 +14,11 @@ import { useApmParams } from '../../../../hooks/use_apm_params'; import { useBreakpoints } from '../../../../hooks/use_breakpoints'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { - getSpanMetricColumns, - SpanMetricGroup, -} from '../../../shared/dependencies_table/get_span_metric_columns'; +import type { SpanMetricGroup } from '../../../shared/dependencies_table/get_span_metric_columns'; +import { getSpanMetricColumns } from '../../../shared/dependencies_table/get_span_metric_columns'; import { EmptyMessage } from '../../../shared/empty_message'; -import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; +import type { ITableColumn } from '../../../shared/managed_table'; +import { ManagedTable } from '../../../shared/managed_table'; import { getComparisonEnabled } from '../../../shared/time_comparison/get_comparison_enabled'; import { TruncateWithTooltip } from '../../../shared/truncate_with_tooltip'; import { DependencyOperationDetailLink } from '../../dependency_operation_detail_view/dependency_operation_detail_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx index 852af7c321424..94901a1bf027d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_detail_link.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; import { EuiLink } from '@elastic/eui'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { useApmRouter } from '../../../hooks/use_apm_router'; -import { ApmRoutes } from '../../routing/apm_route_config'; +import type { ApmRoutes } from '../../routing/apm_route_config'; type Query = TypeOf['query']; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx index f7cd26fab3f81..c929866d1bcb6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/dependency_operation_distribution_chart.tsx @@ -13,7 +13,7 @@ import { useApmParams } from '../../../hooks/use_apm_params'; import { useFetcher } from '../../../hooks/use_fetcher'; import { useSampleChartSelection } from '../../../hooks/use_sample_chart_selection'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { DurationDistributionChartData } from '../../shared/charts/duration_distribution_chart'; +import type { DurationDistributionChartData } from '../../shared/charts/duration_distribution_chart'; import { DurationDistributionChartWithScrubber } from '../../shared/charts/duration_distribution_chart_with_scrubber'; export function DependencyOperationDistributionChart() { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx index ef7ea348d37f7..adbbf622aa489 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/index.tsx @@ -20,7 +20,7 @@ import { ResettingHeightRetainer } from '../../shared/height_retainer/resetting_ import { push, replace } from '../../shared/links/url_helpers'; import { useWaterfallFetcher } from '../transaction_details/use_waterfall_fetcher'; import { WaterfallWithSummary } from '../transaction_details/waterfall_with_summary'; -import { TransactionTab } from '../transaction_details/waterfall_with_summary/transaction_tabs'; +import type { TransactionTab } from '../transaction_details/waterfall_with_summary/transaction_tabs'; import { DependencyOperationDistributionChart } from './dependency_operation_distribution_chart'; import { DetailViewHeader } from './detail_view_header'; import { maybeRedirectToAvailableSpanSample } from './maybe_redirect_to_available_span_sample'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.test.ts index 3ad72ce068b9e..e8e371e2515a6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.test.ts @@ -6,8 +6,8 @@ */ import { range } from 'lodash'; import { maybeRedirectToAvailableSpanSample } from './maybe_redirect_to_available_span_sample'; -import { replace as urlHelpersReplace } from '../../shared/links/url_helpers'; -import { History } from 'history'; +import type { replace as urlHelpersReplace } from '../../shared/links/url_helpers'; +import type { History } from 'history'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; describe('maybeRedirectToAvailableSpanSample', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.ts index d47cdbca64b92..71c5f6dfdf59d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/dependency_operation_detail_view/maybe_redirect_to_available_span_sample.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { History } from 'history'; +import type { History } from 'history'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { replace as urlHelpersReplace } from '../../shared/links/url_helpers'; +import type { replace as urlHelpersReplace } from '../../shared/links/url_helpers'; export function maybeRedirectToAvailableSpanSample({ spanFetchStatus, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/apm_documents_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/apm_documents_tab.tsx index 28a2b2f01b9ab..c7dbc4bd28881 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/apm_documents_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/apm_documents_tab.tsx @@ -5,14 +5,8 @@ * 2.0. */ -import { - EuiBadge, - EuiBasicTable, - EuiBasicTableColumn, - EuiSpacer, - EuiText, - EuiToolTip, -} from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBadge, EuiBasicTable, EuiSpacer, EuiText, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { orderBy } from 'lodash'; @@ -21,7 +15,7 @@ import { asBigNumber, asInteger } from '../../../../common/utils/formatters'; import type { ApmEvent } from '../../../../server/routes/diagnostics/bundle/get_apm_events'; import { useAdHocApmDataView } from '../../../hooks/use_adhoc_apm_data_view'; import { useApmParams } from '../../../hooks/use_apm_params'; -import { ApmPluginStartDeps } from '../../../plugin'; +import type { ApmPluginStartDeps } from '../../../plugin'; import { SearchBar } from '../../shared/search_bar/search_bar'; import { useDiagnosticsContext } from './context/use_diagnostics'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/context/diagnostics_context.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/context/diagnostics_context.tsx index f8ebfe98d6709..560ddafec281e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/context/diagnostics_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/context/diagnostics_context.tsx @@ -8,7 +8,7 @@ import React, { useMemo, useState } from 'react'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; type DiagnosticsBundle = APIReturnType<'GET /internal/apm/diagnostics'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/data_stream_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/data_stream_tab.tsx index 25b01126cfeec..b049f58c62a83 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/data_stream_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/data_stream_tab.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { IndicesDataStream } from '@elastic/elasticsearch/lib/api/types'; -import { EuiBadge, EuiBasicTable, EuiBasicTableColumn, EuiSpacer, EuiText } from '@elastic/eui'; +import type { IndicesDataStream } from '@elastic/elasticsearch/lib/api/types'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBadge, EuiBasicTable, EuiSpacer, EuiText } from '@elastic/eui'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { useDiagnosticsContext } from './context/use_diagnostics'; type DiagnosticsBundle = APIReturnType<'GET /internal/apm/diagnostics'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/import_export_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/import_export_tab.tsx index 4d1074b3b40fa..bdeead278986d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/import_export_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/import_export_tab.tsx @@ -16,7 +16,7 @@ import { EuiCallOut, EuiSpacer, } from '@elastic/eui'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { useDiagnosticsContext } from './context/use_diagnostics'; import { getIsIndexTemplateOk } from './summary_tab/index_templates_status'; import { getIsIndicesTabOk } from './summary_tab/indicies_status'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_pattern_settings_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_pattern_settings_tab.tsx index cd9e20b2bc6ba..fe6d1f99a9367 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_pattern_settings_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_pattern_settings_tab.tsx @@ -8,7 +8,7 @@ import { EuiLink, EuiLoadingElastic } from '@elastic/eui'; import { EuiBadge, EuiSpacer, EuiText, EuiTitle, EuiToolTip } from '@elastic/eui'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { useDiagnosticsContext } from './context/use_diagnostics'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_templates_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_templates_tab.tsx index c2a4c47fde86e..d40f875952e78 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_templates_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/index_templates_tab.tsx @@ -6,9 +6,10 @@ */ import { EuiCallOut, EuiLoadingElastic } from '@elastic/eui'; -import { EuiBadge, EuiBasicTable, EuiBasicTableColumn, EuiSpacer, EuiText } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBadge, EuiBasicTable, EuiSpacer, EuiText } from '@elastic/eui'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { useDiagnosticsContext } from './context/use_diagnostics'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/indices_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/indices_tab.tsx index d025076389b29..ed92664b3dc36 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/indices_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/indices_tab.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBasicTable, - EuiBasicTableColumn, EuiIcon, EuiLoadingElastic, EuiSpacer, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/data_streams_status.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/data_streams_status.tsx index 1cf1fc06e3043..c5569bc68be97 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/data_streams_status.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/data_streams_status.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiLink } from '@elastic/eui'; import { useApmParams } from '../../../../hooks/use_apm_params'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { useDiagnosticsContext } from '../context/use_diagnostics'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index.tsx index 56b5953933330..73dde1bbc8aec 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiFlexGroup, EuiCallOut, EuiDescriptionList, EuiSpacer } from '@elastic/eui'; import { isCCSRemoteIndexName } from '@kbn/es-query'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ApmIntegrationPackageStatus } from './apm_integration_package_status'; import { IndexTemplatesStatus } from './index_templates_status'; import { FieldMappingStatus } from './indicies_status'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index_templates_status.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index_templates_status.tsx index 86b9cd8a97b7a..74e0d1c86aa68 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index_templates_status.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/index_templates_status.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiLink } from '@elastic/eui'; import { FETCH_STATUS } from '@kbn/observability-shared-plugin/public'; import { useApmParams } from '../../../../hooks/use_apm_params'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useDiagnosticsContext } from '../context/use_diagnostics'; import { TabStatus } from './tab_status'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/indicies_status.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/indicies_status.tsx index 26c5d7f0bab61..6ea30a4b9bcf1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/indicies_status.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/diagnostics/summary_tab/indicies_status.tsx @@ -10,7 +10,7 @@ import { EuiLink } from '@elastic/eui'; import { isEmpty } from 'lodash'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useDiagnosticsContext } from '../context/use_diagnostics'; import { TabStatus } from './tab_status'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/entity_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/entity_link.test.tsx index 7bbfb43af71b8..46bf430a15159 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/entity_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/entity_link.test.tsx @@ -14,9 +14,9 @@ import * as useServiceEntitySummary from '../../../../context/apm_service/use_se import * as useFetcher from '../../../../hooks/use_fetcher'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { fromQuery } from '../../../shared/links/url_helpers'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { Redirect } from 'react-router-dom'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import * as useEntityCentricExperienceSetting from '../../../../hooks/use_entity_centric_experience_setting'; jest.mock('react-router-dom', () => ({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/index.tsx index 7ad5661159fd5..b11e37c063f21 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/entities/entity_link/index.tsx @@ -25,7 +25,7 @@ import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useEntityCentricExperienceSetting } from '../../../../hooks/use_entity_centric_experience_setting'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; -import { ApmPluginStartDeps } from '../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../plugin'; const pageHeader = { pageTitle: 'APM', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.stories.tsx index d8fb75fd0c1af..94ebabcbf7a13 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.stories.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import { ErrorDistribution } from '.'; import { MockApmPluginStorybook } from '../../../../context/apm_plugin/mock_apm_plugin_storybook'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.tsx index 272f0660711db..14759d56e2457 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/distribution/index.tsx @@ -22,9 +22,9 @@ import React from 'react'; import { useElasticChartsTheme } from '@kbn/charts-theme'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_text'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ChartContainer } from '../../../shared/charts/chart_container'; import { ChartType, getTimeSeriesColor } from '../../../shared/charts/helper/get_timeseries_color'; import { getTimeZone } from '../../../shared/charts/helper/timezone'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_contextual_insight.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_contextual_insight.tsx index 20d5521b43ebf..90ea6e750c62d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_contextual_insight.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_contextual_insight.tsx @@ -8,9 +8,9 @@ import { EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import type { Message } from '@kbn/observability-ai-assistant-plugin/public'; import React, { useMemo, useState } from 'react'; -import { AT_TIMESTAMP } from '@kbn/apm-types'; +import type { AT_TIMESTAMP } from '@kbn/apm-types'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { ErrorSampleDetailTabContent } from './error_sample_detail'; import { exceptionStacktraceTab, logStacktraceTab } from './error_tabs'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_detail.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_detail.tsx index a1a2962b8067a..928c0ff2d8e4e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_detail.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_sample_detail.tsx @@ -29,16 +29,18 @@ import { first } from 'lodash'; import React, { useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; import useAsync from 'react-use/lib/useAsync'; -import { AT_TIMESTAMP, ERROR_GROUP_ID } from '../../../../../common/es_fields/apm'; +import type { AT_TIMESTAMP } from '../../../../../common/es_fields/apm'; +import { ERROR_GROUP_ID } from '../../../../../common/es_fields/apm'; import { TraceSearchType } from '../../../../../common/trace_explorer'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; -import { FETCH_STATUS, isPending, isSuccess } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import { isPending, isSuccess } from '../../../../hooks/use_fetcher'; import { useTraceExplorerEnabledSetting } from '../../../../hooks/use_trace_explorer_enabled_setting'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { TransactionDetailLink } from '../../../shared/links/apm/transaction_detail_link'; import { DiscoverErrorLink } from '../../../shared/links/discover_links/discover_error_link'; import { fromQuery, toQuery } from '../../../shared/links/url_helpers'; @@ -50,7 +52,8 @@ import { UserAgentSummaryItem } from '../../../shared/summary/user_agent_summary import { TimestampTooltip } from '../../../shared/timestamp_tooltip'; import { PlaintextStacktrace } from './plaintext_stacktrace'; import { TransactionTab } from '../../transaction_details/waterfall_with_summary/transaction_tabs'; -import { ErrorTab, ErrorTabKey, getTabs } from './error_tabs'; +import type { ErrorTab } from './error_tabs'; +import { ErrorTabKey, getTabs } from './error_tabs'; import { ErrorUiActionsContextMenu } from './error_ui_actions_context_menu'; import { ExceptionStacktrace } from './exception_stacktrace'; import { SampleSummary } from './sample_summary'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_tabs.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_tabs.tsx index 86b69eb480b3f..610c186ac477d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_tabs.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_tabs.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; export enum ErrorTabKey { LogStackTrace = 'log_stacktrace', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_ui_actions_context_menu.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_ui_actions_context_menu.tsx index df0b0a93020d2..3c5baa6fbb818 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_ui_actions_context_menu.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/error_ui_actions_context_menu.tsx @@ -4,14 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - EuiButton, - EuiContextMenu, - EuiContextMenuPanelItemDescriptor, - EuiPopover, -} from '@elastic/eui'; +import type { EuiContextMenuPanelItemDescriptor } from '@elastic/eui'; +import { EuiButton, EuiContextMenu, EuiPopover } from '@elastic/eui'; import React, { useState } from 'react'; -import { ObservabilityActionContextMenuItemProps } from '@kbn/observability-shared-plugin/public'; +import type { ObservabilityActionContextMenuItemProps } from '@kbn/observability-shared-plugin/public'; import { i18n } from '@kbn/i18n'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.stories.tsx index 3511be0cfe847..eab4c3c032576 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { Story } from '@storybook/react'; -import React, { ComponentProps, ComponentType } from 'react'; +import type { Story } from '@storybook/react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { ExceptionStacktrace } from './exception_stacktrace'; type Args = ComponentProps; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx index 3740edcbfe7d4..9661a42b89050 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { mount } from 'enzyme'; import { EuiThemeProvider } from '@elastic/eui'; import * as stories from './exception_stacktrace.stories'; -import { ExceptionStackTraceTitleProps } from './exception_stacktrace_title'; +import type { ExceptionStackTraceTitleProps } from './exception_stacktrace_title'; const { JavaWithLongLines } = composeStories(stories); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.tsx index 2554000727ad9..956184aa49a13 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/exception_stacktrace.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { Exception } from '../../../../../typings/es_schemas/raw/error_raw'; +import type { Exception } from '../../../../../typings/es_schemas/raw/error_raw'; import { Stacktrace } from '../../../shared/stacktrace'; import { CauseStacktrace } from '../../../shared/stacktrace/cause_stacktrace'; import { ExceptionStacktraceTitle } from './exception_stacktrace_title'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/index.tsx index 543e95bc0afba..618b571045394 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/index.tsx @@ -9,7 +9,8 @@ import React, { useEffect } from 'react'; import { useHistory } from 'react-router-dom'; import { fromQuery, toQuery } from '../../../shared/links/url_helpers'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; -import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { ErrorSampleDetails } from './error_sample_detail'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx index 40d9a21bee352..94d2ec5c93070 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/error_sampler/sample_summary.tsx @@ -8,7 +8,7 @@ import { EuiText, EuiSpacer, EuiCodeBlock, useEuiFontSize } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; const Label = styled.div` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/index.tsx index 6f2650d7b46de..64bc6f8bb9f6f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/index.tsx @@ -25,7 +25,7 @@ import { ErrorDistribution } from './distribution'; import { TopErroneousTransactions } from './top_erroneous_transactions'; import { maybe } from '../../../../common/utils/maybe'; import { fromQuery, toQuery } from '../../shared/links/url_helpers'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; type ErrorSamplesAPIResponse = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx index f81d6b8d7abf3..32fe2c2e103dc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_details/top_erroneous_transactions/index.tsx @@ -7,14 +7,9 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { - EuiBasicTable, - EuiBasicTableColumn, - EuiTitle, - RIGHT_ALIGNMENT, - EuiSpacer, -} from '@elastic/eui'; -import { ValuesType } from 'utility-types'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, EuiTitle, RIGHT_ALIGNMENT, EuiSpacer } from '@elastic/eui'; +import type { ValuesType } from 'utility-types'; import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { SparkPlot } from '../../../shared/charts/spark_plot'; import { ChartType, getTimeSeriesColor } from '../../../shared/charts/helper/get_timeseries_color'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/error_group_list.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/error_group_list.stories.tsx index 6cdb74ba1535c..de6af639d1af8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/error_group_list.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/error_group_list.stories.tsx @@ -4,11 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; +import type { CoreStart } from '@kbn/core/public'; +import type { Meta, Story } from '@storybook/react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { ErrorGroupList } from '.'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../../context/apm_plugin/mock_apm_plugin_storybook'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/index.tsx index c6593806191f4..218f007378970 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/index.tsx @@ -19,15 +19,12 @@ import { ChartType, getTimeSeriesColor } from '../../../shared/charts/helper/get import { SparkPlot } from '../../../shared/charts/spark_plot'; import { ErrorDetailLink } from '../../../shared/links/apm/error_detail_link'; import { ErrorOverviewLink } from '../../../shared/links/apm/error_overview_link'; -import { - ITableColumn, - ManagedTable, - TableOptions, - TableSearchBar, -} from '../../../shared/managed_table'; +import type { ITableColumn, TableOptions, TableSearchBar } from '../../../shared/managed_table'; +import { ManagedTable } from '../../../shared/managed_table'; import { TimestampTooltip } from '../../../shared/timestamp_tooltip'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; -import { ErrorGroupItem, useErrorGroupListData } from './use_error_group_list_data'; +import type { ErrorGroupItem } from './use_error_group_list_data'; +import { useErrorGroupListData } from './use_error_group_list_data'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; const GroupIdLink = styled(ErrorDetailLink)` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx index 484830c23d8a5..dead54d084936 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/error_group_overview/error_group_list/use_error_group_list_data.tsx @@ -10,8 +10,8 @@ import { useFetcher } from '../../../../hooks/use_fetcher'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { useStateDebounced } from '../../../../hooks/use_debounce'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; -import { TableOptions } from '../../../shared/managed_table'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { TableOptions } from '../../../shared/managed_table'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/help_popover/help_popover.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/help_popover/help_popover.tsx index cfb50f983fdbe..21dc5e375d094 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/help_popover/help_popover.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/help_popover/help_popover.tsx @@ -5,17 +5,11 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; -import { - EuiButtonEmpty, - EuiButtonIcon, - EuiLinkButtonProps, - EuiPopover, - EuiPopoverProps, - EuiPopoverTitle, - EuiText, -} from '@elastic/eui'; +import type { EuiLinkButtonProps, EuiPopoverProps } from '@elastic/eui'; +import { EuiButtonEmpty, EuiButtonIcon, EuiPopover, EuiPopoverTitle, EuiText } from '@elastic/eui'; import styled from '@emotion/styled'; const PopoverContent = styled(EuiText)` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.test.tsx index b1a1fea3924ee..5c0b3d75f1aa7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.test.tsx @@ -4,11 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { renderHook } from '@testing-library/react'; import { useTabs } from './use_tabs'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { shallow } from 'enzyme'; const KibanaReactContext = createKibanaReactContext({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx index 9fa178672aee5..8c85c6de61d1d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/infra_overview/infra_tabs/use_tabs.tsx @@ -4,14 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiTabbedContentProps } from '@elastic/eui'; +import type { EuiTabbedContentProps } from '@elastic/eui'; import { useMemo } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import React from 'react'; import { EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ApmPluginStartDeps } from '../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../plugin'; import { KUBERNETES_POD_NAME, HOST_NAME, CONTAINER_ID } from '../../../../../common/es_fields/apm'; type Tab = NonNullable[0] & { id: 'containers' | 'pods' | 'hosts'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx index a936ec601ebea..a34ad29a80f9b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/jvm_metrics_overview/index.tsx @@ -16,7 +16,8 @@ import { useFetcher, FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { truncate, unit } from '../../../../utils/style'; import { ServiceNodeMetricOverviewLink } from '../../../shared/links/apm/service_node_metric_overview_link'; -import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; +import type { ITableColumn } from '../../../shared/managed_table'; +import { ManagedTable } from '../../../shared/managed_table'; const INITIAL_SORT_FIELD = 'cpu'; const INITIAL_SORT_DIRECTION = 'desc'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_active_instances.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_active_instances.tsx index 417f96e73f26d..03e6dcf1fd0ce 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_active_instances.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_active_instances.tsx @@ -4,15 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { EuiBasicTableColumn, PropertySort } from '@elastic/eui'; import { - EuiBasicTableColumn, EuiFlexGroup, EuiFlexItem, EuiInMemoryTable, euiPaletteColorBlind, EuiPanel, EuiTitle, - PropertySort, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; @@ -21,12 +20,12 @@ import { asInteger, asMillisecondDuration, } from '../../../../../common/utils/formatters'; -import { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { TimeseriesChartWithContext } from '../../../shared/charts/timeseries_chart_with_context'; import { ListMetric } from '../../../shared/list_metric'; import { ServerlessFunctionNameLink } from './serverless_function_name_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_functions.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_functions.tsx index c0a8a14a52038..5445fb0e5219b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_functions.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/serverless_metrics/serverless_functions.tsx @@ -4,15 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - EuiBasicTableColumn, - EuiFlexGroup, - EuiFlexItem, - EuiInMemoryTable, - EuiPanel, - EuiTitle, - PropertySort, -} from '@elastic/eui'; +import type { EuiBasicTableColumn, PropertySort } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiInMemoryTable, EuiPanel, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; import { asDynamicBytes, asMillisecondDuration } from '../../../../../common/utils/formatters'; @@ -20,7 +13,7 @@ import { useApmServiceContext } from '../../../../context/apm_service/use_apm_se import { useApmParams } from '../../../../hooks/use_apm_params'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ServerlessFunctionNameLink } from './serverless_function_name_link'; type ServerlessFunctionOverview = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/helper.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/helper.ts index 781dfca52570a..2674034cd3d7e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/helper.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/helper.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import type { DashboardPanelMap } from '@kbn/dashboard-plugin/common'; import { AGENT_NAME_DASHBOARD_FILE_MAPPING, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/index.tsx index cc9c12b97a6d2..4e6c145fe9603 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/index.tsx @@ -8,16 +8,14 @@ import React, { useState, useEffect } from 'react'; import { ViewMode } from '@kbn/embeddable-plugin/public'; -import { - DashboardApi, - DashboardCreationOptions, - DashboardRenderer, -} from '@kbn/dashboard-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/common'; -import { buildExistsFilter, buildPhraseFilter, Filter } from '@kbn/es-query'; +import type { DashboardApi, DashboardCreationOptions } from '@kbn/dashboard-plugin/public'; +import { DashboardRenderer } from '@kbn/dashboard-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import type { Filter } from '@kbn/es-query'; +import { buildExistsFilter, buildPhraseFilter } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import { controlGroupStateBuilder } from '@kbn/controls-plugin/public'; -import { NotificationsStart } from '@kbn/core/public'; +import type { NotificationsStart } from '@kbn/core/public'; import { ENVIRONMENT_ALL, ENVIRONMENT_NOT_DEFINED, @@ -25,7 +23,8 @@ import { import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; -import { convertSavedDashboardToPanels, MetricsDashboardProps } from './helper'; +import type { MetricsDashboardProps } from './helper'; +import { convertSavedDashboardToPanels } from './helper'; export function JsonMetricsDashboard(dashboardProps: MetricsDashboardProps) { const [dashboard, setDashboard] = useState(undefined); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/charts/sessions_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/charts/sessions_chart.tsx index 20f6b2550b632..a6df2a30470a7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/charts/sessions_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/charts/sessions_chart.tsx @@ -8,7 +8,7 @@ import { EuiPanel, EuiTitle, EuiIconTip, EuiFlexItem, EuiFlexGroup } from '@elas import { i18n } from '@kbn/i18n'; import React from 'react'; import { useFetcher } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { TimeseriesChartWithContext } from '../../../shared/charts/timeseries_chart_with_context'; import { getComparisonChartTheme } from '../../../shared/time_comparison/get_comparison_chart_theme'; import { getTimeSeriesColor, ChartType } from '../../../shared/charts/helper/get_timeseries_color'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.stories.tsx index 1fd2b4e7522b7..66814b567c94f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.stories.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import { ErrorDistribution } from '.'; import { MockApmPluginStorybook } from '../../../../../../context/apm_plugin/mock_apm_plugin_storybook'; import { FETCH_STATUS } from '../../../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.tsx index 6f821025ece3d..006642f55d1b3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_group_details/shared/distribution/index.tsx @@ -16,9 +16,10 @@ import { import React from 'react'; import { TimeseriesChartWithContext } from '../../../../../shared/charts/timeseries_chart_with_context'; import { useLegacyUrlParams } from '../../../../../../context/url_params_context/use_url_params'; -import { FETCH_STATUS, isPending } from '../../../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../../../hooks/use_fetcher'; +import { isPending } from '../../../../../../hooks/use_fetcher'; import { usePreviousPeriodLabel } from '../../../../../../hooks/use_previous_period_text'; -import { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; import { getComparisonChartTheme } from '../../../../../shared/time_comparison/get_comparison_chart_theme'; import { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.stories.tsx index 993d291a7e4c3..2f91b4ef7df1b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/crash_group_list.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; +import type { Meta, Story } from '@storybook/react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { MockApmPluginContextWrapper } from '../../../../../context/apm_plugin/mock_apm_plugin_context'; import { MockUrlParamsContextProvider } from '../../../../../context/url_params_context/mock_url_params_context_provider'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx index 403a5ff03db7f..565b7610edc3b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crash_group_list/index.tsx @@ -12,7 +12,7 @@ import React, { useMemo } from 'react'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; import { asInteger } from '../../../../../../common/utils/formatters'; import { useApmParams } from '../../../../../hooks/use_apm_params'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { truncate, unit } from '../../../../../utils/style'; import { ChartType, @@ -21,7 +21,8 @@ import { import { SparkPlot } from '../../../../shared/charts/spark_plot'; import { CrashDetailLink } from '../../../../shared/links/apm/mobile/crash_detail_link'; import { ErrorOverviewLink } from '../../../../shared/links/apm/mobile/error_overview_link'; -import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; +import type { ITableColumn } from '../../../../shared/managed_table'; +import { ManagedTable } from '../../../../shared/managed_table'; import { TimestampTooltip } from '../../../../shared/timestamp_tooltip'; import { isTimeComparison } from '../../../../shared/time_comparison/get_comparison_options'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx index 44f02392a23a1..93b2f60bdcf0a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/crashes_overview.tsx @@ -15,7 +15,7 @@ import { useCrashGroupDistributionFetcher } from '../../../../hooks/use_crash_gr import { MobileErrorsAndCrashesTreemap } from '../charts/mobile_errors_and_crashes_treemap'; import { MobileCrashGroupList } from './crash_group_list'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { ErrorDistribution } from '../errors_and_crashes_group_details/shared/distribution'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.stories.tsx index 9e564a930a9a7..84d4d0a76404b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/error_group_list.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; +import type { Meta, Story } from '@storybook/react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { MockApmPluginContextWrapper } from '../../../../../context/apm_plugin/mock_apm_plugin_context'; import { MockUrlParamsContextProvider } from '../../../../../context/url_params_context/mock_url_params_context_provider'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx index 7153b673b3195..af9849e645fc9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/error_group_list/index.tsx @@ -12,7 +12,7 @@ import React, { useMemo } from 'react'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; import { asInteger } from '../../../../../../common/utils/formatters'; import { useApmParams } from '../../../../../hooks/use_apm_params'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { truncate, unit } from '../../../../../utils/style'; import { ChartType, @@ -21,7 +21,8 @@ import { import { SparkPlot } from '../../../../shared/charts/spark_plot'; import { ErrorDetailLink } from '../../../../shared/links/apm/mobile/error_detail_link'; import { ErrorOverviewLink } from '../../../../shared/links/apm/mobile/error_overview_link'; -import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; +import type { ITableColumn } from '../../../../shared/managed_table'; +import { ManagedTable } from '../../../../shared/managed_table'; import { TimestampTooltip } from '../../../../shared/timestamp_tooltip'; import { isTimeComparison } from '../../../../shared/time_comparison/get_comparison_options'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx index e4c0dafbabd9d..e5e28f7003961 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/errors_and_crashes_overview/errors_overview.tsx @@ -16,7 +16,7 @@ import { useApmParams } from '../../../../hooks/use_apm_params'; import { useErrorGroupDistributionFetcher } from '../../../../hooks/use_error_group_distribution_fetcher'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; import { HttpErrorRateChart } from '../charts/mobile_http_error_rate'; import { ErrorDistribution } from '../errors_and_crashes_group_details/shared/distribution'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/search_bar.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/search_bar.tsx index f3163046f9592..da28051cac734 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/search_bar.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/search_bar.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexGroupProps, EuiFlexItem, EuiSpacer } from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React from 'react'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; import { TimeComparison } from '../../shared/time_comparison'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/filters/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/filters/index.tsx index 0d1b29a08a44d..117cac851f0f7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/filters/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/filters/index.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiFlexGroup, EuiFlexGroupProps, EuiFlexItem, EuiSelect } from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useHistory } from 'react-router-dom'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.test.tsx index f877dd7217cb1..0971f5bf8c070 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.test.tsx @@ -6,7 +6,7 @@ */ import { render } from '@testing-library/react'; -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import React from 'react'; import { EmbeddedMap } from './embedded_map'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.tsx index c75c8985f3a17..d77780481a05e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/embedded_map.tsx @@ -6,14 +6,14 @@ */ import React, { useMemo } from 'react'; -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { i18n } from '@kbn/i18n'; import type { Filter } from '@kbn/es-query'; -import { ApmPluginStartDeps } from '../../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../../plugin'; import { getLayerList } from './map_layers/get_layer_list'; -import { MapTypes } from '../../../../../../common/mobile/constants'; -import { StyleColorParams } from './map_layers/style_color_params'; +import type { MapTypes } from '../../../../../../common/mobile/constants'; +import type { StyleColorParams } from './map_layers/style_color_params'; function EmbeddedMapComponent({ selectedMap, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/index.tsx index 3afaa9ce429b7..af4d1a9aff103 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/index.tsx @@ -6,14 +6,14 @@ */ import React, { useState } from 'react'; -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { EuiSpacer } from '@elastic/eui'; import type { Filter } from '@kbn/es-query'; import { useEuiTheme } from '@elastic/eui'; import { EmbeddedMap } from './embedded_map'; import { MapTypes } from '../../../../../../common/mobile/constants'; import { EmbeddedMapSelect } from './embedded_map_select'; -import { StyleColorParams } from './map_layers/style_color_params'; +import type { StyleColorParams } from './map_layers/style_color_params'; export function GeoMap({ start, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_http_requests_map_layer_list.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_http_requests_map_layer_list.ts index 98adacc76953d..c6b9ef02b846f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_http_requests_map_layer_list.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_http_requests_map_layer_list.ts @@ -5,14 +5,12 @@ * 2.0. */ -import { +import type { EMSFileSourceDescriptor, LayerDescriptor as BaseLayerDescriptor, VectorLayerDescriptor as BaseVectorLayerDescriptor, - AGG_TYPE, - LAYER_TYPE, - SOURCE_TYPES, } from '@kbn/maps-plugin/common'; +import { AGG_TYPE, LAYER_TYPE, SOURCE_TYPES } from '@kbn/maps-plugin/common'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { v4 as uuidv4 } from 'uuid'; import type { MapsStartApi } from '@kbn/maps-plugin/public'; @@ -26,7 +24,7 @@ import { } from '../../../../../../../common/es_fields/apm'; import { getLayerStyle, PalleteColors } from './get_map_layer_style'; import { MobileSpanSubtype, MobileSpanType } from '../../../../../../../common/mobile/constants'; -import { StyleColorParams } from './style_color_params'; +import type { StyleColorParams } from './style_color_params'; interface VectorLayerDescriptor extends BaseVectorLayerDescriptor { sourceDescriptor: EMSFileSourceDescriptor; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_layer_list.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_layer_list.ts index 848991d79f0bd..44497008d84f8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_layer_list.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_layer_list.ts @@ -5,10 +5,10 @@ * 2.0. */ import type { MapsStartApi } from '@kbn/maps-plugin/public'; -import { LayerDescriptor } from '@kbn/maps-plugin/common'; +import type { LayerDescriptor } from '@kbn/maps-plugin/common'; import { getHttpRequestsLayerList } from './get_http_requests_map_layer_list'; import { getSessionMapLayerList } from './get_session_map_layer_list'; -import { StyleColorParams } from './style_color_params'; +import type { StyleColorParams } from './style_color_params'; import { MapTypes } from '../../../../../../../common/mobile/constants'; export function getLayerList({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_map_layer_style.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_map_layer_style.ts index 392ccc31ce0b1..9729855e93ba6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_map_layer_style.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_map_layer_style.ts @@ -5,8 +5,8 @@ * 2.0. */ +import type { VectorStyleDescriptor } from '@kbn/maps-plugin/common'; import { - VectorStyleDescriptor, COLOR_MAP_TYPE, FIELD_ORIGIN, LABEL_BORDER_SIZES, @@ -15,7 +15,7 @@ import { SYMBOLIZE_AS_TYPES, } from '@kbn/maps-plugin/common'; -import { StyleColorParams } from './style_color_params'; +import type { StyleColorParams } from './style_color_params'; export enum PalleteColors { BluetoRed = 'Blue to Red', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_session_map_layer_list.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_session_map_layer_list.ts index b71d3bd316b65..d7dce49eb6c06 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_session_map_layer_list.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/geo_map/map_layers/get_session_map_layer_list.ts @@ -5,14 +5,12 @@ * 2.0. */ -import { +import type { EMSFileSourceDescriptor, LayerDescriptor as BaseLayerDescriptor, VectorLayerDescriptor as BaseVectorLayerDescriptor, - AGG_TYPE, - LAYER_TYPE, - SOURCE_TYPES, } from '@kbn/maps-plugin/common'; +import { AGG_TYPE, LAYER_TYPE, SOURCE_TYPES } from '@kbn/maps-plugin/common'; import { v4 as uuidv4 } from 'uuid'; import type { MapsStartApi } from '@kbn/maps-plugin/public'; import { i18n } from '@kbn/i18n'; @@ -22,7 +20,7 @@ import { SESSION_ID, } from '../../../../../../../common/es_fields/apm'; import { getLayerStyle, PalleteColors } from './get_map_layer_style'; -import { StyleColorParams } from './style_color_params'; +import type { StyleColorParams } from './style_color_params'; interface VectorLayerDescriptor extends BaseVectorLayerDescriptor { sourceDescriptor: EMSFileSourceDescriptor; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/index.tsx index 2efe54fbac9bc..f5b8b636cbe00 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/index.tsx @@ -6,15 +6,8 @@ */ import React from 'react'; -import { - EuiFlexGroupProps, - EuiFlexGroup, - EuiFlexItem, - EuiLink, - EuiPanel, - EuiSpacer, - EuiTitle, -} from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiPanel, EuiSpacer, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { AnnotationsContextProvider } from '../../../../context/annotations/annotations_context'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/index.tsx index 4a1e73f5b2f5c..ab1cd319fb32c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/index.tsx @@ -7,10 +7,11 @@ import React, { useRef } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiFlexGroup, EuiFlexGroupProps, useResizeObserver } from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, useResizeObserver } from '@elastic/eui'; import { SunburstChart } from './sunburst_chart'; import { useBreakpoints } from '../../../../../hooks/use_breakpoints'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { useFetcher } from '../../../../../hooks/use_fetcher'; import { MobileProperty } from '../../../../../../common/mobile_types'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/sunburst_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/sunburst_chart.tsx index 47018c775fd25..fd591be6929ab 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/sunburst_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/most_used_charts/sunburst_chart.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { Chart, Partition, PartitionLayout, Datum, PartialTheme, Settings } from '@elastic/charts'; +import type { Datum, PartialTheme } from '@elastic/charts'; +import { Chart, Partition, PartitionLayout, Settings } from '@elastic/charts'; import { EuiFlexItem, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx index b514277a5dc91..2f43e738ed9ef 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/location_stats.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { MetricDatum, MetricTrendShape } from '@elastic/charts'; +import type { MetricDatum } from '@elastic/charts'; +import { MetricTrendShape } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import { EuiIcon, EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import React, { useCallback } from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/metric_item.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/metric_item.tsx index 696079ba5be90..ce070641eda1e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/metric_item.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/metric_item.tsx @@ -5,7 +5,8 @@ * 2.0. */ import React from 'react'; -import { Chart, Metric, MetricDatum } from '@elastic/charts'; +import type { MetricDatum } from '@elastic/charts'; +import { Chart, Metric } from '@elastic/charts'; import { EuiSkeletonText, EuiPanel } from '@elastic/eui'; import { isEmpty } from 'lodash'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx index 4376eeccab5c3..8c028b00f62e2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { MetricDatum, MetricTrendShape } from '@elastic/charts'; +import type { MetricDatum } from '@elastic/charts'; +import { MetricTrendShape } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import React, { useCallback } from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/app_version_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/app_version_tab.tsx index f7dcb443c60b3..1b333ad716942 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/app_version_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/app_version_tab.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { TabContentProps } from '.'; +import type { TabContentProps } from '.'; import { isPending } from '../../../../../hooks/use_fetcher'; import { StatsList } from './stats_list'; import { SERVICE_VERSION } from '../../../../../../common/es_fields/apm'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/devices_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/devices_tab.tsx index df48eddb77cee..17aba5aeda6d3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/devices_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/devices_tab.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { TabContentProps } from '.'; +import type { TabContentProps } from '.'; import { isPending } from '../../../../../hooks/use_fetcher'; import { StatsList } from './stats_list'; import { useMobileStatisticsFetcher } from './use_mobile_statistics_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/os_version_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/os_version_tab.tsx index 81adbb8e4d429..331e2e97f0f57 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/os_version_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/os_version_tab.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { TabContentProps } from '.'; +import type { TabContentProps } from '.'; import { isPending } from '../../../../../hooks/use_fetcher'; import { StatsList } from './stats_list'; import { useMobileStatisticsFetcher } from './use_mobile_statistics_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/get_columns.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/get_columns.tsx index 24eb1da34f67e..54a9853dc806b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/get_columns.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/get_columns.tsx @@ -7,8 +7,8 @@ import { RIGHT_ALIGNMENT, EuiText } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; -import { ValuesType } from 'utility-types'; -import { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; +import type { ValuesType } from 'utility-types'; +import type { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; import { ChartType, getTimeSeriesColor, @@ -20,7 +20,7 @@ import { asPercent, asTransactionRate, } from '../../../../../../../common/utils/formatters'; -import { ITableColumn } from '../../../../../shared/managed_table'; +import type { ITableColumn } from '../../../../../shared/managed_table'; type MobileMainStatisticsByField = APIReturnType<'GET /internal/apm/mobile-services/{serviceName}/main_statistics'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/index.tsx index d7686f4c1585c..2a44420623ed6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/stats_list/index.tsx @@ -8,7 +8,7 @@ import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { ManagedTable } from '../../../../../shared/managed_table'; -import { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; import { getColumns } from './get_columns'; type MobileMainStatisticsByField = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/transactions_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/transactions_tab.tsx index f4aad02a036d8..10914f36bcff2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/transactions_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/mobile/transaction_overview/transaction_overview_tabs/transactions_tab.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { TabContentProps } from '.'; +import type { TabContentProps } from '.'; import { TransactionsTable } from '../../../../shared/transactions_table'; function TransactionsTab({ environment, kuery, start, end }: TabContentProps) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_config_table.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_config_table.tsx index cbce7789896ce..c2707e93d1167 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_config_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_config_table.tsx @@ -8,14 +8,8 @@ import React from 'react'; import type { ValuesType } from 'utility-types'; import { get } from 'lodash'; -import { - EuiBasicTable, - EuiText, - EuiBasicTableColumn, - EuiButton, - EuiButtonIcon, - copyToClipboard, -} from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, EuiText, EuiButton, EuiButtonIcon, copyToClipboard } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; function ConfigurationValueColumn({ columnKey, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_status_instructions.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_status_instructions.tsx index 347c075561688..4bf286fef9233 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_status_instructions.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/agent_status_instructions.tsx @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { EuiButton, EuiCallOut, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import { EuiStepStatus } from '@elastic/eui/src/components/steps/step_number'; +import type { EuiStepStatus } from '@elastic/eui/src/components/steps/step_number'; function AgentStatusWarningCallout() { return ( diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/index.tsx index d4d6978924f01..1c82cb8dddd4a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/index.tsx @@ -10,13 +10,13 @@ import { useKibana } from '@kbn/kibana-react-plugin/public'; import { EuiSpacer } from '@elastic/eui'; import { callApmApi } from '../../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { ApmPluginStartDeps } from '../../../plugin'; +import type { ApmPluginStartDeps } from '../../../plugin'; import { Introduction } from './introduction'; import { InstructionsSet } from './instructions_set'; import { serverlessInstructions } from './serverless_instructions'; import { Footer } from './footer'; import { PrivilegeType } from '../../../../common/privilege_type'; -import { AgentApiKey, InstructionSet } from './instruction_variants'; +import type { AgentApiKey, InstructionSet } from './instruction_variants'; export function Onboarding() { const [instructions, setInstructions] = useState([]); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instruction_variants.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instruction_variants.ts index 5ad4e8578b788..4e831e07b6bb9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instruction_variants.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instruction_variants.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; export enum INSTRUCTION_VARIANT { NODE = 'node', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/django_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/django_agent.tsx index 69ac7240e4f8a..ff958e612b31c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/django_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/django_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/dotnet_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/dotnet_agent.tsx index 739db1a8ef5fc..a0e12c4cbadac 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/dotnet_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/dotnet_agent.tsx @@ -7,11 +7,12 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/flask_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/flask_agent.tsx index da435327a132e..8959f7f6c979e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/flask_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/flask_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/go_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/go_agent.tsx index 0543a4f7e820c..92ec88b49ed20 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/go_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/go_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/java_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/java_agent.tsx index c4728caf3da95..1f161f9a156b6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/java_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/java_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/node_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/node_agent.tsx index ce4c4f3415630..e7b6d20b6cec5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/node_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/node_agent.tsx @@ -7,11 +7,12 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { ApiKeyCallout } from './api_key_callout'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; export const createNodeAgentInstructions = (commonOptions: AgentInstructions): EuiStepProps[] => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/otel_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/otel_agent.tsx index e9464675a5561..1a3fe3bea1bd0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/otel_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/otel_agent.tsx @@ -6,10 +6,10 @@ */ import { i18n } from '@kbn/i18n'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { copyToClipboard, EuiBasicTable, - EuiBasicTableColumn, EuiButton, EuiButtonIcon, EuiLink, @@ -17,11 +17,11 @@ import { EuiSpacer, EuiText, } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { FormattedMessage } from '@kbn/i18n-react'; -import { AgentApiDetails, AgentInstructions } from '../instruction_variants'; +import type { AgentApiDetails, AgentInstructions } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/php_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/php_agent.tsx index 739e93a4afeb1..aa6cc11f16a6e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/php_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/php_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rack_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rack_agent.tsx index 9662a6e17451e..24bf8d3d57f27 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rack_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rack_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rails_agent.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rails_agent.tsx index b9eb57dac4d88..024441ee73a1a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rails_agent.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions/rails_agent.tsx @@ -7,10 +7,11 @@ import { i18n } from '@kbn/i18n'; import { EuiCodeBlock, EuiMarkdownFormat, EuiSpacer } from '@elastic/eui'; -import { EuiStepProps } from '@elastic/eui/src/components/steps/step'; +import type { EuiStepProps } from '@elastic/eui/src/components/steps/step'; import React from 'react'; import { AgentConfigInstructions } from '../agent_config_instructions'; -import { INSTRUCTION_VARIANT, AgentInstructions } from '../instruction_variants'; +import type { AgentInstructions } from '../instruction_variants'; +import { INSTRUCTION_VARIANT } from '../instruction_variants'; import { ApiKeyCallout } from './api_key_callout'; import { agentStatusCheckInstruction } from '../agent_status_instructions'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions_set.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions_set.tsx index 13529e8ed52af..50993eea85ebc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions_set.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/instructions_set.tsx @@ -16,12 +16,12 @@ import { } from '@elastic/eui'; import React, { useMemo } from 'react'; import { useHistory } from 'react-router-dom'; -import { +import type { INSTRUCTION_VARIANT, - getDisplayText, InstructionVariant, InstructionSet, } from './instruction_variants'; +import { getDisplayText } from './instruction_variants'; import { useApmParams } from '../../../hooks/use_apm_params'; import { push } from '../../shared/links/url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/serverless_instructions.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/serverless_instructions.ts index 4bbb4e30db228..7bf39aedef1fb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/serverless_instructions.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/onboarding/serverless_instructions.ts @@ -6,8 +6,9 @@ */ import { i18n } from '@kbn/i18n'; -import { ConfigSchema } from '../../..'; -import { INSTRUCTION_VARIANT, AgentInstructions, AgentApiKey } from './instruction_variants'; +import type { ConfigSchema } from '../../..'; +import type { AgentInstructions, AgentApiKey } from './instruction_variants'; +import { INSTRUCTION_VARIANT } from './instruction_variants'; import { createJavaAgentInstructions, createNodeAgentInstructions, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/index.tsx index c41f1dac63051..2d24c8283aced 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/index.tsx @@ -5,12 +5,8 @@ * 2.0. */ -import { - EuiLoadingSpinner, - EuiSpacer, - EuiTabbedContent, - EuiTabbedContentProps, -} from '@elastic/eui'; +import type { EuiTabbedContentProps } from '@elastic/eui'; +import { EuiLoadingSpinner, EuiSpacer, EuiTabbedContent } from '@elastic/eui'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; import { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_callout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_callout.tsx index 55aca366dba32..95e99e1fe7e56 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_callout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_callout.tsx @@ -8,7 +8,7 @@ import { EuiButton, EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiLink } from '@elas import React from 'react'; import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ApmPluginStartDeps } from '../../../plugin'; +import type { ApmPluginStartDeps } from '../../../plugin'; import { useLocalStorage } from '../../../hooks/use_local_storage'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx index 0d6681d942d55..f2f43f7aab475 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_flamegraph.tsx @@ -7,8 +7,8 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import { ApmDataSourceWithSummary } from '../../../../common/data_source'; -import { ApmDocumentType } from '../../../../common/document_type'; +import type { ApmDataSourceWithSummary } from '../../../../common/data_source'; +import type { ApmDocumentType } from '../../../../common/document_type'; import { CONTAINER_ID, HOST_NAME } from '../../../../common/es_fields/apm'; import { mergeKueries, toKueryFilterFormat } from '../../../../common/utils/kuery_utils'; import { useFetcher } from '../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx index 2ad1106ab9ad0..2099b3b0b2f3f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/profiling_overview/profiling_hosts_top_functions.tsx @@ -8,8 +8,8 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { EmbeddableFunctions } from '@kbn/observability-shared-plugin/public'; import React from 'react'; -import { ApmDataSourceWithSummary } from '../../../../common/data_source'; -import { ApmDocumentType } from '../../../../common/document_type'; +import type { ApmDataSourceWithSummary } from '../../../../common/data_source'; +import type { ApmDocumentType } from '../../../../common/document_type'; import { CONTAINER_ID, HOST_NAME } from '../../../../common/es_fields/apm'; import { mergeKueries, toKueryFilterFormat } from '../../../../common/utils/kuery_utils'; import { isPending, useFetcher } from '../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/edit_dashboard.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/edit_dashboard.tsx index c880a912a5b51..9cb1a55e1ac2a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/edit_dashboard.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/edit_dashboard.tsx @@ -8,7 +8,7 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { SaveDashboardModal } from './save_dashboard_modal'; -import { MergedServiceDashboard } from '..'; +import type { MergedServiceDashboard } from '..'; export function EditDashboard({ onRefresh, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx index 9369f6dd2a224..39c891dbef8f4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/goto_dashboard.tsx @@ -8,8 +8,8 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { ApmPluginStartDeps } from '../../../../plugin'; -import { SavedApmCustomDashboard } from '../../../../../common/custom_dashboards'; +import type { ApmPluginStartDeps } from '../../../../plugin'; +import type { SavedApmCustomDashboard } from '../../../../../common/custom_dashboards'; export function GotoDashboard({ currentDashboard }: { currentDashboard: SavedApmCustomDashboard }) { const { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx index 50bde406cb231..185f0c2a6d86d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/link_dashboard.tsx @@ -7,7 +7,7 @@ import { EuiButton, EuiButtonEmpty } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; -import { MergedServiceDashboard } from '..'; +import type { MergedServiceDashboard } from '..'; import { SaveDashboardModal } from './save_dashboard_modal'; export function LinkDashboard({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx index 5f2f91df44231..e98bccbdf6173 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/save_dashboard_modal.tsx @@ -7,6 +7,7 @@ import React, { useCallback, useState } from 'react'; import { useHistory } from 'react-router-dom'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiButton, EuiModal, @@ -16,7 +17,6 @@ import { EuiSwitch, EuiModalBody, EuiComboBox, - EuiComboBoxOptionOption, EuiFlexGroup, EuiToolTip, EuiIcon, @@ -29,7 +29,7 @@ import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { SERVICE_NAME } from '../../../../../common/es_fields/apm'; import { fromQuery, toQuery } from '../../../shared/links/url_helpers'; -import { MergedServiceDashboard } from '..'; +import type { MergedServiceDashboard } from '..'; interface Props { onClose: () => void; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx index b7d7e15559720..ddad0c0fcaca0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/actions/unlink_dashboard.tsx @@ -8,7 +8,7 @@ import { EuiButtonEmpty, EuiConfirmModal } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { MergedServiceDashboard } from '..'; +import type { MergedServiceDashboard } from '..'; import { fromQuery, toQuery } from '../../../shared/links/url_helpers'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { callApmApi } from '../../../../services/rest/create_call_apm_api'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/dashboard_selector.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/dashboard_selector.tsx index 1cc2f2a93c207..200a5005e46a1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/dashboard_selector.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/dashboard_selector.tsx @@ -10,7 +10,7 @@ import { useHistory } from 'react-router-dom'; import useMount from 'react-use/lib/useMount'; import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { MergedServiceDashboard } from '.'; +import type { MergedServiceDashboard } from '.'; import { fromQuery, toQuery } from '../../shared/links/url_helpers'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/index.tsx index a92d781e3dd7c..235891057049b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dashboards/index.tsx @@ -18,18 +18,15 @@ import { } from '@elastic/eui'; import { ViewMode } from '@kbn/embeddable-plugin/public'; -import { - DashboardApi, - DashboardCreationOptions, - DashboardRenderer, -} from '@kbn/dashboard-plugin/public'; -import { SerializableRecord } from '@kbn/utility-types'; +import type { DashboardApi, DashboardCreationOptions } from '@kbn/dashboard-plugin/public'; +import { DashboardRenderer } from '@kbn/dashboard-plugin/public'; +import type { SerializableRecord } from '@kbn/utility-types'; import { EmptyDashboards } from './empty_dashboards'; import { GotoDashboard, LinkDashboard } from './actions'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; -import { SavedApmCustomDashboard } from '../../../../common/custom_dashboards'; +import type { SavedApmCustomDashboard } from '../../../../common/custom_dashboards'; import { ContextMenu } from './context_menu'; import { UnlinkDashboard } from './actions/unlink_dashboard'; import { EditDashboard } from './actions/edit_dashboard'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx index dd09948dbfed2..b380765d2451d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_dependencies/service_dependencies_breakdown_chart.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { getVizColorForIndex } from '../../../../common/viz_colors'; -import { Coordinate, TimeSeries } from '../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../typings/timeseries'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useFetcher } from '../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/refresh_service_groups_subscriber.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/refresh_service_groups_subscriber.tsx index bd4c658bf6135..441ae877d732d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/refresh_service_groups_subscriber.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/refresh_service_groups_subscriber.tsx @@ -6,7 +6,8 @@ */ import React, { useEffect, useRef } from 'react'; -import { Subject, Subscription } from 'rxjs'; +import type { Subscription } from 'rxjs'; +import { Subject } from 'rxjs'; const refreshServiceGroupsSubject = new Subject(); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/save_modal.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/save_modal.tsx index 9ecc00d8681ec..c40eb3d803712 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/save_modal.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/save_modal.tsx @@ -12,7 +12,7 @@ import { callApmApi } from '../../../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { GroupDetails } from './group_details'; import { SelectServices } from './select_services'; -import { ServiceGroup, SavedServiceGroup } from '../../../../../common/service_groups'; +import type { ServiceGroup, SavedServiceGroup } from '../../../../../common/service_groups'; import { refreshServiceGroups } from '../refresh_service_groups_subscriber'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx index 77694d60c84e8..a1499bdfebcf2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_group_save/service_list_preview.tsx @@ -4,13 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiBasicTable, EuiBasicTableColumn, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { AgentIcon } from '@kbn/custom-icons'; import { i18n } from '@kbn/i18n'; import { orderBy } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; -import { ValuesType } from 'utility-types'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { ValuesType } from 'utility-types'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { unit } from '../../../../utils/style'; import { EnvironmentBadge } from '../../../shared/environment_badge'; import { TruncateWithTooltip } from '../../../shared/truncate_with_tooltip'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_group_card.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_group_card.tsx index 4972bf4582813..77214d2a92bdc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_group_card.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_group_card.tsx @@ -5,11 +5,11 @@ * 2.0. */ import { EuiToolTip } from '@elastic/eui'; +import type { EuiCardProps } from '@elastic/eui'; import { EuiAvatar, EuiBadge, EuiCard, - EuiCardProps, EuiFlexGroup, EuiFlexItem, EuiText, @@ -18,7 +18,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { ServiceGroup } from '../../../../../common/service_groups'; +import type { ServiceGroup } from '../../../../../common/service_groups'; import { useObservabilityActiveAlertsHref } from '../../../shared/links/kibana'; import { ServiceStat } from './service_stat'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_groups_list.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_groups_list.tsx index 0558007e49406..82c196d153fff 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_groups_list.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_groups_list.tsx @@ -6,11 +6,11 @@ */ import { EuiFlexGroup } from '@elastic/eui'; import React from 'react'; -import { SavedServiceGroup } from '../../../../../common/service_groups'; +import type { SavedServiceGroup } from '../../../../../common/service_groups'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useDefaultEnvironment } from '../../../../hooks/use_default_environment'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ServiceGroupsCard } from './service_group_card'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_stat.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_stat.tsx index 8440e3ae2c364..06b202597350d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_stat.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/service_stat.tsx @@ -6,7 +6,8 @@ */ import { EuiFlexItem, EuiSkeletonText } from '@elastic/eui'; -import React, { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; +import React from 'react'; interface Props { loading: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/sort.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/sort.tsx index 6b635798c1359..bc5bca798cdb8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/sort.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_groups/service_groups_list/sort.tsx @@ -7,7 +7,7 @@ import { EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { ServiceGroupsSortType } from '.'; +import type { ServiceGroupsSortType } from '.'; interface Props { type: ServiceGroupsSortType; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx index d052583607300..d2f08d7ca6b99 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/index.tsx @@ -11,7 +11,8 @@ import { i18n } from '@kbn/i18n'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { v4 as uuidv4 } from 'uuid'; import { ApmDocumentType } from '../../../../common/document_type'; -import { ServiceInventoryFieldName, ServiceListItem } from '../../../../common/service_inventory'; +import type { ServiceListItem } from '../../../../common/service_inventory'; +import { ServiceInventoryFieldName } from '../../../../common/service_inventory'; import { useAnomalyDetectionJobsContext } from '../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useApmParams } from '../../../hooks/use_apm_params'; @@ -21,8 +22,8 @@ import { useLocalStorage } from '../../../hooks/use_local_storage'; import { usePreferredDataSourceAndBucketSize } from '../../../hooks/use_preferred_data_source_and_bucket_size'; import { useProgressiveFetcher } from '../../../hooks/use_progressive_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; -import { SortFunction } from '../../shared/managed_table'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { SortFunction } from '../../shared/managed_table'; import { MLCallout, shouldDisplayMlCallout } from '../../shared/ml_callout'; import { SearchBar } from '../../shared/search_bar/search_bar'; import { isTimeComparison } from '../../shared/time_comparison/get_comparison_options'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx index 41b69daf1cdf4..4699602037d44 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_inventory.stories.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { Meta, Story } from '@storybook/react'; +import type { CoreStart } from '@kbn/core/public'; +import type { Meta, Story } from '@storybook/react'; import React from 'react'; import { ServiceInventory } from '.'; import { AnomalyDetectionSetupState } from '../../../../common/anomaly_detection/get_anomaly_detection_setup_state'; import { AnomalyDetectionJobsContext } from '../../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../context/apm_plugin/mock_apm_plugin_storybook'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/__fixtures__/service_api_mock_data.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/__fixtures__/service_api_mock_data.ts index 7c6f3d85c13cb..0a16f064c5021 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/__fixtures__/service_api_mock_data.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/__fixtures__/service_api_mock_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; type ServiceListAPIResponse = APIReturnType<'GET /internal/apm/services'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/apm_services_table.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/apm_services_table.tsx index 8b1d3ad19bd7f..90385689f7458 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/apm_services_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/apm_services_table.tsx @@ -17,14 +17,12 @@ import { import { i18n } from '@kbn/i18n'; import { apmEnableServiceInventoryTableSearchBar } from '@kbn/observability-plugin/common'; import { ALERT_STATUS_ACTIVE } from '@kbn/rule-data-utils'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { omit } from 'lodash'; import React, { useMemo } from 'react'; import { ServiceHealthStatus } from '../../../../../common/service_health_status'; -import { - ServiceInventoryFieldName, - ServiceListItem, -} from '../../../../../common/service_inventory'; +import type { ServiceListItem } from '../../../../../common/service_inventory'; +import { ServiceInventoryFieldName } from '../../../../../common/service_inventory'; import { isDefaultTransactionType } from '../../../../../common/transaction_types'; import { asMillisecondDuration, @@ -34,23 +32,21 @@ import { import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; -import { Breakpoints, useBreakpoints } from '../../../../hooks/use_breakpoints'; +import type { Breakpoints } from '../../../../hooks/use_breakpoints'; +import { useBreakpoints } from '../../../../hooks/use_breakpoints'; import { useFallbackToTransactionsFetcher } from '../../../../hooks/use_fallback_to_transactions_fetcher'; -import { FETCH_STATUS, isFailure, isPending } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import { isFailure, isPending } from '../../../../hooks/use_fetcher'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { unit } from '../../../../utils/style'; -import { ApmRoutes } from '../../../routing/apm_route_config'; +import type { ApmRoutes } from '../../../routing/apm_route_config'; import { AggregatedTransactionsBadge } from '../../../shared/aggregated_transactions_badge'; import { ChartType, getTimeSeriesColor } from '../../../shared/charts/helper/get_timeseries_color'; import { EnvironmentBadge } from '../../../shared/environment_badge'; import { ServiceLink } from '../../../shared/links/apm/service_link'; import { ListMetric } from '../../../shared/list_metric'; -import { - ITableColumn, - ManagedTable, - SortFunction, - TableSearchBar, -} from '../../../shared/managed_table'; +import type { ITableColumn, SortFunction, TableSearchBar } from '../../../shared/managed_table'; +import { ManagedTable } from '../../../shared/managed_table'; import { ColumnHeaderWithTooltip } from './column_header_with_tooltip'; import { HealthBadge } from './health_badge'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/health_badge.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/health_badge.tsx index 1c21826c80d3b..0cfe5b9539f53 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/health_badge.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/health_badge.tsx @@ -7,10 +7,10 @@ import React from 'react'; import { EuiBadge, useEuiTheme } from '@elastic/eui'; +import type { ServiceHealthStatus } from '../../../../../common/service_health_status'; import { getServiceHealthStatusBadgeColor, getServiceHealthStatusLabel, - ServiceHealthStatus, } from '../../../../../common/service_health_status'; export function HealthBadge({ healthStatus }: { healthStatus: ServiceHealthStatus }) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/order_service_items.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/order_service_items.ts index 85d2b9678f061..507e43610d5ea 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/order_service_items.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/order_service_items.ts @@ -6,10 +6,8 @@ */ import { orderBy } from 'lodash'; import { ServiceHealthStatus } from '../../../../../common/service_health_status'; -import { - ServiceListItem, - ServiceInventoryFieldName, -} from '../../../../../common/service_inventory'; +import type { ServiceListItem } from '../../../../../common/service_inventory'; +import { ServiceInventoryFieldName } from '../../../../../common/service_inventory'; type SortValueGetter = (item: ServiceListItem) => string | number; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.stories.tsx index efd00b38b56cc..4e6999c0da4a4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.stories.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; +import type { CoreStart } from '@kbn/core/public'; +import type { Meta, Story } from '@storybook/react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { ApmServicesTable } from './apm_services_table'; import { ServiceHealthStatus } from '../../../../../common/service_health_status'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.test.tsx index e2ac029c79ce3..8dc45afe9bd00 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_inventory/service_list/service_list.test.tsx @@ -10,7 +10,7 @@ import { render, screen } from '@testing-library/react'; import React from 'react'; import { getServiceColumns } from './apm_services_table'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; -import { Breakpoints } from '../../../../hooks/use_breakpoints'; +import type { Breakpoints } from '../../../../hooks/use_breakpoints'; import { apmRouter } from '../../../routing/apm_route_config'; import * as timeSeriesColor from '../../../shared/charts/helper/get_timeseries_color'; import * as stories from './service_list.stories'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_logs/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_logs/index.tsx index 35f502642518f..c6333f0f63342 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_logs/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_logs/index.tsx @@ -6,7 +6,7 @@ */ import React, { useMemo } from 'react'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { LazySavedSearchComponent } from '@kbn/saved-search-component'; import useAsync from 'react-use/lib/useAsync'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; @@ -16,7 +16,7 @@ import { useKibana } from '../../../context/kibana_context/use_kibana'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; export function ServiceLogs() { const { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape.stories.tsx index 4adb330ffdc28..0258360653aac 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import cytoscape from 'cytoscape'; -import React, { ComponentType } from 'react'; +import type cytoscape from 'cytoscape'; +import type { ComponentType } from 'react'; +import React from 'react'; import { MockApmPluginStorybook } from '../../../../context/apm_plugin/mock_apm_plugin_storybook'; import { Cytoscape } from '../cytoscape'; import { Centerer } from './centerer'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape_example_data.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape_example_data.stories.tsx index 04f247ebc2244..fb0766c346975 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape_example_data.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/__stories__/cytoscape_example_data.stories.tsx @@ -15,7 +15,7 @@ import { EuiSpacer, EuiToolTip, } from '@elastic/eui'; -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import React, { useEffect, useState } from 'react'; import { CodeEditor } from '@kbn/code-editor'; import { Cytoscape } from '../cytoscape'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.test.tsx index 71d3f7aa271d0..03677f82cbaba 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.test.tsx @@ -6,7 +6,8 @@ */ import cytoscape from 'cytoscape'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; import { Controls } from './controls'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.tsx index e3a293a279e2c..26be768bdabfd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/controls.tsx @@ -12,7 +12,7 @@ import styled from '@emotion/styled'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { getLegacyApmHref } from '../../shared/links/apm/apm_link'; import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_params'; -import { APMQueryParams } from '../../shared/links/url_helpers'; +import type { APMQueryParams } from '../../shared/links/url_helpers'; import { CytoscapeContext } from './cytoscape'; import { getAnimationOptions, getNodeHeight } from './cytoscape_options'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape.tsx index eacd67e6dabe8..57bf652fb873c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape.tsx @@ -8,15 +8,8 @@ import cytoscape from 'cytoscape'; import dagre from 'cytoscape-dagre'; import { isEqual } from 'lodash'; -import React, { - createContext, - CSSProperties, - memo, - ReactNode, - useEffect, - useRef, - useState, -} from 'react'; +import type { CSSProperties, ReactNode } from 'react'; +import React, { createContext, memo, useEffect, useRef, useState } from 'react'; import { useEuiTheme } from '@elastic/eui'; import { useTraceExplorerEnabledSetting } from '../../../hooks/use_trace_explorer_enabled_setting'; import { getCytoscapeOptions } from './cytoscape_options'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape_options.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape_options.ts index fa6fdbce3c76c..cfe12a5d8b5a3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape_options.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/cytoscape_options.ts @@ -5,10 +5,10 @@ * 2.0. */ -import cytoscape from 'cytoscape'; -import { CSSProperties } from 'react'; +import type cytoscape from 'cytoscape'; +import type { CSSProperties } from 'react'; import type { EuiThemeComputed } from '@elastic/eui'; -import { ServiceAnomalyStats } from '../../../../common/anomaly_detection'; +import type { ServiceAnomalyStats } from '../../../../common/anomaly_detection'; import { SERVICE_NAME, SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../../common/es_fields/apm'; import { getServiceHealthStatusColor, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/empty_banner.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/empty_banner.test.tsx index 168180e89c97e..9899d7ae244bb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/empty_banner.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/empty_banner.test.tsx @@ -7,7 +7,8 @@ import { act, waitFor } from '@testing-library/react'; import cytoscape from 'cytoscape'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; import { renderWithTheme } from '../../../utils/test_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/icons.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/icons.ts index c7c19d207c3ce..a8ddbe1aec89e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/icons.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/icons.ts @@ -6,7 +6,7 @@ */ import { getAgentIcon } from '@kbn/custom-icons'; -import cytoscape from 'cytoscape'; +import type cytoscape from 'cytoscape'; import { AGENT_NAME, SPAN_SUBTYPE, SPAN_TYPE } from '../../../../common/es_fields/apm'; import { getSpanIcon } from '../../shared/span_icon/get_span_icon'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/index.tsx index 7d6bcbe69cfac..e944277f26ca6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/index.tsx @@ -7,7 +7,8 @@ import { usePerformanceContext } from '@kbn/ebt-tools'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiPanel, useEuiTheme } from '@elastic/eui'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { isActivePlatinumLicense } from '../../../../common/license_check'; import { invalidLicenseMessage, SERVICE_MAP_TIMEOUT_ERROR } from '../../../../common/service_map'; @@ -25,7 +26,7 @@ import { useRefDimensions } from './use_ref_dimensions'; import { SearchBar } from '../../shared/search_bar/search_bar'; import { useServiceName } from '../../../hooks/use_service_name'; import { useApmParams, useAnyOfApmParams } from '../../../hooks/use_apm_params'; -import { Environment } from '../../../../common/environment_rt'; +import type { Environment } from '../../../../common/environment_rt'; import { useTimeRange } from '../../../hooks/use_time_range'; import { DisabledPrompt } from './disabled_prompt'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/anomaly_detection.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/anomaly_detection.tsx index 562093976177a..e2fbe40a394d3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/anomaly_detection.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/anomaly_detection.tsx @@ -17,7 +17,8 @@ import { import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; -import { getSeverity, ServiceAnomalyStats } from '../../../../../common/anomaly_detection'; +import type { ServiceAnomalyStats } from '../../../../../common/anomaly_detection'; +import { getSeverity } from '../../../../../common/anomaly_detection'; import { getServiceHealthStatus, getServiceHealthStatusColor, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx index f2da74cfdcd82..544014d8dcd1a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/dependency_contents.tsx @@ -7,19 +7,19 @@ import { EuiButton, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { METRIC_TYPE } from '@kbn/analytics'; import React from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; -import { NodeDataDefinition } from 'cytoscape'; +import type { NodeDataDefinition } from 'cytoscape'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; -import { ContentsProps } from '.'; +import type { ContentsProps } from '.'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; -import { ApmRoutes } from '../../../routing/apm_route_config'; +import type { ApmRoutes } from '../../../routing/apm_route_config'; import { StatsList } from './stats_list'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; type DependencyReturn = APIReturnType<'GET /internal/apm/service-map/dependency'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx index aa1a4959a4a70..5a5cf901e622e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/edge_contents.tsx @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import { METRIC_TYPE } from '@kbn/analytics'; import React from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; -import { EdgeDataDefinition } from 'cytoscape'; -import { ContentsProps } from '.'; +import type { EdgeDataDefinition } from 'cytoscape'; +import type { ContentsProps } from '.'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { TraceSearchType } from '../../../../../common/trace_explorer'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx index a81df94c3d6f0..9e115ae0a6c57 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/externals_list_contents.tsx @@ -13,14 +13,14 @@ import { } from '@elastic/eui'; import React, { Fragment } from 'react'; import styled from '@emotion/styled'; -import { NodeDataDefinition } from 'cytoscape'; -import { ContentsProps } from '.'; +import type { NodeDataDefinition } from 'cytoscape'; +import type { ContentsProps } from '.'; import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_TYPE, SPAN_SUBTYPE, } from '../../../../../common/es_fields/apm'; -import { ExternalConnectionNode } from '../../../../../common/service_map'; +import type { ExternalConnectionNode } from '../../../../../common/service_map'; const ExternalResourcesList = styled.section` max-height: 360px; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/index.tsx index 827ea59015f26..1bdd6240b63dc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/index.tsx @@ -15,19 +15,12 @@ import { EuiIcon, useEuiTheme, } from '@elastic/eui'; -import cytoscape from 'cytoscape'; -import React, { - CSSProperties, - MouseEvent, - useCallback, - useContext, - useEffect, - useRef, - useState, -} from 'react'; +import type cytoscape from 'cytoscape'; +import type { CSSProperties, MouseEvent } from 'react'; +import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { SERVICE_NAME, SPAN_TYPE } from '../../../../../common/es_fields/apm'; -import { Environment } from '../../../../../common/environment_rt'; +import type { Environment } from '../../../../../common/environment_rt'; import { useTraceExplorerEnabledSetting } from '../../../../hooks/use_trace_explorer_enabled_setting'; import { CytoscapeContext } from '../cytoscape'; import { getAnimationOptions, popoverWidth } from '../cytoscape_options'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx index 1112f608d49c0..f33bea26cd329 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/popover.stories.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import cytoscape from 'cytoscape'; import React from 'react'; import { Popover } from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx index 272a5e97dfd1a..4914fe8f8feed 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/resource_contents.tsx @@ -9,7 +9,7 @@ import { EuiDescriptionListDescription, EuiDescriptionListTitle } from '@elastic import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; -import { NodeDataDefinition } from 'cytoscape'; +import type { NodeDataDefinition } from 'cytoscape'; import type { ContentsProps } from '.'; import { SPAN_SUBTYPE, SPAN_TYPE } from '../../../../../common/es_fields/apm'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/service_contents.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/service_contents.tsx index a64b9cdbf3fdc..7a8a09f85a639 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/service_contents.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/service_contents.tsx @@ -10,7 +10,7 @@ import { EuiButton, EuiFlexItem, EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { NodeDataDefinition } from 'cytoscape'; +import type { NodeDataDefinition } from 'cytoscape'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; import type { ContentsProps } from '.'; @@ -19,7 +19,7 @@ import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { AnomalyDetection } from './anomaly_detection'; import { StatsList } from './stats_list'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; type ServiceNodeReturn = APIReturnType<'GET /internal/apm/service-map/service/{serviceName}'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/stats_list.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/stats_list.tsx index 6bd4cc647650d..6bc7cec0db87e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/stats_list.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/popover/stats_list.tsx @@ -10,10 +10,10 @@ import { i18n } from '@kbn/i18n'; import { isNumber } from 'lodash'; import React, { useMemo } from 'react'; import { asDuration, asPercent, asTransactionRate } from '../../../../../common/utils/formatters'; -import { Coordinate } from '../../../../../typings/timeseries'; +import type { Coordinate } from '../../../../../typings/timeseries'; import { SparkPlot } from '../../../shared/charts/spark_plot'; import { ChartType, getTimeSeriesColor } from '../../../shared/charts/helper/get_timeseries_color'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; type ServiceNodeReturn = APIReturnType<'GET /internal/apm/service-map/service/{serviceName}'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts index fdf607c340fe2..9f40a34be5cbf 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_map/use_cytoscape_event_handlers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import cytoscape from 'cytoscape'; +import type cytoscape from 'cytoscape'; import { debounce } from 'lodash'; import { useEffect } from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/apm_overview/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/apm_overview/index.tsx index 7995402eb29a9..f747319f5c7e8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/apm_overview/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/apm_overview/index.tsx @@ -4,18 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - EuiFlexGroup, - EuiFlexGroupProps, - EuiFlexItem, - EuiLink, - EuiPanel, - EuiSpacer, -} from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiPanel, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { chartHeight } from '..'; -import { AgentName } from '../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../typings/es_schemas/ui/fields/agent'; import { isOpenTelemetryAgentName, isRumAgentName, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview.stories.tsx index afd0b06700517..c65aedc957c4a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview.stories.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import React from 'react'; import { EntityDataStreamType } from '@kbn/observability-shared-plugin/common'; import { ServiceOverview } from '.'; import { MockApmPluginStorybook } from '../../../context/apm_plugin/mock_apm_plugin_storybook'; -import { APMServiceContextValue } from '../../../context/apm_service/apm_service_context'; +import type { APMServiceContextValue } from '../../../context/apm_service/apm_service_context'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { mockApmApiCallResponse } from '../../../services/rest/call_apm_api_spy'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx index 1327a58cc0e86..34a2be48813ec 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_dependencies_table/index.tsx @@ -8,7 +8,8 @@ import { EuiIconTip } from '@elastic/eui'; import { METRIC_TYPE } from '@kbn/analytics'; import { i18n } from '@kbn/i18n'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; import { getNodeName, NodeType } from '../../../../../common/connections'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx index 7b0a99055a73a..3f37453b8edaf 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_chart_and_table/index.tsx @@ -13,11 +13,12 @@ import { useApmServiceContext } from '../../../../context/apm_service/use_apm_se import { useApmParams } from '../../../../hooks/use_apm_params'; import { FETCH_STATUS, isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { InstancesLatencyDistributionChart } from '../../../shared/charts/instances_latency_distribution_chart'; -import { ServiceOverviewInstancesTable, TableOptions } from '../service_overview_instances_table'; -import { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; -import { InstancesSortField } from '../../../../../common/instances'; +import type { TableOptions } from '../service_overview_instances_table'; +import { ServiceOverviewInstancesTable } from '../service_overview_instances_table'; +import type { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; +import type { InstancesSortField } from '../../../../../common/instances'; interface ServiceOverviewInstancesChartAndTableProps { chartHeight: number; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx index 539a02c75ebba..85da44144453a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/get_columns.tsx @@ -5,19 +5,21 @@ * 2.0. */ -import { EuiBasicTableColumn, EuiButtonIcon, RIGHT_ALIGNMENT } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiButtonIcon, RIGHT_ALIGNMENT } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { ActionMenu } from '@kbn/observability-shared-plugin/public'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; -import { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; import { getServiceNodeName, SERVICE_NODE_NAME_MISSING } from '../../../../../common/service_nodes'; import { asMillisecondDuration, asPercent, asTransactionRate, } from '../../../../../common/utils/formatters'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { MetricOverviewLink } from '../../../shared/links/apm/metric_overview_link'; import { ListMetric } from '../../../shared/list_metric'; import { getLatencyColumnLabel } from '../../../shared/transactions_table/get_latency_column_label'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx index 8b0ca455871af..073c39dfa4186 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/index.tsx @@ -7,17 +7,19 @@ import { EuiBasicTable, EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { ReactNode, useEffect, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useEffect, useState } from 'react'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; -import { PAGE_SIZE, SortDirection } from '../service_overview_instances_chart_and_table'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { SortDirection } from '../service_overview_instances_chart_and_table'; +import { PAGE_SIZE } from '../service_overview_instances_chart_and_table'; import { OverviewTableContainer } from '../../../shared/overview_table_container'; import { getColumns } from './get_columns'; import { InstanceDetails } from './intance_details'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useBreakpoints } from '../../../../hooks/use_breakpoints'; -import { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; -import { InstancesSortField } from '../../../../../common/instances'; +import type { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; +import type { InstancesSortField } from '../../../../../common/instances'; type ServiceInstanceMainStatistics = APIReturnType<'GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx index 4e609b35935f1..ea3c24281d20b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/index.tsx @@ -15,10 +15,8 @@ import { SectionSubtitle, SectionTitle, } from '@kbn/observability-shared-plugin/public'; -import { - AllDatasetsLocatorParams, - ALL_DATASETS_LOCATOR_ID, -} from '@kbn/deeplinks-observability/locators'; +import type { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability/locators'; +import { ALL_DATASETS_LOCATOR_ID } from '@kbn/deeplinks-observability/locators'; import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { ASSET_DETAILS_LOCATOR_ID, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/menu_sections.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/menu_sections.ts index 7d7ced6c5a990..4e08572c9cb4e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/menu_sections.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_actions_menu/menu_sections.ts @@ -6,19 +6,19 @@ */ import { i18n } from '@kbn/i18n'; -import { IBasePath } from '@kbn/core/public'; +import type { IBasePath } from '@kbn/core/public'; import moment from 'moment'; -import { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability/locators'; +import type { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability/locators'; import type { LocatorPublic } from '@kbn/share-plugin/public'; -import { NodeLogsLocatorParams } from '@kbn/logs-shared-plugin/common'; +import type { NodeLogsLocatorParams } from '@kbn/logs-shared-plugin/common'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; import { type AssetDetailsLocator } from '@kbn/observability-shared-plugin/common'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; -import { +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { Action, - getNonEmptySections, SectionRecord, } from '../../../../shared/transaction_action_menu/sections_helper'; +import { getNonEmptySections } from '../../../../shared/transaction_action_menu/sections_helper'; type InstaceDetails = APIReturnType<'GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_details.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_details.test.tsx index d9fe0fa17552e..5221387add62b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_details.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/instance_details.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { expectTextsInDocument, expectTextsNotInDocument, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx index bd9ade55866e9..5ae28c69f52a6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_instances_table/intance_details.tsx @@ -6,7 +6,8 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiSkeletonText, useEuiTheme } from '@elastic/eui'; -import { CloudProvider, getAgentIcon, getCloudProviderIcon } from '@kbn/custom-icons'; +import type { CloudProvider } from '@kbn/custom-icons'; +import { getAgentIcon, getCloudProviderIcon } from '@kbn/custom-icons'; import { i18n } from '@kbn/i18n'; import { get } from 'lodash'; import React from 'react'; @@ -35,7 +36,7 @@ import { } from '../../../../../common/es_fields/infra_metrics'; import { isPending } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { KeyValueFilterList } from '../../../shared/key_value_filter_list'; import { pushNewItemToKueryBar } from '../../../shared/kuery_bar/utils'; import { getContainerIcon } from '../../../shared/service_icons'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart/get_throughput_screen_context.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart/get_throughput_screen_context.ts index ad60e71a7093d..825d757466404 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart/get_throughput_screen_context.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_overview/service_overview_throughput_chart/get_throughput_screen_context.ts @@ -7,7 +7,7 @@ import { SERVICE_ENVIRONMENT } from '@kbn/observability-shared-plugin/common'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; -import { Environment } from '../../../../../common/environment_rt'; +import type { Environment } from '../../../../../common/environment_rt'; import { PROCESSOR_EVENT, SERVICE_NAME, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/constants.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/constants.ts index 4fa7c09f2c219..84eabe291f120 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/constants.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/constants.ts @@ -8,10 +8,8 @@ import { i18n } from '@kbn/i18n'; import type { AddDataPanelProps } from '@kbn/observability-shared-plugin/public'; import type { LocatorPublic } from '@kbn/share-plugin/common'; -import { - ApmOnboardingLocatorCategory, - ApmOnboardingLocatorParams, -} from '../../../locator/onboarding_locator'; +import type { ApmOnboardingLocatorParams } from '../../../locator/onboarding_locator'; +import { ApmOnboardingLocatorCategory } from '../../../locator/onboarding_locator'; export type AddAPMCalloutKeys = | 'serviceOverview' diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/index.tsx index 2759f5718a16e..9b496c2711f7a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/index.tsx @@ -9,12 +9,16 @@ import React from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { AddDataPanel } from '@kbn/observability-shared-plugin/public'; import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; -import { ApmOnboardingLocatorParams } from '../../../locator/onboarding_locator'; +import type { ApmOnboardingLocatorParams } from '../../../locator/onboarding_locator'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { EmptyStateClickParams, EntityInventoryAddDataParams } from '../../../services/telemetry'; -import { ApmPluginStartDeps, ApmServices } from '../../../plugin'; +import type { + EmptyStateClickParams, + EntityInventoryAddDataParams, +} from '../../../services/telemetry'; +import type { ApmPluginStartDeps, ApmServices } from '../../../plugin'; import { useKibanaUrl } from '../../../hooks/use_kibana_url'; -import { addAPMCalloutDefinitions, AddAPMCalloutKeys } from './constants'; +import type { AddAPMCalloutKeys } from './constants'; +import { addAPMCalloutDefinitions } from './constants'; export interface ServiceTabEmptyStateProps { id: AddAPMCalloutKeys; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/service_tab_empty_state.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/service_tab_empty_state.stories.tsx index 1e85abd2a5b62..589556f70e0e0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/service_tab_empty_state.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/service_tab_empty_state/service_tab_empty_state.stories.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ComponentProps, ComponentType } from 'react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { ServiceTabEmptyState } from '.'; import { MockApmPluginStorybook } from '../../../context/apm_plugin/mock_apm_plugin_storybook'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.stories.tsx index 8c69954f637e8..e9b95ac914589 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.stories.tsx @@ -7,15 +7,13 @@ import { storiesOf } from '@storybook/react'; import React from 'react'; -import { CoreStart } from '@kbn/core/public'; -import { AgentConfiguration } from '../../../../../../common/agent_configuration/configuration_types'; +import type { CoreStart } from '@kbn/core/public'; +import type { AgentConfiguration } from '../../../../../../common/agent_configuration/configuration_types'; import { FETCH_STATUS } from '../../../../../hooks/use_fetcher'; import { createCallApmApi } from '../../../../../services/rest/create_call_apm_api'; import { AgentConfigurationCreateEdit } from '.'; -import { - ApmPluginContext, - ApmPluginContextValue, -} from '../../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../../context/apm_plugin/apm_plugin_context'; +import { ApmPluginContext } from '../../../../../context/apm_plugin/apm_plugin_context'; storiesOf('app/settings/AgentConfigurations/agent_configuration_create_edit', module) .addDecorator((storyFn) => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.tsx index 735f18669e8f7..56661eb41bd53 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/index.tsx @@ -7,15 +7,15 @@ import { EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { History } from 'history'; +import type { History } from 'history'; import { isEmpty } from 'lodash'; import React, { useCallback, useEffect, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { +import type { AgentConfiguration, AgentConfigurationIntake, } from '../../../../../../common/agent_configuration/configuration_types'; -import { FetcherResult } from '../../../../../hooks/use_fetcher'; +import type { FetcherResult } from '../../../../../hooks/use_fetcher'; import { fromQuery, toQuery } from '../../../../shared/links/url_helpers'; import { ServicePage } from './service_page/service_page'; import { SettingsPage } from './settings_page/settings_page'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_select.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_select.tsx index 92e081049bca0..42a8b1ebd8c5a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_select.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_select.tsx @@ -5,12 +5,8 @@ * 2.0. */ -import { - EuiComboBox, - EuiComboBoxOptionOption, - EuiDescribedFormGroup, - EuiFormRow, -} from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox, EuiDescribedFormGroup, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_suggestions_select.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_suggestions_select.tsx index fcb02fc159f4d..c13fd7150b46e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_suggestions_select.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/form_row_suggestions_select.tsx @@ -6,7 +6,8 @@ */ import moment from 'moment'; import { EuiDescribedFormGroup, EuiFormRow } from '@elastic/eui'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { SuggestionsSelect } from '../../../../../shared/suggestions_select'; import { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx index 47f74e4f4f4fb..b23afedb6cd84 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/service_page/service_page.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { isString } from 'lodash'; import { EuiButtonEmpty } from '@elastic/eui'; -import { AgentConfigurationIntake } from '../../../../../../../common/agent_configuration/configuration_types'; +import type { AgentConfigurationIntake } from '../../../../../../../common/agent_configuration/configuration_types'; import { omitAllOption, getOptionLabel, @@ -22,7 +22,7 @@ import { LegacyAPMLink } from '../../../../../shared/links/apm/apm_link'; import { FormRowSuggestionsSelect } from './form_row_suggestions_select'; import { SERVICE_NAME } from '../../../../../../../common/es_fields/apm'; import { isOpenTelemetryAgentName } from '../../../../../../../common/agent_name'; -import { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; interface Props { newConfig: AgentConfigurationIntake; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/save_config.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/save_config.ts index 09ebaf27cb842..970fde7ba18ce 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/save_config.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/save_config.ts @@ -6,8 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { NotificationsStart } from '@kbn/core/public'; -import { AgentConfigurationIntake } from '../../../../../../../common/agent_configuration/configuration_types'; +import type { NotificationsStart } from '@kbn/core/public'; +import type { AgentConfigurationIntake } from '../../../../../../../common/agent_configuration/configuration_types'; import { getOptionLabel, omitAllOption, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/setting_form_row.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/setting_form_row.tsx index 6ef77676bad6b..1c11a5a6b70e0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/setting_form_row.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/setting_form_row.tsx @@ -19,7 +19,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { EuiMarkdownFormat } from '@elastic/eui'; -import { SettingDefinition } from '../../../../../../../common/agent_configuration/setting_definitions/types'; +import type { SettingDefinition } from '../../../../../../../common/agent_configuration/setting_definitions/types'; import { validateSetting } from '../../../../../../../common/agent_configuration/setting_definitions'; import { amountAndUnitToString, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx index dcfbe3d365102..37e6d4ac8a9c8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx @@ -21,13 +21,13 @@ import { BottomBarActions, useUiTracker } from '@kbn/observability-shared-plugin import React, { useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { getOptionLabel } from '../../../../../../../common/agent_configuration/all_option'; -import { AgentConfigurationIntake } from '../../../../../../../common/agent_configuration/configuration_types'; +import type { AgentConfigurationIntake } from '../../../../../../../common/agent_configuration/configuration_types'; import { filterByAgent, settingDefinitions, validateSetting, } from '../../../../../../../common/agent_configuration/setting_definitions'; -import { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; import { useApmPluginContext } from '../../../../../../context/apm_plugin/use_apm_plugin_context'; import { FETCH_STATUS } from '../../../../../../hooks/use_fetcher'; import { saveConfig } from './save_config'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/confirm_delete_modal.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/confirm_delete_modal.tsx index 914c664946fc2..45f1bd2efeeb5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/confirm_delete_modal.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/confirm_delete_modal.tsx @@ -7,10 +7,11 @@ import React, { useState } from 'react'; import { EuiConfirmModal } from '@elastic/eui'; -import { NotificationsStart } from '@kbn/core/public'; +import type { NotificationsStart } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { getOptionLabel } from '../../../../../../common/agent_configuration/all_option'; -import { APIReturnType, callApmApi } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import { callApmApi } from '../../../../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; type Config = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/index.tsx index ddd74716ceefb..41ae951a68a9a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_configurations/list/index.tsx @@ -19,12 +19,13 @@ import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React, { useState } from 'react'; import { useApmRouter } from '../../../../../hooks/use_apm_router'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { getOptionLabel } from '../../../../../../common/agent_configuration/all_option'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; import { FETCH_STATUS } from '../../../../../hooks/use_fetcher'; import { LoadingStatePrompt } from '../../../../shared/loading_state_prompt'; -import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; +import type { ITableColumn } from '../../../../shared/managed_table'; +import { ManagedTable } from '../../../../shared/managed_table'; import { TimestampTooltip } from '../../../../shared/timestamp_tooltip'; import { ConfirmDeleteModal } from './confirm_delete_modal'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_explorer_docs_link/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_explorer_docs_link/index.tsx index f06cdd328cba9..52a1196f37936 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_explorer_docs_link/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_explorer_docs_link/index.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { isOpenTelemetryAgentName } from '../../../../../../common/agent_name'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; -import { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; interface AgentExplorerDocsLinkProps { agentName: AgentName; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_contextual_information/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_contextual_information/index.tsx index 412814372cccc..f8c3f4cea7cd9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_contextual_information/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_contextual_information/index.tsx @@ -7,13 +7,13 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { isEmpty } from 'lodash'; import React from 'react'; -import { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; import { useApmPluginContext } from '../../../../../../context/apm_plugin/use_apm_plugin_context'; import { useDefaultTimeRange } from '../../../../../../hooks/use_default_time_range'; -import { ApmRoutes } from '../../../../../routing/apm_route_config'; +import type { ApmRoutes } from '../../../../../routing/apm_route_config'; import { ServiceLink } from '../../../../../shared/links/apm/service_link'; import { StickyProperties } from '../../../../../shared/sticky_properties'; import { getComparisonEnabled } from '../../../../../shared/time_comparison/get_comparison_enabled'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_instances_details/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_instances_details/index.tsx index 19b0ea898d04f..3f2e67ea07071 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_instances_details/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/agent_instances_details/index.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiBasicTableColumn, EuiInMemoryTable, EuiLink, EuiText } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiInMemoryTable, EuiLink, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { MetricOverviewLink } from '../../../../../shared/links/apm/metric_overview_link'; import { AgentExplorerFieldName } from '../../../../../../../common/agent_explorer'; import { isOpenTelemetryAgentName } from '../../../../../../../common/agent_name'; @@ -17,8 +18,8 @@ import { getServiceNodeName, SERVICE_NODE_NAME_MISSING, } from '../../../../../../../common/service_nodes'; -import { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; -import { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; +import type { AgentName } from '../../../../../../../typings/es_schemas/ui/fields/agent'; +import type { APIReturnType } from '../../../../../../services/rest/create_call_apm_api'; import { unit } from '../../../../../../utils/style'; import { EnvironmentBadge } from '../../../../../shared/environment_badge'; import { ItemsBadge } from '../../../../../shared/item_badge'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/index.tsx index bea6172af8f63..d8ed01d38cf08 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_instances/index.tsx @@ -22,7 +22,7 @@ import { FETCH_STATUS } from '../../../../../hooks/use_fetcher'; import { useProgressiveFetcher } from '../../../../../hooks/use_progressive_fetcher'; import { useTimeRange } from '../../../../../hooks/use_time_range'; import { ResponsiveFlyout } from '../../../transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout'; -import { AgentExplorerItem } from '../agent_list'; +import type { AgentExplorerItem } from '../agent_list'; import { AgentContextualInformation } from './agent_contextual_information'; import { AgentInstancesDetails } from './agent_instances_details'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_latest_version/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_latest_version/index.tsx index e13f94e2690d0..65c4463d70e5b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_latest_version/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_latest_version/index.tsx @@ -9,7 +9,7 @@ import { EuiSkeletonRectangle, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; -import { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; export function AgentLatestVersion({ agentName, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx index 7c3210dabbfea..0ff90dff3e424 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/agent_list/index.tsx @@ -10,14 +10,15 @@ import { AgentIcon } from '@kbn/custom-icons'; import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React, { useMemo, useState } from 'react'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { AgentExplorerFieldName } from '../../../../../../common/agent_explorer'; -import { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { EnvironmentBadge } from '../../../../shared/environment_badge'; import { ItemsBadge } from '../../../../shared/item_badge'; -import { ITableColumn, ManagedTable } from '../../../../shared/managed_table'; +import type { ITableColumn } from '../../../../shared/managed_table'; +import { ManagedTable } from '../../../../shared/managed_table'; import { TruncateWithTooltip } from '../../../../shared/truncate_with_tooltip'; import { AgentExplorerDocsLink } from '../agent_explorer_docs_link'; import { AgentInstances } from '../agent_instances'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/index.tsx index c89f3cc7a0387..9269df3695d00 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_explorer/index.tsx @@ -18,7 +18,7 @@ import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React from 'react'; import { useHistory } from 'react-router-dom'; -import { +import type { ElasticApmAgentLatestVersion, OtelAgentLatestVersion, } from '../../../../../common/agent_explorer'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.stories.tsx index 2ccf0d64b41a1..91b24c8f9919f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.stories.tsx @@ -4,11 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { Meta, Story } from '@storybook/react'; +import type { ComponentProps } from 'react'; +import React from 'react'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { ApiKey } from '@kbn/security-plugin-types-common'; +import type { ApiKey } from '@kbn/security-plugin-types-common'; import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginContextWrapper } from '../../../../context/apm_plugin/mock_apm_plugin_context'; import { AgentKeysTable } from './agent_keys_table'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.tsx index ac013caaa5fba..491731905e27f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/agent_keys_table.tsx @@ -7,8 +7,9 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiInMemoryTable, EuiBasicTableColumn, EuiInMemoryTableProps } from '@elastic/eui'; -import { ApiKey } from '@kbn/security-plugin-types-common'; +import type { EuiBasicTableColumn, EuiInMemoryTableProps } from '@elastic/eui'; +import { EuiInMemoryTable } from '@elastic/eui'; +import type { ApiKey } from '@kbn/security-plugin-types-common'; import { TimestampTooltip } from '../../../shared/timestamp_tooltip'; import { ConfirmDeleteModal } from './confirm_delete_modal'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/confirm_delete_modal.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/confirm_delete_modal.tsx index da7f39d5ad7d7..c3c1c2e81888d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/confirm_delete_modal.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/confirm_delete_modal.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiConfirmModal } from '@elastic/eui'; -import { ApiKey } from '@kbn/security-plugin-types-common'; +import type { ApiKey } from '@kbn/security-plugin-types-common'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { callApmApi } from '../../../../services/rest/create_call_apm_api'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.stories.tsx index 47b4a519da6da..39469d5be2932 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.stories.tsx @@ -4,10 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Meta, Story } from '@storybook/react'; -import React, { ComponentProps } from 'react'; +import type { Meta, Story } from '@storybook/react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { CreateAgentKeyFlyout } from './create_agent_key'; -import { CreateApiKeyResponse } from '../../../../../common/agent_key_types'; +import type { CreateApiKeyResponse } from '../../../../../common/agent_key_types'; type Args = ComponentProps; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx index 6abbf70c19950..20c2437b46788 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/create_agent_key.tsx @@ -28,7 +28,7 @@ import { } from '@elastic/eui'; import { isEmpty } from 'lodash'; import { callApmApi } from '../../../../services/rest/create_call_apm_api'; -import { CreateApiKeyResponse } from '../../../../../common/agent_key_types'; +import type { CreateApiKeyResponse } from '../../../../../common/agent_key_types'; import { useCurrentUser } from '../../../../hooks/use_current_user'; import { PrivilegeType } from '../../../../../common/privilege_type'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/index.tsx index ef50b81d090b6..206a4ffb6bbf6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/index.tsx @@ -18,14 +18,14 @@ import { EuiLoadingSpinner, EuiToolTip, } from '@elastic/eui'; -import { ApiKey } from '@kbn/security-plugin-types-common'; +import type { ApiKey } from '@kbn/security-plugin-types-common'; import { useFetcher, FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { PermissionDenied } from './prompts/permission_denied'; import { ApiKeysNotEnabled } from './prompts/api_keys_not_enabled'; import { AgentKeysTable } from './agent_keys_table'; import { CreateAgentKeyFlyout } from './create_agent_key'; import { AgentKeyCallOut } from './create_agent_key/agent_key_callout'; -import { CreateApiKeyResponse } from '../../../../../common/agent_key_types'; +import type { CreateApiKeyResponse } from '../../../../../common/agent_key_types'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; const INITIAL_DATA = { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/api_keys_not_enabled.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/api_keys_not_enabled.stories.tsx index eaf50108a7689..c4da68f592faf 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/api_keys_not_enabled.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/api_keys_not_enabled.stories.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Story } from '@storybook/react'; +import type { Story } from '@storybook/react'; import React from 'react'; import { ApiKeysNotEnabled } from './api_keys_not_enabled'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/permission_denied.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/permission_denied.stories.tsx index 5fcc6ded1991b..910234fce6999 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/permission_denied.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/agent_keys/prompts/permission_denied.stories.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Story } from '@storybook/react'; +import type { Story } from '@storybook/react'; import React from 'react'; import { PermissionDenied } from './permission_denied'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/add_environments.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/add_environments.tsx index 3d272119f7071..097cf5970509c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/add_environments.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/add_environments.tsx @@ -6,6 +6,7 @@ */ import React, { useState } from 'react'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiTitle, EuiText, @@ -13,14 +14,13 @@ import { EuiButton, EuiButtonEmpty, EuiComboBox, - EuiComboBoxOptionOption, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiEmptyPrompt, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { ML_ERRORS } from '../../../../../common/anomaly_detection'; import { useFetcher, FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/create_jobs.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/create_jobs.ts index f104a91a3d723..cd97c42ec8d6d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/create_jobs.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/create_jobs.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { NotificationsStart } from '@kbn/core/public'; +import type { NotificationsStart } from '@kbn/core/public'; import { callApmApi } from '../../../../services/rest/create_call_apm_api'; const errorToastTitle = i18n.translate('xpack.apm.anomalyDetection.createJobs.failed.title', { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/index.tsx index abaeb8c6c039e..f4b1627c88c5f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/index.tsx @@ -13,7 +13,7 @@ import { JobsList } from './jobs_list'; import { AddEnvironments } from './add_environments'; import { LicensePrompt } from '../../../shared/license_prompt'; import { useLicenseContext } from '../../../../context/license/use_license_context'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { useAnomalyDetectionJobsContext } from '../../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context'; export type AnomalyDetectionApiResponse = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/jobs_list.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/jobs_list.tsx index 399964c98cb96..44024865da17f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/jobs_list.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/anomaly_detection/jobs_list.tsx @@ -30,9 +30,10 @@ import { callApmApi } from '../../../../services/rest/create_call_apm_api'; import { MLExplorerLink } from '../../../shared/links/machine_learning_links/mlexplorer_link'; import { MLManageJobsLink } from '../../../shared/links/machine_learning_links/mlmanage_jobs_link'; import { LoadingStatePrompt } from '../../../shared/loading_state_prompt'; -import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; +import type { ITableColumn } from '../../../shared/managed_table'; +import { ManagedTable } from '../../../shared/managed_table'; import { MLCallout, shouldDisplayMlCallout } from '../../../shared/ml_callout'; -import { AnomalyDetectionApiResponse } from '.'; +import type { AnomalyDetectionApiResponse } from '.'; import { JobsListStatus } from './jobs_list_status'; type Jobs = AnomalyDetectionApiResponse['jobs']; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/apm_indices/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/apm_indices/index.tsx index 1e6a5d2266d22..f2a469e05448a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/apm_indices/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/apm_indices/index.tsx @@ -25,9 +25,10 @@ import React, { useEffect, useState } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useFetcher } from '../../../../hooks/use_fetcher'; -import { ApmPluginStartDeps } from '../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../plugin'; import { clearCache } from '../../../../services/rest/call_api'; -import { APIReturnType, callApmApi } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import { callApmApi } from '../../../../services/rest/create_call_apm_api'; const APM_INDEX_LABELS = [ { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.test.tsx index abfb3c8a4e3a0..a4214b6bb4595 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.test.tsx @@ -6,7 +6,8 @@ */ import { fireEvent, render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { act } from 'react-dom/test-utils'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { MockApmPluginContextWrapper } from '../../../../../context/apm_plugin/mock_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx index 564381f78a4a3..cdd05bc988bc9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/delete_button.tsx @@ -7,7 +7,7 @@ import { EuiButtonEmpty, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { NotificationsStart } from '@kbn/core/public'; +import type { NotificationsStart } from '@kbn/core/public'; import React, { useState } from 'react'; import { callApmApi } from '../../../../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/filters_section.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/filters_section.tsx index 33361e5ebc23e..c4894b8576783 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/filters_section.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/filters_section.tsx @@ -17,7 +17,7 @@ import { import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React from 'react'; -import { Filter, FilterKey } from '../../../../../../common/custom_link/custom_link_types'; +import type { Filter, FilterKey } from '../../../../../../common/custom_link/custom_link_types'; import { DEFAULT_OPTION, FILTER_SELECT_OPTIONS, getSelectOptions } from './helper'; import { SuggestionsSelect } from '../../../../shared/suggestions_select'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.test.ts index cdf1eaca311ec..a4594d5ba6bd9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.test.ts @@ -6,8 +6,8 @@ */ import { getSelectOptions, replaceTemplateVariables } from './helper'; -import { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; -import { Filter } from '../../../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; +import type { Filter } from '../../../../../../common/custom_link/custom_link_types'; describe('Custom link helper', () => { describe('getSelectOptions', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.ts index d47adac0ecd73..6f6f9da90924a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/helper.ts @@ -9,8 +9,8 @@ import { i18n } from '@kbn/i18n'; import Mustache from 'mustache'; import { isEmpty, get } from 'lodash'; import { FILTER_OPTIONS } from '../../../../../../common/custom_link/custom_link_filter_options'; -import { Filter, FilterKey } from '../../../../../../common/custom_link/custom_link_types'; -import { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; +import type { Filter, FilterKey } from '../../../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; import { getEncodedCustomLinkUrl } from '../../../../../../common/custom_link'; interface FilterSelectOption { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/index.tsx index 62dd53a69e872..7f4e3cd8f91ce 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/index.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; -import { Filter } from '../../../../../../common/custom_link/custom_link_types'; +import type { Filter } from '../../../../../../common/custom_link/custom_link_types'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; import { FiltersSection } from './filters_section'; import { FlyoutFooter } from './flyout_footer'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.stories.tsx index dc4cd50c4bfc2..a24123e95d3ed 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import React, { ComponentProps } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { ComponentProps } from 'react'; +import React from 'react'; +import type { CoreStart } from '@kbn/core/public'; import { createCallApmApi } from '../../../../../services/rest/create_call_apm_api'; import { LinkPreview } from './link_preview'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.tsx index ef1001f670a90..076dcde93eca0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_preview.tsx @@ -19,8 +19,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { debounce } from 'lodash'; -import { Filter } from '../../../../../../common/custom_link/custom_link_types'; -import { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; +import type { Filter } from '../../../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; import { callApmApi } from '../../../../../services/rest/create_call_apm_api'; import { replaceTemplateVariables, convertFiltersToQuery } from './helper'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_section.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_section.tsx index f46035ddf8a8b..c75da7c4f571b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_section.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/link_section.tsx @@ -8,7 +8,7 @@ import { EuiFieldText, EuiFormRow, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { CustomLink } from '../../../../../../common/custom_link/custom_link_types'; +import type { CustomLink } from '../../../../../../common/custom_link/custom_link_types'; import { Documentation } from './documentation'; interface InputField { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/save_custom_link.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/save_custom_link.ts index a65be84768f82..f314ac0544178 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/save_custom_link.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/create_edit_custom_link_flyout/save_custom_link.ts @@ -6,8 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { NotificationsStart } from '@kbn/core/public'; -import { Filter, CustomLink } from '../../../../../../common/custom_link/custom_link_types'; +import type { NotificationsStart } from '@kbn/core/public'; +import type { Filter, CustomLink } from '../../../../../../common/custom_link/custom_link_types'; import { callApmApi } from '../../../../../services/rest/create_call_apm_api'; export async function saveCustomLink({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/custom_link_table.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/custom_link_table.tsx index 24dd62efa5a95..17e88e19f101d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/custom_link_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/custom_link_table.tsx @@ -16,10 +16,11 @@ import { import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React, { useState } from 'react'; -import { CustomLink } from '../../../../../common/custom_link/custom_link_types'; +import type { CustomLink } from '../../../../../common/custom_link/custom_link_types'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { LoadingStatePrompt } from '../../../shared/loading_state_prompt'; -import { ITableColumn, ManagedTable } from '../../../shared/managed_table'; +import type { ITableColumn } from '../../../shared/managed_table'; +import { ManagedTable } from '../../../shared/managed_table'; import { TimestampTooltip } from '../../../shared/timestamp_tooltip'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx index b513809ebc44e..c78cce66bf560 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.test.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import { fireEvent, render, RenderResult } from '@testing-library/react'; +import type { RenderResult } from '@testing-library/react'; +import { fireEvent, render } from '@testing-library/react'; import React from 'react'; import { act } from 'react-dom/test-utils'; import { getCallApmApiSpy } from '../../../../services/rest/call_apm_api_spy'; import { CustomLinkOverview } from '.'; import { License } from '@kbn/licensing-plugin/common/license'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.tsx index 59d40ebf67752..80c81663c53b0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/custom_link/index.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import React, { useEffect, useState } from 'react'; import { INVALID_LICENSE } from '../../../../../common/custom_link'; -import { CustomLink } from '../../../../../common/custom_link/custom_link_types'; +import type { CustomLink } from '../../../../../common/custom_link/custom_link_types'; import { useLicenseContext } from '../../../../context/license/use_license_context'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { LicensePrompt } from '../../../shared/license_prompt'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/confirm_switch_modal.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/confirm_switch_modal.stories.tsx index f26795ce3ac20..89b9c4d1dc312 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/confirm_switch_modal.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/confirm_switch_modal.stories.tsx @@ -6,7 +6,8 @@ */ import type { Story } from '@storybook/react'; -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import { MockApmPluginStorybook } from '../../../../context/apm_plugin/mock_apm_plugin_storybook'; import { ConfirmSwitchModal } from './confirm_switch_modal'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/index.tsx index dc9e77d0b68a3..88d2eadf5cebc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/index.tsx @@ -7,13 +7,14 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { NotificationsStart } from '@kbn/core/public'; +import type { NotificationsStart } from '@kbn/core/public'; import moment from 'moment'; import { useLocalStorage } from '../../../../hooks/use_local_storage'; import { SchemaOverview } from './schema_overview'; import { ConfirmSwitchModal } from './confirm_switch_modal'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; -import { callApmApi, APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import { callApmApi } from '../../../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; type FleetMigrationCheckResponse = APIReturnType<'GET /internal/apm/fleet/migration_check'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema.stories.tsx index b005851258051..7e03448513bcd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema.stories.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import type { Meta, Story } from '@storybook/react'; -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import { Schema } from '.'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../../context/apm_plugin/mock_apm_plugin_storybook'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; interface Args { hasCloudAgentPolicy: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema_overview.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema_overview.tsx index 70fb4ea818385..95df03c8f0d8d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema_overview.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/settings/schema/schema_overview.tsx @@ -21,7 +21,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import semverLt from 'semver/functions/lt'; -import { PackagePolicy } from '@kbn/fleet-plugin/common/types'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common/types'; import rocketLaunchGraphic from './blog_rocket_720x420.png'; import { MigrationInProgressPanel } from './migration_in_progress_panel'; import { UpgradeAvailableCard } from './migrated/upgrade_available_card'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/get_storage_explorer_links.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/get_storage_explorer_links.ts index a85dfb3b1f8d2..f4e47b9650eea 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/get_storage_explorer_links.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/get_storage_explorer_links.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart } from '@kbn/core-lifecycle-browser'; +import type { CoreStart } from '@kbn/core-lifecycle-browser'; export function getIndexManagementHref(core: CoreStart, dataStream?: string) { const indexManagementPath = '/data/index_management/data_streams'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index.tsx index 5dc5d811a3b17..195c916e0e381 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { useState, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { useState } from 'react'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiInMemoryTable, - EuiBasicTableColumn, EuiButtonIcon, EuiScreenReaderOnly, RIGHT_ALIGNMENT, @@ -26,7 +27,7 @@ import { apmServiceInventoryOptimizedSorting } from '@kbn/observability-plugin/c import moment from 'moment'; import { isEmpty } from 'lodash'; import { downloadJson } from '../../../../utils/download_json'; -import { AgentName } from '../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../typings/es_schemas/ui/fields/agent'; import { EnvironmentBadge } from '../../../shared/environment_badge'; import { asPercent, asTransactionRate } from '../../../../../common/utils/formatters'; import { ServiceLink } from '../../../shared/links/apm/service_link'; @@ -42,7 +43,7 @@ import { useProgressiveFetcher } from '../../../../hooks/use_progressive_fetcher import { useTimeRange } from '../../../../hooks/use_time_range'; import { SizeLabel } from './size_label'; import { joinByKey } from '../../../../../common/utils/join_by_key'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; interface StorageExplorerItem { serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index_stats_per_service.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index_stats_per_service.tsx index 49e894ea7da28..c250b443b133f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index_stats_per_service.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/index_stats_per_service.tsx @@ -6,16 +6,10 @@ */ import React from 'react'; -import { - EuiInMemoryTable, - EuiBasicTableColumn, - EuiPanel, - EuiTitle, - EuiSpacer, - EuiLink, -} from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiInMemoryTable, EuiPanel, EuiTitle, EuiSpacer, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { NOT_AVAILABLE_LABEL } from '../../../../../common/i18n'; import { asDynamicBytes, asInteger } from '../../../../../common/utils/formatters'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/storage_details_per_service.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/storage_details_per_service.tsx index 43ea19407108d..9eb20894e70a0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/storage_details_per_service.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/services_table/storage_details_per_service.tsx @@ -18,12 +18,13 @@ import { EuiSpacer, } from '@elastic/eui'; import { useChartThemes } from '@kbn/observability-shared-plugin/public'; -import { Chart, Partition, Settings, Datum, PartitionLayout } from '@elastic/charts'; +import type { Datum } from '@elastic/charts'; +import { Chart, Partition, Settings, PartitionLayout } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { useEuiTheme } from '@elastic/eui'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { IndexLifecyclePhaseSelectOption } from '../../../../../common/storage_explorer_types'; +import type { IndexLifecyclePhaseSelectOption } from '../../../../../common/storage_explorer_types'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; import { isPending } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/storage_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/storage_chart.tsx index dd8b1c20f0191..0531c176c2201 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/storage_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/storage_chart.tsx @@ -24,7 +24,7 @@ import { ChartContainer } from '../../shared/charts/chart_container'; import { getTimeZone } from '../../shared/charts/helper/timezone'; import { isTimeseriesEmpty } from '../../shared/charts/helper/helper'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { Coordinate, TimeSeries } from '../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../typings/timeseries'; import { asDynamicBytes } from '../../../../common/utils/formatters'; export function StorageChart() { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/summary_stats.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/summary_stats.tsx index 30053480eb4e6..496c2acd814fc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/summary_stats.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/storage_explorer/summary_stats.tsx @@ -29,7 +29,7 @@ import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_ import { asTransactionRate } from '../../../../common/utils/formatters'; import { getIndexManagementHref } from './get_storage_explorer_links'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; interface Props { data?: APIReturnType<'GET /internal/apm/storage_explorer_summary_stats'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/top_traces_overview/trace_list.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/top_traces_overview/trace_list.tsx index 74461fcb7920f..a1883c14b87dd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/top_traces_overview/trace_list.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/top_traces_overview/trace_list.tsx @@ -7,20 +7,22 @@ import { EuiIcon, EuiToolTip, RIGHT_ALIGNMENT, useEuiFontSize } from '@elastic/eui'; import { usePerformanceContext } from '@kbn/ebt-tools'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useMemo } from 'react'; import styled from '@emotion/styled'; -import { ApmRoutes } from '../../routing/apm_route_config'; +import type { ApmRoutes } from '../../routing/apm_route_config'; import { asMillisecondDuration, asTransactionRate } from '../../../../common/utils/formatters'; import { useApmParams } from '../../../hooks/use_apm_params'; -import { FetcherResult, FETCH_STATUS } from '../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { FetcherResult } from '../../../hooks/use_fetcher'; +import { FETCH_STATUS } from '../../../hooks/use_fetcher'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { truncate } from '../../../utils/style'; import { EmptyMessage } from '../../shared/empty_message'; import { ImpactBar } from '../../shared/impact_bar'; import { TransactionDetailLink } from '../../shared/links/apm/transaction_detail_link'; -import { ITableColumn, ManagedTable } from '../../shared/managed_table'; +import type { ITableColumn } from '../../shared/managed_table'; +import { ManagedTable } from '../../shared/managed_table'; import { ServiceLink } from '../../shared/links/apm/service_link'; import { TruncateWithTooltip } from '../../shared/truncate_with_tooltip'; import { NOT_AVAILABLE_LABEL } from '../../../../common/i18n'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/index.tsx index a02c9cd693121..86e18290e53f7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/index.tsx @@ -8,13 +8,14 @@ import { EuiFlexGroup, EuiFlexItem, EuiTab, EuiTabs } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; -import { TraceSearchQuery, TraceSearchType } from '../../../../common/trace_explorer'; +import type { TraceSearchQuery } from '../../../../common/trace_explorer'; +import { TraceSearchType } from '../../../../common/trace_explorer'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { useApmRoutePath } from '../../../hooks/use_apm_route_path'; import { useTimeRange } from '../../../hooks/use_time_range'; import { TraceExplorerSamplesFetcherContextProvider } from '../../../hooks/use_trace_explorer_samples'; -import { APIClientRequestParamsOf } from '../../../services/rest/create_call_apm_api'; +import type { APIClientRequestParamsOf } from '../../../services/rest/create_call_apm_api'; import { ApmDatePicker } from '../../shared/date_picker/apm_date_picker'; import { push } from '../../shared/links/url_helpers'; import { TechnicalPreviewBadge } from '../../shared/technical_preview_badge'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_explorer_waterfall.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_explorer_waterfall.tsx index 1bda6985e534e..e4a9f56de053f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_explorer_waterfall.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_explorer_waterfall.tsx @@ -14,7 +14,7 @@ import { ResettingHeightRetainer } from '../../shared/height_retainer/resetting_ import { push, replace } from '../../shared/links/url_helpers'; import { useWaterfallFetcher } from '../transaction_details/use_waterfall_fetcher'; import { WaterfallWithSummary } from '../transaction_details/waterfall_with_summary'; -import { TransactionTab } from '../transaction_details/waterfall_with_summary/transaction_tabs'; +import type { TransactionTab } from '../transaction_details/waterfall_with_summary/transaction_tabs'; export function TraceExplorerWaterfall() { const history = useHistory(); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_search_box/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_search_box/index.tsx index 411c124e9fb13..3618a26d04e08 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_search_box/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_explorer/trace_search_box/index.tsx @@ -5,9 +5,11 @@ * 2.0. */ import React from 'react'; -import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSelect, EuiSelectOption } from '@elastic/eui'; +import type { EuiSelectOption } from '@elastic/eui'; +import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { TraceSearchQuery, TraceSearchType } from '../../../../../common/trace_explorer'; +import type { TraceSearchQuery } from '../../../../../common/trace_explorer'; +import { TraceSearchType } from '../../../../../common/trace_explorer'; import { useAdHocApmDataView } from '../../../../hooks/use_adhoc_apm_data_view'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/index.tsx index b1d1b0f8d745b..205e13da9add3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/index.tsx @@ -16,7 +16,7 @@ import { getRedirectToTransactionDetailPageUrl } from './get_redirect_to_transac import { getRedirectToTracePageUrl } from './get_redirect_to_trace_page_url'; import { useApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { ApmPluginStartDeps } from '../../../plugin'; +import type { ApmPluginStartDeps } from '../../../plugin'; const CentralizedContainer = styled.div` height: 100%; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/trace_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/trace_link.test.tsx index 06f7101520bab..cd8033a800a9c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/trace_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/trace_link/trace_link.test.tsx @@ -7,10 +7,11 @@ import { render, waitFor } from '@testing-library/react'; import { shallow } from 'enzyme'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { TraceLink } from '.'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx index f7aa1a0b849a9..915f8eaf38610 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/aggregated_critical_path_tab.tsx @@ -12,7 +12,7 @@ import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useTimeRange } from '../../../hooks/use_time_range'; import { CriticalPathFlamegraph } from '../../shared/critical_path_flamegraph'; import { TechnicalPreviewBadge } from '../../shared/technical_preview_badge'; -import { TabContentProps } from './transaction_details_tabs'; +import type { TabContentProps } from './transaction_details_tabs'; function TransactionDetailAggregatedCriticalPath({ traceSamplesFetchResult }: TabContentProps) { const { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx index 4750f36d0b86b..993da38d9457a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.test.tsx @@ -8,14 +8,15 @@ import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { render, screen, waitFor } from '@testing-library/react'; import { createMemoryHistory } from 'history'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { merge } from 'lodash'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MockUrlParamsContextProvider } from '../../../../context/url_params_context/mock_url_params_context_provider'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.tsx index f7a976b3cc82d..59257c337b530 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/distribution/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { XYBrushEvent } from '@elastic/charts'; +import type { XYBrushEvent } from '@elastic/charts'; import { EuiSpacer } from '@elastic/eui'; import React, { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; @@ -22,9 +22,9 @@ import { useTimeRange } from '../../../../hooks/use_time_range'; import { DurationDistributionChartWithScrubber } from '../../../shared/charts/duration_distribution_chart_with_scrubber'; import { ResettingHeightRetainer } from '../../../shared/height_retainer/resetting_height_container'; import { fromQuery, push, toQuery } from '../../../shared/links/url_helpers'; -import { TransactionTab } from '../waterfall_with_summary/transaction_tabs'; +import type { TransactionTab } from '../waterfall_with_summary/transaction_tabs'; import { useTransactionDistributionChartData } from './use_transaction_distribution_chart_data'; -import { TraceSamplesFetchResult } from '../../../../hooks/use_transaction_trace_samples_fetcher'; +import type { TraceSamplesFetchResult } from '../../../../hooks/use_transaction_trace_samples_fetcher'; interface TransactionDistributionProps { onChartSelection: (event: XYBrushEvent) => void; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/failed_transactions_correlations_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/failed_transactions_correlations_tab.tsx index 59c3a5300fd1d..eee825b01a3cd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/failed_transactions_correlations_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/failed_transactions_correlations_tab.tsx @@ -18,7 +18,7 @@ import { useLicenseContext } from '../../../context/license/use_license_context' import { LicensePrompt } from '../../shared/license_prompt'; import { FailedTransactionsCorrelations } from '../correlations/failed_transactions_correlations'; -import { TabContentProps } from './transaction_details_tabs'; +import type { TabContentProps } from './transaction_details_tabs'; function FailedTransactionsCorrelationsTab({ onFilter }: TabContentProps) { const license = useLicenseContext(); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/latency_correlations_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/latency_correlations_tab.tsx index f382a5d191720..fecab2c322fac 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/latency_correlations_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/latency_correlations_tab.tsx @@ -18,7 +18,7 @@ import { useLicenseContext } from '../../../context/license/use_license_context' import { LicensePrompt } from '../../shared/license_prompt'; import { LatencyCorrelations } from '../correlations/latency_correlations'; -import { TabContentProps } from './transaction_details_tabs'; +import type { TabContentProps } from './transaction_details_tabs'; function LatencyCorrelationsTab({ onFilter }: TabContentProps) { const license = useLicenseContext(); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/profiling_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/profiling_tab.tsx index 36a3b724376ce..f883421a3629e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/profiling_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/profiling_tab.tsx @@ -4,13 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { EuiTabbedContentProps } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSpacer, EuiTabbedContent, - EuiTabbedContentProps, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx index 51106dd2eb8a4..7f6d167151a2d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/top_errors/index.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { v4 as uuidv4 } from 'uuid'; import { isTimeComparison } from '../../../shared/time_comparison/get_comparison_options'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { getColumns } from '../../../shared/errors_table/get_columns'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../hooks/use_time_range'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/trace_samples_tab.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/trace_samples_tab.tsx index 79919c5cdd332..fc1618591a143 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/trace_samples_tab.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/trace_samples_tab.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { TransactionDistribution } from './distribution'; -import { TabContentProps } from './transaction_details_tabs'; +import type { TabContentProps } from './transaction_details_tabs'; function TraceSamplesTab({ selectSampleFromChartSelection, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx index 478c6b5d7e91c..5e394643fe157 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/transaction_details_tabs.tsx @@ -7,7 +7,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; -import { XYBrushEvent } from '@elastic/charts'; +import type { XYBrushEvent } from '@elastic/charts'; import { EuiPanel, EuiSpacer, EuiTab, EuiTabs } from '@elastic/eui'; import { omit } from 'lodash'; import { useHistory } from 'react-router-dom'; @@ -17,10 +17,8 @@ import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useCriticalPathFeatureEnabledSetting } from '../../../hooks/use_critical_path_feature_enabled_setting'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { useSampleChartSelection } from '../../../hooks/use_sample_chart_selection'; -import { - TraceSamplesFetchResult, - useTransactionTraceSamplesFetcher, -} from '../../../hooks/use_transaction_trace_samples_fetcher'; +import type { TraceSamplesFetchResult } from '../../../hooks/use_transaction_trace_samples_fetcher'; +import { useTransactionTraceSamplesFetcher } from '../../../hooks/use_transaction_trace_samples_fetcher'; import { fromQuery, toQuery } from '../../shared/links/url_helpers'; import { aggregatedCriticalPathTab } from './aggregated_critical_path_tab'; import { failedTransactionsCorrelationsTab } from './failed_transactions_correlations_tab'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts index 6e7ab2f4bddd3..29e9d222a81e7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/use_waterfall_fetcher.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { useFetcher } from '../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { getWaterfall } from './waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; const INITIAL_DATA: APIReturnType<'GET /internal/apm/traces/{traceId}'> = { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx index 4c52c2df57432..0e064df12bd08 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/index.tsx @@ -19,10 +19,11 @@ import React, { useEffect, useState } from 'react'; import { TransactionSummary } from '../../../shared/summary/transaction_summary'; import { TransactionActionMenu } from '../../../shared/transaction_action_menu/transaction_action_menu'; import { MaybeViewTraceLink } from './maybe_view_trace_link'; -import { TransactionTab, TransactionTabs } from './transaction_tabs'; -import { Environment } from '../../../../../common/environment_rt'; +import type { TransactionTab } from './transaction_tabs'; +import { TransactionTabs } from './transaction_tabs'; +import type { Environment } from '../../../../../common/environment_rt'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { WaterfallFetchResult } from '../use_waterfall_fetcher'; +import type { WaterfallFetchResult } from '../use_waterfall_fetcher'; interface Props { waterfallFetchResult: WaterfallFetchResult['waterfall']; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx index 0a0d69fa71169..a7257663dd413 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/maybe_view_trace_link.tsx @@ -9,10 +9,10 @@ import { EuiButton, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { getNextEnvironmentUrlParam } from '../../../../../common/environment_filter_values'; -import { Transaction as ITransaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction as ITransaction } from '../../../../../typings/es_schemas/ui/transaction'; import { TransactionDetailLink } from '../../../shared/links/apm/transaction_detail_link'; -import { IWaterfall } from './waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; -import { Environment } from '../../../../../common/environment_rt'; +import type { IWaterfall } from './waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; +import type { Environment } from '../../../../../common/environment_rt'; import { useAnyOfApmParams } from '../../../../hooks/use_apm_params'; import { LatencyAggregationType } from '../../../../../common/latency_aggregation_types'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx index ead237d3d374d..97f21eee2d433 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/transaction_tabs.tsx @@ -9,10 +9,10 @@ import { EuiSpacer, EuiTab, EuiTabs, EuiSkeletonText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { LogStream } from '@kbn/logs-shared-plugin/public'; import React, { useMemo } from 'react'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { TransactionMetadata } from '../../../shared/metadata_table/transaction_metadata'; import { WaterfallContainer } from './waterfall_container'; -import { IWaterfall } from './waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; +import type { IWaterfall } from './waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; export enum TransactionTab { timeline = 'timeline', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.test.ts index 2c2b04b62e0be..2288e360b8c38 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; import { getAgentMarks } from './get_agent_marks'; describe('getAgentMarks', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.ts index 72e6f1681db45..e37067feb5f5d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks.ts @@ -6,8 +6,8 @@ */ import { sortBy } from 'lodash'; -import { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; -import { Mark } from '.'; +import type { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; +import type { Mark } from '.'; // Extends Mark without adding new properties to it. export interface AgentMark extends Mark { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.test.ts index 5331ae1ae3d36..bba168674770d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IWaterfallError } from '../waterfall/waterfall_helpers/waterfall_helpers'; +import type { IWaterfallError } from '../waterfall/waterfall_helpers/waterfall_helpers'; import { getErrorMarks } from './get_error_marks'; describe('getErrorMarks', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts index 2e932c6e27632..d22223cece390 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks.ts @@ -6,9 +6,9 @@ */ import { isEmpty } from 'lodash'; -import { IWaterfallError } from '../waterfall/waterfall_helpers/waterfall_helpers'; -import { Mark } from '.'; -import { WaterfallError } from '../../../../../../../common/waterfall/typings'; +import type { IWaterfallError } from '../waterfall/waterfall_helpers/waterfall_helpers'; +import type { Mark } from '.'; +import type { WaterfallError } from '../../../../../../../common/waterfall/typings'; export interface ErrorMark extends Mark { type: 'errorMark'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx index 41d11ba74e2e1..48f108e950bdd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx @@ -17,11 +17,12 @@ import { import { transparentize } from 'polished'; import React, { useEffect, useRef } from 'react'; import { WindowScroller, AutoSizer } from 'react-virtualized'; -import { areEqual, ListChildComponentProps, VariableSizeList as List } from 'react-window'; +import type { ListChildComponentProps } from 'react-window'; +import { areEqual, VariableSizeList as List } from 'react-window'; import { css } from '@emotion/react'; import { asBigNumber } from '../../../../../../../common/utils/formatters'; -import { Margins } from '../../../../../shared/charts/timeline'; -import { +import type { Margins } from '../../../../../shared/charts/timeline'; +import type { IWaterfallNodeFlatten, IWaterfall, IWaterfallSpanOrTransaction, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx index 5a873501b959b..37daa2bc97fa0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/span_links_badge.tsx @@ -7,7 +7,7 @@ import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; +import type { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; type Props = SpanLinksCount & { id: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.stories.tsx index 7209203b54cc0..600e99d61ace5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.stories.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { SyncBadge, SyncBadgeProps } from './sync_badge'; +import type { SyncBadgeProps } from './sync_badge'; +import { SyncBadge } from './sync_badge'; export default { title: 'app/TransactionDetails/Waterfall/Badge/SyncBadge', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.tsx index 3146bd3c2e657..4989012b651d1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/badge/sync_badge.tsx @@ -8,7 +8,7 @@ import { EuiBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { AgentName } from '../../../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../../../typings/es_schemas/ui/fields/agent'; export interface SyncBadgeProps { /** diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/context/waterfall_context.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/context/waterfall_context.tsx index 1a19bff884e4f..12a524979cd43 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/context/waterfall_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/context/waterfall_context.tsx @@ -5,16 +5,20 @@ * 2.0. */ -import { Dictionary, groupBy } from 'lodash'; -import React, { PropsWithChildren, useCallback, useEffect, useMemo, useState } from 'react'; -import { CriticalPathSegment } from '../../../../../../../../common/critical_path/types'; +import type { Dictionary } from 'lodash'; +import { groupBy } from 'lodash'; +import type { PropsWithChildren } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import type { CriticalPathSegment } from '../../../../../../../../common/critical_path/types'; import { getCriticalPath } from '../../../../../../../../common/critical_path/get_critical_path'; -import { - buildTraceTree, - convertTreeToList, +import type { IWaterfall, IWaterfallNode, IWaterfallNodeFlatten, +} from '../waterfall_helpers/waterfall_helpers'; +import { + buildTraceTree, + convertTreeToList, updateTraceTreeNode, } from '../waterfall_helpers/waterfall_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx index 91f60fd9df842..5749f1aacc989 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/failure_badge.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiBadge, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import styled from '@emotion/styled'; -import { EventOutcome } from '../../../../../../../typings/es_schemas/raw/fields/event_outcome'; +import type { EventOutcome } from '../../../../../../../typings/es_schemas/raw/fields/event_outcome'; const ResetLineHeight = styled.span` line-height: initial; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx index 12b5250df5ff8..2c76d5dc73664 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/flyout_top_level_properties.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { SERVICE_NAME, TRANSACTION_NAME } from '../../../../../../../common/es_fields/apm'; import { getNextEnvironmentUrlParam } from '../../../../../../../common/environment_filter_values'; import { LatencyAggregationType } from '../../../../../../../common/latency_aggregation_types'; -import { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../../../typings/es_schemas/ui/transaction'; import { useAnyOfApmParams } from '../../../../../../hooks/use_apm_params'; import { TransactionDetailLink } from '../../../../../shared/links/apm/transaction_detail_link'; import { ServiceLink } from '../../../../../shared/links/apm/service_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx index 56a5367a4cfa6..ef739b7bed0e8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/index.tsx @@ -7,7 +7,7 @@ import { EuiButtonEmpty, EuiCallOut, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { History } from 'history'; +import type { History } from 'history'; import React, { useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; import styled from '@emotion/styled'; @@ -21,7 +21,7 @@ import { getAgentMarks } from '../marks/get_agent_marks'; import { getErrorMarks } from '../marks/get_error_marks'; import { AccordionWaterfall } from './accordion_waterfall'; import { WaterfallFlyout } from './waterfall_flyout'; -import { IWaterfall, IWaterfallItem } from './waterfall_helpers/waterfall_helpers'; +import type { IWaterfall, IWaterfallItem } from './waterfall_helpers/waterfall_helpers'; const Container = styled.div` transition: 0.1s padding ease; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx index 3c3440b7833cf..474cd5a4f3d0f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/responsive_flyout.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { EuiFlyout, EuiFlyoutProps } from '@elastic/eui'; +import type { EuiFlyoutProps } from '@elastic/eui'; +import { EuiFlyout } from '@elastic/eui'; import styled, { type StyledComponent } from '@emotion/styled'; // The return type of this component needs to be specified because the inferred diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx index f412df0b099bb..4dbb60e13594a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/index.tsx @@ -26,8 +26,8 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { isEmpty } from 'lodash'; import React, { Fragment } from 'react'; import { PlaintextStacktrace } from '../../../../../error_group_details/error_sampler/plaintext_stacktrace'; -import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { Span } from '../../../../../../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; import { useFetcher, isPending } from '../../../../../../../hooks/use_fetcher'; import { DiscoverSpanLink } from '../../../../../../shared/links/discover_links/discover_span_link'; import { SpanMetadata } from '../../../../../../shared/metadata_table/span_metadata'; @@ -41,7 +41,7 @@ import { TimestampTooltip } from '../../../../../../shared/timestamp_tooltip'; import { SyncBadge } from '../badge/sync_badge'; import { FailureBadge } from '../failure_badge'; import { ResponsiveFlyout } from '../responsive_flyout'; -import { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; +import type { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; import { SpanDatabase } from './span_db'; import { StickySpanProperties } from './sticky_span_properties'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_db.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_db.tsx index ab24c43d5ffab..d52282cb21a6d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_db.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_db.tsx @@ -8,7 +8,7 @@ import { EuiSpacer, EuiTitle, EuiCodeBlock } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { Fragment } from 'react'; -import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; +import type { Span } from '../../../../../../../../typings/es_schemas/ui/span'; interface Props { spanDb?: NonNullable['db']; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx index da1b6ec421900..a14b3c91301b5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/span_flyout.stories.tsx @@ -6,14 +6,15 @@ */ import { apm, dedot } from '@kbn/apm-synthtrace-client'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Story } from '@storybook/react'; -import React, { ComponentProps, ComponentType } from 'react'; +import type { Story } from '@storybook/react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { SpanFlyout } from '.'; -import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; -import { ApmPluginContextValue } from '../../../../../../../context/apm_plugin/apm_plugin_context'; +import type { Span } from '../../../../../../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { ApmPluginContextValue } from '../../../../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../../../../../context/apm_plugin/mock_apm_plugin_storybook'; -import { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; type Args = ComponentProps; type SpanDetailsApiReturnType = APIReturnType<'GET /internal/apm/traces/{traceId}/spans/{spanId}'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx index 87bbb189e7f03..441b0235914ae 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/sticky_span_properties.tsx @@ -16,8 +16,8 @@ import { } from '../../../../../../../../common/es_fields/apm'; import { getNextEnvironmentUrlParam } from '../../../../../../../../common/environment_filter_values'; import { NOT_AVAILABLE_LABEL } from '../../../../../../../../common/i18n'; -import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { Span } from '../../../../../../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; import { useAnyOfApmParams } from '../../../../../../../hooks/use_apm_params'; import { DependencyLink } from '../../../../../../shared/links/dependency_link'; import { TransactionDetailLink } from '../../../../../../shared/links/apm/transaction_detail_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx index 214cc8841b2c2..bd141c0229fd3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/span_flyout/truncate_height_section.tsx @@ -7,7 +7,8 @@ import { EuiIcon, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { Fragment, ReactNode, useEffect, useRef, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { Fragment, useEffect, useRef, useState } from 'react'; import styled from '@emotion/styled'; const ToggleButtonContainer = styled.div` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/dropped_spans_warning.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/dropped_spans_warning.tsx index a90ae0e675da0..a93a77f45cc7c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/dropped_spans_warning.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/dropped_spans_warning.tsx @@ -8,7 +8,7 @@ import { EuiCallOut, EuiHorizontalRule, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; import { useApmPluginContext } from '../../../../../../../context/apm_plugin/use_apm_plugin_context'; export function DroppedSpansWarning({ transactionDoc }: { transactionDoc: Transaction }) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx index bdeecb07f0f12..7e0a94001b2b7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/index.tsx @@ -20,7 +20,7 @@ import { import { i18n } from '@kbn/i18n'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import React from 'react'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; import { useFetcher, isPending } from '../../../../../../../hooks/use_fetcher'; import { TransactionMetadata } from '../../../../../../shared/metadata_table/transaction_metadata'; import { getSpanLinksTabContent } from '../../../../../../shared/span_links/span_links_tab_content'; @@ -28,7 +28,7 @@ import { TransactionSummary } from '../../../../../../shared/summary/transaction import { TransactionActionMenu } from '../../../../../../shared/transaction_action_menu/transaction_action_menu'; import { FlyoutTopLevelProperties } from '../flyout_top_level_properties'; import { ResponsiveFlyout } from '../responsive_flyout'; -import { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; +import type { SpanLinksCount } from '../waterfall_helpers/waterfall_helpers'; import { DroppedSpansWarning } from './dropped_spans_warning'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx index a8f4cb5f2423f..dad508d3afa78 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/transaction_flyout/transaction_flyout.stories.tsx @@ -5,13 +5,14 @@ * 2.0. */ import { apm, dedot } from '@kbn/apm-synthtrace-client'; -import { Story } from '@storybook/react'; -import React, { ComponentProps, ComponentType } from 'react'; +import type { Story } from '@storybook/react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { TransactionFlyout } from '.'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; -import { ApmPluginContextValue } from '../../../../../../../context/apm_plugin/apm_plugin_context'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { ApmPluginContextValue } from '../../../../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../../../../../context/apm_plugin/mock_apm_plugin_storybook'; -import { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; type Args = ComponentProps; type TransactionDetailsApiReturnType = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx index 3c45ba1587d93..340dce1008c30 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_flyout.tsx @@ -5,14 +5,14 @@ * 2.0. */ -import { History } from 'history'; +import type { History } from 'history'; import React from 'react'; import { useHistory } from 'react-router-dom'; import { useAnyOfApmParams } from '../../../../../../hooks/use_apm_params'; import { useTimeRange } from '../../../../../../hooks/use_time_range'; import { SpanFlyout } from './span_flyout'; import { TransactionFlyout } from './transaction_flyout'; -import { IWaterfall } from './waterfall_helpers/waterfall_helpers'; +import type { IWaterfall } from './waterfall_helpers/waterfall_helpers'; interface Props { waterfallItemId?: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts index 9d7d60944acdd..76fe97489d91a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.test.ts @@ -6,25 +6,27 @@ */ import { groupBy } from 'lodash'; -import { Span } from '../../../../../../../../typings/es_schemas/ui/span'; -import { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; -import { - getClockSkew, - getOrderedWaterfallItems, - getWaterfall, +import type { Span } from '../../../../../../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; +import type { IWaterfallItem, IWaterfallTransaction, IWaterfallError, IWaterfallSpanOrTransaction, + IWaterfallNode, + IWaterfallNodeFlatten, +} from './waterfall_helpers'; +import { + getClockSkew, + getOrderedWaterfallItems, + getWaterfall, getOrphanTraceItemsCount, buildTraceTree, convertTreeToList, updateTraceTreeNode, - IWaterfallNode, - IWaterfallNodeFlatten, } from './waterfall_helpers'; -import { APMError } from '../../../../../../../../typings/es_schemas/ui/apm_error'; -import { +import type { APMError } from '../../../../../../../../typings/es_schemas/ui/apm_error'; +import type { WaterfallSpan, WaterfallTransaction, } from '../../../../../../../../common/waterfall/typings'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts index b9a8f1d8cd15c..01aea35a73a55 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers.ts @@ -6,12 +6,13 @@ */ import { euiPaletteColorBlind } from '@elastic/eui'; -import { Dictionary, first, flatten, groupBy, isEmpty, sortBy, uniq } from 'lodash'; +import type { Dictionary } from 'lodash'; +import { first, flatten, groupBy, isEmpty, sortBy, uniq } from 'lodash'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { CriticalPathSegment } from '../../../../../../../../common/critical_path/types'; +import type { CriticalPathSegment } from '../../../../../../../../common/critical_path/types'; import type { APIReturnType } from '../../../../../../../services/rest/create_call_apm_api'; import type { Transaction } from '../../../../../../../../typings/es_schemas/ui/transaction'; -import { +import type { WaterfallError, WaterfallSpan, WaterfallTransaction, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx index 296c98705294c..ec9fd5653e211 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_item.tsx @@ -7,17 +7,18 @@ import { EuiBadge, EuiIcon, EuiText, EuiTitle, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { ReactNode, useRef, useEffect, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useRef, useEffect, useState } from 'react'; import styled from '@emotion/styled'; import { isMobileAgentName, isRumAgentName } from '../../../../../../../common/agent_name'; import { TRACE_ID, TRANSACTION_ID } from '../../../../../../../common/es_fields/apm'; import { asDuration } from '../../../../../../../common/utils/formatters'; -import { Margins } from '../../../../../shared/charts/timeline'; +import type { Margins } from '../../../../../shared/charts/timeline'; import { TruncateWithTooltip } from '../../../../../shared/truncate_with_tooltip'; import { SyncBadge } from './badge/sync_badge'; import { SpanLinksBadge } from './badge/span_links_badge'; import { ColdStartBadge } from './badge/cold_start_badge'; -import { IWaterfallSpanOrTransaction } from './waterfall_helpers/waterfall_helpers'; +import type { IWaterfallSpanOrTransaction } from './waterfall_helpers/waterfall_helpers'; import { FailureBadge } from './failure_badge'; import { useApmRouter } from '../../../../../../hooks/use_apm_router'; import { useAnyOfApmParams } from '../../../../../../hooks/use_apm_params'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx index bdc6382272dec..5cb44ea3eaf42 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_container.stories.tsx @@ -7,18 +7,19 @@ import { EuiFilePicker, EuiForm } from '@elastic/eui'; import { apm, dedot } from '@kbn/apm-synthtrace-client'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import { noop } from 'lodash'; -import React, { ComponentProps, useState } from 'react'; +import type { ComponentProps } from 'react'; +import React, { useState } from 'react'; import { WaterfallContainer } from '.'; -import { +import type { WaterfallError, WaterfallSpan, WaterfallTransaction, } from '../../../../../../common/waterfall/typings'; -import { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../../typings/es_schemas/ui/transaction'; import { MockApmPluginStorybook } from '../../../../../context/apm_plugin/mock_apm_plugin_storybook'; -import { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../../services/rest/create_call_apm_api'; import { getWaterfall } from './waterfall/waterfall_helpers/waterfall_helpers'; type Args = ComponentProps; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_legends.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_legends.tsx index 5dee02e381f75..75c11dde0aa8b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_legends.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_legends.tsx @@ -11,10 +11,8 @@ import { EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { Legend } from '../../../../shared/charts/timeline/legend'; -import { - IWaterfallLegend, - WaterfallLegendType, -} from './waterfall/waterfall_helpers/waterfall_helpers'; +import type { IWaterfallLegend } from './waterfall/waterfall_helpers/waterfall_helpers'; +import { WaterfallLegendType } from './waterfall/waterfall_helpers/waterfall_helpers'; interface Props { legends: IWaterfallLegend[]; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_overview/transaction_overview.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_overview/transaction_overview.test.tsx index 9fa0f5231bbf4..947dda02630a5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_overview/transaction_overview.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/app/transaction_overview/transaction_overview.test.tsx @@ -6,8 +6,9 @@ */ import { queryByLabelText } from '@testing-library/react'; -import { createMemoryHistory, MemoryHistory } from 'history'; -import { CoreStart } from '@kbn/core/public'; +import type { MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; +import type { CoreStart } from '@kbn/core/public'; import React from 'react'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx index 4889f33b3f0db..87747878eae4a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_accordion.tsx @@ -15,16 +15,17 @@ import { EuiTabbedContent, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import styled from '@emotion/styled'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { Markdown } from '@kbn/shared-ux-markdown'; import { AgentIcon } from '@kbn/custom-icons'; -import { +import type { AgentRuntimeAttachmentProps, CreateAgentInstructions, } from './agent_instructions_mappings'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import type { NewPackagePolicy, PackagePolicy, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_mappings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_mappings.ts index 689ab3a5df95c..dbafa6b8fb232 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_mappings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/agent_instructions_mappings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ComponentType } from 'react'; +import type { ComponentType } from 'react'; import { createDotNetAgentInstructions, createDjangoAgentInstructions, @@ -19,10 +19,10 @@ import { createRackAgentInstructions, createOpenTelemetryAgentInstructions, } from '../../../../common/tutorial/instructions/apm_agent_instructions'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; // TODO: Uncomment once https://github.com/elastic/beats/issues/29631 has been closed import { JavaRuntimeAttachment } from './runtime_attachment/supported_agents/java_runtime_attachment'; -import { +import type { NewPackagePolicy, PackagePolicy, PackagePolicyEditExtensionComponentProps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/index.tsx index 89c1c068b75ec..8cfe7a0c7f8cd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/index.tsx @@ -9,7 +9,7 @@ import { EuiPanel, EuiSpacer } from '@elastic/eui'; import React, { Fragment } from 'react'; import { AgentInstructionsAccordion } from './agent_instructions_accordion'; import { ApmAgentInstructionsMappings } from './agent_instructions_mappings'; -import { +import type { NewPackagePolicy, PackagePolicy, PackagePolicyEditExtensionComponentProps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/render_mustache.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/render_mustache.ts index dd3f63cb51361..6eb4f630c59f7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/render_mustache.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/render_mustache.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DocLinksStart } from '@kbn/core/public'; +import type { DocLinksStart } from '@kbn/core/public'; import Mustache from 'mustache'; const TEMPLATE_TAGS = ['{', '}']; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/discovery_rule.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/discovery_rule.tsx index 948e0a5d68925..8eb868b83611b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/discovery_rule.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/discovery_rule.tsx @@ -5,6 +5,7 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; +import type { DraggableProvidedDragHandleProps } from '@elastic/eui'; import { EuiText, EuiFlexGroup, @@ -12,11 +13,10 @@ import { EuiIcon, EuiBadge, EuiPanel, - DraggableProvidedDragHandleProps, EuiButtonIcon, } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { Operation } from '.'; +import type { Operation } from '.'; interface Props { id: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/edit_discovery_rule.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/edit_discovery_rule.tsx index e8e3e452418b7..d2e968fbd897f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/edit_discovery_rule.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/edit_discovery_rule.tsx @@ -20,7 +20,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { Operation, DISCOVERY_RULE_TYPE_ALL, STAGED_DISCOVERY_RULE_ID } from '.'; +import type { Operation } from '.'; +import { DISCOVERY_RULE_TYPE_ALL, STAGED_DISCOVERY_RULE_ID } from '.'; interface Props { id: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/index.tsx index f46bb6808438d..8aa23a48c3905 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/index.tsx @@ -5,8 +5,10 @@ * 2.0. */ -import { htmlIdGenerator, euiDragDropReorder, DropResult } from '@elastic/eui'; -import React, { useState, useCallback, ReactNode, useEffect } from 'react'; +import type { DropResult } from '@elastic/eui'; +import { htmlIdGenerator, euiDragDropReorder } from '@elastic/eui'; +import type { ReactNode } from 'react'; +import React, { useState, useCallback, useEffect } from 'react'; import { RuntimeAttachment as RuntimeAttachmentStateless } from './runtime_attachment'; export const STAGED_DISCOVERY_RULE_ID = 'STAGED_DISCOVERY_RULE_ID'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/java_agent_version_input.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/java_agent_version_input.tsx index f8c013bae837d..020ff53a1c4a8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/java_agent_version_input.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/java_agent_version_input.tsx @@ -9,10 +9,10 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFlexItem, EuiFormRow, EuiLink, EuiComboBox } from '@elastic/eui'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createCallApmApi } from '../../../../services/rest/create_call_apm_api'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; -import { RuntimeAttachmentSettings } from '.'; +import type { RuntimeAttachmentSettings } from '.'; interface Props { isValid: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.stories.tsx index ced8af22b25fa..6c3a8663af3f4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.stories.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import React, { useState } from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { RuntimeAttachment } from '.'; import { JavaRuntimeAttachment } from './supported_agents/java_runtime_attachment'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.tsx index a1cb50cc60842..c468b8539f523 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/runtime_attachment.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { DropResult } from '@elastic/eui'; import { EuiCallOut, EuiSpacer, @@ -17,14 +18,14 @@ import { EuiDroppable, EuiDraggable, EuiIcon, - DropResult, } from '@elastic/eui'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { DiscoveryRule } from './discovery_rule'; import { DefaultDiscoveryRule } from './default_discovery_rule'; import { EditDiscoveryRule } from './edit_discovery_rule'; -import { IDiscoveryRuleList, Operation, RuntimeAttachmentSettings } from '.'; +import type { IDiscoveryRuleList, Operation, RuntimeAttachmentSettings } from '.'; import { JavaAgentVersionInput } from './java_agent_version_input'; const DEFAULT_AGENT_VERSION = 'latest'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/supported_agents/java_runtime_attachment.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/supported_agents/java_runtime_attachment.tsx index 204e9266c6bfe..f471b5a353733 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/supported_agents/java_runtime_attachment.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_agents/runtime_attachment/supported_agents/java_runtime_attachment.tsx @@ -9,7 +9,8 @@ import yaml from 'js-yaml'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useState, useMemo } from 'react'; -import { RuntimeAttachment, RuntimeAttachmentSettings, IDiscoveryRule, validateVersion } from '..'; +import type { RuntimeAttachmentSettings, IDiscoveryRule } from '..'; +import { RuntimeAttachment, validateVersion } from '..'; import type { NewPackagePolicy, PackagePolicy, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_custom_assets_extension.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_custom_assets_extension.tsx index 7c21c15f7ee12..adb697d987a20 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_custom_assets_extension.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_custom_assets_extension.tsx @@ -8,9 +8,10 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { CustomAssetsAccordionProps, CustomAssetsAccordion } from '@kbn/fleet-plugin/public'; +import type { CustomAssetsAccordionProps } from '@kbn/fleet-plugin/public'; +import { CustomAssetsAccordion } from '@kbn/fleet-plugin/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ApmPluginStartDeps } from '../../plugin'; +import type { ApmPluginStartDeps } from '../../plugin'; export function ApmCustomAssetsExtension() { const { http } = useKibana().services; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_enrollment_flyout_extension.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_enrollment_flyout_extension.tsx index 0bc8720c98c3c..206aae9fa3ea8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_enrollment_flyout_extension.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_enrollment_flyout_extension.tsx @@ -9,9 +9,9 @@ import React from 'react'; import { EuiButton, EuiText, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { AgentEnrollmentFlyoutFinalStepExtension } from '@kbn/fleet-plugin/public'; +import type { AgentEnrollmentFlyoutFinalStepExtension } from '@kbn/fleet-plugin/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ApmPluginStartDeps } from '../../plugin'; +import type { ApmPluginStartDeps } from '../../plugin'; function StepComponent() { const { http } = useKibana().services; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/create_apm_policy_form.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/create_apm_policy_form.tsx index 5757fdabd5d54..035132ce23c3d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/create_apm_policy_form.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/create_apm_policy_form.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { APMPolicyForm } from '.'; -import { +import type { PackagePolicyVars, NewPackagePolicy, PackagePolicyCreateExtensionComponentProps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.stories.tsx index 86cafe85cebdb..31f2552328a03 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.stories.tsx @@ -5,11 +5,11 @@ * 2.0. */ import React, { useState } from 'react'; -import { Meta, Story } from '@storybook/react'; -import { CoreStart } from '@kbn/core/public'; +import type { Meta, Story } from '@storybook/react'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { EditAPMPolicyForm } from './edit_apm_policy_form'; -import { NewPackagePolicy, PackagePolicy } from './typings'; +import type { NewPackagePolicy, PackagePolicy } from './typings'; const coreMock = { http: { get: async () => ({}) }, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.tsx index be9c89601d4ab..3d514c17dd0c9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/edit_apm_policy_form.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { APMPolicyForm } from '.'; -import { +import type { NewPackagePolicy, PackagePolicy, PackagePolicyEditExtensionComponentProps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx index bd072a0b4e499..8a43cbe044aad 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/index.tsx @@ -18,9 +18,10 @@ import { isTailBasedSamplingValid, } from './settings_definition/tail_sampling_settings'; import { getTLSSettings, isTLSFormValid } from './settings_definition/tls_settings'; -import { SettingsForm, SettingsSection } from './settings_form'; +import type { SettingsSection } from './settings_form'; +import { SettingsForm } from './settings_form'; import { isSettingsFormValid, mergeNewVars } from './settings_form/utils'; -import { PackagePolicyVars } from './typings'; +import type { PackagePolicyVars } from './typings'; interface Props { updateAPMPolicy: (newVars: PackagePolicyVars, isValid: boolean) => void; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/agent_authorization_settings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/agent_authorization_settings.ts index 6feeadb2cd37c..df6ad0296446e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/agent_authorization_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/agent_authorization_settings.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { getIntegerRt } from '../../../../../common/agent_configuration/runtime_types/integer_rt'; import { OPTIONAL_LABEL } from '../settings_form/utils'; -import { SettingsRow } from '../typings'; +import type { SettingsRow } from '../typings'; export function getAgentAuthorizationSettings(): SettingsRow[] { return [ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/apm_settings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/apm_settings.ts index ad50b18052478..ad9ed518aa48d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/apm_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/apm_settings.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { getDurationRt } from '../../../../../common/agent_configuration/runtime_types/duration_rt'; import { getIntegerRt } from '../../../../../common/agent_configuration/runtime_types/integer_rt'; import { OPTIONAL_LABEL, REQUIRED_LABEL } from '../settings_form/utils'; -import { SettingsRow } from '../typings'; +import type { SettingsRow } from '../typings'; export function getApmSettings(): SettingsRow[] { return [ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/debug_settings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/debug_settings.ts index e5661389527b4..d087f6f7cf4a6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/debug_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/debug_settings.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; import { OPTIONAL_LABEL } from '../settings_form/utils'; -import { SettingsRow } from '../typings'; +import type { SettingsRow } from '../typings'; export function getDebugSettings(): SettingsRow[] { return [ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/rum_settings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/rum_settings.ts index e6c59794c384c..6539608ac4f74 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/rum_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/rum_settings.ts @@ -7,7 +7,7 @@ import * as t from 'io-ts'; import { either } from 'fp-ts/lib/Either'; import { i18n } from '@kbn/i18n'; -import { PackagePolicyVars, SettingsRow } from '../typings'; +import type { PackagePolicyVars, SettingsRow } from '../typings'; import { isSettingsFormValid, OPTIONAL_LABEL } from '../settings_form/utils'; const arrayRegex = new RegExp(/[\[\]]/); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.tsx index 555298ad9bc8a..f2c50133d8969 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tail_sampling_settings.tsx @@ -9,7 +9,7 @@ import { EuiLink } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { isSettingsFormValid, OPTIONAL_LABEL } from '../settings_form/utils'; -import { PackagePolicyVars, SettingsRow } from '../typings'; +import type { PackagePolicyVars, SettingsRow } from '../typings'; import { getDurationRt } from '../../../../../common/agent_configuration/runtime_types/duration_rt'; import { getStorageSizeRt } from '../../../../../common/agent_configuration/runtime_types/storage_size_rt'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tls_settings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tls_settings.ts index dc35f931df19e..0c60f3e83b322 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tls_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_definition/tls_settings.ts @@ -5,7 +5,7 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import { PackagePolicyVars, SettingsRow } from '../typings'; +import type { PackagePolicyVars, SettingsRow } from '../typings'; import { isSettingsFormValid, OPTIONAL_LABEL, REQUIRED_LABEL } from '../settings_form/utils'; const TLS_ENABLED_KEY = 'tls_enabled'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx index 20d018e273628..6ac99b2e3b964 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/form_row_setting.tsx @@ -17,8 +17,8 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; import { CodeEditor } from '@kbn/code-editor'; -import { FormRowOnChange } from '.'; -import { SettingsRow } from '../typings'; +import type { FormRowOnChange } from '.'; +import type { SettingsRow } from '../typings'; const FixedHeightDiv = styled.div` height: 300px; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx index 592677a2bf87f..ce46798fa1d26 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/index.tsx @@ -18,7 +18,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; -import { PackagePolicyVars, SettingsRow } from '../typings'; +import type { PackagePolicyVars, SettingsRow } from '../typings'; import { FormRowSetting } from './form_row_setting'; import { validateSettingValue } from './utils'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.test.ts index 503be80ae2855..9c119ac2e2e55 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.test.ts @@ -6,7 +6,7 @@ */ import { getDurationRt } from '../../../../../common/agent_configuration/runtime_types/duration_rt'; import { getIntegerRt } from '../../../../../common/agent_configuration/runtime_types/integer_rt'; -import { PackagePolicyVars, SettingsRow } from '../typings'; +import type { PackagePolicyVars, SettingsRow } from '../typings'; import { mergeNewVars, isSettingsFormValid, validateSettingValue } from './utils'; describe('settings utils', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.ts index 3ab80d6a7010b..415453da4dcee 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/settings_form/utils.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { isRight } from 'fp-ts/lib/Either'; import { PathReporter } from 'io-ts/lib/PathReporter'; import { isEmpty, isFinite } from 'lodash'; -import { PackagePolicyVars, SettingsRow, BasicSettingRow } from '../typings'; +import type { PackagePolicyVars, SettingsRow, BasicSettingRow } from '../typings'; export const REQUIRED_LABEL = i18n.translate('xpack.apm.fleet_integration.settings.requiredLabel', { defaultMessage: 'Required', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts index 401759ad0f98b..3fc053bfa1897 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/apm_policy_form/typings.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import * as t from 'io-ts'; -import { ReactNode } from 'react'; -import { PackagePolicyConfigRecordEntry } from '@kbn/fleet-plugin/common'; +import type * as t from 'io-ts'; +import type { ReactNode } from 'react'; +import type { PackagePolicyConfigRecordEntry } from '@kbn/fleet-plugin/common'; export type { PackagePolicyCreateExtensionComponentProps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_agents_tab_extension.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_agents_tab_extension.tsx index 861f587f9c42c..8736a85a1279e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_agents_tab_extension.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_agents_tab_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackagePolicyEditExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyEditExtensionComponent } from '@kbn/fleet-plugin/public'; export const getLazyApmAgentsTabExtension = () => { return lazy(async () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_create_extension.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_create_extension.tsx index c8a1392a80027..c7a8868e2ac8c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_create_extension.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_create_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackagePolicyCreateExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyCreateExtensionComponent } from '@kbn/fleet-plugin/public'; export const getLazyAPMPolicyCreateExtension = () => { return lazy(async () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_edit_extension.tsx b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_edit_extension.tsx index 9e956697b33ca..4e5ba5aaa3660 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_edit_extension.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/fleet_integration/lazy_apm_policy_edit_extension.tsx @@ -6,7 +6,7 @@ */ import { lazy } from 'react'; -import { PackagePolicyEditExtensionComponent } from '@kbn/fleet-plugin/public'; +import type { PackagePolicyEditExtensionComponent } from '@kbn/fleet-plugin/public'; export const getLazyAPMPolicyEditExtension = () => { return lazy(async () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/apm_error_boundary.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/apm_error_boundary.tsx index f68254c6afd1f..25014e4492ef0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/apm_error_boundary.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/apm_error_boundary.tsx @@ -10,7 +10,7 @@ import { useKibana } from '@kbn/kibana-react-plugin/public'; import React from 'react'; import { NotFoundPrompt } from '@kbn/shared-ux-prompt-not-found'; import { useLocation } from 'react-router-dom'; -import { ApmPluginStartDeps } from '../../plugin'; +import type { ApmPluginStartDeps } from '../../plugin'; export function ApmErrorBoundary({ children }: { children?: React.ReactNode }) { const location = useLocation(); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx index 0b628ff985735..67193013b3c93 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx @@ -5,20 +5,16 @@ * 2.0. */ -import { - EuiContextMenu, - EuiContextMenuPanelDescriptor, - EuiHeaderLink, - EuiPopover, -} from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiContextMenu, EuiHeaderLink, EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; -import { ApmOnboardingLocatorParams } from '../../../../locator/onboarding_locator'; +import type { ApmOnboardingLocatorParams } from '../../../../locator/onboarding_locator'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useKibana } from '../../../../context/kibana_context/use_kibana'; -import { ApmPluginStartDeps, ApmServices } from '../../../../plugin'; -import { EntityInventoryAddDataParams } from '../../../../services/telemetry'; +import type { ApmPluginStartDeps, ApmServices } from '../../../../plugin'; +import type { EntityInventoryAddDataParams } from '../../../../services/telemetry'; import { associateServiceLogsProps, collectServiceLogsProps, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/alerting_popover_flyout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/alerting_popover_flyout.tsx index e08e37b5d6eff..fd57ea99e257f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/alerting_popover_flyout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/alerting_popover_flyout.tsx @@ -5,12 +5,8 @@ * 2.0. */ -import { - EuiContextMenu, - EuiContextMenuPanelDescriptor, - EuiHeaderLink, - EuiPopover, -} from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiContextMenu, EuiHeaderLink, EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { ApmRuleType } from '@kbn/rule-data-utils'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.test.tsx index f894ee34103a4..72fecf35dc6a1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.test.tsx @@ -9,7 +9,7 @@ import { fireEvent, render, waitFor } from '@testing-library/react'; import { createMemoryHistory } from 'history'; import React from 'react'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; -import { ApmMlJob } from '../../../../../common/anomaly_detection/apm_ml_job'; +import type { ApmMlJob } from '../../../../../common/anomaly_detection/apm_ml_job'; import { getAnomalyDetectionSetupState } from '../../../../../common/anomaly_detection/get_anomaly_detection_setup_state'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; import * as hooks from '../../../../context/anomaly_detection_jobs/use_anomaly_detection_jobs_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx index 2441dd7893cd9..e382b0ea4ae40 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/anomaly_detection_setup_link.tsx @@ -6,7 +6,7 @@ */ import { EuiLoadingSpinner } from '@elastic/eui'; -import { IconType } from '@elastic/eui'; +import type { IconType } from '@elastic/eui'; import { EuiHeaderLink, EuiIcon, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/labs/labs_flyout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/labs/labs_flyout.tsx index bda1c7e4ee022..c3f541972a8e2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/labs/labs_flyout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/apm_header_action_menu/labs/labs_flyout.tsx @@ -27,7 +27,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { useEditableSettings, useUiTracker } from '@kbn/observability-shared-plugin/public'; import { FieldRowProvider } from '@kbn/management-settings-components-field-row'; -import { ValueValidation } from '@kbn/core-ui-settings-browser/src/types'; +import type { ValueValidation } from '@kbn/core-ui-settings-browser/src/types'; import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; import { useFetcher, isPending } from '../../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/index.tsx index 2b709e2077470..68390d9c5598e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/index.tsx @@ -20,16 +20,14 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { KibanaEnvironmentContextProvider } from '../../../context/kibana_environment_context/kibana_environment_context'; import { AnomalyDetectionJobsContextProvider } from '../../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; -import { - ApmPluginContext, - ApmPluginContextValue, -} from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import { ApmPluginContext } from '../../../context/apm_plugin/apm_plugin_context'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { BreadcrumbsContextProvider } from '../../../context/breadcrumbs/context'; import { LicenseProvider } from '../../../context/license/license_context'; import { TimeRangeIdContextProvider } from '../../../context/time_range_id/time_range_id_context'; import { UrlParamsProvider } from '../../../context/url_params_context/url_params_context'; -import { ApmPluginStartDeps, ApmServices } from '../../../plugin'; +import type { ApmPluginStartDeps, ApmServices } from '../../../plugin'; import { ApmErrorBoundary } from '../apm_error_boundary'; import { apmRouter } from '../apm_route_config'; import { TrackPageview } from '../track_pageview'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_date_range/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_date_range/index.tsx index 30476dd0539b2..421fb8b682380 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_date_range/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_date_range/index.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ReactElement } from 'react'; +import type { ReactElement } from 'react'; import { useLocation } from 'react-router-dom'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { useDateRangeRedirect } from '../../../../hooks/use_date_range_redirect'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_environment/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_environment/index.test.tsx index fa5d9c3b64102..e98ab28794808 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_environment/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_default_environment/index.test.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { RouterProvider } from '@kbn/typed-react-router-config'; import { render } from '@testing-library/react'; -import { createMemoryHistory, Location, MemoryHistory } from 'history'; +import type { Location, MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; import qs from 'query-string'; import { RedirectWithDefaultEnvironment } from '.'; import { apmRouter } from '../../apm_route_config'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.test.tsx index 0d48d157fa6b8..d850feb6b715c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.test.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { RouterProvider } from '@kbn/typed-react-router-config'; import { render } from '@testing-library/react'; -import { createMemoryHistory, Location, MemoryHistory } from 'history'; +import type { Location, MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; import qs from 'query-string'; import { RedirectWithOffset } from '.'; import { apmRouter } from '../../apm_route_config'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.tsx index 6bfbf82fc2f2a..424d1a4b33b1c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/redirect_with_offset/index.tsx @@ -10,10 +10,8 @@ import qs from 'query-string'; import React from 'react'; import { useApmRouter } from '../../../../hooks/use_apm_router'; import { isRouteWithComparison } from '../../../shared/is_route_with_time_range'; -import { - TimeRangeComparisonEnum, - dayAndWeekBeforeToOffset, -} from '../../../shared/time_comparison/get_comparison_options'; +import type { TimeRangeComparisonEnum } from '../../../shared/time_comparison/get_comparison_options'; +import { dayAndWeekBeforeToOffset } from '../../../shared/time_comparison/get_comparison_options'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { getComparisonEnabled } from '../../../shared/time_comparison/get_comparison_enabled'; import { toBoolean } from '../../../../context/url_params_context/helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/scroll_to_top_on_path_change.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/scroll_to_top_on_path_change.tsx index bd51666dcf439..d86bdc52fd942 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/scroll_to_top_on_path_change.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/app_root/scroll_to_top_on_path_change.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import { Component } from 'react'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/home/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/home/index.tsx index 63ee44baae253..993315551497b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/home/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/home/index.tsx @@ -8,7 +8,8 @@ import { i18n } from '@kbn/i18n'; import { toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; import { Outlet } from '@kbn/typed-react-router-config'; import * as t from 'io-ts'; -import React, { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { dynamic } from '@kbn/shared-ux-utility'; import { offsetRt } from '../../../../common/comparison_rt'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/home/page_template.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/home/page_template.tsx index 1e5508bceb4ed..b0a0360df866c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/home/page_template.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/home/page_template.tsx @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import * as t from 'io-ts'; +import type * as t from 'io-ts'; import React from 'react'; -import { Route } from '@kbn/typed-react-router-config'; +import type { Route } from '@kbn/typed-react-router-config'; import { Breadcrumb } from '../../app/breadcrumb'; import { ApmMainTemplate } from '../templates/apm_main_template'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/redirect_to.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/redirect_to.tsx index aeedf5f9cb55b..459a3faf12624 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/redirect_to.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/redirect_to.tsx @@ -6,8 +6,9 @@ */ import React from 'react'; -import { Location } from 'history'; -import { Redirect, useLocation, RouteComponentProps } from 'react-router-dom'; +import type { Location } from 'history'; +import type { RouteComponentProps } from 'react-router-dom'; +import { Redirect, useLocation } from 'react-router-dom'; /** * Function that returns a react component to redirect to a given pathname removing hash-based URLs diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/service_detail/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/service_detail/index.tsx index 8a4a1c32877c5..2c214fe542a5f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/service_detail/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/service_detail/index.tsx @@ -27,7 +27,7 @@ import { InfraTab } from '../../app/infra_overview/infra_tabs/use_tabs'; import { ApmServiceTemplate } from '../templates/apm_service_template'; import { ApmServiceWrapper } from './apm_service_wrapper'; import { RedirectToDefaultServiceRouteView } from './redirect_to_default_service_route_view'; -import { SearchBar } from '../../shared/search_bar/search_bar'; +import type { SearchBar } from '../../shared/search_bar/search_bar'; import { ServiceDependencies } from '../../app/service_dependencies'; import { ServiceDashboards } from '../../app/service_dashboards'; import { ErrorGroupDetails } from '../../app/error_group_details'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/entities_inventory_callout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/entities_inventory_callout.tsx index 16eeba5e67ef4..447d8cfba007d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/entities_inventory_callout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/entities_inventory_callout.tsx @@ -10,7 +10,7 @@ import { TechnicalPreviewBadge } from '@kbn/observability-shared-plugin/public'; import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ApmPluginStartDeps } from '../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../plugin'; interface EntitiesInventoryCalloutProps { onDismiss: () => void; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/index.tsx index b7fadf8c12870..eae1bbae1c34b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_main_template/index.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { EuiFlexGroup, EuiPageHeaderProps } from '@elastic/eui'; +import type { EuiPageHeaderProps } from '@elastic/eui'; +import { EuiFlexGroup } from '@elastic/eui'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { ObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; +import type { ObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; import type { KibanaPageTemplateProps } from '@kbn/shared-ux-page-kibana-template'; import React, { useContext } from 'react'; import { useLocation } from 'react-router-dom'; @@ -20,7 +21,7 @@ import { KibanaEnvironmentContext } from '../../../../context/kibana_environment import { getPathForFeedback } from '../../../../utils/get_path_for_feedback'; import { EnvironmentsContextProvider } from '../../../../context/environments_context/environments_context'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; -import { ApmPluginStartDeps } from '../../../../plugin'; +import type { ApmPluginStartDeps } from '../../../../plugin'; import { ServiceGroupSaveButton } from '../../../app/service_groups'; import { ServiceGroupsButtonGroup } from '../../../app/service_groups/service_groups_button_group'; import { ApmEnvironmentFilter } from '../../../shared/environment_filter'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.stories.tsx index 3ea8707fe7849..287c34b701895 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/analyze_data_button.stories.tsx @@ -13,7 +13,7 @@ import { MockApmPluginContextWrapper } from '../../../../context/apm_plugin/mock import { APMServiceContext } from '../../../../context/apm_service/apm_service_context'; import { AnalyzeDataButton } from './analyze_data_button'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; interface Args { agentName: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx index 6c2fdaea96687..f75f7a67f8e0a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/index.tsx @@ -22,7 +22,8 @@ import { SearchBar } from '../../../shared/search_bar/search_bar'; import { ServiceIcons } from '../../../shared/service_icons'; import { ApmMainTemplate } from '../apm_main_template'; import { AnalyzeDataButton } from './analyze_data_button'; -import { Tab, useTabs } from './use_tabs'; +import type { Tab } from './use_tabs'; +import { useTabs } from './use_tabs'; interface Props { title: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.test.tsx index fee28395960c9..363526d343baa 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.test.tsx @@ -4,20 +4,21 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { renderHook } from '@testing-library/react'; import { createMemoryHistory } from 'history'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { ServerlessType } from '../../../../../common/serverless'; -import { APIEndpoint } from '../../../../../server'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { APIEndpoint } from '../../../../../server'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginContextWrapper, mockApmPluginContextValue, } from '../../../../context/apm_plugin/mock_apm_plugin_context'; import * as useApmServiceContext from '../../../../context/apm_service/use_apm_service_context'; -import { ServiceEntitySummary } from '../../../../context/apm_service/use_service_entity_summary_fetcher'; +import type { ServiceEntitySummary } from '../../../../context/apm_service/use_service_entity_summary_fetcher'; import * as fetcherHook from '../../../../hooks/use_fetcher'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { fromQuery } from '../../../shared/links/url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.tsx index 53a91c60be3ab..b91ce935f3055 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/apm_service_template/use_tabs.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiBadge, EuiPageHeaderProps, EuiToolTip } from '@elastic/eui'; +import type { EuiPageHeaderProps } from '@elastic/eui'; +import { EuiBadge, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { enableAwsLambdaMetrics } from '@kbn/observability-plugin/common'; import { keyBy, omit } from 'lodash'; @@ -18,7 +19,7 @@ import { isServerlessAgentName, } from '../../../../../common/agent_name'; import { ApmFeatureFlagName } from '../../../../../common/apm_feature_flags'; -import { ServerlessType } from '../../../../../common/serverless'; +import type { ServerlessType } from '../../../../../common/serverless'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useApmServiceContext } from '../../../../context/apm_service/use_apm_service_context'; import { useApmFeatureFlag } from '../../../../hooks/use_apm_feature_flag'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx index 0c6a1f4176ec5..752bb740ca37f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/mobile_service_template/index.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiPageHeaderProps, EuiTitle } from '@elastic/eui'; +import type { EuiPageHeaderProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { omit } from 'lodash'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/service_group_template.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/service_group_template.tsx index d9fb2437be14c..1319b4f87148e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/service_group_template.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/service_group_template.tsx @@ -5,13 +5,8 @@ * 2.0. */ -import { - EuiPageHeaderProps, - EuiFlexGroup, - EuiFlexItem, - EuiSkeletonTitle, - EuiIcon, -} from '@elastic/eui'; +import type { EuiPageHeaderProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSkeletonTitle, EuiIcon } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import type { KibanaPageTemplateProps } from '@kbn/shared-ux-page-kibana-template'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.stories.tsx index eaab08bc09e6f..5a3ccd5f85ac4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.stories.tsx @@ -8,7 +8,8 @@ import type { CoreStart } from '@kbn/core/public'; import type { Meta, Story } from '@storybook/react'; import { noop } from 'lodash'; -import React, { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginStorybook } from '../../../context/apm_plugin/mock_apm_plugin_storybook'; import { mockApmApiCallResponse } from '../../../services/rest/call_apm_api_spy'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.tsx b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.tsx index 9235065271768..fc9a2976357e9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/routing/templates/settings_template.tsx @@ -5,17 +5,17 @@ * 2.0. */ -import { EuiPageHeaderProps } from '@elastic/eui'; -import { CoreStart } from '@kbn/core/public'; +import type { EuiPageHeaderProps } from '@elastic/eui'; +import type { CoreStart } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { enableAgentExplorerView } from '@kbn/observability-plugin/public'; import React from 'react'; -import { Environment } from '../../../../common/environment_rt'; +import type { Environment } from '../../../../common/environment_rt'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { useDefaultEnvironment } from '../../../hooks/use_default_environment'; import { BetaBadge } from '../../shared/beta_badge'; -import { ApmRouter } from '../apm_route_config'; +import type { ApmRouter } from '../apm_route_config'; import { ApmMainTemplate } from './apm_main_template'; import { useApmFeatureFlag } from '../../../hooks/use_apm_feature_flag'; import { ApmFeatureFlagName } from '../../../../common/apm_feature_flags'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/add_data_buttons/buttons.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/add_data_buttons/buttons.tsx index b58799f0e00c2..b8c9e9c11e329 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/add_data_buttons/buttons.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/add_data_buttons/buttons.tsx @@ -8,16 +8,15 @@ // Disabling it for now until the EUI team fixes it /* eslint-disable @elastic/eui/href-or-on-click */ -import { EuiButton, EuiButtonSize } from '@elastic/eui'; +import type { EuiButtonSize } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; -import { LocatorPublic } from '@kbn/share-plugin/common'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { - ApmOnboardingLocatorCategory, - ApmOnboardingLocatorParams, -} from '../../../locator/onboarding_locator'; +import type { ApmOnboardingLocatorParams } from '../../../locator/onboarding_locator'; +import { ApmOnboardingLocatorCategory } from '../../../locator/onboarding_locator'; export const addApmDataProps = (locator: LocatorPublic | undefined) => { return { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/beta_badge.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/beta_badge.tsx index c6b3c72575fce..76b4a595d0900 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/beta_badge.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/beta_badge.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiBetaBadge, IconType } from '@elastic/eui'; +import type { IconType } from '@elastic/eui'; +import { EuiBetaBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx index e0ad710a14d9e..d9cbec2c86bc6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/breakdown_chart/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { TickFormatter, XYBrushEvent } from '@elastic/charts'; import { AnnotationDomainType, AreaSeries, @@ -16,8 +17,6 @@ import { Position, ScaleType, Settings, - TickFormatter, - XYBrushEvent, Tooltip, LegendValue, } from '@elastic/charts'; @@ -27,15 +26,15 @@ import moment from 'moment'; import React from 'react'; import { useHistory } from 'react-router-dom'; import { useChartThemes } from '@kbn/observability-shared-plugin/public'; -import { Annotation } from '../../../../../common/annotations'; +import type { Annotation } from '../../../../../common/annotations'; import { asAbsoluteDateTime, asPercent, getDurationFormatter, } from '../../../../../common/utils/formatters'; -import { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; import { useChartPointerEventContext } from '../../../../context/chart_pointer_event/use_chart_pointer_event_context'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { unit } from '../../../../utils/style'; import { ChartContainer } from '../chart_container'; import { isTimeseriesEmpty, onBrushEnd } from '../helper/helper'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart/index.tsx index 65f22d78adf99..572f3e0504db1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart/index.tsx @@ -8,21 +8,23 @@ import React, { useMemo } from 'react'; import { flatten } from 'lodash'; +import type { + BrushEndListener, + LineAnnotationDatum, + LineAnnotationStyle, + TickFormatter, +} from '@elastic/charts'; import { AnnotationDomainType, AreaSeries, Axis, - BrushEndListener, Chart, CurveType, LineAnnotation, - LineAnnotationDatum, - LineAnnotationStyle, Position, RectAnnotation, ScaleType, Settings, - TickFormatter, } from '@elastic/charts'; import { euiPaletteColorBlind, useEuiTheme } from '@elastic/eui'; @@ -36,7 +38,7 @@ import { getDurationFormatter } from '../../../../../common/utils/formatters'; import type { HistogramItem } from '../../../../../common/correlations/types'; import { DEFAULT_PERCENTILE_THRESHOLD } from '../../../../../common/correlations/constants'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { ChartContainer } from '../chart_container'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart_with_scrubber/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart_with_scrubber/index.tsx index 3b9131a537362..650047c899453 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart_with_scrubber/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/duration_distribution_chart_with_scrubber/index.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BrushEndListener, BrushEvent, XYBrushEvent } from '@elastic/charts'; +import type { BrushEndListener, BrushEvent, XYBrushEvent } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; @@ -17,15 +17,13 @@ import { EuiText, EuiTitle, } from '@elastic/eui'; -import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; import { ChartTitleToolTip } from '../../../app/correlations/chart_title_tool_tip'; import { getDurationFormatter } from '../../../../../common/utils/formatters'; -import { - DurationDistributionChart, - DurationDistributionChartData, -} from '../duration_distribution_chart'; +import type { DurationDistributionChartData } from '../duration_distribution_chart'; +import { DurationDistributionChart } from '../duration_distribution_chart'; import { TotalDocCountLabel } from '../duration_distribution_chart/total_doc_count_label'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; // Format the selected latency range for the "Clear selection" badge. // If the two values share the same unit, it will only displayed once. diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx index 6be23f967398b..677c7bcecffc4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/failed_transaction_rate_chart/index.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiIconTip } from '@elastic/eui'; import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_text'; import { isTimeComparison } from '../../time_comparison/get_comparison_options'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { asPercent } from '../../../../../common/utils/formatters'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/flamegraph/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/flamegraph/index.tsx index d1617f198b9e2..757eb7adefeb9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/flamegraph/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/flamegraph/index.tsx @@ -7,7 +7,7 @@ import { EuiEmptyPrompt } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { EmbeddableFlamegraph } from '@kbn/observability-shared-plugin/public'; -import { BaseFlameGraph } from '@kbn/profiling-utils'; +import type { BaseFlameGraph } from '@kbn/profiling-utils'; import { isEmpty } from 'lodash'; import React from 'react'; import { FETCH_STATUS, isPending } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx index 74179489aceb2..7c01428cab960 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/get_chart_anomaly_timeseries.tsx @@ -13,8 +13,8 @@ import { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; import type { AreaSeriesStyle, RecursivePartial } from '@elastic/charts'; import type { EuiThemeComputed } from '@elastic/eui'; import { getSeverityColor } from '../../../../../common/anomaly_detection'; -import { ServiceAnomalyTimeseries } from '../../../../../common/anomaly_detection/service_anomaly_timeseries'; -import { APMChartSpec } from '../../../../../typings/timeseries'; +import type { ServiceAnomalyTimeseries } from '../../../../../common/anomaly_detection/service_anomaly_timeseries'; +import type { APMChartSpec } from '../../../../../typings/timeseries'; export const expectedBoundsTitle = i18n.translate('xpack.apm.comparison.expectedBoundsTitle', { defaultMessage: 'Expected bounds', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.test.ts index 9db7123b32881..db92f011ecc7c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.test.ts @@ -6,8 +6,8 @@ */ import { onBrushEnd, isTimeseriesEmpty } from './helper'; -import { History } from 'history'; -import { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; +import type { History } from 'history'; +import type { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; describe('Chart helper', () => { describe('onBrushEnd', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.ts index c5fc977ad2fa6..138e6ffe9be7d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/helper.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { XYBrushEvent } from '@elastic/charts'; -import { History } from 'history'; -import { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; +import type { XYBrushEvent } from '@elastic/charts'; +import type { History } from 'history'; +import type { Coordinate, TimeSeries } from '../../../../../typings/timeseries'; import { fromQuery, toQuery } from '../../links/url_helpers'; export const onBrushEnd = ({ x, history }: { x: XYBrushEvent['x']; history: History }) => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.test.ts index 9b5308de1020d..d7f448ea4dcb6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.test.ts @@ -6,7 +6,7 @@ */ import moment from 'moment-timezone'; -import { IUiSettingsClient } from '@kbn/core/public'; +import type { IUiSettingsClient } from '@kbn/core/public'; import { getDomainTZ, getTimeTicksTZ, getTimeZone } from './timezone'; describe('Timezone helper', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.ts index 951788bfbe7b3..71d2d862142da 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/helper/timezone.ts @@ -6,7 +6,7 @@ */ import d3 from 'd3'; -import { IUiSettingsClient } from '@kbn/core/public'; +import type { IUiSettingsClient } from '@kbn/core/public'; import { UI_SETTINGS } from '@kbn/data-plugin/common'; import { getTimezoneOffsetInMs } from './get_timezone_offset_in_ms'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.stories.tsx index 72391588d3909..7ecd8cf09e1eb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.stories.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { TooltipInfo } from '@elastic/charts'; +import type { TooltipInfo } from '@elastic/charts'; import React from 'react'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { getDurationFormatter } from '../../../../../common/utils/formatters'; import { CustomTooltip } from './custom_tooltip'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx index 8e0c24162f2a6..1a026a02c90dd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/custom_tooltip.tsx @@ -5,13 +5,14 @@ * 2.0. */ -import { TooltipInfo } from '@elastic/charts'; +import type { TooltipInfo } from '@elastic/charts'; import { EuiIcon, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { getServiceNodeName } from '../../../../../common/service_nodes'; -import { asTransactionRate, TimeFormatter } from '../../../../../common/utils/formatters'; +import type { TimeFormatter } from '../../../../../common/utils/formatters'; +import { asTransactionRate } from '../../../../../common/utils/formatters'; type ServiceInstanceMainStatistics = APIReturnType<'GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx index 6e5ce28e8cd22..65095a4c9e3f7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/index.tsx @@ -5,17 +5,19 @@ * 2.0. */ +import type { + ElementClickListener, + GeometryValue, + TooltipInfo, + TooltipProps, +} from '@elastic/charts'; import { Axis, BubbleSeries, Chart, - ElementClickListener, - GeometryValue, Position, ScaleType, Settings, - TooltipInfo, - TooltipProps, TooltipType, Tooltip, } from '@elastic/charts'; @@ -27,8 +29,8 @@ import { useChartThemes } from '@kbn/observability-shared-plugin/public'; import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_text'; import { SERVICE_NODE_NAME } from '../../../../../common/es_fields/apm'; import { asTransactionRate, getDurationFormatter } from '../../../../../common/utils/formatters'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import * as urlHelpers from '../../links/url_helpers'; import { ChartContainer } from '../chart_container'; import { getResponseTimeTickFormatter } from '../transaction_charts/helper'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/instances_latency_distribution_chart.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/instances_latency_distribution_chart.stories.tsx index fc92947cd7737..fecc9c683b3e4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/instances_latency_distribution_chart.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/instances_latency_distribution_chart/instances_latency_distribution_chart.stories.tsx @@ -5,9 +5,11 @@ * 2.0. */ -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; -import { InstancesLatencyDistributionChart, InstancesLatencyDistributionChartProps } from '.'; +import type { InstancesLatencyDistributionChartProps } from '.'; +import { InstancesLatencyDistributionChart } from '.'; import { MockApmPluginStorybook } from '../../../../context/apm_plugin/mock_apm_plugin_storybook'; export default { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/latency_chart/latency_chart.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/latency_chart/latency_chart.stories.tsx index f02020c3645ed..9a5e74e1f8fbd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/latency_chart/latency_chart.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/latency_chart/latency_chart.stories.tsx @@ -6,7 +6,7 @@ */ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { LatencyChart } from '.'; @@ -20,7 +20,8 @@ import { ApmTimeRangeMetadataContextProvider } from '../../../../context/time_ra import { MockUrlParamsContextProvider } from '../../../../context/url_params_context/mock_url_params_context_provider'; import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { mockApmApiCallResponse } from '../../../../services/rest/call_apm_api_spy'; -import { APIReturnType, createCallApmApi } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import { createCallApmApi } from '../../../../services/rest/create_call_apm_api'; interface Args { latencyChartResponse: APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/latency'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_error_rate_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_error_rate_chart.tsx index 6cbd3e188720b..bf7d2871f6846 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_error_rate_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_error_rate_chart.tsx @@ -13,7 +13,7 @@ import { SERVICE_NAME } from '@kbn/observability-shared-plugin/common'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { asDecimalOrInteger } from '../../../../../common/utils/formatters'; import { TooltipContent } from './tooltip_content'; import { Popover } from './popover'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_rate_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_rate_chart.tsx index 8025a628067e7..efb89f68ef541 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_rate_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/log_rate_chart.tsx @@ -12,7 +12,7 @@ import { css } from '@emotion/react'; import { useApmParams } from '../../../../hooks/use_apm_params'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { useTimeRange } from '../../../../hooks/use_time_range'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { asDecimalOrInteger } from '../../../../../common/utils/formatters'; import { TooltipContent } from './tooltip_content'; import { Popover } from './popover'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/tooltip_content.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/tooltip_content.tsx index 9fbcdec335a73..54f99a7deb16e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/tooltip_content.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/log_rates/tooltip_content.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { HTMLAttributes, ReactElement } from 'react'; +import type { HTMLAttributes, ReactElement } from 'react'; +import React from 'react'; import { EuiText } from '@elastic/eui'; import { css } from '@emotion/react'; import { FormattedMessage } from '@kbn/i18n-react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/metrics_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/metrics_chart/index.tsx index 017ede4861a2b..b5c1047b22cfc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/metrics_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/metrics_chart/index.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiTitle } from '@elastic/eui'; import React from 'react'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { asDecimal, asInteger, @@ -15,8 +15,8 @@ import { getDurationFormatter, getFixedByteFormatter, } from '../../../../../common/utils/formatters'; -import { Maybe } from '../../../../../typings/common'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { Maybe } from '../../../../../typings/common'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { TimeseriesChartWithContext } from '../timeseries_chart_with_context'; import { getMaxY, getResponseTimeTickFormatter } from '../transaction_charts/helper'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/spark_plot/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/spark_plot/index.tsx index b18fd70d0d2ca..526c16fb06c7d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/spark_plot/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/spark_plot/index.tsx @@ -5,13 +5,13 @@ * 2.0. */ +import type { PartialTheme } from '@elastic/charts'; import { AreaSeries, BarSeries, Chart, CurveType, LineSeries, - PartialTheme, ScaleType, Settings, Tooltip, @@ -20,7 +20,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingChart, useEuiTheme } from import React from 'react'; import { useChartThemes } from '@kbn/observability-shared-plugin/public'; import { i18n } from '@kbn/i18n'; -import { Coordinate } from '../../../../../typings/timeseries'; +import type { Coordinate } from '../../../../../typings/timeseries'; import { unit } from '../../../../utils/style'; import { getComparisonChartTheme } from '../../time_comparison/get_comparison_chart_theme'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/index.tsx index 8b0a966b91b44..11fe04d30a3a9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/index.tsx @@ -7,8 +7,8 @@ import React, { useState } from 'react'; import { EuiResizeObserver } from '@elastic/eui'; -import { AgentMark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; -import { ErrorMark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; +import type { AgentMark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; +import type { ErrorMark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; import { getPlotValues } from './plot_utils'; import { TimelineAxis } from './timeline_axis'; import { VerticalLines } from './vertical_lines'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.test.tsx index 27fe750b06521..c825a23b51515 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.test.tsx @@ -8,7 +8,7 @@ import { shallow } from 'enzyme'; import React from 'react'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; -import { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; +import type { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; import { AgentMarker } from './agent_marker'; describe('AgentMarker', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx index 1ee668fb5765f..eff9364351987 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/agent_marker.tsx @@ -9,7 +9,7 @@ import { EuiToolTip, useEuiTheme } from '@elastic/eui'; import React from 'react'; import styled from '@emotion/styled'; import { asDuration } from '../../../../../../common/utils/formatters'; -import { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; +import type { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; import { Legend } from '../legend'; const NameContainer = styled.div` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.test.tsx index 748b783661743..58e0ab63fedb3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.test.tsx @@ -6,11 +6,12 @@ */ import { fireEvent, act } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { MockApmPluginContextWrapper } from '../../../../../context/apm_plugin/mock_apm_plugin_context'; import { expectTextsInDocument, renderWithTheme } from '../../../../../utils/test_helpers'; -import { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; +import type { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; import { ErrorMarker } from './error_marker'; function Wrapper({ children }: { children?: ReactNode }) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx index 14b2a277c3931..bdc8c1ded4a29 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/error_marker.tsx @@ -11,7 +11,7 @@ import styled from '@emotion/styled'; import { TRACE_ID, TRANSACTION_ID } from '../../../../../../common/es_fields/apm'; import { asDuration } from '../../../../../../common/utils/formatters'; import { useLegacyUrlParams } from '../../../../../context/url_params_context/use_url_params'; -import { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; +import type { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; import { ErrorDetailLink } from '../../../links/apm/error_detail_link'; import { Legend, Shape } from '../legend'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.test.tsx index cadf1078937c6..100dbe3515e85 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.test.tsx @@ -8,8 +8,8 @@ import { shallow } from 'enzyme'; import React from 'react'; import { Marker } from '.'; -import { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; -import { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; +import type { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; +import type { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; describe('Marker', () => { it('renders agent marker', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.tsx index 4499f06558db6..2a5b72abb41ce 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/marker/index.tsx @@ -7,8 +7,8 @@ import React from 'react'; import styled from '@emotion/styled'; -import { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; -import { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; +import type { AgentMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; +import type { ErrorMark } from '../../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_error_marks'; import { AgentMarker } from './agent_marker'; import { ErrorMarker } from './error_marker'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/plot_utils.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/plot_utils.ts index a099c2c39313a..c91682f6dba43 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/plot_utils.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/plot_utils.ts @@ -6,7 +6,7 @@ */ import { scaleLinear } from 'd3-scale'; -import { Margins } from '.'; +import type { Margins } from '.'; export type PlotValues = ReturnType; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline.test.tsx index e6b9d30000229..4d7ac4a3e6c95 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline.test.tsx @@ -12,8 +12,9 @@ import { mockMoment, toJson, } from '../../../../utils/test_helpers'; -import { TimelineAxisContainer, TimelineProps, VerticalLinesContainer } from '.'; -import { AgentMark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; +import type { TimelineProps } from '.'; +import { TimelineAxisContainer, VerticalLinesContainer } from '.'; +import type { AgentMark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks/get_agent_marks'; describe.each([[TimelineAxisContainer], [VerticalLinesContainer]])(`Timeline`, (Component) => { let consoleMock: jest.SpyInstance; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline_axis.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline_axis.tsx index ebaa3d231dfa1..2b00687c009e6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline_axis.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/timeline_axis.tsx @@ -9,9 +9,9 @@ import { inRange } from 'lodash'; import React from 'react'; import { useEuiTheme } from '@elastic/eui'; import { getDurationFormatter } from '../../../../../common/utils/formatters'; -import { Mark } from '.'; +import type { Mark } from '.'; import { Marker } from './marker'; -import { PlotValues } from './plot_utils'; +import type { PlotValues } from './plot_utils'; // Remove any tick that is too close to topTraceDuration const getXAxisTickValues = (tickValues: number[], topTraceDuration?: number) => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/vertical_lines.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/vertical_lines.tsx index 1f2a929084bea..fe54ffb4fa9a4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/vertical_lines.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeline/vertical_lines.tsx @@ -7,8 +7,8 @@ import React from 'react'; import { useEuiTheme } from '@elastic/eui'; -import { Mark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks'; -import { PlotValues } from './plot_utils'; +import type { Mark } from '../../../app/transaction_details/waterfall_with_summary/waterfall_container/marks'; +import type { PlotValues } from './plot_utils'; interface VerticalLinesProps { marks?: Mark[]; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart.tsx index 5f08befb46a3a..75be9419fa111 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart.tsx @@ -5,29 +5,32 @@ * 2.0. */ +import type { + LineAnnotation, + RectAnnotationStyle, + SeriesIdentifier, + XYBrushEvent, + XYChartSeriesIdentifier, + SettingsSpec, +} from '@elastic/charts'; import { AreaSeries, Axis, BarSeries, Chart, CurveType, - LineAnnotation, LineSeries, niceTimeFormatter, Position, RectAnnotation, - RectAnnotationStyle, ScaleType, - SeriesIdentifier, Settings, - XYBrushEvent, - XYChartSeriesIdentifier, Tooltip, - SettingsSpec, } from '@elastic/charts'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiSpacer, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import React from 'react'; import { useHistory } from 'react-router-dom'; import { useChartThemes } from '@kbn/observability-shared-plugin/public'; import { isExpectedBoundsComparison } from '../time_comparison/get_comparison_options'; @@ -40,7 +43,7 @@ import { getChartAnomalyTimeseries, } from './helper/get_chart_anomaly_timeseries'; import { isTimeseriesEmpty, onBrushEnd } from './helper/helper'; -import { TimeseriesChartWithContextProps } from './timeseries_chart_with_context'; +import type { TimeseriesChartWithContextProps } from './timeseries_chart_with_context'; const END_ZONE_LABEL = i18n.translate('xpack.apm.timeseries.endzone', { defaultMessage: diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart_with_context.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart_with_context.tsx index 5f08e7375788e..707819ce75d8a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart_with_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/timeseries_chart_with_context.tsx @@ -5,23 +5,18 @@ * 2.0. */ -import { - AnnotationDomainType, - LegendItemListener, - LineAnnotation, - Position, - YDomainRange, -} from '@elastic/charts'; +import type { LegendItemListener, YDomainRange } from '@elastic/charts'; +import { AnnotationDomainType, LineAnnotation, Position } from '@elastic/charts'; import React from 'react'; import { EuiIcon, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { asAbsoluteDateTime } from '../../../../common/utils/formatters'; import { useAnnotationsContext } from '../../../context/annotations/use_annotations_context'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; -import { ServiceAnomalyTimeseries } from '../../../../common/anomaly_detection/service_anomaly_timeseries'; -import { Coordinate, TimeSeries } from '../../../../typings/timeseries'; +import type { ServiceAnomalyTimeseries } from '../../../../common/anomaly_detection/service_anomaly_timeseries'; +import type { Coordinate, TimeSeries } from '../../../../typings/timeseries'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { FETCH_STATUS } from '../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { unit } from '../../../utils/style'; import { getTimeZone } from './helper/timezone'; import { TimeseriesChart } from './timeseries_chart'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.test.ts index f8f4858109891..763ee014921de 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.test.ts @@ -7,7 +7,7 @@ import { getResponseTimeTickFormatter, getMaxY } from './helper'; -import { TimeSeries, Coordinate } from '../../../../../typings/timeseries'; +import type { TimeSeries, Coordinate } from '../../../../../typings/timeseries'; import { getDurationFormatter, toMicroseconds } from '../../../../../common/utils/formatters'; describe('transaction chart helper', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.tsx index 31d18b7a9709d..c9ba53795558b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/helper.tsx @@ -6,8 +6,8 @@ */ import { isFiniteNumber } from '../../../../../common/utils/is_finite_number'; -import { Coordinate } from '../../../../../typings/timeseries'; -import { TimeFormatter } from '../../../../../common/utils/formatters'; +import type { Coordinate } from '../../../../../typings/timeseries'; +import type { TimeFormatter } from '../../../../../common/utils/formatters'; export function getResponseTimeTickFormatter(formatter: TimeFormatter) { return (t: number) => formatter(t).formatted; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx index 06ca3ad46bf3a..f0a20e78ed0e4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_charts/index.tsx @@ -22,7 +22,7 @@ import { isOpenTelemetryAgentName, isRumAgentName, } from '../../../../../common/agent_name'; -import { AgentName } from '../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../typings/es_schemas/ui/fields/agent'; export function TransactionCharts({ kuery, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_coldstart_rate_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_coldstart_rate_chart/index.tsx index 701c5eaa12db3..5e79fa002dc1b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_coldstart_rate_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/transaction_coldstart_rate_chart/index.tsx @@ -17,7 +17,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { usePreviousPeriodLabel } from '../../../../hooks/use_previous_period_text'; import { isTimeComparison } from '../../time_comparison/get_comparison_options'; -import { APIReturnType } from '../../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../../services/rest/create_call_apm_api'; import { asPercent } from '../../../../../common/utils/formatters'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { TimeseriesChartWithContext } from '../timeseries_chart_with_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/treemap_chart/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/treemap_chart/index.tsx index 05685a608487d..02a7d045ef802 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/treemap_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/charts/treemap_chart/index.tsx @@ -5,11 +5,12 @@ * 2.0. */ import React from 'react'; -import { Chart, Datum, Partition, PartitionLayout } from '@elastic/charts'; +import type { Datum } from '@elastic/charts'; +import { Chart, Partition, PartitionLayout } from '@elastic/charts'; import { euiPaletteColorBlind } from '@elastic/eui'; import { percentValueGetter } from '@elastic/charts/dist/chart_types/partition_chart/layout/config'; import { isEmpty } from 'lodash'; -import { FETCH_STATUS } from '../../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../../hooks/use_fetcher'; import { ChartContainer } from '../chart_container'; type DataType = Array<{ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_to_flamegraph.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_to_flamegraph.ts index ff144973920e5..72e83a78d23e9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_to_flamegraph.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/critical_path_to_flamegraph.ts @@ -10,10 +10,8 @@ import { memoize, sumBy } from 'lodash'; import { lighten, parseToRgb } from 'polished'; import seedrandom from 'seedrandom'; import type { CriticalPathResponse } from '../../../../server/routes/traces/get_aggregated_critical_path'; -import { - CriticalPathTreeNode, - getAggregatedCriticalPathRootNodes, -} from '../../../../common/critical_path/get_aggregated_critical_path_root_nodes'; +import type { CriticalPathTreeNode } from '../../../../common/critical_path/get_aggregated_critical_path_root_nodes'; +import { getAggregatedCriticalPathRootNodes } from '../../../../common/critical_path/get_aggregated_critical_path_root_nodes'; const lightenColor = lighten(0.2); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/index.tsx index cf5bad7592374..988d2ef547581 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/critical_path_flamegraph/index.tsx @@ -4,14 +4,16 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Chart, Datum, Flame, Settings, Tooltip } from '@elastic/charts'; +import type { Datum } from '@elastic/charts'; +import { Chart, Flame, Settings, Tooltip } from '@elastic/charts'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, euiPaletteColorBlind } from '@elastic/eui'; import { css } from '@emotion/css'; import { useChartThemes } from '@kbn/observability-shared-plugin/public'; import { uniqueId } from 'lodash'; import React, { useMemo, useRef } from 'react'; import { i18n } from '@kbn/i18n'; -import { FETCH_STATUS, useFetcher, isPending } from '../../../hooks/use_fetcher'; +import type { FETCH_STATUS } from '../../../hooks/use_fetcher'; +import { useFetcher, isPending } from '../../../hooks/use_fetcher'; import { CriticalPathFlamegraphTooltip } from './critical_path_flamegraph_tooltip'; import { criticalPathToFlamegraph } from './critical_path_to_flamegraph'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/date_picker.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/date_picker.test.tsx index 4e862d044bb3c..5f2b34b72615f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/date_picker.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/date_picker.test.tsx @@ -8,7 +8,8 @@ import { EuiSuperDatePicker } from '@elastic/eui'; import { waitFor } from '@testing-library/react'; import { mount } from 'enzyme'; -import { createMemoryHistory, MemoryHistory } from 'history'; +import type { MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; import React from 'react'; import { useLocation } from 'react-router-dom'; import qs from 'query-string'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/index.tsx index cfade20f548d0..ddaac8d8b1f3e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/date_picker/index.tsx @@ -12,7 +12,7 @@ import { UI_SETTINGS } from '@kbn/data-plugin/common'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { clearCache } from '../../../services/rest/call_api'; import { fromQuery, toQuery } from '../links/url_helpers'; -import { TimePickerQuickRange } from './typings'; +import type { TimePickerQuickRange } from './typings'; export function DatePicker({ rangeFrom, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/get_span_metric_columns.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/get_span_metric_columns.tsx index 567b635f1eb42..f6a33c9afa3cb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/get_span_metric_columns.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/get_span_metric_columns.tsx @@ -9,14 +9,15 @@ import { EuiFlexGroup, EuiFlexItem, EuiIconTip, RIGHT_ALIGNMENT } from '@elastic import { i18n } from '@kbn/i18n'; import { ChartType, getTimeSeriesColor } from '../charts/helper/get_timeseries_color'; import { ListMetric } from '../list_metric'; -import { ITableColumn } from '../managed_table'; -import { FETCH_STATUS, isPending } from '../../../hooks/use_fetcher'; +import type { ITableColumn } from '../managed_table'; +import type { FETCH_STATUS } from '../../../hooks/use_fetcher'; +import { isPending } from '../../../hooks/use_fetcher'; import { asMillisecondDuration, asPercent, asTransactionRate, } from '../../../../common/utils/formatters'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { ImpactBar } from '../impact_bar'; import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/index.tsx index 48b8e6ebc7d09..6266091a3c21b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependencies_table/index.tsx @@ -8,14 +8,16 @@ import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { ConnectionStatsItemWithComparisonData } from '../../../../common/connections'; +import type { ConnectionStatsItemWithComparisonData } from '../../../../common/connections'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; import { EmptyMessage } from '../empty_message'; -import { ITableColumn, ManagedTable } from '../managed_table'; +import type { ITableColumn } from '../managed_table'; +import { ManagedTable } from '../managed_table'; import { OverviewTableContainer } from '../overview_table_container'; import { TruncateWithTooltip } from '../truncate_with_tooltip'; -import { getSpanMetricColumns, SpanMetricGroup } from './get_span_metric_columns'; +import type { SpanMetricGroup } from './get_span_metric_columns'; +import { getSpanMetricColumns } from './get_span_metric_columns'; export type DependenciesItem = Omit & { name: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx index 2b6a146050967..d0ebfd148ec7f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_failed_transaction_rate_chart.tsx @@ -11,11 +11,11 @@ import { isTimeComparison } from '../time_comparison/get_comparison_options'; import { asPercent } from '../../../../common/utils/formatters'; import { useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { Coordinate, TimeSeries } from '../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../typings/timeseries'; import { TimeseriesChartWithContext } from '../charts/timeseries_chart_with_context'; import { ChartType, getTimeSeriesColor } from '../charts/helper/get_timeseries_color'; import { getComparisonChartTheme } from '../time_comparison/get_comparison_chart_theme'; -import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; +import type { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { useSearchServiceDestinationMetrics } from '../../../context/time_range_metadata/use_search_service_destination_metrics'; function yLabelFormat(y?: number | null) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx index 1305fc9fd9386..0d4fe5d5840a0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_latency_chart.tsx @@ -11,12 +11,12 @@ import { isTimeComparison } from '../time_comparison/get_comparison_options'; import { getDurationFormatter } from '../../../../common/utils/formatters'; import { useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { Coordinate, TimeSeries } from '../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../typings/timeseries'; import { TimeseriesChartWithContext } from '../charts/timeseries_chart_with_context'; import { getMaxY, getResponseTimeTickFormatter } from '../charts/transaction_charts/helper'; import { ChartType, getTimeSeriesColor } from '../charts/helper/get_timeseries_color'; import { getComparisonChartTheme } from '../time_comparison/get_comparison_chart_theme'; -import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; +import type { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { useSearchServiceDestinationMetrics } from '../../../context/time_range_metadata/use_search_service_destination_metrics'; export function DependencyLatencyChart({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts index f348a257462e0..10b8fe1e9b95a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_metric_charts_route_params.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { TypeOf } from '@kbn/typed-react-router-config'; -import { ApmRoutes } from '../../routing/apm_route_config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; +import type { ApmRoutes } from '../../routing/apm_route_config'; export type DependencyMetricChartsRouteParams = Pick< { spanName?: string } & TypeOf< diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx index c9487e93e3f06..b55c2a3075d46 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/dependency_throughput_chart.tsx @@ -11,11 +11,11 @@ import { isTimeComparison } from '../time_comparison/get_comparison_options'; import { asTransactionRate } from '../../../../common/utils/formatters'; import { useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { Coordinate, TimeSeries } from '../../../../typings/timeseries'; +import type { Coordinate, TimeSeries } from '../../../../typings/timeseries'; import { TimeseriesChartWithContext } from '../charts/timeseries_chart_with_context'; import { ChartType, getTimeSeriesColor } from '../charts/helper/get_timeseries_color'; import { getComparisonChartTheme } from '../time_comparison/get_comparison_chart_theme'; -import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; +import type { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { useSearchServiceDestinationMetrics } from '../../../context/time_range_metadata/use_search_service_destination_metrics'; export function DependencyThroughputChart({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx index f64d40ca9e88a..7ed5549e2241d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/dependency_metric_charts/index.tsx @@ -12,7 +12,7 @@ import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; import { DependencyFailedTransactionRateChart } from './dependency_failed_transaction_rate_chart'; import { DependencyLatencyChart } from './dependency_latency_chart'; -import { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; +import type { DependencyMetricChartsRouteParams } from './dependency_metric_charts_route_params'; import { DependencyThroughputChart } from './dependency_throughput_chart'; export function DependencyMetricCharts() { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/empty_message.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/empty_message.tsx index 012060cbee375..1ca82d39f0fd6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/empty_message.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/empty_message.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiEmptyPrompt, EuiEmptyPromptProps } from '@elastic/eui'; +import type { EuiEmptyPromptProps } from '@elastic/eui'; +import { EuiEmptyPrompt } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_filter/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_filter/index.tsx index 782b409957e4d..f950b01c4acc0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_filter/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_filter/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { History } from 'history'; +import type { History } from 'history'; import React from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { fromQuery, toQuery } from '../links/url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_select/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_select/index.tsx index 0978694116432..902f4ee6afdaa 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_select/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/environment_select/index.tsx @@ -8,7 +8,8 @@ import { isEmpty } from 'lodash'; import { i18n } from '@kbn/i18n'; import React, { useMemo, useState } from 'react'; import { debounce } from 'lodash'; -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox } from '@elastic/eui'; import { getEnvironmentLabel, ENVIRONMENT_NOT_DEFINED, @@ -17,7 +18,7 @@ import { import { SERVICE_ENVIRONMENT } from '../../../../common/es_fields/apm'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { Environment } from '../../../../common/environment_rt'; +import type { Environment } from '../../../../common/environment_rt'; function getEnvironmentOptions(environments: Environment[]) { const environmentOptions = environments diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/errors_table/get_columns.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/errors_table/get_columns.tsx index 1cbd4c108509a..56f424ef46b31 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/errors_table/get_columns.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/errors_table/get_columns.tsx @@ -5,14 +5,15 @@ * 2.0. */ -import { EuiBasicTableColumn, RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; import styled from '@emotion/styled'; import { isTimeComparison } from '../time_comparison/get_comparison_options'; import { asInteger } from '../../../../common/utils/formatters'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { truncate } from '../../../utils/style'; import { SparkPlot } from '../charts/spark_plot'; import { ErrorDetailLink } from '../links/apm/error_detail_link'; @@ -20,7 +21,7 @@ import { ErrorOverviewLink } from '../links/apm/error_overview_link'; import { TimestampTooltip } from '../timestamp_tooltip'; import { TruncateWithTooltip } from '../truncate_with_tooltip'; import { ChartType, getTimeSeriesColor } from '../charts/helper/get_timeseries_color'; -import { ApmRoutes } from '../../routing/apm_route_config'; +import type { ApmRoutes } from '../../routing/apm_route_config'; const ErrorLink = styled(ErrorOverviewLink)` ${truncate('100%')}; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/explore_logs_button.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/explore_logs_button.tsx index 4d09b6bd08fe6..ece78351deed6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/explore_logs_button.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/explore_logs_button.tsx @@ -13,7 +13,8 @@ */ import React from 'react'; -import { AllDatasetsLocatorParams, ALL_DATASETS_LOCATOR_ID } from '@kbn/deeplinks-observability'; +import type { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability'; +import { ALL_DATASETS_LOCATOR_ID } from '@kbn/deeplinks-observability'; import { EuiButtonEmpty } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/logs_explorer_locator_config.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/logs_explorer_locator_config.ts index e5baa87856b31..39279f46e6587 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/logs_explorer_locator_config.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/explore_logs_button/logs_explorer_locator_config.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability'; -import { LocatorPublic } from '@kbn/share-plugin/common'; +import type { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; import { getRouterLinkProps } from '@kbn/router-utils'; -import { RouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; +import type { RouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; export const buildLogsExplorerLocatorConfig = ({ locator, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/get_bool_filter.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/get_bool_filter.ts index 42575126aaab5..4adfe0ec68a6c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/get_bool_filter.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/get_bool_filter.ts @@ -14,9 +14,9 @@ import { TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; -import { UIProcessorEvent } from '../../../common/processor_event'; +import type { UIProcessorEvent } from '../../../common/processor_event'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { ApmUrlParams } from '../../context/url_params_context/types'; +import type { ApmUrlParams } from '../../context/url_params_context/types'; export function getBoolFilter({ groupId, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/is_route_with_time_range.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/is_route_with_time_range.ts index f5ec673745939..6dfd7f815d57e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/is_route_with_time_range.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/is_route_with_time_range.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import type { ApmRouter } from '../routing/apm_route_config'; export function isRouteWithTimeRange({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/index.tsx index fdd993fab6c28..fe127e555ee2f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/index.tsx @@ -5,10 +5,12 @@ * 2.0. */ import { castArray } from 'lodash'; -import React, { TableHTMLAttributes } from 'react'; -import { EuiTable, EuiTableProps, EuiTableBody, EuiTableRow, EuiTableRowCell } from '@elastic/eui'; +import type { TableHTMLAttributes } from 'react'; +import React from 'react'; +import type { EuiTableProps } from '@elastic/eui'; +import { EuiTable, EuiTableBody, EuiTableRow, EuiTableRowCell } from '@elastic/eui'; import { FormattedValue } from './formatted_value'; -import { KeyValuePair } from '../../../../common/utils/flatten_object'; +import type { KeyValuePair } from '../../../../common/utils/flatten_object'; export function KeyValueTable({ keyValuePairs, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/key_value_table.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/key_value_table.test.tsx index 395003e7b2439..4942f61ccb4ba 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/key_value_table.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/key_value_table/key_value_table.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { KeyValueTable } from '.'; -import { render } from '@testing-library/react'; +import type { render } from '@testing-library/react'; import { renderWithTheme } from '../../../utils/test_helpers'; function getKeys(output: ReturnType) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/index.tsx index 373482675854f..3d800d6bb4167 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/index.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { i18n } from '@kbn/i18n'; import { uniqueId } from 'lodash'; import React, { useState } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; -import { QuerySuggestion } from '@kbn/unified-search-plugin/public'; +import type { QuerySuggestion } from '@kbn/unified-search-plugin/public'; import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; import type { DataView } from '@kbn/data-views-plugin/public'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/utils.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/utils.ts index 805e162c67fe6..28728a170f28c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/utils.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/kuery_bar/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { History } from 'history'; +import type { History } from 'history'; import { isEmpty } from 'lodash'; import { push } from '../links/url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/license_prompt/license_prompt.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/license_prompt/license_prompt.stories.tsx index 3ab6cfd69888a..f415140fd0a82 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/license_prompt/license_prompt.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/license_prompt/license_prompt.stories.tsx @@ -5,12 +5,11 @@ * 2.0. */ -import React, { ComponentProps, ComponentType } from 'react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { LicensePrompt } from '.'; -import { - ApmPluginContext, - ApmPluginContextValue, -} from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import { ApmPluginContext } from '../../../context/apm_plugin/apm_plugin_context'; const contextMock = { core: { http: { basePath: { prepend: () => {} } } }, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/agent_configuration_links.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/agent_configuration_links.tsx index b518cb23d91ff..2e1030653d5c6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/agent_configuration_links.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/agent_configuration_links.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import { IBasePath } from '@kbn/core/public'; -import { AgentConfigurationIntake } from '../../../../../common/agent_configuration/configuration_types'; +import type { IBasePath } from '@kbn/core/public'; +import type { AgentConfigurationIntake } from '../../../../../common/agent_configuration/configuration_types'; import { getLegacyApmHref } from './apm_link'; export function editAgentConfigurationHref( diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.test.tsx index 5065ab1689f5f..4f889f2eda5a6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; import { getRenderedHref } from '../../../../utils/test_helpers'; import { LegacyAPMLink } from './apm_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.tsx index 8fdbec144a4b8..6d3d57bc6b660 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/apm_link.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui'; -import { IBasePath } from '@kbn/core/public'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiLink } from '@elastic/eui'; +import type { IBasePath } from '@kbn/core/public'; import { pick } from 'lodash'; import React from 'react'; import { useLocation } from 'react-router-dom'; @@ -14,7 +15,8 @@ import url from 'url'; import { pickKeys } from '../../../../../common/utils/pick_keys'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params'; -import { APMQueryParams, fromQuery, toQuery } from '../url_helpers'; +import type { APMQueryParams } from '../url_helpers'; +import { fromQuery, toQuery } from '../url_helpers'; interface Props extends EuiLinkAnchorProps { path?: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_detail_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_detail_link.tsx index 0f06e698acaee..74ef4682f4cc1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_detail_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_detail_link.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { LegacyAPMLink, APMLinkExtendProps } from './apm_link'; +import type { APMLinkExtendProps } from './apm_link'; +import { LegacyAPMLink } from './apm_link'; interface Props extends APMLinkExtendProps { serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_overview_link.tsx index 58bc9cd75492e..ed624eac3fcb4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/error_overview_link.tsx @@ -7,9 +7,9 @@ import React from 'react'; import { EuiLink } from '@elastic/eui'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { useApmRouter } from '../../../../hooks/use_apm_router'; -import { ApmRoutes } from '../../../routing/apm_route_config'; +import type { ApmRoutes } from '../../../routing/apm_route_config'; interface Props { children: React.ReactNode; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/home_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/home_link.tsx index 78d0d4f9fb000..9d7b27b24daed 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/home_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/home_link.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { LegacyAPMLink, APMLinkExtendProps } from './apm_link'; +import type { APMLinkExtendProps } from './apm_link'; +import { LegacyAPMLink } from './apm_link'; function HomeLink(props: APMLinkExtendProps) { return ; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/metric_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/metric_overview_link.tsx index 5c2dd2b4b6705..e77b77537ce52 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/metric_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/metric_overview_link.tsx @@ -6,8 +6,9 @@ */ import React from 'react'; -import { APMQueryParams } from '../url_helpers'; -import { LegacyAPMLink, APMLinkExtendProps, useAPMHref } from './apm_link'; +import type { APMQueryParams } from '../url_helpers'; +import type { APMLinkExtendProps } from './apm_link'; +import { LegacyAPMLink, useAPMHref } from './apm_link'; const persistedFilters: Array = [ 'host', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/crash_detail_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/crash_detail_link.tsx index 7e72af09bb5c5..676454e2e54ae 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/crash_detail_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/crash_detail_link.tsx @@ -6,9 +6,9 @@ */ import React from 'react'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { EuiLink } from '@elastic/eui'; -import { mobileServiceDetailRoute } from '../../../../routing/mobile_service_detail'; +import type { mobileServiceDetailRoute } from '../../../../routing/mobile_service_detail'; import { useApmRouter } from '../../../../../hooks/use_apm_router'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_detail_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_detail_link.tsx index 2a7cc1566514c..e5caddd300f84 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_detail_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_detail_link.tsx @@ -6,10 +6,10 @@ */ import React from 'react'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { EuiLink } from '@elastic/eui'; import { useApmRouter } from '../../../../../hooks/use_apm_router'; -import { mobileServiceDetailRoute } from '../../../../routing/mobile_service_detail'; +import type { mobileServiceDetailRoute } from '../../../../routing/mobile_service_detail'; interface Props { children: React.ReactNode; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_overview_link.tsx index 4c066b2656e0b..f78eaefb39ac8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/mobile/error_overview_link.tsx @@ -7,9 +7,9 @@ import React from 'react'; import { EuiLink } from '@elastic/eui'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { useApmRouter } from '../../../../../hooks/use_apm_router'; -import { mobileServiceDetailRoute } from '../../../../routing/mobile_service_detail'; +import type { mobileServiceDetailRoute } from '../../../../routing/mobile_service_detail'; interface Props { children: React.ReactNode; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_inventory_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_inventory_link.tsx index c4a589dca3ad8..4d95f3c70a483 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_inventory_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_inventory_link.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { APMQueryParams } from '../url_helpers'; +import type { APMQueryParams } from '../url_helpers'; import { useAPMHref } from './apm_link'; const persistedFilters: Array = ['host', 'agentName']; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/index.tsx index b6d7d1789fac9..6239c0b4d6071 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/index.tsx @@ -9,14 +9,14 @@ import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiText } from '@elastic/eui'; import { AgentIcon } from '@kbn/custom-icons'; import { i18n } from '@kbn/i18n'; import styled from '@emotion/styled'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; import { isMobileAgentName } from '../../../../../../common/agent_name'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; -import { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../../../typings/es_schemas/ui/fields/agent'; import { useApmRouter } from '../../../../../hooks/use_apm_router'; import { truncate, unit } from '../../../../../utils/style'; -import { ApmRoutes } from '../../../../routing/apm_route_config'; +import type { ApmRoutes } from '../../../../routing/apm_route_config'; import { PopoverTooltip } from '../../../popover_tooltip'; import { TruncateWithTooltip } from '../../../truncate_with_tooltip'; import { MaxGroupsMessage, OTHER_SERVICE_NAME } from '../max_groups_message'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/service_link.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/service_link.stories.tsx index 55033ed6349ae..ea313171a5626 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/service_link.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_link/service_link.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { Story } from '@storybook/react'; -import React, { ComponentProps, ComponentType } from 'react'; +import type { Story } from '@storybook/react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { ServiceLink } from '.'; import { MockApmPluginStorybook } from '../../../../../context/apm_plugin/mock_apm_plugin_storybook'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_map_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_map_link.tsx index e2e4afd79c0d8..f9958e588ba73 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_map_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_map_link.tsx @@ -7,7 +7,8 @@ import { EuiLink } from '@elastic/eui'; import React from 'react'; -import { APMLinkExtendProps, useAPMHref } from './apm_link'; +import type { APMLinkExtendProps } from './apm_link'; +import { useAPMHref } from './apm_link'; export function useServiceMapHref(serviceName?: string) { const path = serviceName ? `/services/${serviceName}/service-map` : '/service-map'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx index 2032e15266dbf..7b99e981e9bb1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_metric_overview_link.tsx @@ -7,8 +7,9 @@ import { EuiLink } from '@elastic/eui'; import React from 'react'; -import { APMQueryParams } from '../url_helpers'; -import { APMLinkExtendProps, useAPMHref } from './apm_link'; +import type { APMQueryParams } from '../url_helpers'; +import type { APMLinkExtendProps } from './apm_link'; +import { useAPMHref } from './apm_link'; interface Props extends APMLinkExtendProps { serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_overview_link.tsx index e13a38143ef25..7ea28dfbebeac 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_node_overview_link.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { APMQueryParams } from '../url_helpers'; +import type { APMQueryParams } from '../url_helpers'; import { useAPMHref } from './apm_link'; const persistedFilters: Array = [ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_transactions_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_transactions_overview_link.tsx index 42b345f330d49..edf62a082bc56 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_transactions_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/service_transactions_overview_link.tsx @@ -7,8 +7,9 @@ import { EuiLink } from '@elastic/eui'; import React from 'react'; -import { APMQueryParams } from '../url_helpers'; -import { APMLinkExtendProps, useAPMHref } from './apm_link'; +import type { APMQueryParams } from '../url_helpers'; +import type { APMLinkExtendProps } from './apm_link'; +import { useAPMHref } from './apm_link'; import { removeUndefinedProps } from '../../../../context/url_params_context/helpers'; const persistedFilters: Array = [ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/trace_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/trace_overview_link.tsx index 9353de8162b08..2462c5905c5e4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/trace_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/trace_overview_link.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { APMQueryParams } from '../url_helpers'; +import type { APMQueryParams } from '../url_helpers'; import { useAPMHref } from './apm_link'; const persistedFilters: Array = [ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.test.tsx index bbd4f162fe361..5c405c711c8b3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.test.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; import { getRenderedHref } from '../../../../../utils/test_helpers'; import { TransactionDetailLink } from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.tsx index 4cdd3fd5a6398..78904a0d8c389 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_detail_link/index.tsx @@ -17,8 +17,9 @@ import { unit } from '../../../../../utils/style'; import { PopoverTooltip } from '../../../popover_tooltip'; import { getComparisonEnabled } from '../../../time_comparison/get_comparison_enabled'; import { TruncateWithTooltip } from '../../../truncate_with_tooltip'; -import { APMQueryParams } from '../../url_helpers'; -import { APMLinkExtendProps, getLegacyApmHref } from '../apm_link'; +import type { APMQueryParams } from '../../url_helpers'; +import type { APMLinkExtendProps } from '../apm_link'; +import { getLegacyApmHref } from '../apm_link'; import { MaxGroupsMessage } from '../max_groups_message'; export const txGroupsDroppedBucketName = '_other'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_overview_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_overview_link.tsx index 1098864dbc28f..93e0382794b76 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_overview_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/apm/transaction_overview_link.tsx @@ -10,7 +10,8 @@ import React from 'react'; import { useLocation } from 'react-router-dom'; import { removeUndefinedProps } from '../../../../context/url_params_context/helpers'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; -import { APMLinkExtendProps, getLegacyApmHref } from './apm_link'; +import type { APMLinkExtendProps } from './apm_link'; +import { getLegacyApmHref } from './apm_link'; interface Props extends APMLinkExtendProps { serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.stories.tsx index b240cafb20ed2..0a9798556ff22 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { Story } from '@storybook/react'; -import React, { ComponentProps, ComponentType } from 'react'; +import type { Story } from '@storybook/react'; +import type { ComponentProps, ComponentType } from 'react'; +import React from 'react'; import { MockApmPluginStorybook } from '../../../context/apm_plugin/mock_apm_plugin_storybook'; import { DependencyLink } from './dependency_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.tsx index d202c1cb770b7..4aade4a60a5d3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/dependency_link.tsx @@ -6,12 +6,12 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; import styled from '@emotion/styled'; import { useApmRouter } from '../../../hooks/use_apm_router'; import { truncate } from '../../../utils/style'; -import { ApmRoutes } from '../../routing/apm_route_config'; +import type { ApmRoutes } from '../../routing/apm_route_config'; import { SpanIcon } from '../span_icon'; const StyledLink = styled(EuiLink)` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_button.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_button.test.tsx index 3cbe8d7e31632..d02280769ba9f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_button.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_button.test.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { shallow, ShallowWrapper } from 'enzyme'; +import type { ShallowWrapper } from 'enzyme'; +import { shallow } from 'enzyme'; import React from 'react'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { DiscoverErrorLink } from './discover_error_link'; describe('DiscoverErrorLink without kuery', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.test.tsx index 3cbe8d7e31632..d02280769ba9f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.test.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { shallow, ShallowWrapper } from 'enzyme'; +import type { ShallowWrapper } from 'enzyme'; +import { shallow } from 'enzyme'; import React from 'react'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; import { DiscoverErrorLink } from './discover_error_link'; describe('DiscoverErrorLink without kuery', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx index a32c01f3b15e5..4194c30fa7ec1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_error_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { ERROR_GROUP_ID, SERVICE_NAME } from '../../../../../common/es_fields/apm'; import { DiscoverLink } from './discover_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_link.tsx index 31e214c679f7e..eb3a86e16f4ee 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_link.tsx @@ -6,8 +6,8 @@ */ import { EuiLink, EuiLoadingSpinner } from '@elastic/eui'; -import { Location } from 'history'; -import { IBasePath } from '@kbn/core/public'; +import type { Location } from 'history'; +import type { IBasePath } from '@kbn/core/public'; import React from 'react'; import { useLocation } from 'react-router-dom'; import rison from '@kbn/rison'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx index e1defd9d3f592..4566141871e5e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_links.integration.test.tsx @@ -5,11 +5,11 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; -import { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; -import { Span } from '../../../../../typings/es_schemas/ui/span'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { APMError } from '../../../../../typings/es_schemas/ui/apm_error'; +import type { Span } from '../../../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import * as useAdHocApmDataView from '../../../../hooks/use_adhoc_apm_data_view'; import { getRenderedHref } from '../../../../utils/test_helpers'; import { DiscoverErrorLink } from './discover_error_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx index 189353cea7403..22e08776db1b6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_span_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { SPAN_ID } from '../../../../../common/es_fields/apm'; import { DiscoverLink } from './discover_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_button.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_button.test.tsx index b8b021f558c0b..8fd17b34fec0b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_button.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_button.test.tsx @@ -7,7 +7,7 @@ import { shallow } from 'enzyme'; import React from 'react'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { DiscoverTransactionLink, getDiscoverQuery } from './discover_transaction_link'; import mockTransaction from './__fixtures__/mock_transaction.json'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.test.tsx index 61f2a1090cd37..7eef258f9c28e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { getDiscoverQuery } from './discover_transaction_link'; function getMockTransaction() { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx index e4e306c7430d4..862b955d8e129 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/discover_links/discover_transaction_link.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { PROCESSOR_EVENT, TRACE_ID, TRANSACTION_ID } from '../../../../../common/es_fields/apm'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { DiscoverLink } from './discover_link'; export function getDiscoverQuery(transaction: Transaction) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/elastic_docs_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/elastic_docs_link.tsx index df1f5694783d0..5293a8152801a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/elastic_docs_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/elastic_docs_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiLink } from '@elastic/eui'; import React from 'react'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.test.tsx index 17cd3871b9e2d..8449a30baa827 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; import { getRenderedHref } from '../../../utils/test_helpers'; import { InfraLink } from './infra_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.tsx index b98652b710020..aa3a03b96cd2e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/infra_link.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiLink, EuiLinkAnchorProps } from '@elastic/eui'; -import { IBasePath } from '@kbn/core/public'; +import type { EuiLinkAnchorProps } from '@elastic/eui'; +import { EuiLink } from '@elastic/eui'; +import type { IBasePath } from '@kbn/core/public'; import React from 'react'; import url from 'url'; -import { InfraAppId } from '@kbn/observability-shared-plugin/public/infra'; +import type { InfraAppId } from '@kbn/observability-shared-plugin/public/infra'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { fromQuery } from './url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/kibana.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/kibana.ts index 0facd9287e5e1..2076345f63289 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/kibana.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/kibana.ts @@ -6,7 +6,7 @@ */ import rison from '@kbn/rison'; -import { IBasePath } from '@kbn/core/public'; +import type { IBasePath } from '@kbn/core/public'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; export function getUpgradeAssistantHref(basePath: IBasePath) { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.test.tsx index 703bca0f5364e..0d400d861ab4c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; import { getRenderedHref } from '../../../../utils/test_helpers'; import { MLExplorerLink } from './mlexplorer_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.tsx index af5ec49635db0..fcb55c1ad2ffc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlexplorer_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { EuiLink } from '@elastic/eui'; import { useMlHref, ML_PAGES } from '@kbn/ml-plugin/public'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlmanage_jobs_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlmanage_jobs_link.test.tsx index 88ac543a745df..0fae49b449c54 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlmanage_jobs_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlmanage_jobs_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; import { getRenderedHref } from '../../../../utils/test_helpers'; import { MLManageJobsLink } from './mlmanage_jobs_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.test.tsx index 05f891409f98f..9af085372fa80 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import React from 'react'; import { getRenderedHref } from '../../../../utils/test_helpers'; import { MLSingleMetricLink } from './mlsingle_metric_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.tsx index 122e790efb4c6..7c9b53b309b41 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/machine_learning_links/mlsingle_metric_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { EuiLink } from '@elastic/eui'; import { useMlHref, ML_PAGES } from '@kbn/ml-plugin/public'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/rison_helpers.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/rison_helpers.ts index 7bc02b407c823..9dbd56b70c935 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/rison_helpers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/rison_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import { toQuery } from './url_helpers'; export interface TimepickerRisonData { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/url_helpers.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/url_helpers.ts index 93ecb3a8d4855..06e3b31792858 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/links/url_helpers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/links/url_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { History } from 'history'; +import type { History } from 'history'; import { parse, stringify } from 'query-string'; import { url } from '@kbn/kibana-utils-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/list_metric.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/list_metric.tsx index df70ced1daa53..1bb8df929a066 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/list_metric.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/list_metric.tsx @@ -6,7 +6,8 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; -import React, { ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; +import React from 'react'; import { SparkPlot } from './charts/spark_plot'; interface ListMetricProps extends ComponentProps { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/managed_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/managed_table/index.tsx index 908be6a16dcaa..ac7d89eea7b79 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/managed_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/managed_table/index.tsx @@ -6,9 +6,11 @@ */ import { i18n } from '@kbn/i18n'; -import { EuiBasicTable, EuiBasicTableColumn } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable } from '@elastic/eui'; import { isEmpty, merge, orderBy } from 'lodash'; -import React, { ReactNode, useCallback, useEffect, useMemo, useState } from 'react'; +import type { ReactNode } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useHistory } from 'react-router-dom'; import { useLegacyUrlParams } from '../../../context/url_params_context/use_url_params'; import { fromQuery, toQuery } from '../links/url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/error_metadata/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/error_metadata/index.tsx index dab585180fce9..0ae0aef46ef1f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/error_metadata/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/error_metadata/index.tsx @@ -7,7 +7,8 @@ import React, { useMemo } from 'react'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { APMError, AT_TIMESTAMP } from '@kbn/apm-types'; +import type { APMError } from '@kbn/apm-types'; +import { AT_TIMESTAMP } from '@kbn/apm-types'; import { getSectionsFromFields } from '../helper'; import { MetadataTable } from '..'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/index.tsx index 3056c173caa46..c8807bf55292f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/index.tsx @@ -26,7 +26,7 @@ import { fromQuery, toQuery } from '../links/url_helpers'; import { filterSectionsByTerm } from './helper'; import { Section } from './section'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; -import { SectionDescriptor } from './types'; +import type { SectionDescriptor } from './types'; interface Props { sections: SectionDescriptor[]; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/metadata_table.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/metadata_table.test.tsx index e43e80ff51119..d4db1d76346ad 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/metadata_table.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/metadata_table.test.tsx @@ -6,7 +6,8 @@ */ import { render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { MetadataTable } from '.'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx index f98956e93745b..9c87d548cdd77 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/span_metadata/index.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Span } from '../../../../../typings/es_schemas/ui/span'; +import type { Span } from '../../../../../typings/es_schemas/ui/span'; import { getSectionsFromFields } from '../helper'; import { MetadataTable } from '..'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx index ac9bf7af55790..e2dc1901bfac8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/metadata_table/transaction_metadata/index.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { getSectionsFromFields } from '../helper'; import { MetadataTable } from '..'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/not_available_popover/not_available_apm_metrics.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/not_available_popover/not_available_apm_metrics.tsx index 66c466502bdd1..3cd11802d2dcf 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/not_available_popover/not_available_apm_metrics.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/not_available_popover/not_available_apm_metrics.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { PopoverBadge } from '../popover_badge'; import { useKibana } from '../../../context/kibana_context/use_kibana'; -import { ApmPluginStartDeps, ApmServices } from '../../../plugin'; +import type { ApmPluginStartDeps, ApmServices } from '../../../plugin'; import { AddApmData } from '../add_data_buttons/buttons'; export function NotAvailableApmMetrics() { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/overview_table_container/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/overview_table_container/index.tsx index 8c2f62f7998b3..93f2b15ff4deb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/overview_table_container/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/overview_table_container/index.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import styled from '@emotion/styled'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/flamegraph/flamegraph_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/flamegraph/flamegraph_link.tsx index 3ead8b10b0f66..b6bf28a95e879 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/flamegraph/flamegraph_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/flamegraph/flamegraph_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexGroupProps, EuiFlexItem, EuiLink } from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { useProfilingPlugin } from '../../../../hooks/use_profiling_plugin'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/top_functions/top_functions_link.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/top_functions/top_functions_link.tsx index 9c0edafb6ce55..96fb900722576 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/top_functions/top_functions_link.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/profiling/top_functions/top_functions_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexGroupProps, EuiFlexItem, EuiLink } from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { useProfilingPlugin } from '../../../../hooks/use_profiling_plugin'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.test.tsx index 75b18be29b422..04f1b4f39352f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.test.tsx @@ -6,7 +6,8 @@ */ import { getByTestId, fireEvent, getByText, act } from '@testing-library/react'; -import { createMemoryHistory, MemoryHistory } from 'history'; +import type { MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; import React from 'react'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; @@ -18,7 +19,7 @@ import * as useApmDataViewHook from '../../../hooks/use_adhoc_apm_data_view'; import * as useServiceTransactionTypesHook from '../../../context/apm_service/use_service_transaction_types_fetcher'; import { renderWithTheme } from '../../../utils/test_helpers'; import { fromQuery } from '../links/url_helpers'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { SearchBar } from './search_bar'; import { ApmTimeRangeMetadataContextProvider } from '../../../context/time_range_metadata/time_range_metadata_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.tsx index 57033eb5f1d19..dd82f303feaca 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/search_bar/search_bar.tsx @@ -4,9 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiFlexGroup, EuiFlexGroupProps, EuiFlexItem, EuiSpacer } from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import React from 'react'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; import { TimeComparison } from '../time_comparison'; import { TransactionTypeSelect } from '../transaction_type_select'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/select_with_placeholder/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/select_with_placeholder/index.tsx index 23a1ad7eddaa3..ca46895b8f24c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/select_with_placeholder/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/select_with_placeholder/index.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { EuiSelect, EuiSelectProps } from '@elastic/eui'; +import type { EuiSelectProps } from '@elastic/eui'; +import { EuiSelect } from '@elastic/eui'; import { isEmpty } from 'lodash'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/cloud_details.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/cloud_details.tsx index ce79f9132dce9..9a19e89385ece 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/cloud_details.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/cloud_details.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { EuiBadge, EuiDescriptionList, EuiDescriptionListProps } from '@elastic/eui'; +import type { EuiDescriptionListProps } from '@elastic/eui'; +import { EuiBadge, EuiDescriptionList } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; type ServiceDetailsReturnType = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/details'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/container_details.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/container_details.tsx index 2d558c3cfee8e..652fa6a2eae8c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/container_details.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/container_details.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiDescriptionList, EuiDescriptionListProps, EuiBadge } from '@elastic/eui'; +import type { EuiDescriptionListProps } from '@elastic/eui'; +import { EuiDescriptionList, EuiBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { asInteger } from '../../../../common/utils/formatters'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; type ServiceDetailsReturnType = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/details'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/icon_popover.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/icon_popover.tsx index 5c6a5fc54d335..db4a32e1589d8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/icon_popover.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/icon_popover.tsx @@ -7,7 +7,7 @@ import { EuiButtonIcon, EuiSkeletonText, EuiPopover, EuiPopoverTitle } from '@elastic/eui'; import React from 'react'; -import { PopoverItem } from '.'; +import type { PopoverItem } from '.'; import { FETCH_STATUS } from '../../../hooks/use_fetcher'; interface IconPopoverProps { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.test.tsx index 577c5267c1589..77546f9b31369 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.test.tsx @@ -6,13 +6,14 @@ */ import { fireEvent, render } from '@testing-library/react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { merge } from 'lodash'; // import { renderWithTheme } from '../../../../utils/test_helpers'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MockUrlParamsContextProvider } from '../../../context/url_params_context/mock_url_params_context_provider'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.tsx index a7c4b2311508a..a72ead1b2963c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/index.tsx @@ -7,14 +7,11 @@ import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { - CloudProvider, - getAgentIcon, - getCloudProviderIcon, - getServerlessIcon, -} from '@kbn/custom-icons'; -import React, { ReactChild, useState } from 'react'; -import { ContainerType } from '../../../../common/service_metadata'; +import type { CloudProvider } from '@kbn/custom-icons'; +import { getAgentIcon, getCloudProviderIcon, getServerlessIcon } from '@kbn/custom-icons'; +import type { ReactChild } from 'react'; +import React, { useState } from 'react'; +import type { ContainerType } from '../../../../common/service_metadata'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { CloudDetails } from './cloud_details'; import { ServerlessDetails } from './serverless_details'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/otel_details.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/otel_details.tsx index 04aa2b6f56838..fb0a44f31f043 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/otel_details.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/otel_details.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { EuiDescriptionList, EuiDescriptionListProps } from '@elastic/eui'; +import type { EuiDescriptionListProps } from '@elastic/eui'; +import { EuiDescriptionList } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; type ServiceDetailsReturnType = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/details'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/serverless_details.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/serverless_details.tsx index 7584097966932..672b15e3105a4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/serverless_details.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/serverless_details.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { EuiBadge, EuiDescriptionList, EuiDescriptionListProps } from '@elastic/eui'; +import type { EuiDescriptionListProps } from '@elastic/eui'; +import { EuiBadge, EuiDescriptionList } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; type ServiceDetailsReturnType = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/details'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_details.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_details.tsx index e43d444fcf493..991f1b0d327e1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_details.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_details.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { EuiDescriptionList, EuiDescriptionListProps } from '@elastic/eui'; +import type { EuiDescriptionListProps } from '@elastic/eui'; +import { EuiDescriptionList } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; type ServiceDetailsReturnType = APIReturnType<'GET /internal/apm/services/{serviceName}/metadata/details'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_icons.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_icons.stories.tsx index 468cad227e71d..a3a1f47425788 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_icons.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/service_icons/service_icons.stories.tsx @@ -5,11 +5,12 @@ * 2.0. */ import { EuiFlexGroup, EuiFlexItem, EuiTitle } from '@elastic/eui'; -import { Meta, Story } from '@storybook/react'; +import type { Meta, Story } from '@storybook/react'; import React from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { APIReturnType, createCallApmApi } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import { createCallApmApi } from '../../../services/rest/create_call_apm_api'; import { ServiceIcons } from '.'; type ServiceDetailsReturnType = diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/index.tsx index e46af11ffbe50..b0bef413b5d84 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/index.tsx @@ -4,20 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - EuiFlexGroup, - EuiFlexItem, - EuiLoadingSpinner, - EuiSelect, - EuiSelectOption, -} from '@elastic/eui'; +import type { EuiSelectOption } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSelect } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo, useState } from 'react'; -import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { isPending, useFetcher } from '../../../hooks/use_fetcher'; import { useTimeRange } from '../../../hooks/use_time_range'; -import { SpanLinksCount } from '../../app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; +import type { SpanLinksCount } from '../../app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; import { KueryBar } from '../kuery_bar'; import { SpanLinksCallout } from './span_links_callout'; import { SpanLinksTable } from './span_links_table'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_tab_content.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_tab_content.tsx index 8d85763f7e6c0..e368211cfef6b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_tab_content.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_tab_content.tsx @@ -7,9 +7,9 @@ import { EuiNotificationBadge, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SpanLinks } from '.'; -import { SpanLinksCount } from '../../app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; +import type { SpanLinksCount } from '../../app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers'; import { TechnicalPreviewBadge } from '../technical_preview_badge'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_table.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_table.tsx index 357ad7e9deb11..3f9008d624154 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/span_links/span_links_table.tsx @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { EuiBasicTableColumn } from '@elastic/eui'; import { - EuiBasicTableColumn, EuiButtonEmpty, EuiButtonIcon, EuiCopy, @@ -19,7 +19,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; -import { SpanLinkDetails } from '../../../../common/span_links'; +import type { SpanLinkDetails } from '../../../../common/span_links'; import { asDuration } from '../../../../common/utils/formatters'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useApmRouter } from '../../../hooks/use_apm_router'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/cause_stacktrace.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/cause_stacktrace.tsx index 9db86f6147eb9..fdc0d1002ec66 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/cause_stacktrace.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/cause_stacktrace.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; import { Stacktrace } from '.'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; const Accordion = styled(EuiAccordion)` border-top: ${({ theme }) => theme.euiTheme.border.thin}; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/context.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/context.tsx index a79b5529d2cde..624df9c7b8e7d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/context.tsx @@ -14,7 +14,7 @@ import python from 'react-syntax-highlighter/dist/cjs/languages/hljs/python'; import ruby from 'react-syntax-highlighter/dist/cjs/languages/hljs/ruby'; import xcode from 'react-syntax-highlighter/dist/cjs/styles/hljs/xcode'; import styled from '@emotion/styled'; -import { StackframeWithLineContext } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { StackframeWithLineContext } from '../../../../typings/es_schemas/raw/fields/stackframe'; SyntaxHighlighter.registerLanguage('javascript', javascript); SyntaxHighlighter.registerLanguage('python', python); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.test.tsx index 73803f70d6954..7e3cf4b7f8902 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { renderWithTheme } from '../../../utils/test_helpers'; import { FrameHeading } from './frame_heading'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.tsx index 734ac85cf40e6..20c470b45bc7b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading.tsx @@ -5,14 +5,15 @@ * 2.0. */ -import React, { ComponentType } from 'react'; +import type { ComponentType } from 'react'; +import React from 'react'; import styled from '@emotion/styled'; import { useEuiFontSize } from '@elastic/eui'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { FrameHeadingRendererProps } from './frame_heading_renderers'; import { CSharpFrameHeadingRenderer, DefaultFrameHeadingRenderer, - FrameHeadingRendererProps, JavaFrameHeadingRenderer, JavaScriptFrameHeadingRenderer, RubyFrameHeadingRenderer, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx index 0664fbf6b1d94..b8c3a47e93a88 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/c_sharp_frame_heading_renderer.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FrameHeadingRendererProps } from '.'; +import type { FrameHeadingRendererProps } from '.'; import { DefaultFrameHeadingRenderer } from './default_frame_heading_renderer'; export function CSharpFrameHeadingRenderer({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/default_frame_heading_renderer.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/default_frame_heading_renderer.tsx index f4a6116fa080a..fa866cb5c396e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/default_frame_heading_renderer.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/default_frame_heading_renderer.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FrameHeadingRendererProps } from '.'; +import type { FrameHeadingRendererProps } from '.'; export function DefaultFrameHeadingRenderer({ stackframe, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/index.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/index.ts index 3dd235706a4ec..15965aa805878 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/index.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/index.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ComponentType } from 'react'; -import { Stackframe } from '../../../../../typings/es_schemas/raw/fields/stackframe'; +import type { ComponentType } from 'react'; +import type { Stackframe } from '../../../../../typings/es_schemas/raw/fields/stackframe'; export interface FrameHeadingRendererProps { fileDetailComponent: ComponentType>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_frame_heading_renderer.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_frame_heading_renderer.tsx index 4b4864e7f1f76..318d7c32b84c0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_frame_heading_renderer.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_frame_heading_renderer.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FrameHeadingRendererProps } from '.'; +import type { FrameHeadingRendererProps } from '.'; export function JavaFrameHeadingRenderer({ stackframe, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_script_frame_heading_renderer.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_script_frame_heading_renderer.tsx index a50f782f19ec2..d17197607bea1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_script_frame_heading_renderer.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/java_script_frame_heading_renderer.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FrameHeadingRendererProps } from '.'; +import type { FrameHeadingRendererProps } from '.'; export function JavaScriptFrameHeadingRenderer({ stackframe, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/php_frame_heading_renderer.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/php_frame_heading_renderer.tsx index 5d80ea85756a3..7bb19fcb0cc2b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/php_frame_heading_renderer.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/php_frame_heading_renderer.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FrameHeadingRendererProps } from '.'; +import type { FrameHeadingRendererProps } from '.'; export function PhpFrameHeadingRenderer({ stackframe, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/ruby_frame_heading_renderer.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/ruby_frame_heading_renderer.tsx index 0446c790225e5..38d1c9cd248da 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/ruby_frame_heading_renderer.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/frame_heading_renderers/ruby_frame_heading_renderer.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { FrameHeadingRendererProps } from '.'; +import type { FrameHeadingRendererProps } from '.'; export function RubyFrameHeadingRenderer({ stackframe, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/index.tsx index 5f23a99395057..ca220626dc8e2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/index.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { isEmpty, last } from 'lodash'; import React, { Fragment } from 'react'; import { EuiCodeBlock } from '@elastic/eui'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { EmptyMessage } from '../empty_message'; import { LibraryStacktrace } from './library_stacktrace'; import { Stackframe as StackframeComponent } from './stackframe'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/library_stacktrace.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/library_stacktrace.tsx index b5fe38b6eb663..dd4df07467e29 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/library_stacktrace.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/library_stacktrace.tsx @@ -9,7 +9,7 @@ import { EuiAccordion } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { Stackframe as StackframeComponent } from './stackframe'; const LibraryStacktraceAccordion = styled(EuiAccordion)` diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.test.tsx index dd7b188b4b552..e9da0bda8aaf2 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.test.tsx @@ -6,8 +6,9 @@ */ import React from 'react'; -import { ReactWrapper, shallow } from 'enzyme'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { ReactWrapper } from 'enzyme'; +import { shallow } from 'enzyme'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { mountWithTheme } from '../../../utils/test_helpers'; import { Stackframe as StackframeComponent } from './stackframe'; import stacktracesMock from './__fixtures__/stacktraces.json'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.tsx index 8eb6138557d25..7b4a4d1b1529e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stackframe.tsx @@ -8,7 +8,7 @@ import { EuiAccordion, useEuiFontSize } from '@elastic/eui'; import React from 'react'; import styled from '@emotion/styled'; -import { +import type { Stackframe as StackframeType, StackframeWithLineContext, } from '../../../../typings/es_schemas/raw/fields/stackframe'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stacktrace.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stacktrace.test.ts index 2dc6ea3baf5dc..e6001bb76063c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stacktrace.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/stacktrace.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { getGroupedStackframes } from '.'; import stacktracesMock from './__fixtures__/stacktraces.json'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/variables.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/variables.tsx index e59d6e9bc5c12..2cd3fc1408a85 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/variables.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/stacktrace/variables.tsx @@ -9,7 +9,7 @@ import { EuiAccordion } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import styled from '@emotion/styled'; -import { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; +import type { Stackframe } from '../../../../typings/es_schemas/raw/fields/stackframe'; import { KeyValueTable } from '../key_value_table'; import { flattenObject } from '../../../../common/utils/flatten_object'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/index.tsx index d45f948362307..6a319f6d94201 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/index.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox } from '@elastic/eui'; import { throttle } from 'lodash'; import React, { useCallback, useState } from 'react'; import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/suggestions_select.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/suggestions_select.stories.tsx index d61ff83de083f..d67e4579547e8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/suggestions_select.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/suggestions_select/suggestions_select.stories.tsx @@ -5,10 +5,10 @@ * 2.0. */ -import { EuiComboBoxOptionOption } from '@elastic/eui'; -import { Meta, Story } from '@storybook/react'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import type { Meta, Story } from '@storybook/react'; import React from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { createCallApmApi } from '../../../services/rest/create_call_apm_api'; import { SuggestionsSelect } from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/__fixtures__/transactions.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/__fixtures__/transactions.ts index be36da8931a5f..d85712245575a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/__fixtures__/transactions.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/__fixtures__/transactions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; export const httpOk: Transaction = { '@timestamp': '0', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/index.tsx index 619ed1bb8f791..1bd5ff208b5b1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/index.tsx @@ -7,7 +7,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React, { Fragment } from 'react'; -import { Maybe } from '../../../../typings/common'; +import type { Maybe } from '../../../../typings/common'; import { useBreakpoints } from '../../../hooks/use_breakpoints'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/transaction_summary.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/transaction_summary.tsx index db5ab9b4c7af5..795d437fec745 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/transaction_summary.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/transaction_summary.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { Summary } from '.'; import { TimestampTooltip } from '../timestamp_tooltip'; import { DurationSummaryItem } from './duration_summary_item'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/user_agent_summary_item.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/user_agent_summary_item.tsx index 9a2f3e041bf1c..3f037e288cc19 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/user_agent_summary_item.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/summary/user_agent_summary_item.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { EuiToolTip, useEuiFontSize } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import styled from '@emotion/styled'; -import { UserAgent } from '../../../../typings/es_schemas/raw/fields/user_agent'; +import type { UserAgent } from '../../../../typings/es_schemas/raw/fields/user_agent'; type UserAgentSummaryItemProps = UserAgent; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/technical_preview_badge.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/technical_preview_badge.tsx index 4263412b26057..11f5d75b9bcee 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/technical_preview_badge.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/technical_preview_badge.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiBetaBadge, IconType } from '@elastic/eui'; +import type { IconType } from '@elastic/eui'; +import { EuiBetaBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_chart_theme.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_chart_theme.ts index c4684d6398c94..9cc11a46453e5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_chart_theme.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_chart_theme.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PartialTheme } from '@elastic/charts'; +import type { PartialTheme } from '@elastic/charts'; export function getComparisonChartTheme(): PartialTheme { return { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.test.ts index 12811360cabc8..f2c4826286cc7 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { getComparisonEnabled } from './get_comparison_enabled'; describe('getComparisonEnabled', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.ts index edf7f11194bfb..d413e4d347a10 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_enabled.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { enableComparisonByDefault } from '@kbn/observability-plugin/public'; export function getComparisonEnabled({ diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_options.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_options.ts index ffb14f95848e6..212707be31dd3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_options.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/get_comparison_options.ts @@ -7,8 +7,8 @@ import moment from 'moment'; import { i18n } from '@kbn/i18n'; -import { Environment } from '../../../../common/environment_rt'; -import { AnomalyDetectionJobsContextValue } from '../../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; +import type { Environment } from '../../../../common/environment_rt'; +import type { AnomalyDetectionJobsContextValue } from '../../../context/anomaly_detection_jobs/anomaly_detection_jobs_context'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; export enum TimeRangeComparisonEnum { diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/index.test.tsx index 9fffd11600c81..2bfdd2530aaf9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/time_comparison/index.test.tsx @@ -6,7 +6,8 @@ */ import { render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { expectTextsInDocument, expectTextsNotInDocument } from '../../../utils/test_helpers'; import { TimeComparison } from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/timestamp_tooltip/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/timestamp_tooltip/index.tsx index cf5693c29c384..bae019bc574dd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/timestamp_tooltip/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/timestamp_tooltip/index.tsx @@ -8,7 +8,8 @@ import React from 'react'; import { EuiToolTip } from '@elastic/eui'; import moment from 'moment-timezone'; -import { asAbsoluteDateTime, TimeUnit } from '../../../../common/utils/formatters'; +import type { TimeUnit } from '../../../../common/utils/formatters'; +import { asAbsoluteDateTime } from '../../../../common/utils/formatters'; interface Props { /** diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/__fixtures__/mock_data.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/__fixtures__/mock_data.ts index cda39943214a1..1cd0895770c84 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/__fixtures__/mock_data.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/__fixtures__/mock_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; const bareTransaction = { '@metadata': 'whatever', diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_flyout.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_flyout.tsx index db1c7db2a3303..2d0488cb3e6c9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_flyout.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_flyout.tsx @@ -7,8 +7,8 @@ import { useMemo } from 'react'; import React from 'react'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; -import { Filter } from '../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { Filter } from '../../../../common/custom_link/custom_link_types'; import { useFetcher } from '../../../hooks/use_fetcher'; import { convertFiltersToQuery } from '../../app/settings/custom_link/create_edit_custom_link_flyout/helper'; import { CreateEditCustomLinkFlyout } from '../../app/settings/custom_link/create_edit_custom_link_flyout'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.test.tsx index 91cbee58cd259..430b609032f15 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.test.tsx @@ -7,8 +7,8 @@ import { render } from '@testing-library/react'; import React from 'react'; -import { CustomLink } from '../../../../../common/custom_link/custom_link_types'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { CustomLink } from '../../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { expectTextsInDocument, expectTextsNotInDocument } from '../../../../utils/test_helpers'; import { CustomLinkList } from './custom_link_list'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.tsx index a8d9da7ccd35b..b242a0656bb93 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_list.tsx @@ -7,8 +7,8 @@ import React from 'react'; import { SectionLink, SectionLinks } from '@kbn/observability-shared-plugin/public'; -import { CustomLink } from '../../../../../common/custom_link/custom_link_types'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { CustomLink } from '../../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { unit } from '../../../../utils/style'; import { getEncodedCustomLinkUrl } from '../../../../../common/custom_link'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_toolbar.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_toolbar.test.tsx index 8ac1be269487a..29e3a304d760f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_toolbar.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/custom_link_toolbar.test.tsx @@ -6,9 +6,10 @@ */ import { act, fireEvent, render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; -import { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.test.tsx index 07bbc170d022e..258ec003055f8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.test.tsx @@ -6,10 +6,11 @@ */ import { act, fireEvent, render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { CustomLinkMenuSection } from '.'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { MockApmPluginContextWrapper } from '../../../../context/apm_plugin/mock_apm_plugin_context'; import * as useFetcher from '../../../../hooks/use_fetcher'; import { expectTextsInDocument, expectTextsNotInDocument } from '../../../../utils/test_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.tsx index 74b398e2eadc3..0ef4c65dab200 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/custom_link_menu_section/index.tsx @@ -23,8 +23,8 @@ import { SectionTitle, } from '@kbn/observability-shared-plugin/public'; import { NO_PERMISSION_LABEL } from '../../../../../common/custom_link'; -import { CustomLink, Filter } from '../../../../../common/custom_link/custom_link_types'; -import { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; +import type { CustomLink, Filter } from '../../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../../typings/es_schemas/ui/transaction'; import { useApmPluginContext } from '../../../../context/apm_plugin/use_apm_plugin_context'; import { FETCH_STATUS, useFetcher } from '../../../../hooks/use_fetcher'; import { convertFiltersToQuery } from '../../../app/settings/custom_link/create_edit_custom_link_flyout/helper'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts index 0ec439f177222..3f93870bc696d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.test.ts @@ -7,13 +7,14 @@ import { createMemoryHistory } from 'history'; import rison from '@kbn/rison'; -import { IBasePath } from '@kbn/core/public'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { IBasePath } from '@kbn/core/public'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { getSections } from './sections'; -import { apmRouter as apmRouterBase, ApmRouter } from '../../routing/apm_route_config'; +import type { ApmRouter } from '../../routing/apm_route_config'; +import { apmRouter as apmRouterBase } from '../../routing/apm_route_config'; import { logsLocatorsMock } from '../../../context/apm_plugin/mock_apm_plugin_context'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; -import { +import type { AssetDetailsLocatorParams, AssetDetailsLocator, } from '@kbn/observability-shared-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.ts index f30deed376e86..8721c1293ac2a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections.ts @@ -6,23 +6,24 @@ */ import { i18n } from '@kbn/i18n'; -import { Location } from 'history'; -import { IBasePath } from '@kbn/core/public'; +import type { Location } from 'history'; +import type { IBasePath } from '@kbn/core/public'; import { isEmpty, pickBy } from 'lodash'; import moment from 'moment'; import type { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; import type { ProfilingLocators } from '@kbn/observability-shared-plugin/public'; import type { AssetDetailsLocator } from '@kbn/observability-shared-plugin/common'; -import { LocatorPublic } from '@kbn/share-plugin/common'; -import { SerializableRecord } from '@kbn/utility-types'; -import { Environment } from '../../../../common/environment_rt'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; +import type { SerializableRecord } from '@kbn/utility-types'; +import type { Environment } from '../../../../common/environment_rt'; import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { getDiscoverHref } from '../links/discover_links/discover_link'; import { getDiscoverQuery } from '../links/discover_links/discover_transaction_link'; -import { SectionRecord, getNonEmptySections, Action } from './sections_helper'; +import type { SectionRecord, Action } from './sections_helper'; +import { getNonEmptySections } from './sections_helper'; import { HOST_NAME, TRACE_ID } from '../../../../common/es_fields/apm'; -import { ApmRouter } from '../../routing/apm_route_config'; +import type { ApmRouter } from '../../routing/apm_route_config'; function getInfraMetricsQuery(transaction: Transaction) { const timestamp = new Date(transaction['@timestamp']).getTime(); diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections_helper.ts b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections_helper.ts index a59628981e1a4..b6f2afb81694f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections_helper.ts +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/sections_helper.ts @@ -6,7 +6,7 @@ */ import { isEmpty } from 'lodash'; -import { MouseEvent } from 'react'; +import type { MouseEvent } from 'react'; export interface Action { key: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx index 90cbbec97ac16..2c9722e89f91f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx @@ -16,8 +16,8 @@ import { NODE_LOGS_LOCATOR_ID, TRACE_LOGS_LOCATOR_ID, } from '@kbn/logs-shared-plugin/common'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { mockApmPluginContextValue, MockApmPluginContextWrapper, @@ -33,11 +33,11 @@ import * as useAdHocApmDataView from '../../../hooks/use_adhoc_apm_data_view'; import { useProfilingIntegrationSetting } from '../../../hooks/use_profiling_integration_setting'; import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/common'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; -import { +import type { AssetDetailsLocator, AssetDetailsLocatorParams, - ASSET_DETAILS_LOCATOR_ID, } from '@kbn/observability-shared-plugin/common'; +import { ASSET_DETAILS_LOCATOR_ID } from '@kbn/observability-shared-plugin/common'; const mockAssetDetailsLocator = { getRedirectUrl: jest diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx index 4f45441ea1937..60532c4ed2310 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.tsx @@ -30,7 +30,7 @@ import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/common'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { ApmFeatureFlagName } from '../../../../common/apm_feature_flags'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useLicenseContext } from '../../../context/license/use_license_context'; import { useApmFeatureFlag } from '../../../hooks/use_apm_feature_flag'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_type_select.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_type_select.tsx index f6e2a1a52b535..b12d3e18d059a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_type_select.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transaction_type_select.tsx @@ -6,7 +6,8 @@ */ import { EuiSelect } from '@elastic/eui'; -import React, { FormEvent, useCallback } from 'react'; +import type { FormEvent } from 'react'; +import React, { useCallback } from 'react'; import { useHistory } from 'react-router-dom'; import styled from '@emotion/styled'; import { useApmServiceContext } from '../../context/apm_service/use_apm_service_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/get_columns.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/get_columns.tsx index 3c34af7e999c5..452f8910a6a68 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/get_columns.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/get_columns.tsx @@ -15,27 +15,27 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { TypeOf } from '@kbn/typed-react-router-config'; -import { ValuesType } from 'utility-types'; +import type { TypeOf } from '@kbn/typed-react-router-config'; +import type { ValuesType } from 'utility-types'; import { ALERT_STATUS_ACTIVE } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; import { asMillisecondDuration, asPercent, asTransactionRate, } from '../../../../common/utils/formatters'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { ChartType, getTimeSeriesColor } from '../charts/helper/get_timeseries_color'; import { ImpactBar } from '../impact_bar'; import { TransactionDetailLink } from '../links/apm/transaction_detail_link'; import { ListMetric } from '../list_metric'; import { isTimeComparison } from '../time_comparison/get_comparison_options'; import { getLatencyColumnLabel } from './get_latency_column_label'; -import { ApmRoutes } from '../../routing/apm_route_config'; +import type { ApmRoutes } from '../../routing/apm_route_config'; import { unit } from '../../../utils/style'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../../common/es_fields/apm'; import { fieldValuePairToKql } from '../../../../common/utils/field_value_pair_to_kql'; -import { ITableColumn } from '../managed_table'; +import type { ITableColumn } from '../managed_table'; type TransactionGroupMainStatistics = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx index 1749490a37915..08b4f51446873 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/transactions_table/index.tsx @@ -13,10 +13,8 @@ import { compact } from 'lodash'; import React, { useEffect, useMemo, useState } from 'react'; import { apmEnableTableSearchBar } from '@kbn/observability-plugin/common'; import { ApmDocumentType } from '../../../../common/document_type'; -import { - getLatencyAggregationType, - LatencyAggregationType, -} from '../../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import { getLatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { useApmServiceContext } from '../../../context/apm_service/use_apm_service_context'; import { useAnyOfApmParams } from '../../../hooks/use_apm_params'; import { useApmRouter } from '../../../hooks/use_apm_router'; @@ -24,9 +22,10 @@ import { useBreakpoints } from '../../../hooks/use_breakpoints'; import { useStateDebounced } from '../../../hooks/use_debounce'; import { FETCH_STATUS, isPending, useFetcher } from '../../../hooks/use_fetcher'; import { usePreferredDataSourceAndBucketSize } from '../../../hooks/use_preferred_data_source_and_bucket_size'; -import { APIReturnType } from '../../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../../services/rest/create_call_apm_api'; import { TransactionOverviewLink } from '../links/apm/transaction_overview_link'; -import { ManagedTable, TableSearchBar } from '../managed_table'; +import type { TableSearchBar } from '../managed_table'; +import { ManagedTable } from '../managed_table'; import { OverviewTableContainer } from '../overview_table_container'; import { isTimeComparison } from '../time_comparison/get_comparison_options'; import { getColumns } from './get_columns'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/index.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/index.tsx index 4e86f331e520f..ac2b67b8b9c94 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/index.tsx @@ -6,24 +6,23 @@ */ import React, { useCallback, useEffect } from 'react'; import { i18n } from '@kbn/i18n'; +import type { Filter, Query, TimeRange } from '@kbn/es-query'; import { - Filter, fromKueryExpression, getKqlFieldNamesFromExpression, - Query, - TimeRange, toElasticsearchQuery, } from '@kbn/es-query'; import { useHistory, useLocation } from 'react-router-dom'; import deepEqual from 'fast-deep-equal'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import qs from 'query-string'; -import { DataView, UI_SETTINGS } from '@kbn/data-plugin/common'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { OnRefreshChangeProps } from '@elastic/eui/src/components/date_picker/types'; -import { UIProcessorEvent } from '../../../../common/processor_event'; -import { TimePickerTimeDefaults } from '../date_picker/typings'; -import { ApmPluginStartDeps, ApmServices } from '../../../plugin'; +import type { DataView } from '@kbn/data-plugin/common'; +import { UI_SETTINGS } from '@kbn/data-plugin/common'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { OnRefreshChangeProps } from '@elastic/eui/src/components/date_picker/types'; +import type { UIProcessorEvent } from '../../../../common/processor_event'; +import type { TimePickerTimeDefaults } from '../date_picker/typings'; +import type { ApmPluginStartDeps, ApmServices } from '../../../plugin'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; import { useAdHocApmDataView } from '../../../hooks/use_adhoc_apm_data_view'; import { useProcessorEvent } from '../../../hooks/use_processor_event'; diff --git a/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/unified_search_bar.test.tsx b/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/unified_search_bar.test.tsx index 8a7e71907a62a..7600cc6c0e17f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/unified_search_bar.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/components/shared/unified_search_bar/unified_search_bar.test.tsx @@ -6,13 +6,14 @@ */ import { mount } from 'enzyme'; -import { createMemoryHistory, MemoryHistory } from 'history'; +import type { MemoryHistory } from 'history'; +import { createMemoryHistory } from 'history'; import React from 'react'; import { useLocation } from 'react-router-dom'; import { UnifiedSearchBar } from '.'; -import { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../../../context/apm_plugin/apm_plugin_context'; import { MockApmPluginContextWrapper } from '../../../context/apm_plugin/mock_apm_plugin_context'; -import { UrlParams } from '../../../context/url_params_context/types'; +import type { UrlParams } from '../../../context/url_params_context/types'; import * as useApmDataViewHook from '../../../hooks/use_adhoc_apm_data_view'; import * as useApmParamsHook from '../../../hooks/use_apm_params'; import * as useFetcherHook from '../../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/annotations/annotations_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/annotations/annotations_context.tsx index e5eb4399b1319..07f073768ca49 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/annotations/annotations_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/annotations/annotations_context.tsx @@ -6,7 +6,7 @@ */ import React, { createContext } from 'react'; -import { Annotation } from '../../../common/annotations'; +import type { Annotation } from '../../../common/annotations'; import { useFetcher } from '../../hooks/use_fetcher'; export const AnnotationsContext = createContext({ annotations: [] } as { diff --git a/x-pack/solutions/observability/plugins/apm/public/context/anomaly_detection_jobs/anomaly_detection_jobs_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/anomaly_detection_jobs/anomaly_detection_jobs_context.tsx index 7deeb1f41ea97..5b8d416eb1d98 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/anomaly_detection_jobs/anomaly_detection_jobs_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/anomaly_detection_jobs/anomaly_detection_jobs_context.tsx @@ -5,15 +5,15 @@ * 2.0. */ -import React, { createContext, ReactChild } from 'react'; -import { - AnomalyDetectionSetupState, - getAnomalyDetectionSetupState, -} from '../../../common/anomaly_detection/get_anomaly_detection_setup_state'; +import type { ReactChild } from 'react'; +import React, { createContext } from 'react'; +import type { AnomalyDetectionSetupState } from '../../../common/anomaly_detection/get_anomaly_detection_setup_state'; +import { getAnomalyDetectionSetupState } from '../../../common/anomaly_detection/get_anomaly_detection_setup_state'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; import { useApmParams } from '../../hooks/use_apm_params'; -import { FETCH_STATUS, useFetcher } from '../../hooks/use_fetcher'; -import { APIReturnType } from '../../services/rest/create_call_apm_api'; +import type { FETCH_STATUS } from '../../hooks/use_fetcher'; +import { useFetcher } from '../../hooks/use_fetcher'; +import type { APIReturnType } from '../../services/rest/create_call_apm_api'; import { useApmPluginContext } from '../apm_plugin/use_apm_plugin_context'; import { useLicenseContext } from '../license/use_license_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/apm_plugin_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/apm_plugin_context.tsx index 03711b7265e3f..221bce3ab331d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/apm_plugin_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/apm_plugin_context.tsx @@ -18,7 +18,7 @@ import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/ import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; -import { SharePluginSetup } from '@kbn/share-plugin/public'; +import type { SharePluginSetup } from '@kbn/share-plugin/public'; import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { ApmPluginSetupDeps } from '../../plugin'; import type { ConfigSchema } from '../..'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_context.tsx index 961ac7c733e50..759cfa8a8c819 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_context.tsx @@ -8,7 +8,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { UI_SETTINGS } from '@kbn/data-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { +import type { LogsLocatorParams, NodeLogsLocatorParams, TraceLogsLocatorParams, @@ -22,15 +22,18 @@ import { import { UrlService } from '@kbn/share-plugin/common/url_service'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; import { RouterProvider } from '@kbn/typed-react-router-config'; -import { History, createMemoryHistory } from 'history'; +import type { History } from 'history'; +import { createMemoryHistory } from 'history'; import { merge, noop } from 'lodash'; -import React, { ReactNode, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { useMemo } from 'react'; import { useHistory } from 'react-router-dom'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; -import { ConfigSchema } from '../..'; +import type { ConfigSchema } from '../..'; import { apmRouter } from '../../components/routing/apm_route_config'; import { createCallApmApi } from '../../services/rest/create_call_apm_api'; -import { ApmPluginContext, ApmPluginContextValue } from './apm_plugin_context'; +import type { ApmPluginContextValue } from './apm_plugin_context'; +import { ApmPluginContext } from './apm_plugin_context'; const coreStart = coreMock.createStart({ basePath: '/basepath' }); diff --git a/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_storybook.tsx b/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_storybook.tsx index 14d8d4404a719..bbf2f1dc3e28f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_storybook.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/apm_plugin/mock_apm_plugin_storybook.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MlLocatorDefinition } from '@kbn/ml-plugin/public'; @@ -14,15 +14,18 @@ import { UrlService } from '@kbn/share-plugin/common/url_service'; import { RouterProvider } from '@kbn/typed-react-router-config'; import { createMemoryHistory } from 'history'; import { merge, noop } from 'lodash'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { Observable, of } from 'rxjs'; import { apmRouter } from '../../components/routing/apm_route_config'; import { createCallApmApi } from '../../services/rest/create_call_apm_api'; -import { APMServiceContext, APMServiceContextValue } from '../apm_service/apm_service_context'; +import type { APMServiceContextValue } from '../apm_service/apm_service_context'; +import { APMServiceContext } from '../apm_service/apm_service_context'; import { MockTimeRangeContextProvider } from '../time_range_metadata/mock_time_range_metadata_context_provider'; import { ApmTimeRangeMetadataContextProvider } from '../time_range_metadata/time_range_metadata_context'; -import { ApmPluginContext, ApmPluginContextValue } from './apm_plugin_context'; +import type { ApmPluginContextValue } from './apm_plugin_context'; +import { ApmPluginContext } from './apm_plugin_context'; const uiSettings: Record = { [UI_SETTINGS.TIMEPICKER_QUICK_RANGES]: [ diff --git a/x-pack/solutions/observability/plugins/apm/public/context/apm_service/apm_service_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/apm_service/apm_service_context.tsx index f0b830b541007..e0c09c5756a4e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/apm_service/apm_service_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/apm_service/apm_service_context.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { createContext, ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React, { createContext } from 'react'; import { useHistory } from 'react-router-dom'; -import { History } from 'history'; +import type { History } from 'history'; import { ApmDocumentType } from '../../../common/document_type'; import { getDefaultTransactionType } from '../../../common/transaction_types'; import { useServiceTransactionTypesFetcher } from './use_service_transaction_types_fetcher'; @@ -17,7 +18,7 @@ import { useTimeRange } from '../../hooks/use_time_range'; import { useFallbackToTransactionsFetcher } from '../../hooks/use_fallback_to_transactions_fetcher'; import { replace } from '../../components/shared/links/url_helpers'; import { FETCH_STATUS } from '../../hooks/use_fetcher'; -import { ServerlessType } from '../../../common/serverless'; +import type { ServerlessType } from '../../../common/serverless'; import { usePreferredDataSourceAndBucketSize } from '../../hooks/use_preferred_data_source_and_bucket_size'; import { type ServiceEntitySummary, diff --git a/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_entity_summary_fetcher.ts b/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_entity_summary_fetcher.ts index 1c01b6bd25cb2..357e53819cc08 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_entity_summary_fetcher.ts +++ b/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_entity_summary_fetcher.ts @@ -7,7 +7,7 @@ import { useEntityCentricExperienceSetting } from '../../hooks/use_entity_centric_experience_setting'; import { useFetcher } from '../../hooks/use_fetcher'; -import { APIReturnType } from '../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../services/rest/create_call_apm_api'; export type ServiceEntitySummary = APIReturnType<'GET /internal/apm/entities/services/{serviceName}/summary'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_transaction_types_fetcher.tsx b/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_transaction_types_fetcher.tsx index 188202fd3935b..1c8800fa897a8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_transaction_types_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/apm_service/use_service_transaction_types_fetcher.tsx @@ -6,8 +6,8 @@ */ import { useFetcher } from '../../hooks/use_fetcher'; -import { RollupInterval } from '../../../common/rollup'; -import { ApmTransactionDocumentType } from '../../../common/document_type'; +import type { RollupInterval } from '../../../common/rollup'; +import type { ApmTransactionDocumentType } from '../../../common/document_type'; const INITIAL_DATA = { transactionTypes: [] }; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/context.tsx index 7ec17b3a6cf3b..8ae6482a866c4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/context.tsx @@ -4,8 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Route, RouteMatch, useMatchRoutes } from '@kbn/typed-react-router-config'; -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { Route, RouteMatch } from '@kbn/typed-react-router-config'; +import { useMatchRoutes } from '@kbn/typed-react-router-config'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { compact, isEqual } from 'lodash'; import React, { createContext, useMemo, useState } from 'react'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts b/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts index 846aa1ec70877..23a9280e3eba4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts +++ b/x-pack/solutions/observability/plugins/apm/public/context/breadcrumbs/use_breadcrumb.ts @@ -9,7 +9,8 @@ import { useCurrentRoute } from '@kbn/typed-react-router-config'; import { useContext, useEffect, useRef } from 'react'; import { castArray } from 'lodash'; import useObservable from 'react-use/lib/useObservable'; -import { Breadcrumb, BreadcrumbsContext } from './context'; +import type { Breadcrumb } from './context'; +import { BreadcrumbsContext } from './context'; import { useKibanaEnvironmentContext } from '../kibana_environment_context/use_kibana_environment_context'; import { useKibana } from '../kibana_context/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/chart_pointer_event_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/chart_pointer_event_context.tsx index 0efc0b57179bf..1d4cb41f0664f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/chart_pointer_event_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/chart_pointer_event_context.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { createContext, ReactNode, useRef } from 'react'; +import type { ReactNode } from 'react'; +import React, { createContext, useRef } from 'react'; -import { PointerEvent } from '@elastic/charts'; +import type { PointerEvent } from '@elastic/charts'; export const UPDATE_POINTER_EVENT = 'updatePointerEvent'; export const ChartPointerEventContext = createContext<{ diff --git a/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/use_chart_pointer_event_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/use_chart_pointer_event_context.tsx index 8bd835061f3a9..c0671a80f9752 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/use_chart_pointer_event_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/chart_pointer_event/use_chart_pointer_event_context.tsx @@ -6,8 +6,8 @@ */ import React, { useContext, useEffect, useCallback, useRef } from 'react'; -import { Chart } from '@elastic/charts'; -import { PointerEvent } from '@elastic/charts'; +import type { Chart } from '@elastic/charts'; +import type { PointerEvent } from '@elastic/charts'; import { ChartPointerEventContext, UPDATE_POINTER_EVENT } from './chart_pointer_event_context'; export function useChartPointerEventContext() { diff --git a/x-pack/solutions/observability/plugins/apm/public/context/environments_context/environments_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/environments_context/environments_context.tsx index 4407120e2bf69..95d75be9c6fe3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/environments_context/environments_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/environments_context/environments_context.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { useApmParams } from '../../hooks/use_apm_params'; import { useEnvironmentsFetcher } from '../../hooks/use_environments_fetcher'; import { FETCH_STATUS } from '../../hooks/use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/kibana_context/use_kibana.tsx b/x-pack/solutions/observability/plugins/apm/public/context/kibana_context/use_kibana.tsx index b36a4a1dea35b..5d4700e0ec213 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/kibana_context/use_kibana.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/kibana_context/use_kibana.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { type ApmPluginStartDeps } from '../../plugin'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/license/license_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/license/license_context.tsx index 927e4367dd376..0958736d2f86d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/license/license_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/license/license_context.tsx @@ -7,7 +7,7 @@ import React from 'react'; import useObservable from 'react-use/lib/useObservable'; -import { ILicense } from '@kbn/licensing-plugin/public'; +import type { ILicense } from '@kbn/licensing-plugin/public'; import { useApmPluginContext } from '../apm_plugin/use_apm_plugin_context'; import { InvalidLicenseNotification } from './invalid_license_notification'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx index 986730c99691e..efbc56e095e74 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/service_anomaly_timeseries/service_anomaly_timeseries_context.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { useEnvironmentsContext } from '../environments_context/use_environments_context'; -import { ServiceAnomalyTimeseries } from '../../../common/anomaly_detection/service_anomaly_timeseries'; +import type { ServiceAnomalyTimeseries } from '../../../common/anomaly_detection/service_anomaly_timeseries'; import { useAnyOfApmParams } from '../../hooks/use_apm_params'; import { FETCH_STATUS, useFetcher } from '../../hooks/use_fetcher'; import { useTimeRange } from '../../hooks/use_time_range'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/mock_time_range_metadata_context_provider.tsx b/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/mock_time_range_metadata_context_provider.tsx index 4c08dd57db9eb..c7a223ad1ddba 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/mock_time_range_metadata_context_provider.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/mock_time_range_metadata_context_provider.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; -import { TimeRangeMetadata } from '../../../common/time_range_metadata'; +import type { TimeRangeMetadata } from '../../../common/time_range_metadata'; import { mockApmApiCallResponse } from '../../services/rest/call_apm_api_spy'; const DEFAULTS = { diff --git a/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx index b821b3ff217d9..35084d97c4084 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/time_range_metadata/time_range_metadata_context.tsx @@ -9,11 +9,12 @@ import { apmEnableServiceMetrics, apmEnableContinuousRollups, } from '@kbn/observability-plugin/common'; -import { IUiSettingsClient } from '@kbn/core/public'; -import { TimeRangeMetadata } from '../../../common/time_range_metadata'; +import type { IUiSettingsClient } from '@kbn/core/public'; +import type { TimeRangeMetadata } from '../../../common/time_range_metadata'; import { useApmParams } from '../../hooks/use_apm_params'; import { useApmRoutePath } from '../../hooks/use_apm_route_path'; -import { FetcherResult, useFetcher } from '../../hooks/use_fetcher'; +import type { FetcherResult } from '../../hooks/use_fetcher'; +import { useFetcher } from '../../hooks/use_fetcher'; import { useTimeRange } from '../../hooks/use_time_range'; import { useApmPluginContext } from '../apm_plugin/use_apm_plugin_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/helpers.ts b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/helpers.ts index 1fb70e929ad5a..80880fd622abd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/helpers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/helpers.ts @@ -7,7 +7,7 @@ import datemath from '@kbn/datemath'; import { pickBy } from 'lodash'; -import { UrlParams } from './types'; +import type { UrlParams } from './types'; function getParsedDate(rawDate?: string, options = {}) { if (rawDate) { diff --git a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/mock_url_params_context_provider.tsx b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/mock_url_params_context_provider.tsx index 3cd522037bb11..236a8ac81d22e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/mock_url_params_context_provider.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/mock_url_params_context_provider.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { UrlParams } from './types'; +import type { UrlParams } from './types'; import { UrlParamsContext } from './url_params_context'; const defaultUrlParams = { diff --git a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/resolve_url_params.ts b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/resolve_url_params.ts index 3de5b263a83c6..471a405e2f7fe 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/resolve_url_params.ts +++ b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/resolve_url_params.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { toQuery } from '../../components/shared/links/url_helpers'; import { getDateRange, removeUndefinedProps, toBoolean, toNumber, toString } from './helpers'; -import { UrlParams } from './types'; +import type { UrlParams } from './types'; type TimeUrlParams = Pick; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/types.ts b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/types.ts index d5932ff73cafb..055f05a67a75f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/types.ts +++ b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../common/latency_aggregation_types'; export interface UrlParams { detailTab?: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.test.tsx b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.test.tsx index 82e9fa1e97067..cfbaa07bca259 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.test.tsx @@ -7,7 +7,7 @@ import { waitFor } from '@testing-library/react'; import { mount } from 'enzyme'; -import { History, Location } from 'history'; +import type { History, Location } from 'history'; import moment from 'moment-timezone'; import * as React from 'react'; import { MemoryRouter, Router } from '@kbn/shared-ux-router'; diff --git a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.tsx b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.tsx index 1579ab784dba6..22292f9cd6037 100644 --- a/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/context/url_params_context/url_params_context.tsx @@ -5,18 +5,13 @@ * 2.0. */ -import React, { - createContext, - useCallback, - useMemo, - useRef, - useState, - PropsWithChildren, -} from 'react'; -import { withRouter, RouteComponentProps } from 'react-router-dom'; +import type { PropsWithChildren } from 'react'; +import React, { createContext, useCallback, useMemo, useRef, useState } from 'react'; +import type { RouteComponentProps } from 'react-router-dom'; +import { withRouter } from 'react-router-dom'; import { getDateRange } from './helpers'; import { resolveUrlParams } from './resolve_url_params'; -import { UrlParams } from './types'; +import type { UrlParams } from './types'; export interface TimeRange { rangeFrom: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_failed_transactions_chart/react_embeddable_factory.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_failed_transactions_chart/react_embeddable_factory.tsx index f9513ad09fde7..6eb52a58d0c59 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_failed_transactions_chart/react_embeddable_factory.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_failed_transactions_chart/react_embeddable_factory.tsx @@ -5,8 +5,8 @@ * 2.0. */ import React from 'react'; -import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; -import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import type { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import type { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { initializeTitles, useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { BehaviorSubject } from 'rxjs'; import type { EmbeddableApmAlertingVizProps } from '../types'; diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_latency_chart/react_embeddable_factory.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_latency_chart/react_embeddable_factory.tsx index 1cb032d1d8fc5..27f5eec4f097a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_latency_chart/react_embeddable_factory.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_latency_chart/react_embeddable_factory.tsx @@ -5,8 +5,8 @@ * 2.0. */ import React from 'react'; -import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; -import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import type { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import type { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { initializeTitles, useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { BehaviorSubject } from 'rxjs'; import type { EmbeddableApmAlertingLatencyVizProps } from '../types'; diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/chart.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/chart.tsx index d98c27fc52d1d..999fb020f53e4 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/chart.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/chart.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import ThroughputChart from '../../../components/alerting/ui_components/alert_details_app_section/throughput_chart'; -import { EmbeddableApmAlertingVizProps } from '../types'; +import type { EmbeddableApmAlertingVizProps } from '../types'; import { useAlertingProps } from '../use_alerting_props'; import { TimeRangeCallout } from '../time_range_callout'; import { ServiceNameCallout } from '../service_name_callout'; diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/react_embeddable_factory.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/react_embeddable_factory.tsx index 1126c376e2f0d..df61e1558e9cd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/react_embeddable_factory.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/alerting_throughput_chart/react_embeddable_factory.tsx @@ -5,8 +5,8 @@ * 2.0. */ import React from 'react'; -import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; -import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import type { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import type { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { initializeTitles, useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { BehaviorSubject } from 'rxjs'; import type { EmbeddableApmAlertingVizProps } from '../types'; diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/testing/fixtures.ts b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/testing/fixtures.ts index f2ae97beb74f6..d1869fa40d33f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/testing/fixtures.ts +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/testing/fixtures.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { TopAlert } from '@kbn/observability-plugin/public'; -import { Rule } from '@kbn/alerting-plugin/common'; -import { ApmEmbeddableContextProps } from '../../embeddable_context'; +import type { TopAlert } from '@kbn/observability-plugin/public'; +import type { Rule } from '@kbn/alerting-plugin/common'; +import type { ApmEmbeddableContextProps } from '../../embeddable_context'; import { mockApmPluginContextValue } from '../../../context/apm_plugin/mock_apm_plugin_context'; export const MOCK_DEPS: ApmEmbeddableContextProps['deps'] = { diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/types.ts b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/types.ts index 17d5da69644b3..b55e4d6c51e45 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/types.ts +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/types.ts @@ -7,7 +7,7 @@ import type { Rule } from '@kbn/alerting-plugin/common'; import type { TopAlert } from '@kbn/observability-plugin/public'; -import { SerializedTitles } from '@kbn/presentation-publishing'; +import type { SerializedTitles } from '@kbn/presentation-publishing'; import type { BoolQuery } from '@kbn/es-query'; export interface EmbeddableApmAlertingVizProps extends SerializedTitles { diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/use_alerting_props.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/use_alerting_props.tsx index d85be78919043..cf16033bbdc6b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/use_alerting_props.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/alerting/use_alerting_props.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { useState, useEffect } from 'react'; -import { Rule } from '@kbn/alerting-plugin/common'; +import type { Rule } from '@kbn/alerting-plugin/common'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { getTransactionType } from '../../context/apm_service/apm_service_context'; import { useServiceTransactionTypesFetcher } from '../../context/apm_service/use_service_transaction_types_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/embeddable_context.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/embeddable_context.tsx index 8458a4c9d4466..dd38e9cf7e5f0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/embeddable_context.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/embeddable_context.tsx @@ -7,10 +7,11 @@ import React from 'react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; -import { ApmPluginContext, ApmPluginContextValue } from '../context/apm_plugin/apm_plugin_context'; +import type { ApmPluginContextValue } from '../context/apm_plugin/apm_plugin_context'; +import { ApmPluginContext } from '../context/apm_plugin/apm_plugin_context'; import { createCallApmApi } from '../services/rest/create_call_apm_api'; import { ChartPointerEventContextProvider } from '../context/chart_pointer_event/chart_pointer_event_context'; -import { EmbeddableDeps } from './types'; +import type { EmbeddableDeps } from './types'; import { TimeRangeMetadataContextProvider } from '../context/time_range_metadata/time_range_metadata_context'; export interface ApmEmbeddableContextProps { diff --git a/x-pack/solutions/observability/plugins/apm/public/embeddable/register_embeddables.tsx b/x-pack/solutions/observability/plugins/apm/public/embeddable/register_embeddables.tsx index 215959007a6bb..60627b81c8da0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/embeddable/register_embeddables.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/embeddable/register_embeddables.tsx @@ -4,10 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreSetup } from '@kbn/core/public'; +import type { CoreSetup } from '@kbn/core/public'; -import { ApmPluginStartDeps, ApmPluginStart } from '../plugin'; -import { EmbeddableDeps } from './types'; +import type { ApmPluginStartDeps, ApmPluginStart } from '../plugin'; +import type { EmbeddableDeps } from './types'; import { APM_ALERTING_FAILED_TRANSACTIONS_CHART_EMBEDDABLE, APM_ALERTING_LATENCY_CHART_EMBEDDABLE, diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/create_shared_use_fetcher.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/create_shared_use_fetcher.tsx index b215ae39f67f2..01b448bb699ee 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/create_shared_use_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/create_shared_use_fetcher.tsx @@ -7,7 +7,8 @@ import React, { createContext, useContext, useMemo } from 'react'; import type { APIEndpoint } from '../../server'; import type { APIClientRequestParamsOf, APIReturnType } from '../services/rest/create_call_apm_api'; -import { useFetcher, FetcherResult } from './use_fetcher'; +import type { FetcherResult } from './use_fetcher'; +import { useFetcher } from './use_fetcher'; interface SharedUseFetcher { useFetcherResult: () => FetcherResult> & { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_adhoc_apm_data_view.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_adhoc_apm_data_view.ts index 918a701ea169f..08cb54866bffb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_adhoc_apm_data_view.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_adhoc_apm_data_view.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useEffect, useState } from 'react'; -import { ApmPluginStartDeps } from '../plugin'; +import type { ApmPluginStartDeps } from '../plugin'; import { callApmApi } from '../services/rest/create_call_apm_api'; export async function getApmDataViewIndexPattern() { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_feature_flag.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_feature_flag.ts index c3fd7e5d54181..14dc1722e80f9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_feature_flag.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_feature_flag.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ApmFeatureFlagName, ValueOfApmFeatureFlag } from '../../common/apm_feature_flags'; +import type { ApmFeatureFlagName, ValueOfApmFeatureFlag } from '../../common/apm_feature_flags'; import { useApmPluginContext } from '../context/apm_plugin/use_apm_plugin_context'; export function useApmFeatureFlag( diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_params.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_params.ts index 2a835e7e6989a..4bc3047a3d5fc 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_params.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_params.ts @@ -4,9 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ValuesType } from 'utility-types'; -import { TypeOf, PathsOf, useParams } from '@kbn/typed-react-router-config'; -import { ApmRoutes } from '../components/routing/apm_route_config'; +import type { ValuesType } from 'utility-types'; +import type { TypeOf, PathsOf } from '@kbn/typed-react-router-config'; +import { useParams } from '@kbn/typed-react-router-config'; +import type { ApmRoutes } from '../components/routing/apm_route_config'; // these three different functions exist purely to speed up completions from // TypeScript. One overloaded function is expensive because of the size of the diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_route_path.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_route_path.ts index b659e26610490..8a35a35f94a38 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_route_path.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_apm_route_path.ts @@ -4,8 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { useRoutePath, PathsOf } from '@kbn/typed-react-router-config'; -import { ApmRoutes } from '../components/routing/apm_route_config'; +import type { PathsOf } from '@kbn/typed-react-router-config'; +import { useRoutePath } from '@kbn/typed-react-router-config'; +import type { ApmRoutes } from '../components/routing/apm_route_config'; export function useApmRoutePath() { const path = useRoutePath(); diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_breakpoints.test.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_breakpoints.test.tsx index 7a9a7aa33b6b2..ca25af1f0643b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_breakpoints.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_breakpoints.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { renderHook } from '@testing-library/react'; import { EuiProvider } from '@elastic/eui'; import { useBreakpoints } from './use_breakpoints'; diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_current_user.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_current_user.ts index e319d4ce03ca4..0df4e777ad953 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_current_user.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_current_user.ts @@ -7,8 +7,8 @@ import { useState, useEffect } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { AuthenticatedUser } from '@kbn/security-plugin/common'; -import { ApmServices } from '../plugin'; +import type { AuthenticatedUser } from '@kbn/security-plugin/common'; +import type { ApmServices } from '../plugin'; export function useCurrentUser() { const { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_dashboards_fetcher.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_dashboards_fetcher.ts index 8b1ccf301ae38..1a8b6fb187e09 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_dashboards_fetcher.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_dashboards_fetcher.ts @@ -7,8 +7,8 @@ import { useState, useEffect } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { SearchDashboardsResponse } from '@kbn/dashboard-plugin/public'; -import { ApmPluginStartDeps } from '../plugin'; +import type { SearchDashboardsResponse } from '@kbn/dashboard-plugin/public'; +import type { ApmPluginStartDeps } from '../plugin'; import { FETCH_STATUS } from './use_fetcher'; export interface SearchDashboardsResult { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_date_range_redirect.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_date_range_redirect.ts index 40367b29768a2..ea64de3e81ab5 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_date_range_redirect.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_date_range_redirect.ts @@ -7,7 +7,7 @@ import qs from 'query-string'; import { useHistory, useLocation } from 'react-router-dom'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; -import { TimePickerTimeDefaults } from '../components/shared/date_picker/typings'; +import type { TimePickerTimeDefaults } from '../components/shared/date_picker/typings'; import { useApmPluginContext } from '../context/apm_plugin/use_apm_plugin_context'; export function useDateRangeRedirect() { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_environment.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_environment.ts index d4a0cd1057cd4..88ed9a6d55afb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_environment.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_environment.ts @@ -7,7 +7,7 @@ import { defaultApmServiceEnvironment } from '@kbn/observability-plugin/common'; import { ENVIRONMENT_ALL } from '../../common/environment_filter_values'; -import { Environment } from '../../common/environment_rt'; +import type { Environment } from '../../common/environment_rt'; import { useApmPluginContext } from '../context/apm_plugin/use_apm_plugin_context'; export function useDefaultEnvironment() { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_time_range.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_time_range.ts index c504040dfc06f..eb7855036cd40 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_time_range.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_default_time_range.ts @@ -6,7 +6,7 @@ */ import { UI_SETTINGS } from '@kbn/data-plugin/public'; -import { TimePickerTimeDefaults } from '../components/shared/date_picker/typings'; +import type { TimePickerTimeDefaults } from '../components/shared/date_picker/typings'; import { useApmPluginContext } from '../context/apm_plugin/use_apm_plugin_context'; export function useDefaultTimeRange() { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts index 197e03845a953..193b364d0c2a1 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_dependency_detail_operations_breadcrumb.ts @@ -10,7 +10,7 @@ import { castArray } from 'lodash'; import { useBreadcrumb } from '../context/breadcrumbs/use_breadcrumb'; import { useAnyOfApmParams } from './use_apm_params'; import { useApmRouter } from './use_apm_router'; -import { Breadcrumb } from '../context/breadcrumbs/context'; +import type { Breadcrumb } from '../context/breadcrumbs/context'; export function useDependencyDetailOperationsBreadcrumb( extraBreadCrumbs: Breadcrumb | Breadcrumb[] = [] diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_environments_fetcher.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_environments_fetcher.tsx index 4dc32754cbfe4..b8393e6741f86 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_environments_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_environments_fetcher.tsx @@ -7,8 +7,8 @@ import { SERVICE_ENVIRONMENT } from '../../common/es_fields/apm'; import { useFetcher } from './use_fetcher'; -import { Environment } from '../../common/environment_rt'; -import { APIReturnType } from '../services/rest/create_call_apm_api'; +import type { Environment } from '../../common/environment_rt'; +import type { APIReturnType } from '../services/rest/create_call_apm_api'; type EnvironmentsAPIResponse = APIReturnType<'GET /internal/apm/environments'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx index 4d25a61227d95..d6224c18d679a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { waitFor, act, renderHook, type RenderHookResult } from '@testing-library/react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { delay } from '../utils/test_helpers'; import { useFetcher, isPending, FETCH_STATUS } from './use_fetcher'; diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.tsx index 7522fa87a20e0..419b540c24d3c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_fetcher.tsx @@ -11,7 +11,8 @@ import type { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser' import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useInspectorContext } from '@kbn/observability-shared-plugin/public'; import { useTimeRangeId } from '../context/time_range_id/use_time_range_id'; -import { AutoAbortedAPMClient, callApmApi } from '../services/rest/create_call_apm_api'; +import type { AutoAbortedAPMClient } from '../services/rest/create_call_apm_api'; +import { callApmApi } from '../services/rest/create_call_apm_api'; export enum FETCH_STATUS { LOADING = 'loading', diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_data_source_and_bucket_size.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_data_source_and_bucket_size.ts index cf27bce80de40..0e5c371a0c0bb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_data_source_and_bucket_size.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_data_source_and_bucket_size.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { getPreferredBucketSizeAndDataSource } from '@kbn/apm-data-access-plugin/common'; -import { ApmDataSourceWithSummary } from '../../common/data_source'; +import type { ApmDataSourceWithSummary } from '../../common/data_source'; import { ApmDocumentType } from '../../common/document_type'; import { getBucketSize } from '../../common/utils/get_bucket_size'; import { useTimeRangeMetadata } from '../context/time_range_metadata/use_time_range_metadata_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_service_anomaly_timeseries.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_service_anomaly_timeseries.ts index 944db3726cc1a..a329a73f14c4f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_service_anomaly_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_preferred_service_anomaly_timeseries.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AnomalyDetectorType } from '../../common/anomaly_detection/apm_ml_detectors'; +import type { AnomalyDetectorType } from '../../common/anomaly_detection/apm_ml_detectors'; import { getPreferredServiceAnomalyTimeseries } from '../../common/anomaly_detection/get_preferred_service_anomaly_timeseries'; import { useApmServiceContext } from '../context/apm_service/use_apm_service_context'; import { useEnvironmentsContext } from '../context/environments_context/use_environments_context'; diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_processor_event.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_processor_event.ts index deffd7eae1517..ee9c078c5dbff 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_processor_event.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_processor_event.ts @@ -7,7 +7,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { useLocation } from 'react-router-dom'; -import { UIProcessorEvent } from '../../common/processor_event'; +import type { UIProcessorEvent } from '../../common/processor_event'; /** * Infer the processor.event to used based on the route path diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx b/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx index 79fd80efdf362..174b9f58701c6 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_progressive_fetcher.tsx @@ -15,7 +15,8 @@ import { import type { APMServerRouteRepository } from '../../server'; import type { APMClient, APMClientOptions } from '../services/rest/create_call_apm_api'; -import { FetcherResult, FETCH_STATUS, useFetcher } from './use_fetcher'; +import type { FetcherResult } from './use_fetcher'; +import { FETCH_STATUS, useFetcher } from './use_fetcher'; type APMProgressivelyLoadingServerRouteRepository = OmitByValue< { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_sample_chart_selection.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_sample_chart_selection.ts index b6753bfd89960..f8a8bd531bd72 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_sample_chart_selection.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_sample_chart_selection.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { XYBrushEvent } from '@elastic/charts'; +import type { XYBrushEvent } from '@elastic/charts'; import { useHistory } from 'react-router-dom'; import { push } from '../components/shared/links/url_helpers'; diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_time_range.test.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_time_range.test.ts index 2f6c08aad8ccf..e614bb5e20950 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_time_range.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_time_range.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { renderHook, RenderHookResult } from '@testing-library/react'; +import type { RenderHookResult } from '@testing-library/react'; +import { renderHook } from '@testing-library/react'; import { useTimeRange } from './use_time_range'; describe('useTimeRange', () => { diff --git a/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts b/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts index 3bc56daeffc42..e045034410d8b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts +++ b/x-pack/solutions/observability/plugins/apm/public/hooks/use_transaction_latency_chart_fetcher.ts @@ -7,7 +7,7 @@ import { useMemo } from 'react'; import { ApmDocumentType } from '../../common/document_type'; -import { LatencyAggregationType } from '../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../common/latency_aggregation_types'; import { isTimeComparison } from '../components/shared/time_comparison/get_comparison_options'; import { useApmServiceContext } from '../context/apm_service/use_apm_service_context'; import { getLatencyChartSelector } from '../selectors/latency_chart_selectors'; diff --git a/x-pack/solutions/observability/plugins/apm/public/index.ts b/x-pack/solutions/observability/plugins/apm/public/index.ts index 5d25f64a0d6e4..d4207d993e1fa 100644 --- a/x-pack/solutions/observability/plugins/apm/public/index.ts +++ b/x-pack/solutions/observability/plugins/apm/public/index.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; -import { ApmPlugin, ApmPluginSetup, ApmPluginStart } from './plugin'; +import type { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; +import type { ApmPluginSetup, ApmPluginStart } from './plugin'; +import { ApmPlugin } from './plugin'; export interface ConfigSchema { serviceMapEnabled: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/public/locator/helpers.ts b/x-pack/solutions/observability/plugins/apm/public/locator/helpers.ts index 69c041a00374c..e14cccf9eda0d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/locator/helpers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/locator/helpers.ts @@ -7,7 +7,8 @@ import * as t from 'io-ts'; import { isRight } from 'fp-ts/Either'; import { PathReporter } from 'io-ts/lib/PathReporter'; -import { Environment, environmentRt } from '../../common/environment_rt'; +import type { Environment } from '../../common/environment_rt'; +import { environmentRt } from '../../common/environment_rt'; import { apmRouter } from '../components/routing/apm_route_config'; import type { TimePickerTimeDefaults } from '../components/shared/date_picker/typings'; diff --git a/x-pack/solutions/observability/plugins/apm/public/locator/onboarding_locator.ts b/x-pack/solutions/observability/plugins/apm/public/locator/onboarding_locator.ts index 889486cca8ca7..4f9ed2860ca96 100644 --- a/x-pack/solutions/observability/plugins/apm/public/locator/onboarding_locator.ts +++ b/x-pack/solutions/observability/plugins/apm/public/locator/onboarding_locator.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; export enum ApmOnboardingLocatorCategory { Apm = 'application', diff --git a/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.test.ts b/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.test.ts index 0aa3caf13f1cb..415b394975095 100644 --- a/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.test.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Environment } from '../../common/environment_rt'; -import { IUiSettingsClient } from '@kbn/core/public'; +import type { Environment } from '../../common/environment_rt'; +import type { IUiSettingsClient } from '@kbn/core/public'; import { APMServiceDetailLocator, APM_APP_LOCATOR_ID } from './service_detail_locator'; import { enableComparisonByDefault, diff --git a/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.ts b/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.ts index 6d4a53f1f6e26..b6e7e30459b73 100644 --- a/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.ts +++ b/x-pack/solutions/observability/plugins/apm/public/locator/service_detail_locator.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { IUiSettingsClient } from '@kbn/core/public'; -import { LocatorDefinition } from '@kbn/share-plugin/common'; +import type { IUiSettingsClient } from '@kbn/core/public'; +import type { LocatorDefinition } from '@kbn/share-plugin/common'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import { defaultApmServiceEnvironment, diff --git a/x-pack/solutions/observability/plugins/apm/public/plugin.ts b/x-pack/solutions/observability/plugins/apm/public/plugin.ts index 532c0498f7a56..e0480e53ff826 100644 --- a/x-pack/solutions/observability/plugins/apm/public/plugin.ts +++ b/x-pack/solutions/observability/plugins/apm/public/plugin.ts @@ -9,31 +9,31 @@ import type { PluginSetupContract as AlertingPluginPublicSetup, PluginStartContract as AlertingPluginPublicStart, } from '@kbn/alerting-plugin/public'; -import { ChartsPluginStart } from '@kbn/charts-plugin/public'; -import { +import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; +import type { AppMountParameters, CoreSetup, CoreStart, - DEFAULT_APP_CATEGORIES, Plugin, PluginInitializerContext, SecurityServiceStart, } from '@kbn/core/public'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import { DiscoverSetup, DiscoverStart } from '@kbn/discover-plugin/public'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { DiscoverSetup, DiscoverStart } from '@kbn/discover-plugin/public'; import type { EmbeddableSetup, EmbeddableStart } from '@kbn/embeddable-plugin/public'; import type { ExploratoryViewPublicSetup } from '@kbn/exploratory-view-plugin/public'; import type { FeaturesPluginSetup } from '@kbn/features-plugin/public'; -import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { FleetStart } from '@kbn/fleet-plugin/public'; import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import { i18n } from '@kbn/i18n'; -import { MetricsDataPluginStart } from '@kbn/metrics-data-access-plugin/public'; -import { Start as InspectorPluginStart } from '@kbn/inspector-plugin/public'; +import type { MetricsDataPluginStart } from '@kbn/metrics-data-access-plugin/public'; +import type { Start as InspectorPluginStart } from '@kbn/inspector-plugin/public'; import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; -import { LensPublicStart } from '@kbn/lens-plugin/public'; -import { LicenseManagementUIPluginSetup } from '@kbn/license-management-plugin/public'; +import type { LensPublicStart } from '@kbn/lens-plugin/public'; +import type { LicenseManagementUIPluginSetup } from '@kbn/license-management-plugin/public'; import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { MapsStartApi } from '@kbn/maps-plugin/public'; import type { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/public'; @@ -41,7 +41,7 @@ import type { ObservabilityAIAssistantPublicSetup, ObservabilityAIAssistantPublicStart, } from '@kbn/observability-ai-assistant-plugin/public'; -import { +import type { FetchDataParams, ObservabilityPublicSetup, ObservabilityPublicStart, @@ -52,26 +52,26 @@ import type { ObservabilitySharedPluginStart, } from '@kbn/observability-shared-plugin/public'; import { METRIC_TYPE } from '@kbn/observability-shared-plugin/public'; -import { ProfilingPluginSetup, ProfilingPluginStart } from '@kbn/profiling-plugin/public'; +import type { ProfilingPluginSetup, ProfilingPluginStart } from '@kbn/profiling-plugin/public'; import type { SecurityPluginStart } from '@kbn/security-plugin/public'; import type { SharePluginSetup } from '@kbn/share-plugin/public'; -import { SpacesPluginStart } from '@kbn/spaces-plugin/public'; +import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; -import { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import type { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; -import { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; -import { DashboardStart } from '@kbn/dashboard-plugin/public'; +import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; +import type { DashboardStart } from '@kbn/dashboard-plugin/public'; import type { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { from } from 'rxjs'; import { map } from 'rxjs'; import type { CloudSetup } from '@kbn/cloud-plugin/public'; import type { ServerlessPluginStart } from '@kbn/serverless/public'; -import { LogsSharedClientStartExports } from '@kbn/logs-shared-plugin/public'; -import { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public'; -import { SavedSearchPublicPluginStart } from '@kbn/saved-search-plugin/public'; +import type { LogsSharedClientStartExports } from '@kbn/logs-shared-plugin/public'; +import type { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public'; +import type { SavedSearchPublicPluginStart } from '@kbn/saved-search-plugin/public'; import type { ConfigSchema } from '.'; import { registerApmRuleTypes } from './components/alerting/rule_types/register_apm_rule_types'; import { registerEmbeddables } from './embeddable/register_embeddables'; @@ -84,7 +84,8 @@ import { getLazyAPMPolicyCreateExtension } from './components/fleet_integration/ import { getLazyAPMPolicyEditExtension } from './components/fleet_integration/lazy_apm_policy_edit_extension'; import { featureCatalogueEntry } from './feature_catalogue_entry'; import { APMServiceDetailLocator } from './locator/service_detail_locator'; -import { ITelemetryClient, TelemetryService } from './services/telemetry'; +import type { ITelemetryClient } from './services/telemetry'; +import { TelemetryService } from './services/telemetry'; export type ApmPluginSetup = ReturnType; export type ApmPluginStart = void; diff --git a/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selector.test.ts b/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selector.test.ts index 8a393b9c0e2cb..14b59f102b9d0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selector.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selector.test.ts @@ -6,7 +6,8 @@ */ import { LatencyAggregationType } from '../../common/latency_aggregation_types'; -import { getLatencyChartSelector, LatencyChartsResponse } from './latency_chart_selectors'; +import type { LatencyChartsResponse } from './latency_chart_selectors'; +import { getLatencyChartSelector } from './latency_chart_selectors'; import * as timeSeriesColor from '../components/shared/charts/helper/get_timeseries_color'; const latencyChartData = { diff --git a/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selectors.ts b/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selectors.ts index b4469ba2cfdf1..8e3a8a2cccefd 100644 --- a/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selectors.ts +++ b/x-pack/solutions/observability/plugins/apm/public/selectors/latency_chart_selectors.ts @@ -6,14 +6,14 @@ */ import { i18n } from '@kbn/i18n'; -import { LatencyAggregationType } from '../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../common/latency_aggregation_types'; import { asDuration } from '../../common/utils/formatters'; -import { APMChartSpec, Coordinate } from '../../typings/timeseries'; +import type { APMChartSpec, Coordinate } from '../../typings/timeseries'; import { ChartType, getTimeSeriesColor, } from '../components/shared/charts/helper/get_timeseries_color'; -import { APIReturnType } from '../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../services/rest/create_call_apm_api'; export type LatencyChartsResponse = APIReturnType<'GET /internal/apm/services/{serviceName}/transactions/charts/latency'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/services/call_api.test.ts b/x-pack/solutions/observability/plugins/apm/public/services/call_api.test.ts index 89de087e506df..c2a38c8a76751 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/call_api.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/call_api.test.ts @@ -7,7 +7,7 @@ import { mockNow } from '../utils/test_helpers'; import { clearCache, callApi } from './rest/call_api'; -import { CoreStart, HttpSetup } from '@kbn/core/public'; +import type { CoreStart, HttpSetup } from '@kbn/core/public'; type CoreMock = CoreStart & { http: { diff --git a/x-pack/solutions/observability/plugins/apm/public/services/call_apm_api.test.ts b/x-pack/solutions/observability/plugins/apm/public/services/call_apm_api.test.ts index dceeba14504c3..866cb302c0795 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/call_apm_api.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/call_apm_api.test.ts @@ -7,7 +7,7 @@ import * as callApiExports from './rest/call_api'; import { createCallApmApi, callApmApi } from './rest/create_call_apm_api'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; const callApi = jest .spyOn(callApiExports, 'callApi') diff --git a/x-pack/solutions/observability/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts b/x-pack/solutions/observability/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts index 9f8f8dd4d44b3..4b2af86eb4a87 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/rest/apm_observability_overview_fetchers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ApmFetchDataResponse, FetchDataParams } from '@kbn/observability-plugin/public'; +import type { ApmFetchDataResponse, FetchDataParams } from '@kbn/observability-plugin/public'; import { callApmApi } from './create_call_apm_api'; export const fetchObservabilityOverviewPageData = async ({ diff --git a/x-pack/solutions/observability/plugins/apm/public/services/rest/call_api.ts b/x-pack/solutions/observability/plugins/apm/public/services/rest/call_api.ts index 44a491bc467ae..101e77c50e141 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/rest/call_api.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/rest/call_api.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { CoreSetup, CoreStart } from '@kbn/core/public'; +import type { CoreSetup, CoreStart } from '@kbn/core/public'; import { isString, startsWith } from 'lodash'; import LRU from 'lru-cache'; import hash from 'object-hash'; import { enableInspectEsQueries } from '@kbn/observability-plugin/public'; -import { FetchOptions } from '../../../common/fetch_options'; +import type { FetchOptions } from '../../../common/fetch_options'; function fetchOptionsWithDebug(fetchOptions: FetchOptions, inspectableEsQueriesEnabled: boolean) { const debugEnabled = diff --git a/x-pack/solutions/observability/plugins/apm/public/services/rest/create_call_apm_api.ts b/x-pack/solutions/observability/plugins/apm/public/services/rest/create_call_apm_api.ts index 0964517ef18b5..ae514eb5f5de9 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/rest/create_call_apm_api.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/rest/create_call_apm_api.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreSetup, CoreStart } from '@kbn/core/public'; +import type { CoreSetup, CoreStart } from '@kbn/core/public'; import type { ClientRequestParamsOf, ReturnOf, @@ -13,9 +13,10 @@ import type { ServerRouteRepository, } from '@kbn/server-route-repository'; import { formatRequest } from '@kbn/server-route-repository-utils'; -import { InspectResponse } from '@kbn/observability-plugin/typings/common'; -import { FetchOptions } from '../../../common/fetch_options'; -import { CallApi, callApi } from './call_api'; +import type { InspectResponse } from '@kbn/observability-plugin/typings/common'; +import type { FetchOptions } from '../../../common/fetch_options'; +import type { CallApi } from './call_api'; +import { callApi } from './call_api'; import type { APMServerRouteRepository, APIEndpoint } from '../../../server'; export type APMClientOptions = Omit & { diff --git a/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_client.ts b/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_client.ts index 3f9f870fb3ffe..5a11c4c610af3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_client.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_client.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; -import { +import type { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; +import type { ITelemetryClient, SearchQuerySubmittedParams, - TelemetryEventTypes, EntityInventoryAddDataParams, EmptyStateClickParams, } from './types'; +import { TelemetryEventTypes } from './types'; export class TelemetryClient implements ITelemetryClient { constructor(private analytics: AnalyticsServiceSetup) {} diff --git a/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_events.ts b/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_events.ts index 605c326f7cb09..1dbb27b60ad5f 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_events.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_events.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { TelemetryEventTypes, TelemetryEvent } from './types'; +import type { TelemetryEvent } from './types'; +import { TelemetryEventTypes } from './types'; const searchQuerySubmittedEventType: TelemetryEvent = { eventType: TelemetryEventTypes.SEARCH_QUERY_SUBMITTED, diff --git a/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_service.ts b/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_service.ts index d5dfa09c1c9c6..a214de3d01980 100644 --- a/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_service.ts +++ b/x-pack/solutions/observability/plugins/apm/public/services/telemetry/telemetry_service.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; -import { TelemetryServiceSetupParams, ITelemetryClient, TelemetryEventParams } from './types'; +import type { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; +import type { TelemetryServiceSetupParams, ITelemetryClient, TelemetryEventParams } from './types'; import { apmTelemetryEventBasedTypes } from './telemetry_events'; import { TelemetryClient } from './telemetry_client'; diff --git a/x-pack/solutions/observability/plugins/apm/public/set_help_extension.ts b/x-pack/solutions/observability/plugins/apm/public/set_help_extension.ts index 0b79f81cce2d2..c367aa909994d 100644 --- a/x-pack/solutions/observability/plugins/apm/public/set_help_extension.ts +++ b/x-pack/solutions/observability/plugins/apm/public/set_help_extension.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { getUpgradeAssistantHref } from './components/shared/links/kibana'; export function setHelpExtension({ chrome, http }: CoreStart) { diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_instructions.test.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_instructions.test.tsx index 035844cfc02a7..6d8c50a43a181 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_instructions.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_instructions.test.tsx @@ -5,7 +5,8 @@ * 2.0. */ import { render } from '@testing-library/react'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { AgentConfigInstructions } from './agent_config_instructions'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import * as getCommands from './commands/get_apm_agent_commands'; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_table.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_table.tsx index b06ad4be25dae..922fafeef944e 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_table.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/agent_config_table.tsx @@ -8,7 +8,8 @@ import React from 'react'; import type { ValuesType } from 'utility-types'; import { get } from 'lodash'; -import { EuiBasicTable, EuiText, EuiBasicTableColumn } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; export function AgentConfigurationTable({ diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/config_agent.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/config_agent.stories.tsx index 99c4ad9e55005..0abcb47787c8a 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/config_agent.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/config_agent.stories.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import { Story } from '@storybook/react'; -import { HttpStart } from '@kbn/core/public'; +import type { Story } from '@storybook/react'; +import type { HttpStart } from '@kbn/core/public'; import React from 'react'; import { POLICY_ELASTIC_AGENT_ON_CLOUD } from '../../../common/fleet'; import TutorialConfigAgent from '.'; -import { APIReturnType } from '../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../services/rest/create_call_apm_api'; export type APIResponseType = APIReturnType<'GET /internal/apm/fleet/agents'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.test.ts b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.test.ts index a8d03e651e5b7..69ad04a6c4f12 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.test.ts +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { getPolicyOptions } from './get_policy_options'; -import { APIReturnType } from '../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../services/rest/create_call_apm_api'; type APIResponseType = APIReturnType<'GET /internal/apm/fleet/agents'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.ts b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.ts index 2efc9cc463699..ceefc6367a4d8 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.ts +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/get_policy_options.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; import { POLICY_ELASTIC_AGENT_ON_CLOUD } from '../../../common/fleet'; -import { APIResponseType } from '.'; +import type { APIResponseType } from '.'; const DEFAULT_STANDALONE_CONFIG_LABEL = i18n.translate( 'xpack.apm.tutorial.agent_config.defaultStandaloneConfig', diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.test.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.test.tsx index 7ec6aecdc540f..137c7757b84eb 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.test.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { fireEvent, render, screen, within } from '@testing-library/react'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import React from 'react'; import { expectTextsInDocument, expectTextsNotInDocument } from '../../utils/test_helpers'; import TutorialConfigAgent from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.tsx index 129f15a3355cd..f87e2448bd9e3 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/index.tsx @@ -6,12 +6,13 @@ */ import { EuiLoadingSpinner } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import React, { useEffect, useMemo, useState } from 'react'; import styled from '@emotion/styled'; -import { APIReturnType } from '../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../services/rest/create_call_apm_api'; import { AgentConfigInstructions } from './agent_config_instructions'; -import { getPolicyOptions, PolicyOption } from './get_policy_options'; +import type { PolicyOption } from './get_policy_options'; +import { getPolicyOptions } from './get_policy_options'; import { PolicySelector } from './policy_selector'; export type APIResponseType = APIReturnType<'GET /internal/apm/fleet/agents'>; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/opentelemetry_instructions.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/opentelemetry_instructions.tsx index 4584326f2f3f2..ad46a12e4c34b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/opentelemetry_instructions.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/opentelemetry_instructions.tsx @@ -7,17 +7,17 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBasicTable, EuiLink, EuiSpacer, EuiText, - EuiBasicTableColumn, EuiButtonIcon, copyToClipboard, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; interface Props { apmServerUrl?: string; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/policy_selector.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/policy_selector.tsx index efea6de1bb59d..f006bc53f31ec 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/policy_selector.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/policy_selector.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiComboBox, EuiComboBoxOptionOption, EuiFormRow, EuiLink, EuiText } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox, EuiFormRow, EuiLink, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { groupBy } from 'lodash'; import React from 'react'; -import { PolicyOption } from './get_policy_options'; +import type { PolicyOption } from './get_policy_options'; interface Props { options: PolicyOption[]; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/rum_script.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/rum_script.tsx index 704f42e7be594..e2a2734a45d02 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/rum_script.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/config_agent/rum_script.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import React from 'react'; import TutorialConfigAgent from '.'; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/index.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/index.tsx index 6796c6576ab03..736446e07ae6c 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/index.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/index.tsx @@ -16,10 +16,10 @@ import { EuiSpacer, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import React, { useEffect, useState } from 'react'; import styled from '@emotion/styled'; -import { APIReturnType } from '../../services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../services/rest/create_call_apm_api'; interface Props { http: HttpStart; diff --git a/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/tutorial_fleet_instructions.stories.tsx b/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/tutorial_fleet_instructions.stories.tsx index b5d0857042812..f17ec387c0e9b 100644 --- a/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/tutorial_fleet_instructions.stories.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/tutorial/tutorial_fleet_instructions/tutorial_fleet_instructions.stories.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { Story } from '@storybook/react'; +import type { Story } from '@storybook/react'; import React from 'react'; -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import TutorialFleetInstructions from '.'; interface Args { diff --git a/x-pack/solutions/observability/plugins/apm/public/update_badge.ts b/x-pack/solutions/observability/plugins/apm/public/update_badge.ts index a81a3181008d8..f4102c3a750c0 100644 --- a/x-pack/solutions/observability/plugins/apm/public/update_badge.ts +++ b/x-pack/solutions/observability/plugins/apm/public/update_badge.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; export function setReadonlyBadge({ application, chrome }: CoreStart) { const canSave = application.capabilities.apm.save; diff --git a/x-pack/solutions/observability/plugins/apm/public/utils/test_helpers.tsx b/x-pack/solutions/observability/plugins/apm/public/utils/test_helpers.tsx index a5d6f67829081..331dba862fd42 100644 --- a/x-pack/solutions/observability/plugins/apm/public/utils/test_helpers.tsx +++ b/x-pack/solutions/observability/plugins/apm/public/utils/test_helpers.tsx @@ -9,13 +9,14 @@ // eslint-disable-next-line import/no-extraneous-dependencies import { render, waitFor } from '@testing-library/react'; +import type { MountRendererProps, ReactWrapper } from 'enzyme'; // eslint-disable-next-line import/no-extraneous-dependencies -import { mount, MountRendererProps, ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; // eslint-disable-next-line import/no-extraneous-dependencies import enzymeToJson from 'enzyme-to-json'; -import { Location } from 'history'; +import type { Location } from 'history'; import moment from 'moment'; -import { Moment } from 'moment-timezone'; +import type { Moment } from 'moment-timezone'; import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/apm/scripts/create_functional_tests_archive/index.ts b/x-pack/solutions/observability/plugins/apm/scripts/create_functional_tests_archive/index.ts index 48fdb06a99c38..5846b3b1bc6cb 100644 --- a/x-pack/solutions/observability/plugins/apm/scripts/create_functional_tests_archive/index.ts +++ b/x-pack/solutions/observability/plugins/apm/scripts/create_functional_tests_archive/index.ts @@ -10,7 +10,7 @@ import { execSync } from 'child_process'; import moment from 'moment'; import path from 'path'; import fs from 'fs'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { REPO_ROOT } from '@kbn/repo-info'; import { getEsClient } from '../shared/get_es_client'; import { parseIndexUrl } from '../shared/parse_index_url'; diff --git a/x-pack/solutions/observability/plugins/apm/scripts/diagnostics_bundle/diagnostics_bundle.ts b/x-pack/solutions/observability/plugins/apm/scripts/diagnostics_bundle/diagnostics_bundle.ts index 271a990382358..10d55aa2000e1 100644 --- a/x-pack/solutions/observability/plugins/apm/scripts/diagnostics_bundle/diagnostics_bundle.ts +++ b/x-pack/solutions/observability/plugins/apm/scripts/diagnostics_bundle/diagnostics_bundle.ts @@ -9,9 +9,10 @@ import { Client } from '@elastic/elasticsearch'; import fs from 'fs/promises'; -import axios, { AxiosRequestConfig } from 'axios'; +import type { AxiosRequestConfig } from 'axios'; +import axios from 'axios'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { APIReturnType } from '../../public/services/rest/create_call_apm_api'; +import type { APIReturnType } from '../../public/services/rest/create_call_apm_api'; import { getDiagnosticsBundle } from '../../server/routes/diagnostics/get_diagnostics_bundle'; type DiagnosticsBundle = APIReturnType<'GET /internal/apm/diagnostics'>; diff --git a/x-pack/solutions/observability/plugins/apm/scripts/infer_route_return_types/index.ts b/x-pack/solutions/observability/plugins/apm/scripts/infer_route_return_types/index.ts index 0130e6512bdee..05223871b5a14 100644 --- a/x-pack/solutions/observability/plugins/apm/scripts/infer_route_return_types/index.ts +++ b/x-pack/solutions/observability/plugins/apm/scripts/infer_route_return_types/index.ts @@ -5,19 +5,15 @@ * 2.0. */ -import { - Project, - Node, +import type { FunctionDeclaration, FunctionExpression, ArrowFunction, MethodDeclaration, SourceFile, - SyntaxKind, PropertyAssignment, - ts, - TypeFormatFlags, } from 'ts-morph'; +import { Project, Node, SyntaxKind, ts, TypeFormatFlags } from 'ts-morph'; import Path from 'path'; import { execSync } from 'child_process'; import { argv } from 'yargs'; diff --git a/x-pack/solutions/observability/plugins/apm/scripts/shared/get_http_auth.ts b/x-pack/solutions/observability/plugins/apm/scripts/shared/get_http_auth.ts index 9a51000228d08..3685b06903078 100644 --- a/x-pack/solutions/observability/plugins/apm/scripts/shared/get_http_auth.ts +++ b/x-pack/solutions/observability/plugins/apm/scripts/shared/get_http_auth.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { KibanaConfig } from './read_kibana_config'; +import type { KibanaConfig } from './read_kibana_config'; export const getHttpAuth = (config: KibanaConfig) => { const httpAuth = diff --git a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_downstream_dependencies.ts b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_downstream_dependencies.ts index 478c96e77e568..8cc6e939429a0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_downstream_dependencies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_downstream_dependencies.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import type { FunctionRegistrationParameters } from '.'; -import { RandomSampler } from '../lib/helpers/get_random_sampler'; +import type { RandomSampler } from '../lib/helpers/get_random_sampler'; import { getAssistantDownstreamDependencies } from '../routes/assistant_functions/get_apm_downstream_dependencies'; interface DownstreamDependenciesFunctionRegistrationParams extends FunctionRegistrationParameters { diff --git a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_services_list.ts b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_services_list.ts index 20faf469a112e..70043b4f28444 100644 --- a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_services_list.ts +++ b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_services_list.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { FunctionRegistrationParameters } from '.'; +import type { FunctionRegistrationParameters } from '.'; import { ServiceHealthStatus } from '../../common/service_health_status'; import { getApmAlertsClient } from '../lib/helpers/get_apm_alerts_client'; import { getMlClient } from '../lib/helpers/get_ml_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_timeseries.ts b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_timeseries.ts index 63bdbd422c658..4015bfb95bb81 100644 --- a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/get_apm_timeseries.ts @@ -4,11 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { FromSchema } from 'json-schema-to-ts'; +import type { FromSchema } from 'json-schema-to-ts'; import { omit } from 'lodash'; import { FunctionVisibility } from '@kbn/observability-ai-assistant-plugin/common'; -import { FunctionRegistrationParameters } from '.'; -import { ApmTimeseries, getApmTimeseries } from '../routes/assistant_functions/get_apm_timeseries'; +import type { FunctionRegistrationParameters } from '.'; +import type { ApmTimeseries } from '../routes/assistant_functions/get_apm_timeseries'; +import { getApmTimeseries } from '../routes/assistant_functions/get_apm_timeseries'; import { NON_EMPTY_STRING } from '../utils/non_empty_string_ref'; const parameters = { diff --git a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/index.ts b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/index.ts index 2354d85d5f958..9c98e1f513fca 100644 --- a/x-pack/solutions/observability/plugins/apm/server/assistant_functions/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/assistant_functions/index.ts @@ -14,7 +14,7 @@ import type { import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import type { APMConfig } from '..'; import type { ApmFeatureFlags } from '../../common/apm_feature_flags'; -import { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; import { getApmEventClient } from '../lib/helpers/get_apm_event_client'; import { getRandomSampler } from '../lib/helpers/get_random_sampler'; import type { diff --git a/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.test.ts b/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.test.ts index c7b48846520bd..6cfc4096c3564 100644 --- a/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.test.ts @@ -8,7 +8,7 @@ import type { GetDeprecationsContext, IScopedClusterClient, CoreSetup } from '@kbn/core/server'; import { elasticsearchServiceMock, loggingSystemMock } from '@kbn/core/server/mocks'; import { getDeprecationsInfo } from './apm_user_role'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; let context: GetDeprecationsContext; let esClient: jest.Mocked; diff --git a/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.ts b/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.ts index d99e6a0a39f94..7336e6267115f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.ts +++ b/x-pack/solutions/observability/plugins/apm/server/deprecations/apm_user_role.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { SecurityGetRoleMappingResponse, SecurityGetUserResponse, } from '@elastic/elasticsearch/lib/api/types'; diff --git a/x-pack/solutions/observability/plugins/apm/server/deprecations/index.ts b/x-pack/solutions/observability/plugins/apm/server/deprecations/index.ts index 1d3dd0b3a5b57..341a4741247ad 100644 --- a/x-pack/solutions/observability/plugins/apm/server/deprecations/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/deprecations/index.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreSetup, Logger } from '@kbn/core/server'; -import { SecurityPluginSetup } from '@kbn/security-plugin/server'; +import type { CoreSetup, Logger } from '@kbn/core/server'; +import type { SecurityPluginSetup } from '@kbn/security-plugin/server'; import { getDeprecationsInfo as getApmUserRoleDeprecationsInfo } from './apm_user_role'; export interface DeprecationApmDeps { diff --git a/x-pack/solutions/observability/plugins/apm/server/feature.ts b/x-pack/solutions/observability/plugins/apm/server/feature.ts index 6e129d298e0a7..39a7618bff95d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/feature.ts +++ b/x-pack/solutions/observability/plugins/apm/server/feature.ts @@ -6,9 +6,9 @@ */ import { i18n } from '@kbn/i18n'; -import { LicenseType } from '@kbn/licensing-plugin/common/types'; +import type { LicenseType } from '@kbn/licensing-plugin/common/types'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { +import type { LicensingPluginSetup, LicensingApiRequestHandlerContext, } from '@kbn/licensing-plugin/server'; @@ -16,7 +16,8 @@ import { import { APM_INDEX_SETTINGS_SAVED_OBJECT_TYPE } from '@kbn/apm-data-access-plugin/server/saved_objects/apm_indices'; import { ApmRuleType } from '@kbn/rule-data-utils'; import { ALERTING_FEATURE_ID } from '@kbn/alerting-plugin/common'; -import { KibanaFeatureConfig, KibanaFeatureScope } from '@kbn/features-plugin/common'; +import type { KibanaFeatureConfig } from '@kbn/features-plugin/common'; +import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import { APM_SERVER_FEATURE_ID } from '../common/rules/apm_rule_types'; const alertingFeatures = Object.values(ApmRuleType).map((ruleTypeId) => ({ diff --git a/x-pack/solutions/observability/plugins/apm/server/index.ts b/x-pack/solutions/observability/plugins/apm/server/index.ts index f3ebcec582a46..a37f453e7112a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/index.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { offeringBasedSchema, schema, TypeOf } from '@kbn/config-schema'; -import { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import { offeringBasedSchema, schema } from '@kbn/config-schema'; +import type { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; import { maxSuggestions } from '@kbn/observability-plugin/common'; import { SearchAggregatedTransactionSetting } from '../common/aggregated_transactions'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/anomaly_search.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/anomaly_search.ts index 4192d35d796f3..bd1f2a05fbf3f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/anomaly_search.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/anomaly_search.ts @@ -6,7 +6,7 @@ */ import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; -import { MlClient } from '../helpers/get_ml_client'; +import type { MlClient } from '../helpers/get_ml_client'; export const ML_SERVICE_NAME_FIELD = 'partition_field_value'; export const ML_TRANSACTION_TYPE_FIELD = 'by_field_value'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_anomaly_query.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_anomaly_query.ts index 344a6cc416497..dce5b5b86a3ae 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_anomaly_query.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_anomaly_query.ts @@ -5,12 +5,10 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { termQuery, termsQuery } from '@kbn/observability-plugin/server'; -import { - AnomalyDetectorType, - getAnomalyDetectorIndex, -} from '../../../common/anomaly_detection/apm_ml_detectors'; +import type { AnomalyDetectorType } from '../../../common/anomaly_detection/apm_ml_detectors'; +import { getAnomalyDetectorIndex } from '../../../common/anomaly_detection/apm_ml_detectors'; export function apmMlAnomalyQuery({ serviceName, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_jobs_query.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_jobs_query.ts index 2720dbdecfe1c..f783d545e672b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_jobs_query.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/apm_ml_jobs_query.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; -import { ApmMlJob } from '../../../common/anomaly_detection/apm_ml_job'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { ApmMlJob } from '../../../common/anomaly_detection/apm_ml_job'; export function apmMlJobsQuery(jobs: ApmMlJob[]) { if (!jobs.length) { diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts index fd456d6b203d4..9a557247b551d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/create_anomaly_detection_jobs.ts @@ -6,19 +6,19 @@ */ import Boom from '@hapi/boom'; -import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import { snakeCase } from 'lodash'; import moment from 'moment'; import { v4 as uuidv4 } from 'uuid'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { ElasticsearchCapabilities } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchCapabilities } from '@kbn/core-elasticsearch-server'; import { ML_ERRORS } from '../../../common/anomaly_detection'; import { METRICSET_NAME, PROCESSOR_EVENT } from '../../../common/es_fields/apm'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { environmentQuery } from '../../../common/utils/environment_query'; import { withApmSpan } from '../../utils/with_apm_span'; -import { MlClient } from '../helpers/get_ml_client'; +import type { MlClient } from '../helpers/get_ml_client'; import { APM_ML_JOB_GROUP, ML_MODULE_ID_APM_TRANSACTION } from './constants'; import { getAnomalyDetectionJobs } from './get_anomaly_detection_jobs'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_detection_jobs.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_detection_jobs.ts index 46b87f6247dcb..00bc519a2798d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_detection_jobs.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_detection_jobs.ts @@ -6,7 +6,7 @@ */ import Boom from '@hapi/boom'; import { ML_ERRORS } from '../../../common/anomaly_detection'; -import { MlClient } from '../helpers/get_ml_client'; +import type { MlClient } from '../helpers/get_ml_client'; import { getMlJobsWithAPMGroup } from './get_ml_jobs_with_apm_group'; export function getAnomalyDetectionJobs(mlClient?: MlClient) { diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_timeseries.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_timeseries.ts index 335ee0005911c..32da4b6637228 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_anomaly_timeseries.ts @@ -9,7 +9,7 @@ import type { Logger } from '@kbn/logging'; import { compact, keyBy } from 'lodash'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { parseInterval } from '@kbn/data-plugin/common'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { apmMlAnomalyQuery } from './apm_ml_anomaly_query'; import { AnomalyDetectorType, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts index c0070fbaa690c..63d7e9f49036c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { DATAFEED_STATE, JOB_STATE } from '@kbn/ml-plugin/common'; -import { MlAnomalyDetectors } from '@kbn/ml-plugin/server'; -import { ApmMlJob } from '../../../common/anomaly_detection/apm_ml_job'; -import { Environment } from '../../../common/environment_rt'; +import type { DATAFEED_STATE, JOB_STATE } from '@kbn/ml-plugin/common'; +import type { MlAnomalyDetectors } from '@kbn/ml-plugin/server'; +import type { ApmMlJob } from '../../../common/anomaly_detection/apm_ml_job'; +import type { Environment } from '../../../common/environment_rt'; import { withApmSpan } from '../../utils/with_apm_span'; import { APM_ML_JOB_GROUP } from './constants'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/index.ts index b0e2d99fefd5b..236c9c4f77c35 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/index.ts @@ -6,9 +6,10 @@ */ import { merge } from 'lodash'; -import { Logger } from '@kbn/core/server'; -import { tasks, TelemetryTaskExecutorParams } from './tasks'; -import { APMDataTelemetry } from '../types'; +import type { Logger } from '@kbn/core/server'; +import type { TelemetryTaskExecutorParams } from './tasks'; +import { tasks } from './tasks'; +import type { APMDataTelemetry } from '../types'; type CollectTelemetryParams = TelemetryTaskExecutorParams & { isProd: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts index 7bba841a8dee5..c6689a30c7a1f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.test.ts @@ -9,7 +9,7 @@ import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { tasks } from './tasks'; import { SERVICE_NAME, SERVICE_ENVIRONMENT, AT_TIMESTAMP } from '../../../../common/es_fields/apm'; -import { IndicesStatsResponse } from '../telemetry_client'; +import type { IndicesStatsResponse } from '../telemetry_client'; describe('data telemetry collection tasks', () => { const indices = { diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts index 1ab2a6d44969b..3a8747a65936a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/collect_data_telemetry/tasks.ts @@ -9,7 +9,7 @@ import { getKqlFieldNamesFromExpression } from '@kbn/es-query'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { createHash } from 'crypto'; import { flatten, merge, pickBy, sortBy, sum, uniq, without } from 'lodash'; -import { SavedObjectsClient } from '@kbn/core/server'; +import type { SavedObjectsClient } from '@kbn/core/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { AGENT_NAMES, @@ -57,14 +57,14 @@ import { TRANSACTION_TYPE, USER_AGENT_ORIGINAL, } from '../../../../common/es_fields/apm'; +import type { SavedServiceGroup } from '../../../../common/service_groups'; import { APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, MAX_NUMBER_OF_SERVICE_GROUPS, - SavedServiceGroup, } from '../../../../common/service_groups'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; -import { +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { APMDataTelemetry, APMPerService, APMTelemetry, @@ -74,12 +74,10 @@ import { MetricSupportingRollUp, } from '../types'; import { APM_AGENT_CONFIGURATION_INDEX } from '../../../routes/settings/apm_indices/apm_system_index_constants'; -import { IndicesStatsResponse, TelemetryClient } from '../telemetry_client'; +import type { IndicesStatsResponse, TelemetryClient } from '../telemetry_client'; import { RollupInterval } from '../../../../common/rollup'; -import { - APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE, - SavedApmCustomDashboard, -} from '../../../../common/custom_dashboards'; +import type { SavedApmCustomDashboard } from '../../../../common/custom_dashboards'; +import { APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../../../common/custom_dashboards'; type ISavedObjectsClient = Pick; const TIME_RANGES = ['1d', 'all'] as const; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/index.ts index 5c976c8a499a7..5a88e26394490 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/index.ts @@ -5,25 +5,21 @@ * 2.0. */ -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { - CoreSetup, - Logger, - SavedObjectsClientContract, - SavedObjectsErrorHelpers, -} from '@kbn/core/server'; -import { +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import type { CoreSetup, Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import { SavedObjectsErrorHelpers } from '@kbn/core/server'; +import type { TaskManagerSetupContract, TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; -import { APMDataAccessConfig } from '@kbn/apm-data-access-plugin/server'; +import type { APMDataAccessConfig } from '@kbn/apm-data-access-plugin/server'; import { APM_TELEMETRY_SAVED_OBJECT_ID, APM_TELEMETRY_SAVED_OBJECT_TYPE, } from '../../../common/apm_saved_object_constants'; import { getInternalSavedObjectsClient } from '../helpers/get_internal_saved_objects_client'; import { collectDataTelemetry } from './collect_data_telemetry'; -import { APMUsage } from './types'; +import type { APMUsage } from './types'; import { apmSchema } from './schema'; import { getTelemetryClient } from './telemetry_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/schema.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/schema.ts index d351cc40ae721..68706353eb026 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/schema.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/schema.ts @@ -5,8 +5,13 @@ * 2.0. */ -import { MakeSchemaFrom } from '@kbn/usage-collection-plugin/server'; -import { AggregatedTransactionsCounts, APMUsage, APMPerService, DataStreamCombined } from './types'; +import type { MakeSchemaFrom } from '@kbn/usage-collection-plugin/server'; +import type { + AggregatedTransactionsCounts, + APMUsage, + APMPerService, + DataStreamCombined, +} from './types'; import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; const aggregatedTransactionCountSchema: MakeSchemaFrom = { diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/telemetry_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/telemetry_client.ts index afd3ec0cc87e4..80548a50e15fc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/telemetry_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/telemetry_client.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { estypes } from '@elastic/elasticsearch'; -import { CoreSetup } from '@kbn/core/server'; -import { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; +import type { estypes } from '@elastic/elasticsearch'; +import type { CoreSetup } from '@kbn/core/server'; +import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; import { unwrapEsResponse } from '@kbn/observability-plugin/server'; interface RequiredSearchParams { diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/types.ts b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/types.ts index 757b8bad533ba..3ab1eb0d5b767 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/types.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/apm_telemetry/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import type { AgentName } from '@kbn/elastic-agent-utils'; -import { RollupInterval } from '../../../common/rollup'; +import type { RollupInterval } from '../../../common/rollup'; export interface TimeframeMap { '1d': number; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts b/x-pack/solutions/observability/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts index 32c805b330327..c5d05a928b139 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/connections/exclude_rum_exit_spans_query.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { AGENT_NAME } from '../../../common/es_fields/apm'; import { RUM_AGENT_NAMES } from '../../../common/agent_name'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact.ts b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact.ts index f81999afbb18c..e1eeaad5cb899 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact.ts @@ -6,7 +6,10 @@ */ import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; -import { ConnectionStatsItem, ConnectionStatsItemWithImpact } from '../../../../common/connections'; +import type { + ConnectionStatsItem, + ConnectionStatsItemWithImpact, +} from '../../../../common/connections'; export function getConnectionStatsItemsWithRelativeImpact( items: ConnectionStatsItem[] diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts index cbcad6dea5baf..4263270f20474 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_destination_map.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import objectHash from 'object-hash'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; import { ENVIRONMENT_NOT_DEFINED } from '../../../../common/environment_filter_values'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { AGENT_NAME, EVENT_OUTCOME, @@ -25,10 +25,11 @@ import { SPAN_TYPE, } from '../../../../common/es_fields/apm'; import { withApmSpan } from '../../../utils/with_apm_span'; -import { Node, NodeType } from '../../../../common/connections'; +import type { Node } from '../../../../common/connections'; +import { NodeType } from '../../../../common/connections'; import { excludeRumExitSpansQuery } from '../exclude_rum_exit_spans_query'; -import { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../helpers/get_random_sampler'; +import type { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../helpers/get_random_sampler'; type Destination = { dependencyName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts index 7c5977ddbf854..a583e4de02c92 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/get_stats.ts @@ -7,9 +7,9 @@ import { sum } from 'lodash'; import objectHash from 'object-hash'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { rangeQuery } from '@kbn/observability-plugin/server'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; import { ENVIRONMENT_NOT_DEFINED } from '../../../../common/environment_filter_values'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; @@ -30,7 +30,7 @@ import { NodeType } from '../../../../common/connections'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; import { excludeRumExitSpansQuery } from '../exclude_rum_exit_spans_query'; -import { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; import { getDocumentTypeFilterForServiceDestinationStatistics } from '../../helpers/spans/get_is_using_service_destination_metrics'; const MAX_ITEMS = 1500; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts index 328a9cb98523c..ad0eb8b9ab95c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/connections/get_connection_stats/index.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { merge } from 'lodash'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { joinByKey } from '../../../../common/utils/join_by_key'; import { getStats } from './get_stats'; import { getDestinationMap } from './get_destination_map'; import { calculateThroughputWithRange } from '../../helpers/calculate_throughput'; import { withApmSpan } from '../../../utils/with_apm_span'; -import { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../helpers/get_random_sampler'; +import type { APMEventClient } from '../../helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../helpers/get_random_sampler'; export function getConnectionStats({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/deprecations/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/deprecations/index.ts index f6e75bf5aa301..ae3b1fc00d6be 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/deprecations/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/deprecations/index.ts @@ -8,7 +8,7 @@ import { errors } from '@elastic/elasticsearch'; import Boom from '@hapi/boom'; import { i18n } from '@kbn/i18n'; -import { DeprecationsDetails, DocLinksServiceSetup } from '@kbn/core/server'; +import type { DeprecationsDetails, DocLinksServiceSetup } from '@kbn/core/server'; function deprecationError( title: string, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client.ts index 6754d0b75dc6d..108e738b15dd6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { KibanaRequest } from '@kbn/core/server'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { entitiesAliasPattern, ENTITY_LATEST, ENTITY_HISTORY } from '@kbn/entities-schema'; import { unwrapEsResponse } from '@kbn/observability-plugin/common/utils/unwrap_es_response'; -import { +import type { MsearchMultisearchBody, MsearchMultisearchHeader, } from '@elastic/elasticsearch/lib/api/types'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client.ts index 7a9274e1f3e77..e5cc51084cd9b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; -import { APMRouteHandlerResources } from '../../../../routes/apm_routes/register_apm_server_routes'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { APMRouteHandlerResources } from '../../../../routes/apm_routes/register_apm_server_routes'; type InfraMetricsSearchParams = Omit & { size: number; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_internal_es_client/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_internal_es_client/index.ts index 272f482cdc8eb..e65c8b21b3f31 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_internal_es_client/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/create_es_client/create_internal_es_client/index.ts @@ -8,7 +8,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { unwrapEsResponse } from '@kbn/observability-plugin/server'; import type { ESSearchResponse, ESSearchRequest } from '@kbn/es-types'; -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { callAsyncWithDebug, getDebugBody, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.test.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.test.ts index 2479cad9f213b..a45c754c9a836 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.test.ts @@ -12,7 +12,10 @@ import type { KibanaRequest, SavedObjectsClientContract, } from '@kbn/core/server'; -import { AlertsClient, RuleRegistryPluginStartContract } from '@kbn/rule-registry-plugin/server'; +import type { + AlertsClient, + RuleRegistryPluginStartContract, +} from '@kbn/rule-registry-plugin/server'; describe('get_apm_alerts_client', () => { let ruleRegistryMock: jest.Mocked; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.ts index fb519e2ef859f..b8a2e21316723 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_alerts_client.ts @@ -6,11 +6,11 @@ */ import { isEmpty } from 'lodash'; -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; -import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; -import { DataTier } from '@kbn/observability-shared-plugin/common'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import type { DataTier } from '@kbn/observability-shared-plugin/common'; import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { getDataTierFilterCombined } from '@kbn/apm-data-access-plugin/server/utils'; import { APM_ALERTING_RULE_TYPE_IDS } from '../../../common/alerting/config/apm_alerting_feature_ids'; import type { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_data_access_services.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_data_access_services.ts index 176507e6e3456..6484eb1ad3603 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_data_access_services.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_data_access_services.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ApmDataAccessServices, APMEventClient } from '@kbn/apm-data-access-plugin/server'; -import { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; +import type { ApmDataAccessServices, APMEventClient } from '@kbn/apm-data-access-plugin/server'; +import type { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; export async function getApmDataAccessServices({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_event_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_event_client.ts index 8d2f61a20500d..f595e2b4b7849 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_event_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_apm_event_client.ts @@ -6,11 +6,11 @@ */ import { UI_SETTINGS } from '@kbn/data-plugin/common'; -import { DataTier } from '@kbn/observability-shared-plugin/common'; +import type { DataTier } from '@kbn/observability-shared-plugin/common'; import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; import { APMEventClient } from './create_es_client/create_apm_event_client'; import { withApmSpan } from '../../utils/with_apm_span'; -import { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; +import type { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; import { inspectableEsQueriesMap } from '../../routes/apm_routes/register_apm_server_routes'; export async function getApmEventClient({ diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.test.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.test.ts index d522eec585a3a..301d7f7422d5f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { APMError } from '../../../typings/es_schemas/ui/apm_error'; +import type { APMError } from '../../../typings/es_schemas/ui/apm_error'; import { NOT_AVAILABLE_LABEL } from '../../../common/i18n'; import { getErrorName } from './get_error_name'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.ts index 5d4977a73b42f..566900d1efc29 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_error_name.ts @@ -6,8 +6,8 @@ */ import { NOT_AVAILABLE_LABEL } from '../../../common/i18n'; -import { Maybe } from '../../../typings/common'; -import { APMError } from '../../../typings/es_schemas/ui/apm_error'; +import type { Maybe } from '../../../typings/common'; +import type { APMError } from '../../../typings/es_schemas/ui/apm_error'; export function getErrorName({ error, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_es_capabilities.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_es_capabilities.ts index ab262270075f0..b64081e72081f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_es_capabilities.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_es_capabilities.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; +import type { APMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; export async function getESCapabilities({ core }: APMRouteHandlerResources) { const es = (await core.start()).elasticsearch; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_internal_saved_objects_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_internal_saved_objects_client.ts index a69a705b2f374..9566fb9895928 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_internal_saved_objects_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_internal_saved_objects_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/server'; +import type { CoreStart } from '@kbn/core/server'; export async function getInternalSavedObjectsClient(coreStart: CoreStart) { return coreStart.savedObjects.createInternalRepository(); diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_ml_client.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_ml_client.ts index b94a1abd67e2a..81d01981acbe2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_ml_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_ml_client.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { MlAnomalyDetectors, MlMlSystem, MlModules } from '@kbn/ml-plugin/server'; +import type { MlAnomalyDetectors, MlMlSystem, MlModules } from '@kbn/ml-plugin/server'; import { isActivePlatinumLicense } from '../../../common/license_check'; -import { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; +import type { MinimalAPMRouteHandlerResources } from '../../routes/apm_routes/register_apm_server_routes'; export interface MlClient { mlSystem: MlMlSystem; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_random_sampler/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_random_sampler/index.ts index d00dbfbb55589..052f7a6eb4c44 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_random_sampler/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/get_random_sampler/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart, KibanaRequest } from '@kbn/core/server'; +import type { CoreStart, KibanaRequest } from '@kbn/core/server'; import seedrandom from 'seedrandom'; export type RandomSampler = Awaited>; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts index 07ec546196707..7c6ad46b63db2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/spans/get_is_using_service_destination_metrics.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getDocumentTypeFilterForServiceDestinationStatistics } from '@kbn/apm-data-access-plugin/server/utils'; @@ -15,7 +15,7 @@ import { SPAN_DURATION, SPAN_NAME, } from '../../../../common/es_fields/apm'; -import { APMEventClient } from '../create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../create_es_client/create_apm_event_client'; export function getProcessorEventForServiceDestinationStatistics( searchServiceDestinationMetrics: boolean diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transaction_error_rate.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transaction_error_rate.ts index 768a34fee6e5d..3121e4007044f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transaction_error_rate.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transaction_error_rate.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { AggregationsSumAggregation, AggregationsValueCountAggregation, QueryDslQueryContainer, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.test.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.test.ts index 0eecdfea916ea..2c8d32efc3f55 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.test.ts @@ -6,7 +6,8 @@ */ import { getIsUsingTransactionEvents } from './get_is_using_transaction_events'; -import { SearchParamsMock, inspectSearchParams } from '../../../utils/test_helpers'; +import type { SearchParamsMock } from '../../../utils/test_helpers'; +import { inspectSearchParams } from '../../../utils/test_helpers'; import { SearchAggregatedTransactionSetting } from '../../../../common/aggregated_transactions'; const mockResponseNoHits = { diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.ts index 7c2af7a4b5d84..38b8821ef956e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/get_is_using_transaction_events.ts @@ -7,11 +7,11 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { getSearchTransactionsEvents } from '.'; -import { APMEventClient } from '../create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../create_es_client/create_apm_event_client'; import { SearchAggregatedTransactionSetting } from '../../../../common/aggregated_transactions'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; -import { APMConfig } from '../../..'; +import type { APMConfig } from '../../..'; export async function getIsUsingTransactionEvents({ config, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/index.ts b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/index.ts index 8bf8c0cb74a70..b59001418a8f3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/helpers/transactions/index.ts @@ -7,7 +7,7 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { SearchAggregatedTransactionSetting } from '../../../../common/aggregated_transactions'; import { TRANSACTION_DURATION, @@ -16,8 +16,8 @@ import { PARENT_ID, TRANSACTION_DURATION_SUMMARY, } from '../../../../common/es_fields/apm'; -import { APMConfig } from '../../..'; -import { APMEventClient } from '../create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../..'; +import type { APMEventClient } from '../create_es_client/create_apm_event_client'; import { ApmDocumentType } from '../../../../common/document_type'; export { getBackwardCompatibleDocumentTypeFilter } from '@kbn/apm-data-access-plugin/server/utils'; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query.ts b/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query.ts index fdefd174c4350..560b442e1eb90 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { kqlQuery } from '@kbn/observability-plugin/server'; -import { ServiceGroup } from '../../common/service_groups'; +import type { ServiceGroup } from '../../common/service_groups'; export function serviceGroupQuery(serviceGroup?: ServiceGroup | null): QueryDslQueryContainer[] { return serviceGroup ? kqlQuery(serviceGroup?.kuery) : []; diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query_with_overflow.ts b/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query_with_overflow.ts index f0f1009b7d036..12f9a2d9978fc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query_with_overflow.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/service_group_query_with_overflow.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; import { SERVICE_NAME } from '../../common/es_fields/apm'; -import { ServiceGroup } from '../../common/service_groups'; +import type { ServiceGroup } from '../../common/service_groups'; export function serviceGroupWithOverflowQuery( serviceGroup?: ServiceGroup | null diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts b/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts index 57a6bebc8af78..e61b30341c805 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_coldstart_rate.ts @@ -15,7 +15,7 @@ import { } from '../../../common/es_fields/apm'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { Coordinate } from '../../../typings/timeseries'; +import type { Coordinate } from '../../../typings/timeseries'; import { getBackwardCompatibleDocumentTypeFilter, getProcessorEventForTransactions, @@ -27,7 +27,7 @@ import { getTransactionColdstartRateTimeSeries, } from '../helpers/transaction_coldstart_rate'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../helpers/create_es_client/create_apm_event_client'; export async function getColdstartRate({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts b/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts index 4b1ee98c48cd3..6acfc4e548730 100644 --- a/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts +++ b/x-pack/solutions/observability/plugins/apm/server/lib/transaction_groups/get_failed_transaction_rate.ts @@ -4,15 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { ApmServiceTransactionDocumentType } from '../../../common/document_type'; +import type { ApmServiceTransactionDocumentType } from '../../../common/document_type'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; -import { RollupInterval } from '../../../common/rollup'; +import type { RollupInterval } from '../../../common/rollup'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { Coordinate } from '../../../typings/timeseries'; -import { APMEventClient } from '../helpers/create_es_client/create_apm_event_client'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { APMEventClient } from '../helpers/create_es_client/create_apm_event_client'; import { calculateFailedTransactionRate, getFailedTransactionRateTimeSeries, diff --git a/x-pack/solutions/observability/plugins/apm/server/plugin.ts b/x-pack/solutions/observability/plugins/apm/server/plugin.ts index 90a0cb175d6cb..e8e844b799849 100644 --- a/x-pack/solutions/observability/plugins/apm/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/apm/server/plugin.ts @@ -6,11 +6,18 @@ */ import { mappingFromFieldMap } from '@kbn/alerting-plugin/common'; -import { CoreSetup, CoreStart, Logger, Plugin, PluginInitializerContext } from '@kbn/core/server'; +import type { + CoreSetup, + CoreStart, + Logger, + Plugin, + PluginInitializerContext, +} from '@kbn/core/server'; import { alertsLocatorID } from '@kbn/observability-plugin/common'; import { Dataset } from '@kbn/rule-registry-plugin/server'; import { isEmpty, mapValues } from 'lodash'; -import { APMConfig, APM_SERVER_FEATURE_ID } from '.'; +import type { APMConfig } from '.'; +import { APM_SERVER_FEATURE_ID } from '.'; import { apmTutorialCustomIntegration } from '../common/tutorial/tutorials'; import { registerAssistantFunctions } from './assistant_functions'; import { registerDeprecations } from './deprecations'; @@ -23,10 +30,8 @@ import { registerApmRuleTypes, } from './routes/alerts/register_apm_rule_types'; import { getGlobalApmServerRouteRepository } from './routes/apm_routes/get_global_apm_server_route_repository'; -import { - APMRouteHandlerResources, - registerRoutes, -} from './routes/apm_routes/register_apm_server_routes'; +import type { APMRouteHandlerResources } from './routes/apm_routes/register_apm_server_routes'; +import { registerRoutes } from './routes/apm_routes/register_apm_server_routes'; import { getAlertDetailsContextHandler } from './routes/assistant_functions/get_observability_alert_details_context'; import { addApiKeysToEveryPackagePolicyIfMissing } from './routes/fleet/api_keys/add_api_keys_to_policies_if_missing'; import { registerFleetPolicyCallbacks } from './routes/fleet/register_fleet_policy_callbacks'; @@ -41,7 +46,11 @@ import { apmTelemetry, } from './saved_objects'; import { tutorialProvider } from './tutorial'; -import { APMPluginSetup, APMPluginSetupDependencies, APMPluginStartDependencies } from './types'; +import type { + APMPluginSetup, + APMPluginSetupDependencies, + APMPluginStartDependencies, +} from './types'; export class APMPlugin implements Plugin diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/fetch_agents_latest_version.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/fetch_agents_latest_version.ts index e6c92d7af0d7e..c521a86550d98 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/fetch_agents_latest_version.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/fetch_agents_latest_version.ts @@ -5,15 +5,15 @@ * 2.0. */ import Boom from '@hapi/boom'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { isEmpty } from 'lodash'; import fetch from 'node-fetch'; -import { +import type { ElasticApmAgentLatestVersion, OtelAgentLatestVersion, } from '../../../common/agent_explorer'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { ErrorWithStatusCode } from './error_with_status_code'; const MISSING_CONFIGURATION = i18n.translate( diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts index f0ccdd43fabb0..ffd1035d01739 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_instances.ts @@ -16,7 +16,7 @@ import { SERVICE_NODE_NAME, } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; const MAX_NUMBER_OF_SERVICE_NODES = 500; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_url_repository.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_url_repository.ts index 64b18eff090c4..6f8b8e34840fc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_url_repository.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agent_url_repository.ts @@ -6,7 +6,7 @@ */ import { isOpenTelemetryAgentName } from '../../../common/agent_name'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; const agentsDocPageName: Partial> = { go: 'go', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents.ts index b52febfe1a9a1..c4c50b0e81563 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents.ts @@ -6,9 +6,9 @@ */ import { isOpenTelemetryAgentName } from '../../../common/agent_name'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; import { getAgentDocsPageUrl } from './get_agent_url_repository'; import { getAgentsItems } from './get_agents_items'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents_items.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents_items.ts index 21ec876a20282..364251978dec5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents_items.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/get_agents_items.ts @@ -17,9 +17,9 @@ import { SERVICE_NODE_NAME, } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; import { MAX_NUMBER_OF_SERVICES } from '../services/get_services/get_services_items'; interface AggregationParams { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/route.ts index 870d6a3de11f2..31d454efc6626 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_explorer/route.ts @@ -10,12 +10,12 @@ import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { getRandomSampler } from '../../lib/helpers/get_random_sampler'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, probabilityRt, rangeRt } from '../default_api_types'; -import { AgentExplorerAgentsResponse, getAgents } from './get_agents'; -import { AgentExplorerAgentInstancesResponse, getAgentInstances } from './get_agent_instances'; -import { - AgentLatestVersionsResponse, - fetchAgentsLatestVersion, -} from './fetch_agents_latest_version'; +import type { AgentExplorerAgentsResponse } from './get_agents'; +import { getAgents } from './get_agents'; +import type { AgentExplorerAgentInstancesResponse } from './get_agent_instances'; +import { getAgentInstances } from './get_agent_instances'; +import type { AgentLatestVersionsResponse } from './fetch_agents_latest_version'; +import { fetchAgentsLatestVersion } from './fetch_agents_latest_version'; const agentExplorerRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/get_agents_per_service', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/create_agent_key.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/create_agent_key.ts index 7e26020bc26b9..c0597ebf59593 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/create_agent_key.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/create_agent_key.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SecurityCreateApiKeyResponse } from '@elastic/elasticsearch/lib/api/types'; +import type { SecurityCreateApiKeyResponse } from '@elastic/elasticsearch/lib/api/types'; import Boom from '@hapi/boom'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ApmPluginRequestHandlerContext } from '../typings'; import { ClusterPrivilegeType } from '../../../common/privilege_type'; const resource = '*'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys.ts index 120b520a73edc..8340e28f2d54e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ApiKey } from '@kbn/security-plugin-types-common'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ApiKey } from '@kbn/security-plugin-types-common'; +import type { ApmPluginRequestHandlerContext } from '../typings'; export interface AgentKeysResponse { agentKeys: ApiKey[]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys_privileges.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys_privileges.ts index 5c9a9b833b3d6..4543705ef43fc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys_privileges.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/get_agent_keys_privileges.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/server'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { CoreStart } from '@kbn/core/server'; +import type { ApmPluginRequestHandlerContext } from '../typings'; export interface AgentKeysPrivilegesResponse { areApiKeysEnabled: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts index 0f54ab1ea05a8..17317e7e26e31 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/invalidate_agent_key.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ApmPluginRequestHandlerContext } from '../typings'; export interface InvalidateAgentKeyResponse { invalidatedAgentKeys: string[]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/route.ts index 77fe8d6f50182..6d9a22d1c22fe 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/agent_keys/route.ts @@ -7,10 +7,14 @@ import * as t from 'io-ts'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; -import { AgentKeysResponse, getAgentKeys } from './get_agent_keys'; -import { AgentKeysPrivilegesResponse, getAgentKeysPrivileges } from './get_agent_keys_privileges'; -import { invalidateAgentKey, InvalidateAgentKeyResponse } from './invalidate_agent_key'; -import { createAgentKey, CreateAgentKeyResponse } from './create_agent_key'; +import type { AgentKeysResponse } from './get_agent_keys'; +import { getAgentKeys } from './get_agent_keys'; +import type { AgentKeysPrivilegesResponse } from './get_agent_keys_privileges'; +import { getAgentKeysPrivileges } from './get_agent_keys_privileges'; +import type { InvalidateAgentKeyResponse } from './invalidate_agent_key'; +import { invalidateAgentKey } from './invalidate_agent_key'; +import type { CreateAgentKeyResponse } from './create_agent_key'; +import { createAgentKey } from './create_agent_key'; import { privilegesTypeRt } from '../../../common/privilege_type'; const agentKeysRoute = createApmServerRoute({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/alerting_es_client.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/alerting_es_client.ts index 5638acd293538..4c27879a8985e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/alerting_es_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/alerting_es_client.ts @@ -6,8 +6,8 @@ */ import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; -import { RuleExecutorServices } from '@kbn/alerting-plugin/server'; -import { IUiSettingsClient } from '@kbn/core/server'; +import type { RuleExecutorServices } from '@kbn/alerting-plugin/server'; +import type { IUiSettingsClient } from '@kbn/core/server'; import type { DataTier } from '@kbn/observability-shared-plugin/common'; import { getDataTierFilterCombined } from '@kbn/apm-data-access-plugin/server/utils'; import { searchExcludedDataTiers } from '@kbn/observability-plugin/common/ui_settings_keys'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/register_apm_rule_types.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/register_apm_rule_types.ts index ea653b47145a2..8c3876bfaca93 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/register_apm_rule_types.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/register_apm_rule_types.ts @@ -6,13 +6,14 @@ */ import type { AlertsLocatorParams } from '@kbn/observability-plugin/common'; -import { LocatorPublic } from '@kbn/share-plugin/common'; -import { IBasePath, Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; +import type { IBasePath, Logger, SavedObjectsClientContract } from '@kbn/core/server'; import type { AlertingServerSetup, IRuleTypeAlerts } from '@kbn/alerting-plugin/server'; -import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; -import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; -import { legacyExperimentalFieldMap, ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import type { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; +import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { AGENT_NAME, @@ -30,7 +31,7 @@ import { import { registerTransactionDurationRuleType } from './rule_types/transaction_duration/register_transaction_duration_rule_type'; import { registerAnomalyRuleType } from './rule_types/anomaly/register_anomaly_rule_type'; import { registerErrorCountRuleType } from './rule_types/error_count/register_error_count_rule_type'; -import { APMConfig } from '../..'; +import type { APMConfig } from '../..'; import { registerTransactionErrorRateRuleType } from './rule_types/transaction_error_rate/register_transaction_error_rate_rule_type'; export const APM_RULE_TYPE_ALERT_CONTEXT = 'observability.apm'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/route.ts index ca74e8c27e38f..7ef06add1cb19 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/route.ts @@ -7,7 +7,7 @@ import * as t from 'io-ts'; import { jsonRt } from '@kbn/io-ts-utils'; -import { Coordinate } from '../../../typings/timeseries'; +import type { Coordinate } from '../../../typings/timeseries'; import { getTransactionDurationChartPreview } from './rule_types/transaction_duration/get_transaction_duration_chart_preview'; import { getTransactionErrorCountChartPreview } from './rule_types/error_count/get_error_count_chart_preview'; import { getTransactionErrorRateChartPreview } from './rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.test.ts index e5fc1a41abdfd..214392c73ef60 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.test.ts @@ -6,10 +6,10 @@ */ import { registerAnomalyRuleType } from './register_anomaly_rule_type'; import { ML_ANOMALY_SEVERITY } from '@kbn/ml-anomaly-utils/anomaly_severity'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; import * as GetServiceAnomalies from '../../../service_map/get_service_anomalies'; import { createRuleTypeMocks } from '../../test_utils'; -import { ApmMlJob } from '../../../../../common/anomaly_detection/apm_ml_job'; +import type { ApmMlJob } from '../../../../../common/anomaly_detection/apm_ml_job'; import { AnomalyDetectorType, getAnomalyDetectorIndex, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts index 531b5c9558a56..1bc82029eaf3d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/anomaly/register_anomaly_rule_type.ts @@ -5,17 +5,18 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { GetViewInAppRelativeUrlFnOpts, ActionGroupIdsOf, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, RuleTypeState, RuleExecutorOptions, - AlertsClientError, } from '@kbn/alerting-plugin/server'; -import { KibanaRequest, DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; +import type { KibanaRequest } from '@kbn/core/server'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; import datemath from '@kbn/datemath'; import type { ESSearchResponse } from '@kbn/es-types'; import { @@ -31,7 +32,7 @@ import { ALERT_SEVERITY, ApmRuleType, } from '@kbn/rule-data-utils'; -import { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import type { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/common'; import { asyncForEach } from '@kbn/std'; import { compact } from 'lodash'; @@ -46,23 +47,22 @@ import { getEnvironmentEsField, getEnvironmentLabel, } from '../../../../../common/environment_filter_values'; +import type { THRESHOLD_MET_GROUP } from '../../../../../common/rules/apm_rule_types'; import { ANOMALY_ALERT_SEVERITY_TYPES, APM_SERVER_FEATURE_ID, formatAnomalyReason, RULE_TYPES_CONFIG, - THRESHOLD_MET_GROUP, } from '../../../../../common/rules/apm_rule_types'; import { asMutableArray } from '../../../../../common/utils/as_mutable_array'; import { getAlertUrlTransaction } from '../../../../../common/utils/formatters'; import { getMLJobs } from '../../../service_map/get_service_anomalies'; import { apmActionVariables } from '../../action_variables'; -import { - ApmRuleTypeAlertDefinition, - RegisterRuleDependencies, -} from '../../register_apm_rule_types'; +import type { RegisterRuleDependencies } from '../../register_apm_rule_types'; +import { ApmRuleTypeAlertDefinition } from '../../register_apm_rule_types'; import { getServiceGroupFieldsForAnomaly } from './get_service_group_fields_for_anomaly'; -import { anomalyParamsSchema, ApmRuleParamsType } from '../../../../../common/rules/schema'; +import type { ApmRuleParamsType } from '../../../../../common/rules/schema'; +import { anomalyParamsSchema } from '../../../../../common/rules/schema'; import { getAnomalyDetectorIndex, getAnomalyDetectorType, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts index 9366e3f04abbb..38ba2c052aca9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/get_error_count_chart_preview.ts @@ -9,15 +9,13 @@ import { getParsedFilterQuery, rangeQuery, termQuery } from '@kbn/observability- import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { ApmRuleType } from '@kbn/rule-data-utils'; import { ERROR_GROUP_ID, PROCESSOR_EVENT, SERVICE_NAME } from '../../../../../common/es_fields/apm'; -import { AlertParams, PreviewChartResponse } from '../../route'; +import type { AlertParams, PreviewChartResponse } from '../../route'; import { environmentQuery } from '../../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; import { getGroupByTerms } from '../utils/get_groupby_terms'; import { getAllGroupByFields } from '../../../../../common/rules/get_all_groupby_fields'; -import { - BarSeriesDataMap, - getFilteredBarSeries, -} from '../utils/get_filtered_series_for_preview_chart'; +import type { BarSeriesDataMap } from '../utils/get_filtered_series_for_preview_chart'; +import { getFilteredBarSeries } from '../utils/get_filtered_series_for_preview_chart'; export async function getTransactionErrorCountChartPreview({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts index 8fb4000645a2e..11156d35e0c6f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/error_count/register_error_count_rule_type.ts @@ -6,21 +6,21 @@ */ import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { +import type { GetViewInAppRelativeUrlFnOpts, ActionGroupIdsOf, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, RuleTypeState, RuleExecutorOptions, - AlertsClientError, } from '@kbn/alerting-plugin/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; import { formatDurationFromTimeUnitChar, getAlertDetailsUrl, observabilityPaths, ProcessorEvent, - TimeUnitChar, } from '@kbn/observability-plugin/common'; import { ALERT_EVALUATION_THRESHOLD, @@ -28,7 +28,7 @@ import { ALERT_REASON, ApmRuleType, } from '@kbn/rule-data-utils'; -import { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import type { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; import { getParsedFilterQuery, termQuery } from '@kbn/observability-plugin/server'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/common'; import { asyncForEach } from '@kbn/std'; @@ -39,21 +39,20 @@ import { SERVICE_ENVIRONMENT, SERVICE_NAME, } from '../../../../../common/es_fields/apm'; +import type { THRESHOLD_MET_GROUP } from '../../../../../common/rules/apm_rule_types'; import { APM_SERVER_FEATURE_ID, formatErrorCountReason, RULE_TYPES_CONFIG, - THRESHOLD_MET_GROUP, } from '../../../../../common/rules/apm_rule_types'; -import { errorCountParamsSchema, ApmRuleParamsType } from '../../../../../common/rules/schema'; +import type { ApmRuleParamsType } from '../../../../../common/rules/schema'; +import { errorCountParamsSchema } from '../../../../../common/rules/schema'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { getAlertUrlErrorCount } from '../../../../../common/utils/formatters'; import { apmActionVariables } from '../../action_variables'; import { alertingEsClient } from '../../alerting_es_client'; -import { - ApmRuleTypeAlertDefinition, - RegisterRuleDependencies, -} from '../../register_apm_rule_types'; +import type { RegisterRuleDependencies } from '../../register_apm_rule_types'; +import { ApmRuleTypeAlertDefinition } from '../../register_apm_rule_types'; import { getApmAlertSourceFields, getApmAlertSourceFieldsAgg, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/get_apm_alert_source_fields.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/get_apm_alert_source_fields.ts index 16c33d5942cc2..b0bb9f295d443 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/get_apm_alert_source_fields.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/get_apm_alert_source_fields.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AggregationsTopHitsAggregation } from '@elastic/elasticsearch/lib/api/types'; +import type { AggregationsTopHitsAggregation } from '@elastic/elasticsearch/lib/api/types'; import { LABELS, SERVICE_GROUP_SUPPORTED_FIELDS } from '../../../../common/service_groups'; export interface SourceDoc { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/average_or_percentile_agg.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/average_or_percentile_agg.ts index 97d8248e4071a..40878fe079772 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/average_or_percentile_agg.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/average_or_percentile_agg.ts @@ -5,7 +5,7 @@ * 2.0. */ import { AggregationType } from '../../../../../common/rules/apm_rule_types'; -import { getDurationFieldForTransactions } from '../../../../lib/helpers/transactions'; +import type { getDurationFieldForTransactions } from '../../../../lib/helpers/transactions'; type TransactionDurationField = ReturnType; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts index 0dcf1e3255bd7..797df1945619c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/get_transaction_duration_chart_preview.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getParsedFilterQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ApmRuleType } from '@kbn/rule-data-utils'; import { AggregationType } from '../../../../../common/rules/apm_rule_types'; @@ -15,7 +15,7 @@ import { TRANSACTION_NAME, } from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; -import { AlertParams, PreviewChartResponse } from '../../route'; +import type { AlertParams, PreviewChartResponse } from '../../route'; import { getSearchTransactionsEvents, getBackwardCompatibleDocumentTypeFilter, @@ -23,14 +23,12 @@ import { getProcessorEventForTransactions, } from '../../../../lib/helpers/transactions'; import { averageOrPercentileAgg, getMultiTermsSortOrder } from './average_or_percentile_agg'; -import { APMConfig } from '../../../..'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../..'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; import { getGroupByTerms } from '../utils/get_groupby_terms'; import { getAllGroupByFields } from '../../../../../common/rules/get_all_groupby_fields'; -import { - BarSeriesDataMap, - getFilteredBarSeries, -} from '../utils/get_filtered_series_for_preview_chart'; +import type { BarSeriesDataMap } from '../utils/get_filtered_series_for_preview_chart'; +import { getFilteredBarSeries } from '../utils/get_filtered_series_for_preview_chart'; export async function getTransactionDurationChartPreview({ alertParams, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts index dfc32ec9eb54e..1c8db86e9baf6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_duration/register_transaction_duration_rule_type.ts @@ -6,9 +6,8 @@ */ import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { - AlertsClientError, +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { GetViewInAppRelativeUrlFnOpts, ActionGroupIdsOf, AlertInstanceContext as AlertContext, @@ -16,13 +15,14 @@ import { RuleTypeState, RuleExecutorOptions, } from '@kbn/alerting-plugin/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; import { asDuration, formatDurationFromTimeUnitChar, getAlertDetailsUrl, observabilityPaths, ProcessorEvent, - TimeUnitChar, } from '@kbn/observability-plugin/common'; import { getParsedFilterQuery, termQuery } from '@kbn/observability-plugin/server'; import { @@ -31,7 +31,7 @@ import { ALERT_REASON, ApmRuleType, } from '@kbn/rule-data-utils'; -import { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import type { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/common'; import { getGroupByTerms } from '../utils/get_groupby_terms'; import { SearchAggregatedTransactionSetting } from '../../../../../common/aggregated_transactions'; @@ -43,16 +43,14 @@ import { TRANSACTION_NAME, TRANSACTION_TYPE, } from '../../../../../common/es_fields/apm'; +import type { THRESHOLD_MET_GROUP } from '../../../../../common/rules/apm_rule_types'; import { APM_SERVER_FEATURE_ID, formatTransactionDurationReason, RULE_TYPES_CONFIG, - THRESHOLD_MET_GROUP, } from '../../../../../common/rules/apm_rule_types'; -import { - transactionDurationParamsSchema, - ApmRuleParamsType, -} from '../../../../../common/rules/schema'; +import type { ApmRuleParamsType } from '../../../../../common/rules/schema'; +import { transactionDurationParamsSchema } from '../../../../../common/rules/schema'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { getAlertUrlTransaction, @@ -64,10 +62,8 @@ import { } from '../../../../lib/helpers/transactions'; import { apmActionVariables } from '../../action_variables'; import { alertingEsClient } from '../../alerting_es_client'; -import { - ApmRuleTypeAlertDefinition, - RegisterRuleDependencies, -} from '../../register_apm_rule_types'; +import type { RegisterRuleDependencies } from '../../register_apm_rule_types'; +import { ApmRuleTypeAlertDefinition } from '../../register_apm_rule_types'; import { getApmAlertSourceFields, getApmAlertSourceFieldsAgg, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts index e6fdf321af8d9..7f7a6ffdf4186 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/get_transaction_error_rate_chart_preview.ts @@ -14,21 +14,19 @@ import { EVENT_OUTCOME, } from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; -import { AlertParams, PreviewChartResponse } from '../../route'; +import type { AlertParams, PreviewChartResponse } from '../../route'; import { getSearchTransactionsEvents, getBackwardCompatibleDocumentTypeFilter, getProcessorEventForTransactions, } from '../../../../lib/helpers/transactions'; -import { APMConfig } from '../../../..'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../..'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; import { EventOutcome } from '../../../../../common/event_outcome'; import { getGroupByTerms } from '../utils/get_groupby_terms'; import { getAllGroupByFields } from '../../../../../common/rules/get_all_groupby_fields'; -import { - BarSeriesDataMap, - getFilteredBarSeries, -} from '../utils/get_filtered_series_for_preview_chart'; +import type { BarSeriesDataMap } from '../utils/get_filtered_series_for_preview_chart'; +import { getFilteredBarSeries } from '../utils/get_filtered_series_for_preview_chart'; export async function getTransactionErrorRateChartPreview({ config, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts index 1090a1c91d54b..4217d32934a54 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/transaction_error_rate/register_transaction_error_rate_rule_type.ts @@ -6,21 +6,21 @@ */ import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { +import type { GetViewInAppRelativeUrlFnOpts, ActionGroupIdsOf, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, RuleTypeState, RuleExecutorOptions, - AlertsClientError, } from '@kbn/alerting-plugin/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; import { formatDurationFromTimeUnitChar, getAlertDetailsUrl, observabilityPaths, ProcessorEvent, - TimeUnitChar, } from '@kbn/observability-plugin/common'; import { asPercent } from '@kbn/observability-plugin/common/utils/formatters'; import { getParsedFilterQuery, termQuery } from '@kbn/observability-plugin/server'; @@ -30,7 +30,7 @@ import { ALERT_REASON, ApmRuleType, } from '@kbn/rule-data-utils'; -import { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; +import type { ObservabilityApmAlert } from '@kbn/alerts-as-data-utils'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/common'; import { asyncForEach } from '@kbn/std'; import { SearchAggregatedTransactionSetting } from '../../../../../common/aggregated_transactions'; @@ -44,25 +44,21 @@ import { TRANSACTION_NAME, } from '../../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../../common/event_outcome'; +import type { THRESHOLD_MET_GROUP } from '../../../../../common/rules/apm_rule_types'; import { APM_SERVER_FEATURE_ID, formatTransactionErrorRateReason, RULE_TYPES_CONFIG, - THRESHOLD_MET_GROUP, } from '../../../../../common/rules/apm_rule_types'; -import { - transactionErrorRateParamsSchema, - ApmRuleParamsType, -} from '../../../../../common/rules/schema'; +import type { ApmRuleParamsType } from '../../../../../common/rules/schema'; +import { transactionErrorRateParamsSchema } from '../../../../../common/rules/schema'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { asDecimalOrInteger, getAlertUrlTransaction } from '../../../../../common/utils/formatters'; import { getBackwardCompatibleDocumentTypeFilter } from '../../../../lib/helpers/transactions'; import { apmActionVariables } from '../../action_variables'; import { alertingEsClient } from '../../alerting_es_client'; -import { - ApmRuleTypeAlertDefinition, - RegisterRuleDependencies, -} from '../../register_apm_rule_types'; +import type { RegisterRuleDependencies } from '../../register_apm_rule_types'; +import { ApmRuleTypeAlertDefinition } from '../../register_apm_rule_types'; import { getApmAlertSourceFields, getApmAlertSourceFieldsAgg, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/utils/get_filtered_series_for_preview_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/utils/get_filtered_series_for_preview_chart.ts index 243935adad9fd..5d0aa297124e6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/utils/get_filtered_series_for_preview_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/rule_types/utils/get_filtered_series_for_preview_chart.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Coordinate } from '../../../../../typings/timeseries'; +import type { Coordinate } from '../../../../../typings/timeseries'; export type BarSeriesDataMap = Record; type BarSeriesData = Array<{ name: string; data: Coordinate[] }>; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/test_utils/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/test_utils/index.ts index 9230ca4983698..b3f66f1198ed8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/alerts/test_utils/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/alerts/test_utils/index.ts @@ -5,15 +5,16 @@ * 2.0. */ -import { IBasePath, Logger } from '@kbn/core/server'; +import type { IBasePath, Logger } from '@kbn/core/server'; import { elasticsearchServiceMock } from '@kbn/core/server/mocks'; -import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; +import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import { ruleRegistryMocks } from '@kbn/rule-registry-plugin/server/mocks'; -import { AlertingServerSetup } from '@kbn/alerting-plugin/server'; -import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; +import type { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; import { DEFAULT_FLAPPING_SETTINGS } from '@kbn/alerting-plugin/common'; -import { APMConfig, APM_SERVER_FEATURE_ID } from '../../..'; -import { RegisterRuleDependencies } from '../register_apm_rule_types'; +import type { APMConfig } from '../../..'; +import { APM_SERVER_FEATURE_ID } from '../../..'; +import type { RegisterRuleDependencies } from '../register_apm_rule_types'; export const createRuleTypeMocks = () => { let alertExecutor: (...args: any[]) => Promise; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/create_apm_server_route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/create_apm_server_route.ts index e2f0251a6343c..835be6d10eedb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/create_apm_server_route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/create_apm_server_route.ts @@ -5,8 +5,8 @@ * 2.0. */ import { createServerRouteFactory } from '@kbn/server-route-repository'; -import { APMRouteCreateOptions } from '../typings'; -import { APMRouteHandlerResources } from './register_apm_server_routes'; +import type { APMRouteCreateOptions } from '../typings'; +import type { APMRouteHandlerResources } from './register_apm_server_routes'; export const createApmServerRoute = createServerRouteFactory< APMRouteHandlerResources, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts index 8b1fe99b6d272..381443159d0d6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts @@ -5,7 +5,7 @@ * 2.0. */ import type { EndpointOf, ReturnOf, ServerRouteRepository } from '@kbn/server-route-repository'; -import { PickByValue } from 'utility-types'; +import type { PickByValue } from 'utility-types'; import { agentExplorerRouteRepository } from '../agent_explorer/route'; import { agentKeysRouteRepository } from '../agent_keys/route'; import { alertsChartPreviewRouteRepository } from '../alerts/route'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.test.ts index aae197e5ade5d..1535995389809 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.test.ts @@ -6,12 +6,13 @@ */ import { jsonRt } from '@kbn/io-ts-utils'; -import { ServerRoute, ServerRouteRepository } from '@kbn/server-route-repository'; +import type { ServerRoute, ServerRouteRepository } from '@kbn/server-route-repository'; import * as t from 'io-ts'; -import { CoreSetup, Logger } from '@kbn/core/server'; -import { APMConfig } from '../..'; -import { APMRouteCreateOptions } from '../typings'; -import { APMRouteHandlerResources, registerRoutes } from './register_apm_server_routes'; +import type { CoreSetup, Logger } from '@kbn/core/server'; +import type { APMConfig } from '../..'; +import type { APMRouteCreateOptions } from '../typings'; +import type { APMRouteHandlerResources } from './register_apm_server_routes'; +import { registerRoutes } from './register_apm_server_routes'; import { NEVER } from 'rxjs'; type RegisterRouteDependencies = Parameters[0]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.ts b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.ts index 197b4259d3f09..875d5813181f5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/apm_routes/register_apm_server_routes.ts @@ -7,15 +7,20 @@ import Boom from '@hapi/boom'; import * as t from 'io-ts'; -import { Logger, KibanaRequest, KibanaResponseFactory, RouteRegistrar } from '@kbn/core/server'; +import type { + Logger, + KibanaRequest, + KibanaResponseFactory, + RouteRegistrar, +} from '@kbn/core/server'; import { errors } from '@elastic/elasticsearch'; import agent from 'elastic-apm-node'; -import { +import type { DefaultRouteCreateOptions, IoTsParamsObject, ServerRouteRepository, - stripNullishRequestParameters, } from '@kbn/server-route-repository'; +import { stripNullishRequestParameters } from '@kbn/server-route-repository'; import { merge } from 'lodash'; import { decodeRequestParams, @@ -23,12 +28,12 @@ import { passThroughValidationObject, } from '@kbn/server-route-repository'; import { jsonRt, mergeRt } from '@kbn/io-ts-utils'; -import { InspectResponse } from '@kbn/observability-plugin/typings/common'; +import type { InspectResponse } from '@kbn/observability-plugin/typings/common'; import apm from 'elastic-apm-node'; -import { VersionedRouteRegistrar } from '@kbn/core-http-server'; -import { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; +import type { VersionedRouteRegistrar } from '@kbn/core-http-server'; +import type { IRuleDataClient } from '@kbn/rule-registry-plugin/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { ApmFeatureFlags } from '../../../common/apm_feature_flags'; +import type { ApmFeatureFlags } from '../../../common/apm_feature_flags'; import type { APMCore, APMRouteCreateOptions, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_downstream_dependencies/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_downstream_dependencies/index.ts index 6d8fae8afafe2..f8bd4547b00e7 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_downstream_dependencies/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_downstream_dependencies/index.ts @@ -7,12 +7,12 @@ import datemath from '@elastic/datemath'; import * as t from 'io-ts'; import { termQuery } from '@kbn/observability-plugin/server'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getDestinationMap } from '../../../lib/connections/get_connection_stats/get_destination_map'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { NodeType } from '../../../../common/connections'; export const downstreamDependenciesRouteRt = t.intersection([ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_list/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_list/index.ts index 39f2a77ad9c92..cba856411cdf6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_list/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_list/index.ts @@ -6,16 +6,16 @@ */ import datemath from '@elastic/datemath'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; import { RollupInterval } from '../../../../common/rollup'; import { ApmDocumentType } from '../../../../common/document_type'; -import { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; +import type { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; import { ServiceHealthStatus } from '../../../../common/service_health_status'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { MlClient } from '../../../lib/helpers/get_ml_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { MlClient } from '../../../lib/helpers/get_ml_client'; import { getServicesItems } from '../../services/get_services/get_services_items'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; export interface ApmServicesListItem { 'service.name': string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/get_anomalies.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/get_anomalies.ts index 2b06fbaf26e36..e7b3542572087 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/get_anomalies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/get_anomalies.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { compact, keyBy } from 'lodash'; import { @@ -22,7 +22,7 @@ import { anomalySearch } from '../../../lib/anomaly_detection/anomaly_search'; import { apmMlAnomalyQuery } from '../../../lib/anomaly_detection/apm_ml_anomaly_query'; import { apmMlJobsQuery } from '../../../lib/anomaly_detection/apm_ml_jobs_query'; import { getMlJobsWithAPMGroup } from '../../../lib/anomaly_detection/get_ml_jobs_with_apm_group'; -import { MlClient } from '../../../lib/helpers/get_ml_client'; +import type { MlClient } from '../../../lib/helpers/get_ml_client'; export type ApmAnomalies = Awaited>; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/index.ts index 5c9d40cc22772..05cb7e20e61f2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_service_summary/index.ts @@ -5,8 +5,9 @@ * 2.0. */ import datemath from '@elastic/datemath'; -import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { rangeQuery, ScopedAnnotationsClient, termsQuery } from '@kbn/observability-plugin/server'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; +import { rangeQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ALERT_RULE_PRODUCER, ALERT_STATUS, @@ -15,13 +16,13 @@ import { import * as t from 'io-ts'; import { observabilityFeatureId } from '@kbn/observability-shared-plugin/common'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; -import { Environment } from '../../../../common/environment_rt'; +import type { Environment } from '../../../../common/environment_rt'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { termQuery } from '../../../../common/utils/term_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; -import { MlClient } from '../../../lib/helpers/get_ml_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; +import type { MlClient } from '../../../lib/helpers/get_ml_client'; import { getEnvironments } from '../../environments/get_environments'; import { getServiceAnnotations } from '../../services/annotations'; import { getServiceMetadataDetails } from '../../services/get_service_metadata_details'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/fetch_timeseries.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/fetch_timeseries.ts index 45342d7a86a74..5f0577ac163de 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/fetch_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/fetch_timeseries.ts @@ -9,11 +9,11 @@ import type { AggregationsAggregationContainer, QueryDslQueryContainer, } from '@elastic/elasticsearch/lib/api/types'; -import { AggregationResultOf, AggregationResultOfMap } from '@kbn/es-types'; -import { Unionize } from 'utility-types'; -import { ApmDocumentType } from '../../../../common/document_type'; -import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { AggregationResultOf, AggregationResultOfMap } from '@kbn/es-types'; +import type { Unionize } from 'utility-types'; +import type { ApmDocumentType } from '../../../../common/document_type'; +import type { RollupInterval } from '../../../../common/rollup'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; type ChangePointResult = AggregationResultOf<{ change_point: any }, unknown>; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_exit_span_latency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_exit_span_latency.ts index d94219aac443e..781d0720edeb2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_exit_span_latency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_exit_span_latency.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { termQuery } from '@kbn/observability-plugin/server'; import { ApmDocumentType } from '../../../../common/document_type'; import { @@ -14,7 +14,7 @@ import { SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, } from '../../../../common/es_fields/apm'; import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { fetchSeries } from './fetch_timeseries'; export async function getExitSpanLatency({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_transaction_latency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_transaction_latency.ts index 11984067b9af1..58f47aaea85a7 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_transaction_latency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/get_transaction_latency.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { termQuery } from '@kbn/observability-plugin/server'; import { TRANSACTION_NAME } from '@kbn/observability-shared-plugin/common'; import { ApmDocumentType } from '../../../../common/document_type'; import { TRANSACTION_DURATION_HISTOGRAM, TRANSACTION_TYPE } from '../../../../common/es_fields/apm'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getLatencyAggregation } from '../../../lib/helpers/latency_aggregation_type'; import { fetchSeries } from './fetch_timeseries'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/index.ts index 56afefbafb9d3..aa046af81d7f2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_apm_timeseries/index.ts @@ -14,7 +14,7 @@ import { LatencyAggregationType } from '../../../../common/latency_aggregation_t import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../../common/utils/get_bucket_size'; import { termQuery } from '../../../../common/utils/term_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getErrorEventRate } from './get_error_event_rate'; import { getExitSpanFailureRate } from './get_exit_span_failure_rate'; import { getExitSpanLatency } from './get_exit_span_latency'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_changepoints/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_changepoints/index.ts index 99ea7ec691dab..ba2c9ad987312 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_changepoints/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_changepoints/index.ts @@ -6,8 +6,9 @@ */ import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { ApmTimeseriesType, getApmTimeseries, TimeseriesChangePoint } from '../get_apm_timeseries'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { TimeseriesChangePoint } from '../get_apm_timeseries'; +import { ApmTimeseriesType, getApmTimeseries } from '../get_apm_timeseries'; export interface ChangePointGrouping { title: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_categories/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_categories/index.ts index 7072639f8526e..88d4f74abaf66 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_categories/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_categories/index.ts @@ -6,13 +6,14 @@ */ import datemath from '@elastic/datemath'; -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; import { maybe } from '../../../../common/utils/maybe'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { flattenObject, KeyValuePair } from '../../../../common/utils/flatten_object'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { KeyValuePair } from '../../../../common/utils/flatten_object'; +import { flattenObject } from '../../../../common/utils/flatten_object'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { PROCESSOR_EVENT, TRACE_ID } from '../../../../common/es_fields/apm'; import { getTypedSearch } from '../../../utils/create_typed_es_client'; import { getDownstreamServiceResource } from '../get_observability_alert_details_context/get_downstream_dependency_name'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_rate_analysis_for_alert/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_rate_analysis_for_alert/index.ts index 2d367780fc9dd..b7a7401eab3d5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_rate_analysis_for_alert/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_log_rate_analysis_for_alert/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { fetchLogRateAnalysisForAlert } from '@kbn/aiops-log-rate-analysis/queries/fetch_log_rate_analysis_for_alert'; -import { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; +import type { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; import { PROCESSOR_EVENT } from '../../../../common/es_fields/apm'; import { getShouldMatchOrNotExistFilter } from '../utils/get_should_match_or_not_exist_filter'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_apm_errors.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_apm_errors.ts index 90c76bba181cb..d117a7ccaeb79 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_apm_errors.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_apm_errors.ts @@ -6,7 +6,7 @@ */ import datemath from '@elastic/datemath'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getErrorGroupMainStatistics } from '../../errors/get_error_groups/get_error_group_main_statistics'; import { getDownstreamServiceResource } from './get_downstream_dependency_name'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_container_id_from_signals.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_container_id_from_signals.ts index 93c55cf1a9a30..24af8e677a01a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_container_id_from_signals.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_container_id_from_signals.ts @@ -6,19 +6,19 @@ */ import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { CoreRequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { CoreRequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; import { rangeQuery, typedSearch } from '@kbn/observability-plugin/server/utils/queries'; -import * as t from 'io-ts'; +import type * as t from 'io-ts'; import moment from 'moment'; -import { ESSearchRequest } from '@kbn/es-types'; -import { alertDetailsContextRt } from '@kbn/observability-plugin/server/services'; -import { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; +import type { ESSearchRequest } from '@kbn/es-types'; +import type { alertDetailsContextRt } from '@kbn/observability-plugin/server/services'; +import type { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; import { CONTAINER_ID } from '@kbn/apm-types'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; import { maybe } from '../../../../common/utils/maybe'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; import { ApmDocumentType } from '../../../../common/document_type'; -import { +import type { APMEventClient, APMEventESSearchRequest, } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_downstream_dependency_name.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_downstream_dependency_name.ts index d957372285b02..f48667214a29d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_downstream_dependency_name.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_downstream_dependency_name.ts @@ -16,7 +16,7 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, TRACE_ID, } from '../../../../common/es_fields/apm'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { RollupInterval } from '../../../../common/rollup'; export async function getDownstreamServiceResource({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_service_name_from_signals.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_service_name_from_signals.ts index bd966c500d1bc..220394df3b142 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_service_name_from_signals.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/get_service_name_from_signals.ts @@ -7,17 +7,17 @@ import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { rangeQuery, termQuery, typedSearch } from '@kbn/observability-plugin/server/utils/queries'; -import * as t from 'io-ts'; +import type * as t from 'io-ts'; import moment from 'moment'; -import { ESSearchRequest } from '@kbn/es-types'; -import { alertDetailsContextRt } from '@kbn/observability-plugin/server/services'; +import type { ESSearchRequest } from '@kbn/es-types'; +import type { alertDetailsContextRt } from '@kbn/observability-plugin/server/services'; import type { LogSourcesService } from '@kbn/logs-data-access-plugin/common/types'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; import { SERVICE_NAME } from '@kbn/apm-types'; import { maybe } from '../../../../common/utils/maybe'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; import { ApmDocumentType } from '../../../../common/document_type'; -import { +import type { APMEventClient, APMEventESSearchRequest, } from '../../../lib/helpers/create_es_client/create_apm_event_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts index 16a292d5478bc..56f77b7c3826c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/assistant_functions/get_observability_alert_details_context/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart, Logger } from '@kbn/core/server'; +import type { CoreStart, Logger } from '@kbn/core/server'; import type { AlertDetailsContextualInsight, AlertDetailsContextualInsightsHandler, @@ -18,17 +18,16 @@ import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; import { getMlClient } from '../../../lib/helpers/get_ml_client'; import { getRandomSampler } from '../../../lib/helpers/get_random_sampler'; import { getApmServiceSummary } from '../get_apm_service_summary'; -import { - APMDownstreamDependency, - getAssistantDownstreamDependencies, -} from '../get_apm_downstream_dependencies'; +import type { APMDownstreamDependency } from '../get_apm_downstream_dependencies'; +import { getAssistantDownstreamDependencies } from '../get_apm_downstream_dependencies'; import { getLogRateAnalysisForAlert } from '../get_log_rate_analysis_for_alert'; -import { getLogCategories, LogCategory } from '../get_log_categories'; +import type { LogCategory } from '../get_log_categories'; +import { getLogCategories } from '../get_log_categories'; import { getAnomalies } from '../get_apm_service_summary/get_anomalies'; import { getServiceNameFromSignals } from './get_service_name_from_signals'; import { getContainerIdFromSignals } from './get_container_id_from_signals'; import { getExitSpanChangePoints, getServiceChangePoints } from '../get_changepoints'; -import { APMRouteHandlerResources } from '../../apm_routes/register_apm_server_routes'; +import type { APMRouteHandlerResources } from '../../apm_routes/register_apm_server_routes'; import { getApmErrors } from './get_apm_errors'; export const getAlertDetailsContextHandler = ( diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts index 931b83f4bd392..a6c76d882182c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation.ts @@ -10,7 +10,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SPAN_DURATION, TRANSACTION_DURATION } from '../../../../common/es_fields/apm'; import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export const fetchDurationCorrelation = async ({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation_with_histogram.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation_with_histogram.ts index 561bbddf5f5f7..7e26550d1f5e1 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation_with_histogram.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_correlation_with_histogram.ts @@ -18,11 +18,11 @@ import { KS_TEST_THRESHOLD, } from '../../../../common/correlations/constants'; -import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; +import type { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; import { fetchDurationCorrelation } from './fetch_duration_correlation'; import { fetchDurationRanges } from './fetch_duration_ranges'; import { getEventType } from '../utils'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function fetchDurationCorrelationWithHistogram({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_field_candidates.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_field_candidates.ts index 9f7e35ec56f16..fcd7e445ff780 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_field_candidates.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_field_candidates.ts @@ -7,14 +7,14 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ES_FIELD_TYPES } from '@kbn/field-types'; -import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; import { rangeQuery } from '@kbn/observability-plugin/server'; import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { FIELD_PREFIX_TO_EXCLUDE_AS_CANDIDATE, FIELDS_TO_EXCLUDE_AS_CANDIDATE, } from '../../../../common/correlations/constants'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; const SUPPORTED_ES_FIELD_TYPES = [ ES_FIELD_TYPES.KEYWORD, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts index e9a7430adfc8e..311f00e82e7ca 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_fractions.ts @@ -8,9 +8,9 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; +import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { SPAN_DURATION, TRANSACTION_DURATION } from '../../../../common/es_fields/apm'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; /** diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts index fa513ea9edcfd..0105ba4faaf37 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_histogram_range_steps.ts @@ -8,11 +8,11 @@ import { scaleLog } from 'd3-scale'; import { isFiniteNumber } from '@kbn/observability-plugin/common/utils/is_finite_number'; -import { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; -import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; +import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; +import type { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; import { getDurationField, getEventType } from '../utils'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getBackwardCompatibleDocumentTypeFilter } from '../../../lib/helpers/transactions'; const getHistogramRangeSteps = (min: number, max: number, steps: number) => { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_percentiles.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_percentiles.ts index 20a88573a152d..92cd5abe541fe 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_percentiles.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_percentiles.ts @@ -6,11 +6,11 @@ */ import { SIGNIFICANT_VALUE_DIGITS } from '../../../../common/correlations/constants'; -import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; +import type { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; -import { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; +import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { getDurationField, getEventType } from '../utils'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getBackwardCompatibleDocumentTypeFilter } from '../../../lib/helpers/transactions'; export const fetchDurationPercentiles = async ({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_ranges.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_ranges.ts index 0fa2fad981eb6..1078235ce8ec3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_ranges.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_duration_ranges.ts @@ -7,11 +7,11 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { sumBy } from 'lodash'; -import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; +import type { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; -import { Environment } from '../../../../common/environment_rt'; +import type { Environment } from '../../../../common/environment_rt'; import { getDurationField, getEventType } from '../utils'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getBackwardCompatibleDocumentTypeFilter } from '../../../lib/helpers/transactions'; export const fetchDurationRanges = async ({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts index f6a4b3074b200..7df5fc9e73c88 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_failed_events_correlation_p_values.ts @@ -5,15 +5,15 @@ * 2.0. */ import { termQuery } from '@kbn/observability-plugin/server'; -import { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; -import { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; +import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; +import type { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; import { EVENT_OUTCOME, PROCESSOR_EVENT } from '../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../common/event_outcome'; import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; import { fetchDurationRanges } from './fetch_duration_ranges'; import { getEventType } from '../utils'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export const fetchFailedEventsCorrelationPValues = async ({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_field_value_pairs.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_field_value_pairs.ts index 4347d51150e95..ee0d9ec875626 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_field_value_pairs.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_field_value_pairs.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { FieldValuePair, CommonCorrelationsQueryParams, @@ -14,7 +14,7 @@ import { TERMS_SIZE } from '../../../../common/correlations/constants'; import { splitAllSettledPromises } from '../utils'; import { getCommonCorrelationsQuery } from './get_common_correlations_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export interface FieldValuePairsResponse { fieldValuePairs: FieldValuePair[]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_p_values.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_p_values.ts index eadce95575146..f7e8c46748fa1 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_p_values.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_p_values.ts @@ -9,9 +9,9 @@ import { isCCSRemoteIndexName } from '@kbn/es-query'; import { ERROR_CORRELATION_THRESHOLD } from '../../../../common/correlations/constants'; import type { FailedTransactionsCorrelation } from '../../../../common/correlations/failed_transactions_correlations/types'; -import { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; +import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { LatencyDistributionChartType } from '../../../../common/latency_distribution_chart_types'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { splitAllSettledPromises, getEventType } from '../utils'; import { fetchDurationHistogramRangeSteps } from './fetch_duration_histogram_range_steps'; import { fetchFailedEventsCorrelationPValues } from './fetch_failed_events_correlation_p_values'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_significant_correlations.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_significant_correlations.ts index 51d0fc73313ac..78cbf118bdd09 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_significant_correlations.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/fetch_significant_correlations.ts @@ -23,7 +23,7 @@ import { fetchDurationFractions } from './fetch_duration_fractions'; import { fetchDurationHistogramRangeSteps } from './fetch_duration_histogram_range_steps'; import { fetchDurationRanges } from './fetch_duration_ranges'; import { getEventType } from '../utils'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export interface SignificantCorrelationsResponse { latencyCorrelations: LatencyCorrelation[]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/field_stats/fetch_field_value_field_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/field_stats/fetch_field_value_field_stats.ts index e3277307eb129..b848e9fcbd61c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/field_stats/fetch_field_value_field_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/field_stats/fetch_field_value_field_stats.ts @@ -5,22 +5,22 @@ * 2.0. */ -import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { AggregationsAggregationContainer, AggregationsSamplerAggregate, AggregationsSingleBucketAggregateBase, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type { CommonCorrelationsQueryParams, FieldValuePair, } from '../../../../../common/correlations/types'; -import { +import type { FieldValueFieldStats, TopValueBucket, } from '../../../../../common/correlations/field_stats_types'; import { getCommonCorrelationsQuery } from '../get_common_correlations_query'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; export const fetchFieldValueFieldStats = async ({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/get_common_correlations_query.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/get_common_correlations_query.ts index 3e70d0ef5765a..e82870d6d4057 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/get_common_correlations_query.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/queries/get_common_correlations_query.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; -import { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; +import type { CommonCorrelationsQueryParams } from '../../../../common/correlations/types'; import { environmentQuery } from '../../../../common/utils/environment_query'; export function getCommonCorrelationsQuery({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/route.ts index 658ad91bca835..2914dea8c57ad 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/correlations/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/correlations/route.ts @@ -17,20 +17,18 @@ import { isActivePlatinumLicense } from '../../../common/license_check'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; -import { - DurationFieldCandidatesResponse, - fetchDurationFieldCandidates, -} from './queries/fetch_duration_field_candidates'; +import type { DurationFieldCandidatesResponse } from './queries/fetch_duration_field_candidates'; +import { fetchDurationFieldCandidates } from './queries/fetch_duration_field_candidates'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; import { fetchFieldValueFieldStats } from './queries/field_stats/fetch_field_value_field_stats'; -import { fetchFieldValuePairs, FieldValuePairsResponse } from './queries/fetch_field_value_pairs'; -import { - fetchSignificantCorrelations, - SignificantCorrelationsResponse, -} from './queries/fetch_significant_correlations'; -import { fetchPValues, PValuesResponse } from './queries/fetch_p_values'; +import type { FieldValuePairsResponse } from './queries/fetch_field_value_pairs'; +import { fetchFieldValuePairs } from './queries/fetch_field_value_pairs'; +import type { SignificantCorrelationsResponse } from './queries/fetch_significant_correlations'; +import { fetchSignificantCorrelations } from './queries/fetch_significant_correlations'; +import type { PValuesResponse } from './queries/fetch_p_values'; +import { fetchPValues } from './queries/fetch_p_values'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; -import { TopValuesStats } from '../../../common/correlations/field_stats_types'; +import type { TopValuesStats } from '../../../common/correlations/field_stats_types'; const INVALID_LICENSE = i18n.translate('xpack.apm.correlations.license.text', { defaultMessage: diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_custom_dashboards.ts b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_custom_dashboards.ts index eb0e539483f56..4dcd2fdfebf73 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_custom_dashboards.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_custom_dashboards.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { - APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE, +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedApmCustomDashboard, ApmCustomDashboard, } from '../../../common/custom_dashboards'; +import { APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../../common/custom_dashboards'; interface Props { savedObjectsClient: SavedObjectsClientContract; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_entities_with_dashboards.ts b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_entities_with_dashboards.ts index df1f785216367..1f156ed297b9a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_entities_with_dashboards.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_entities_with_dashboards.ts @@ -6,10 +6,10 @@ */ import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; -import { SavedApmCustomDashboard } from '../../../common/custom_dashboards'; -import { EntitiesESClient } from '../../lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client'; +import type { SavedApmCustomDashboard } from '../../../common/custom_dashboards'; +import type { EntitiesESClient } from '../../lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client'; function getSearchRequest(filters: estypes.QueryDslQueryContainer[]) { return { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_services_with_dashboards.ts b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_services_with_dashboards.ts index c8b78b9052da5..30b3e44cf9584 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_services_with_dashboards.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/get_services_with_dashboards.ts @@ -7,13 +7,13 @@ import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; -import { +import type { APMEventClient, APMEventESSearchRequest, } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { SavedApmCustomDashboard } from '../../../common/custom_dashboards'; +import type { SavedApmCustomDashboard } from '../../../common/custom_dashboards'; function getSearchRequest(filters: estypes.QueryDslQueryContainer[]): APMEventESSearchRequest { return { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/remove_service_dashboard.ts b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/remove_service_dashboard.ts index 353afcd74bb0b..ff8adc0558603 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/remove_service_dashboard.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/remove_service_dashboard.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../../common/custom_dashboards'; interface Options { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/route.ts index 7d062d58f0b1a..61d8667ce82b9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/route.ts @@ -8,7 +8,7 @@ import * as t from 'io-ts'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { saveServiceDashbord } from './save_service_dashboard'; -import { SavedApmCustomDashboard } from '../../../common/custom_dashboards'; +import type { SavedApmCustomDashboard } from '../../../common/custom_dashboards'; import { deleteServiceDashboard } from './remove_service_dashboard'; import { getCustomDashboards } from './get_custom_dashboards'; import { getServicesWithDashboards } from './get_services_with_dashboards'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/save_service_dashboard.ts b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/save_service_dashboard.ts index 600c8e5722633..659a20bbbc3ce 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/save_service_dashboard.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/custom_dashboards/save_service_dashboard.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { - APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE, +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedApmCustomDashboard, ApmCustomDashboard, } from '../../../common/custom_dashboards'; +import { APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../../common/custom_dashboards'; interface Options { savedObjectsClient: SavedObjectsClientContract; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.test.ts index b51ae2f5c271e..7b067a2d486b9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.test.ts @@ -6,12 +6,12 @@ */ import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { Logger } from '@kbn/core/server'; -import { DataViewsService } from '@kbn/data-views-plugin/common'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; +import type { Logger } from '@kbn/core/server'; +import type { DataViewsService } from '@kbn/data-views-plugin/common'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; import * as HistoricalAgentData from '../historical_data/has_historical_agent_data'; -import { APMCore } from '../typings'; +import type { APMCore } from '../typings'; import { createOrUpdateStaticDataView } from './create_static_data_view'; function getMockedDataViewService(existingDataViewTitle: string) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.ts b/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.ts index c3de37e152c0a..571a1b041bf44 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/data_view/create_static_data_view.ts @@ -5,16 +5,17 @@ * 2.0. */ -import { Logger, SavedObjectsErrorHelpers } from '@kbn/core/server'; -import { DataView, DataViewsService } from '@kbn/data-views-plugin/common'; +import type { Logger } from '@kbn/core/server'; +import { SavedObjectsErrorHelpers } from '@kbn/core/server'; +import type { DataView, DataViewsService } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import { getStaticDataViewId } from '@kbn/apm-data-view'; import { TRACE_ID, TRANSACTION_ID, TRANSACTION_DURATION } from '../../../common/es_fields/apm'; import { hasHistoricalAgentData } from '../historical_data/has_historical_agent_data'; import { withApmSpan } from '../../utils/with_apm_span'; import { getApmDataViewIndexPattern } from './get_apm_data_view_index_pattern'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; export type CreateDataViewResponse = Promise< { created: boolean; dataView: DataView } | { created: boolean; reason?: string } diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/data_view/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/data_view/route.ts index 23318949b0811..98bce470cd086 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/data_view/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/data_view/route.ts @@ -6,7 +6,8 @@ */ import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; -import { CreateDataViewResponse, createOrUpdateStaticDataView } from './create_static_data_view'; +import type { CreateDataViewResponse } from './create_static_data_view'; +import { createOrUpdateStaticDataView } from './create_static_data_view'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { getApmDataViewIndexPattern } from './get_apm_data_view_index_pattern'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/debug_telemetry/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/debug_telemetry/route.ts index 3e4e1889321ba..d773853c9078d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/debug_telemetry/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/debug_telemetry/route.ts @@ -7,7 +7,7 @@ import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { APM_TELEMETRY_TASK_NAME } from '../../lib/apm_telemetry'; -import { APMTelemetry } from '../../lib/apm_telemetry/types'; +import type { APMTelemetry } from '../../lib/apm_telemetry/types'; import { APM_TELEMETRY_SAVED_OBJECT_ID, APM_TELEMETRY_SAVED_OBJECT_TYPE, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/default_api_types.ts b/x-pack/solutions/observability/plugins/apm/server/routes/default_api_types.ts index 42ab1b63d431e..4314ffdd99ae0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/default_api_types.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/default_api_types.ts @@ -8,7 +8,7 @@ import * as t from 'io-ts'; import { isoToEpochRt, toNumberRt } from '@kbn/io-ts-utils'; import { either } from 'fp-ts/lib/Either'; -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { ApmDocumentType } from '../../common/document_type'; import { RollupInterval } from '../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts index 4b1e02d6a5e1a..e850eaa0fd267 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_dependency_latency_distribution.ts @@ -11,12 +11,12 @@ import { SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_NAME, } from '../../../common/es_fields/apm'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { EventOutcome } from '../../../common/event_outcome'; import { LatencyDistributionChartType } from '../../../common/latency_distribution_chart_types'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getOverallLatencyDistribution } from '../latency_distribution/get_overall_latency_distribution'; -import { OverallLatencyDistributionResponse } from '../latency_distribution/types'; +import type { OverallLatencyDistributionResponse } from '../latency_distribution/types'; export interface DependencyLatencyDistributionResponse { allSpansDistribution: OverallLatencyDistributionResponse; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts index 14723665e5692..2938e604fbf1a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_error_rate_charts_for_dependency.ts @@ -20,7 +20,7 @@ import { getDocumentTypeFilterForServiceDestinationStatistics, getProcessorEventForServiceDestinationStatistics, } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; interface Options { dependencyName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts index df695bf87f406..7aafa9729675d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_latency_charts_for_dependency.ts @@ -16,7 +16,7 @@ import { getLatencyFieldForServiceDestinationStatistics, getProcessorEventForServiceDestinationStatistics, } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; interface Options { dependencyName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts index 5b84743064142..aaf12cb0b2fea 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_metadata_for_dependency.ts @@ -15,7 +15,7 @@ import { SPAN_SUBTYPE, SPAN_TYPE, } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export interface MetadataForDependencyResponse { spanType: string | undefined; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts index 8f16498ebff98..dc763a33ab31a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_throughput_charts_for_dependency.ts @@ -15,7 +15,7 @@ import { getDocumentTypeFilterForServiceDestinationStatistics, getProcessorEventForServiceDestinationStatistics, } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; interface Options { dependencyName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependencies.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependencies.ts index eb7bcab85296e..6d23b9c871755 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependencies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependencies.ts @@ -6,17 +6,17 @@ */ import { kqlQuery } from '@kbn/observability-plugin/server'; -import { +import type { ConnectionStats, ConnectionStatsItemWithImpact, Node, - NodeType, } from '../../../common/connections'; +import { NodeType } from '../../../common/connections'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; interface Options { apmEventClient: APMEventClient; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts index f082e94524e83..c03c8ed2ce2a0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_operations.ts @@ -14,7 +14,7 @@ import { SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, SPAN_NAME, } from '../../../common/es_fields/apm'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { EventOutcome } from '../../../common/event_outcome'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; @@ -26,7 +26,7 @@ import { getProcessorEventForServiceDestinationStatistics, } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; import { calculateImpactBuilder } from '../traces/calculate_impact_builder'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; const MAX_NUM_OPERATIONS = 500; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts index 6066ebda155d5..142bdfb0076bc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_top_dependency_spans.ts @@ -25,12 +25,12 @@ import { TRANSACTION_NAME, TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { EventOutcome } from '../../../common/event_outcome'; import { environmentQuery } from '../../../common/utils/environment_query'; import { maybe } from '../../../common/utils/maybe'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; const MAX_NUM_SPANS = 1000; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts index 797b4c6c88295..680ce679e36d8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/get_upstream_services_for_dependency.ts @@ -6,13 +6,13 @@ */ import { kqlQuery } from '@kbn/observability-plugin/server'; -import { ConnectionStats, Node } from '../../../common/connections'; +import type { ConnectionStats, Node } from '../../../common/connections'; import { SPAN_DESTINATION_SERVICE_RESOURCE } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; interface Options { apmEventClient: APMEventClient; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/route.ts index 5a744759a865e..36780980cc0bd 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/dependencies/route.ts @@ -12,30 +12,23 @@ import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { getRandomSampler } from '../../lib/helpers/get_random_sampler'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; -import { - DependencyLatencyDistributionResponse, - getDependencyLatencyDistribution, -} from './get_dependency_latency_distribution'; +import type { DependencyLatencyDistributionResponse } from './get_dependency_latency_distribution'; +import { getDependencyLatencyDistribution } from './get_dependency_latency_distribution'; import { getErrorRateChartsForDependency } from './get_error_rate_charts_for_dependency'; -import { - getLatencyChartsForDependency, - LatencyChartsDependencyResponse, -} from './get_latency_charts_for_dependency'; -import { - getMetadataForDependency, - MetadataForDependencyResponse, -} from './get_metadata_for_dependency'; -import { - getThroughputChartsForDependency, - ThroughputChartsForDependencyResponse, -} from './get_throughput_charts_for_dependency'; -import { getTopDependencies, TopDependenciesResponse } from './get_top_dependencies'; -import { DependencyOperation, getTopDependencyOperations } from './get_top_dependency_operations'; -import { DependencySpan, getTopDependencySpans } from './get_top_dependency_spans'; -import { - getUpstreamServicesForDependency, - UpstreamServicesForDependencyResponse, -} from './get_upstream_services_for_dependency'; +import type { LatencyChartsDependencyResponse } from './get_latency_charts_for_dependency'; +import { getLatencyChartsForDependency } from './get_latency_charts_for_dependency'; +import type { MetadataForDependencyResponse } from './get_metadata_for_dependency'; +import { getMetadataForDependency } from './get_metadata_for_dependency'; +import type { ThroughputChartsForDependencyResponse } from './get_throughput_charts_for_dependency'; +import { getThroughputChartsForDependency } from './get_throughput_charts_for_dependency'; +import type { TopDependenciesResponse } from './get_top_dependencies'; +import { getTopDependencies } from './get_top_dependencies'; +import type { DependencyOperation } from './get_top_dependency_operations'; +import { getTopDependencyOperations } from './get_top_dependency_operations'; +import type { DependencySpan } from './get_top_dependency_spans'; +import { getTopDependencySpans } from './get_top_dependency_spans'; +import type { UpstreamServicesForDependencyResponse } from './get_upstream_services_for_dependency'; +import { getUpstreamServicesForDependency } from './get_upstream_services_for_dependency'; const topDependenciesRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/dependencies/top_dependencies', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_apm_events.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_apm_events.ts index dc6a6575e23f2..6437808eeadd0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_apm_events.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_apm_events.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { merge } from 'lodash'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; @@ -17,7 +17,8 @@ import { INDEX, } from '../../../../common/es_fields/apm'; import { getApmIndexPatterns } from './get_indices'; -import { getTypedSearch, TypedSearch } from '../../../utils/create_typed_es_client'; +import type { TypedSearch } from '../../../utils/create_typed_es_client'; +import { getTypedSearch } from '../../../utils/create_typed_es_client'; export interface ApmEvent { legacy?: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_data_streams.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_data_streams.ts index 6444739e6c4b5..1f312fa2f5007 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_data_streams.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_data_streams.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { getApmIndexPatterns } from './get_indices'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_existing_index_templates.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_existing_index_templates.ts index 228be70286595..959d8f7b41890 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_existing_index_templates.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_existing_index_templates.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { getApmIndexTemplateNames } from '../helpers/get_apm_index_template_names'; import { getIndexTemplate } from './get_index_template'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_field_caps.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_field_caps.ts index c734207fa7ece..dd489dff63753 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_field_caps.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_field_caps.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { getApmIndexPatterns } from './get_indices'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_template.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_template.ts index b1ff9ae3ab8ff..70a9ffcd579e7 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_template.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_template.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { +import type { IndicesGetIndexTemplateRequest, IndicesGetIndexTemplateResponse, } from '@elastic/elasticsearch/lib/api/types'; import { errors } from '@elastic/elasticsearch'; -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; export async function getIndexTemplate( esClient: ElasticsearchClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_templates_by_index_pattern.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_templates_by_index_pattern.ts index 6d87c98ea5e22..bec9441bd1be4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_templates_by_index_pattern.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_index_templates_by_index_pattern.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { IndicesSimulateTemplateResponse } from '@elastic/elasticsearch/lib/api/types'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { IndicesSimulateTemplateResponse } from '@elastic/elasticsearch/lib/api/types'; import { orderBy } from 'lodash'; import { errors } from '@elastic/elasticsearch'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices.ts index fa4b01634893c..245d249edba9d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices.ts @@ -6,7 +6,7 @@ */ import { compact, uniq } from 'lodash'; -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; export function getApmIndexPatterns(indices: string[]) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices_states.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices_states.ts index aa8e2ef94d805..5e236be5760b5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices_states.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_indices_states.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { getApmIndexTemplateNames } from '../helpers/get_apm_index_template_names'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_non_data_stream_indices.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_non_data_stream_indices.ts index f2507657229a1..74755a650dac2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_non_data_stream_indices.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/bundle/get_non_data_stream_indices.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { getApmIndexPatterns } from './get_indices'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_diagnostics_bundle.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_diagnostics_bundle.ts index ca92b48fe4fda..917b84b6aeb93 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_diagnostics_bundle.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_diagnostics_bundle.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { NOT_AVAILABLE_LABEL } from '../../../common/i18n'; import { getDataStreams } from './bundle/get_data_streams'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_elasticsearch_version.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_elasticsearch_version.ts index 5f15275fc1f39..be1090e82354e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_elasticsearch_version.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_elasticsearch_version.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; export async function getElasticsearchVersion(esClient: ElasticsearchClient) { const { version } = await esClient.info(); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_fleet_package_info.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_fleet_package_info.ts index bbfc30c76ad7a..c2a2d507a8018 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_fleet_package_info.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/get_fleet_package_info.ts @@ -6,7 +6,7 @@ */ import { FleetUnauthorizedError } from '@kbn/fleet-plugin/server/errors'; -import { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; +import type { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; export async function getFleetPackageInfo(resources: APMRouteHandlerResources) { const fleetPluginStart = await resources.plugins.fleet?.start(); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_apm_index_template_names.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_apm_index_template_names.ts index 2a5f421ce67d9..c74b7ff89b635 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_apm_index_template_names.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_apm_index_template_names.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IndicesGetIndexTemplateIndexTemplateItem } from '@elastic/elasticsearch/lib/api/types'; +import type { IndicesGetIndexTemplateIndexTemplateItem } from '@elastic/elasticsearch/lib/api/types'; const suffix = 'template'; export function getApmIndexTemplateNames() { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_diagnostic_privileges.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_diagnostic_privileges.ts index 27f6d988e7154..18d98bddd0f7a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_diagnostic_privileges.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/helpers/get_diagnostic_privileges.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { getApmIndexPatterns } from '../bundle/get_indices'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/route.ts index fdeba801f8a6d..f8a1430a27ed8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/diagnostics/route.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { FieldCapsResponse, IndicesDataStream, IndicesGetIndexTemplateIndexTemplateItem, @@ -17,7 +17,7 @@ import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import * as t from 'io-ts'; import { isoToEpochRt } from '@kbn/io-ts-utils'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; -import { ApmEvent } from './bundle/get_apm_events'; +import type { ApmEvent } from './bundle/get_apm_events'; import { getDiagnosticsBundle } from './get_diagnostics_bundle'; import { getFleetPackageInfo } from './get_fleet_package_info'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.test.ts index 91f1eff244def..867c8b10a8739 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.test.ts @@ -6,8 +6,8 @@ */ import { mergeEntities } from './merge_entities'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; -import { EntityLatestServiceRaw } from '../types'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { EntityLatestServiceRaw } from '../types'; describe('mergeEntities', () => { it('modifies one service', () => { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.ts b/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.ts index 1e95656cb1f8e..383b07606de0a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/entities/utils/merge_entities.ts @@ -6,7 +6,7 @@ */ import { compact, uniq } from 'lodash'; -import { EntityDataStreamType } from '@kbn/observability-shared-plugin/common'; +import type { EntityDataStreamType } from '@kbn/observability-shared-plugin/common'; import type { EntityLatestServiceRaw } from '../types'; import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.test.ts index 82a694e31c186..e6100cbc9a55a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.test.ts @@ -6,7 +6,8 @@ */ import { getAllEnvironments } from './get_all_environments'; -import { SearchParamsMock, inspectSearchParams } from '../../utils/test_helpers'; +import type { SearchParamsMock } from '../../utils/test_helpers'; +import { inspectSearchParams } from '../../utils/test_helpers'; describe('getAllEnvironments', () => { let mock: SearchParamsMock; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.ts b/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.ts index 7842069217cfa..acbbb76f1c2cb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_all_environments.ts @@ -10,7 +10,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME, SERVICE_ENVIRONMENT } from '../../../common/es_fields/apm'; import { ENVIRONMENT_NOT_DEFINED } from '../../../common/environment_filter_values'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; /** * This is used for getting *all* environments, and does not filter by range. diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_environments.ts b/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_environments.ts index 90ae73a214f4a..1eeb03087396a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_environments.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/environments/get_environments.ts @@ -10,8 +10,8 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_ENVIRONMENT, SERVICE_NAME } from '../../../common/es_fields/apm'; import { ENVIRONMENT_NOT_DEFINED } from '../../../common/environment_filter_values'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { Environment } from '../../../common/environment_rt'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Environment } from '../../../common/environment_rt'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; /** * This is used for getting the list of environments for the environment selector, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/environments/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/environments/route.ts index 23d9b03e9c48e..181b4688b65f8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/environments/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/environments/route.ts @@ -7,7 +7,7 @@ import * as t from 'io-ts'; import { maxSuggestions } from '@kbn/observability-plugin/common'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { getSearchTransactionsEvents } from '../../lib/helpers/transactions'; import { getEnvironments } from './get_environments'; import { rangeRt } from '../default_api_types'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_buckets.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_buckets.ts index 8b1a87e47ae93..58a0b97ee25d6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_buckets.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_buckets.ts @@ -10,7 +10,7 @@ import { ApmDocumentType } from '../../../../common/document_type'; import { ERROR_GROUP_ID, SERVICE_NAME } from '../../../../common/es_fields/apm'; import { RollupInterval } from '../../../../common/rollup'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getBuckets({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_distribution.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_distribution.ts index 1e048caafe9dd..f7e69e3c7b9b2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_distribution.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/get_distribution.ts @@ -9,8 +9,8 @@ import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset import { BUCKET_TARGET_COUNT } from '../../transactions/constants'; import { getBuckets } from './get_buckets'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { Maybe } from '../../../../typings/common'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Maybe } from '../../../../typings/common'; function getBucketSize({ start, end }: { start: number; end: number }) { return Math.floor((end - start) / BUCKET_TARGET_COUNT); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/queries.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/queries.test.ts index c626f47742602..2be5cab229dab 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/queries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/distribution/queries.test.ts @@ -6,7 +6,8 @@ */ import { getErrorDistribution } from './get_distribution'; -import { SearchParamsMock, inspectSearchParams } from '../../../utils/test_helpers'; +import type { SearchParamsMock } from '../../../utils/test_helpers'; +import { inspectSearchParams } from '../../../utils/test_helpers'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; describe('error distribution queries', () => { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts index c5387ea5e7593..dd542cc6a9126 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/erroneous_transactions/get_top_erroneous_transactions.ts @@ -25,7 +25,7 @@ import { getBucketSize } from '../../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; async function getTopErroneousTransactions({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts index d586c9d7e4777..be48580a7ddec 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_detailed_statistics.ts @@ -8,12 +8,12 @@ import { keyBy } from 'lodash'; import { rangeQuery, kqlQuery, termQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { ERROR_GROUP_ID, SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; interface ErrorGroupDetailedStat { groupId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts index 8f201efbe6549..aa7fcd8868f17 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_main_statistics.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AggregationsAggregateOrder } from '@elastic/elasticsearch/lib/api/types'; +import type { AggregationsAggregateOrder } from '@elastic/elasticsearch/lib/api/types'; import { kqlQuery, rangeQuery, termQuery, wildcardQuery } from '@kbn/observability-plugin/server'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; @@ -26,7 +26,7 @@ import { } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getErrorName } from '../../../lib/helpers/get_error_name'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample_ids.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample_ids.ts index fc80c3f411651..508e2353e7777 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample_ids.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_group_sample_ids.ts @@ -15,7 +15,7 @@ import { TRANSACTION_SAMPLED, } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts index 074a4115d875b..4217ec526c564 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/get_error_groups/get_error_sample_details.ts @@ -33,10 +33,10 @@ import { import { environmentQuery } from '../../../../common/utils/environment_query'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getTransaction } from '../../transactions/get_transaction'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; -import { APMError } from '../../../../typings/es_schemas/ui/apm_error'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { APMError } from '../../../../typings/es_schemas/ui/apm_error'; export interface ErrorSampleDetailsResponse { transaction: Transaction | undefined; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/errors/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/errors/route.ts index 95a5f68f9cce6..9f8a94a858649 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/errors/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/errors/route.ts @@ -9,29 +9,20 @@ import { jsonRt, toNumberRt } from '@kbn/io-ts-utils'; import * as t from 'io-ts'; import { notFound } from '@hapi/boom'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; -import { ErrorDistributionResponse, getErrorDistribution } from './distribution/get_distribution'; +import type { ErrorDistributionResponse } from './distribution/get_distribution'; +import { getErrorDistribution } from './distribution/get_distribution'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; -import { - ErrorGroupMainStatisticsResponse, - getErrorGroupMainStatistics, -} from './get_error_groups/get_error_group_main_statistics'; -import { - ErrorGroupPeriodsResponse, - getErrorGroupPeriods, -} from './get_error_groups/get_error_group_detailed_statistics'; -import { - ErrorGroupSampleIdsResponse, - getErrorGroupSampleIds, -} from './get_error_groups/get_error_group_sample_ids'; -import { - ErrorSampleDetailsResponse, - getErrorSampleDetails, -} from './get_error_groups/get_error_sample_details'; +import type { ErrorGroupMainStatisticsResponse } from './get_error_groups/get_error_group_main_statistics'; +import { getErrorGroupMainStatistics } from './get_error_groups/get_error_group_main_statistics'; +import type { ErrorGroupPeriodsResponse } from './get_error_groups/get_error_group_detailed_statistics'; +import { getErrorGroupPeriods } from './get_error_groups/get_error_group_detailed_statistics'; +import type { ErrorGroupSampleIdsResponse } from './get_error_groups/get_error_group_sample_ids'; +import { getErrorGroupSampleIds } from './get_error_groups/get_error_group_sample_ids'; +import type { ErrorSampleDetailsResponse } from './get_error_groups/get_error_sample_details'; +import { getErrorSampleDetails } from './get_error_groups/get_error_sample_details'; import { offsetRt } from '../../../common/comparison_rt'; -import { - getTopErroneousTransactionsPeriods, - TopErroneousTransactionsResponse, -} from './erroneous_transactions/get_top_erroneous_transactions'; +import type { TopErroneousTransactionsResponse } from './erroneous_transactions/get_top_erroneous_transactions'; +import { getTopErroneousTransactionsPeriods } from './erroneous_transactions/get_top_erroneous_transactions'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; const errorsMainStatisticsRoute = createApmServerRoute({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/add_api_keys_to_policies_if_missing.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/add_api_keys_to_policies_if_missing.ts index a59795b3e1cfd..a5b16d6d44da6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/add_api_keys_to_policies_if_missing.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/add_api_keys_to_policies_if_missing.ts @@ -6,11 +6,11 @@ */ import { omit } from 'lodash'; -import { PackagePolicy } from '@kbn/fleet-plugin/common'; -import { CoreStart, Logger } from '@kbn/core/server'; -import { FleetStartContract } from '@kbn/fleet-plugin/server'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { CoreStart, Logger } from '@kbn/core/server'; +import type { FleetStartContract } from '@kbn/fleet-plugin/server'; import { getInternalSavedObjectsClient } from '../../../lib/helpers/get_internal_saved_objects_client'; -import { APMPluginStartDependencies } from '../../../types'; +import type { APMPluginStartDependencies } from '../../../types'; import { getApmPackagePolicies } from '../get_apm_package_policies'; import { createApmAgentConfigApiKey, createApmSourceMapApiKey } from './create_apm_api_keys'; import { getPackagePolicyWithApiKeys, policyHasApiKey } from '../get_package_policy_decorators'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/create_apm_api_keys.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/create_apm_api_keys.ts index 88488d6c04f8a..7b64a477d7b2e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/create_apm_api_keys.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/api_keys/create_apm_api_keys.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart, Logger } from '@kbn/core/server'; +import type { CoreStart, Logger } from '@kbn/core/server'; import { APM_AGENT_CONFIGURATION_INDEX, APM_SOURCE_MAP_INDEX, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/create_cloud_apm_package_policy.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/create_cloud_apm_package_policy.ts index 2faf26022de33..1dc1d4ae98e60 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/create_cloud_apm_package_policy.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/create_cloud_apm_package_policy.ts @@ -5,23 +5,23 @@ * 2.0. */ -import { +import type { ElasticsearchClient, SavedObjectsClientContract, Logger, KibanaRequest, } from '@kbn/core/server'; -import { PackagePolicy } from '@kbn/fleet-plugin/common'; -import { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { APM_SERVER_SCHEMA_SAVED_OBJECT_TYPE, APM_SERVER_SCHEMA_SAVED_OBJECT_ID, } from '../../../common/apm_saved_object_constants'; -import { APMPluginSetupDependencies, APMPluginStartDependencies } from '../../types'; +import type { APMPluginSetupDependencies, APMPluginStartDependencies } from '../../types'; import { getApmPackagePolicyDefinition } from './get_apm_package_policy_definition'; import { decoratePackagePolicyWithAgentConfigAndSourceMap } from './merge_package_policy_with_apm'; import { ELASTIC_CLOUD_APM_AGENT_POLICY_ID } from '../../../common/fleet'; -import { APMInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; export async function createCloudApmPackgePolicy({ cloudPluginSetup, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_agents.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_agents.ts index e989e0da42321..6fff163f628e9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_agents.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_agents.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; -import { FleetStartContract } from '@kbn/fleet-plugin/server'; -import { CloudSetup } from '@kbn/cloud-plugin/server'; +import type { CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; +import type { FleetStartContract } from '@kbn/fleet-plugin/server'; +import type { CloudSetup } from '@kbn/cloud-plugin/server'; import { keyBy } from 'lodash'; -import { APMPluginStartDependencies } from '../../types'; +import type { APMPluginStartDependencies } from '../../types'; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; import { getApmPackagePolicies } from './get_apm_package_policies'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policies.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policies.ts index bbc49ced78dc1..22422155903ec 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policies.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; -import { APMPluginStartDependencies } from '../../types'; +import type { CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; +import type { APMPluginStartDependencies } from '../../types'; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; export async function getApmPackagePolicies({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts index 06037bf53fdc6..224192b95ce94 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_apm_package_policy_definition.ts @@ -6,13 +6,13 @@ */ import yaml from 'js-yaml'; -import { KibanaRequest } from '@kbn/core/server'; -import { RegistryVarsEntry } from '@kbn/fleet-plugin/common'; +import type { KibanaRequest } from '@kbn/core/server'; +import type { RegistryVarsEntry } from '@kbn/fleet-plugin/common'; import { POLICY_ELASTIC_AGENT_ON_CLOUD, INPUT_VAR_NAME_TO_SCHEMA_PATH, } from '../../../common/fleet'; -import { APMPluginSetupDependencies, APMPluginStartDependencies } from '../../types'; +import type { APMPluginSetupDependencies, APMPluginStartDependencies } from '../../types'; import { getLatestApmPackage } from './get_latest_apm_package'; import { translateLegacySchemaPaths } from './translate_legacy_schema_paths'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_cloud_apm_package_policy.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_cloud_apm_package_policy.ts index 21b8fe3929930..328944d06bbd6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_cloud_apm_package_policy.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_cloud_apm_package_policy.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { AgentPolicy, PackagePolicy } from '@kbn/fleet-plugin/common'; -import { Maybe } from '../../../typings/common'; -import { APMPluginStartDependencies } from '../../types'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { AgentPolicy, PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { Maybe } from '../../../typings/common'; +import type { APMPluginStartDependencies } from '../../types'; import { POLICY_ELASTIC_AGENT_ON_CLOUD } from '../../../common/fleet'; export const APM_PACKAGE_NAME = 'apm'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_latest_apm_package.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_latest_apm_package.ts index e63a0f9b468b1..673674fd1dc2d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_latest_apm_package.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_latest_apm_package.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; -import { APMPluginStartDependencies } from '../../types'; +import type { KibanaRequest } from '@kbn/core/server'; +import type { APMPluginStartDependencies } from '../../types'; import { APM_PACKAGE_NAME } from './get_cloud_apm_package_policy'; export async function getLatestApmPackage({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_package_policy_decorators.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_package_policy_decorators.ts index 39d02e95b6109..a1a37ca1687a8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_package_policy_decorators.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_package_policy_decorators.ts @@ -7,10 +7,10 @@ import { set } from '@kbn/safer-lodash-set'; import { cloneDeep, get } from 'lodash'; -import { NewPackagePolicy } from '@kbn/fleet-plugin/common'; -import { AgentConfiguration } from '../../../common/agent_configuration/configuration_types'; +import type { NewPackagePolicy } from '@kbn/fleet-plugin/common'; +import type { AgentConfiguration } from '../../../common/agent_configuration/configuration_types'; import { AGENT_NAME } from '../../../common/es_fields/apm'; -import { ArtifactSourceMap } from './source_maps'; +import type { ArtifactSourceMap } from './source_maps'; // agent config export const AGENT_CONFIG_PATH = `inputs[0].config['apm-server'].value.agent_config`; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.test.ts index 2e2473e425a27..cdfce93eb70b4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { getUnsupportedApmServerSchema } from './get_unsupported_apm_server_schema'; const apmServerSchema = { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.ts index 99cddebcf0d91..9c7718fda20b3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/get_unsupported_apm_server_schema.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { INPUT_VAR_NAME_TO_SCHEMA_PATH } from '../../../common/fleet'; import { APM_SERVER_SCHEMA_SAVED_OBJECT_TYPE, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/is_superuser.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/is_superuser.ts index 97a6bd92a88de..2fee1b29c4435 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/is_superuser.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/is_superuser.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart, KibanaRequest } from '@kbn/core/server'; +import type { CoreStart, KibanaRequest } from '@kbn/core/server'; export function isSuperuser({ coreStart, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts index e7a01142a052b..b4dc631f0efba 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/merge_package_policy_with_apm.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { NewPackagePolicy } from '@kbn/fleet-plugin/common'; -import { APMInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; -import { APMPluginStartDependencies } from '../../types'; +import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import type { NewPackagePolicy } from '@kbn/fleet-plugin/common'; +import type { APMInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMPluginStartDependencies } from '../../types'; import { listConfigurations } from '../settings/agent_configuration/list_configurations'; import { getPackagePolicyWithAgentConfigurations, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts index 2237548f2d325..65d099e9aea3d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/register_fleet_policy_callbacks.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { Logger, CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; -import { +import type { Logger, CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; +import type { FleetStartContract, PostPackagePolicyCreateCallback, PostPackagePolicyDeleteCallback, @@ -23,7 +23,7 @@ import { } from './get_package_policy_decorators'; import { createInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; -import { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; +import type { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; export async function registerFleetPolicyCallbacks({ logger, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/route.ts index ab74a48887f6a..c4b8789543649 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/route.ts @@ -8,25 +8,25 @@ import Boom from '@hapi/boom'; import { i18n } from '@kbn/i18n'; import * as t from 'io-ts'; -import { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { APM_SERVER_SCHEMA_SAVED_OBJECT_ID, APM_SERVER_SCHEMA_SAVED_OBJECT_TYPE, } from '../../../common/apm_saved_object_constants'; -import { ApmFeatureFlags } from '../../../common/apm_feature_flags'; +import type { ApmFeatureFlags } from '../../../common/apm_feature_flags'; import { createInternalESClientWithResources } from '../../lib/helpers/create_es_client/create_internal_es_client'; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { createCloudApmPackgePolicy } from './create_cloud_apm_package_policy'; -import { FleetAgentResponse, getFleetAgents } from './get_agents'; +import type { FleetAgentResponse } from './get_agents'; +import { getFleetAgents } from './get_agents'; import { getApmPackagePolicies } from './get_apm_package_policies'; import { getJavaAgentVersionsFromRegistry } from './get_java_agent_versions'; -import { - getUnsupportedApmServerSchema, - UnsupportedApmServerSchema, -} from './get_unsupported_apm_server_schema'; +import type { UnsupportedApmServerSchema } from './get_unsupported_apm_server_schema'; +import { getUnsupportedApmServerSchema } from './get_unsupported_apm_server_schema'; import { isSuperuser } from './is_superuser'; -import { runMigrationCheck, RunMigrationCheckResponse } from './run_migration_check'; +import type { RunMigrationCheckResponse } from './run_migration_check'; +import { runMigrationCheck } from './run_migration_check'; function throwNotFoundIfFleetMigrationNotAvailable(featureFlags: ApmFeatureFlags): void { if (!featureFlags.migrationToFleetAvailable) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/run_migration_check.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/run_migration_check.ts index ff4487c0684d9..7b050071c8fa2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/run_migration_check.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/run_migration_check.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { PackagePolicy } from '@kbn/fleet-plugin/common'; -import { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { APMRouteHandlerResources } from '../apm_routes/register_apm_server_routes'; import { getApmPackagePolicies } from './get_apm_package_policies'; import { getApmPackagePolicy, getCloudAgentPolicy } from './get_cloud_apm_package_policy'; import { getLatestApmPackage } from './get_latest_apm_package'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.test.ts index b11cf58f8be01..3883f68d2494d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.test.ts @@ -6,7 +6,8 @@ */ import { getPackagePolicyWithSourceMap } from './get_package_policy_decorators'; -import { ArtifactSourceMap, getCleanedBundleFilePath } from './source_maps'; +import type { ArtifactSourceMap } from './source_maps'; +import { getCleanedBundleFilePath } from './source_maps'; const packagePolicy = { id: '123', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.ts index 0ec305058affb..be9fc9e771499 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/source_maps.ts @@ -4,12 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart, ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { CoreStart, ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; import { promisify } from 'util'; import { unzip } from 'zlib'; -import { Artifact } from '@kbn/fleet-plugin/server'; -import { SourceMap } from '../source_maps/route'; -import { APMPluginStartDependencies } from '../../types'; +import type { Artifact } from '@kbn/fleet-plugin/server'; +import type { SourceMap } from '../source_maps/route'; +import type { APMPluginStartDependencies } from '../../types'; import { getApmPackagePolicies } from './get_apm_package_policies'; import { getPackagePolicyWithSourceMap } from './get_package_policy_decorators'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts index b7881d478825e..f368a91211caa 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/fleet/sync_agent_configs_to_apm_package_policies.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; -import { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { TelemetryUsageCounter } from '../typings'; -import { APMPluginStartDependencies } from '../../types'; +import type { CoreStart, SavedObjectsClientContract } from '@kbn/core/server'; +import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import type { TelemetryUsageCounter } from '../typings'; +import type { APMPluginStartDependencies } from '../../types'; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; import { listConfigurations } from '../settings/agent_configuration/list_configurations'; import { getApmPackagePolicies } from './get_apm_package_policies'; import { getPackagePolicyWithAgentConfigurations } from './get_package_policy_decorators'; -import { APMInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../lib/helpers/create_es_client/create_internal_es_client'; export async function syncAgentConfigsToApmPackagePolicies({ coreStartPromise, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_agent_data.ts b/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_agent_data.ts index 5489d893f86f1..ab7fe11a38c8b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_agent_data.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_agent_data.ts @@ -7,7 +7,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { DataTier } from '@kbn/observability-shared-plugin/common'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function hasHistoricalAgentData(apmEventClient: APMEventClient) { const hasDataInWarmOrHotDataTiers = await hasDataRequest(apmEventClient, [ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_entities_data.ts b/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_entities_data.ts index f245c27a99036..747dc930ed1ed 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_entities_data.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/historical_data/has_historical_entities_data.ts @@ -5,9 +5,9 @@ * 2.0. */ import { WrappedElasticsearchClientError } from '@kbn/observability-plugin/server'; -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { errors } from '@elastic/elasticsearch'; -import { EntitiesESClient } from '../../lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client'; +import type { EntitiesESClient } from '../../lib/helpers/create_es_client/create_entities_es_client/create_entities_es_client'; export async function hasEntitiesData(entitiesESClient: EntitiesESClient, logger: Logger) { const params = { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_host_names.ts b/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_host_names.ts index b79b0e5b4358a..f776f5248b75b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_host_names.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_host_names.ts @@ -7,7 +7,7 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { CONTAINER_ID, HOST_NAME } from '../../../common/es_fields/apm'; -import { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; +import type { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; export async function getContainerHostNames({ containerIds, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts b/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts index a8013a2433f2d..14dabb21098c6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/infrastructure/get_infrastructure_data.ts @@ -14,7 +14,7 @@ import { HOST_HOSTNAME, KUBERNETES_POD_NAME, } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export const getInfrastructureData = async ({ kuery, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_overall_latency_distribution.ts b/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_overall_latency_distribution.ts index f1ffe5b3ddfbf..fa59e5bc81651 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_overall_latency_distribution.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_overall_latency_distribution.ts @@ -6,14 +6,14 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { withApmSpan } from '../../utils/with_apm_span'; import { fetchDurationRanges } from '../correlations/queries/fetch_duration_ranges'; import { fetchDurationHistogramRangeSteps } from '../correlations/queries/fetch_duration_histogram_range_steps'; import { getPercentileThresholdValue } from './get_percentile_threshold_value'; import type { OverallLatencyDistributionResponse } from './types'; -import { LatencyDistributionChartType } from '../../../common/latency_distribution_chart_types'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { LatencyDistributionChartType } from '../../../common/latency_distribution_chart_types'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getOverallLatencyDistribution({ chartType, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_percentile_threshold_value.ts b/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_percentile_threshold_value.ts index bb6b65c4a1735..4933a33177842 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_percentile_threshold_value.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/get_percentile_threshold_value.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { CommonCorrelationsQueryParams } from '../../../common/correlations/types'; -import { LatencyDistributionChartType } from '../../../common/latency_distribution_chart_types'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { CommonCorrelationsQueryParams } from '../../../common/correlations/types'; +import type { LatencyDistributionChartType } from '../../../common/latency_distribution_chart_types'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { fetchDurationPercentiles } from '../correlations/queries/fetch_duration_percentiles'; export async function getPercentileThresholdValue({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/route.ts index 704eaf393702e..413a80ae40bd9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/latency_distribution/route.ts @@ -8,7 +8,7 @@ import * as t from 'io-ts'; import { toNumberRt } from '@kbn/io-ts-utils'; import { termQuery } from '@kbn/observability-plugin/server'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { getOverallLatencyDistribution } from './get_overall_latency_distribution'; import { getSearchTransactionsEvents } from '../../lib/helpers/transactions'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; @@ -19,7 +19,7 @@ import { LatencyDistributionChartType, } from '../../../common/latency_distribution_chart_types'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; -import { OverallLatencyDistributionResponse } from './types'; +import type { OverallLatencyDistributionResponse } from './types'; const latencyOverallTransactionDistributionRoute = createApmServerRoute({ endpoint: 'POST /internal/apm/latency/overall_distribution/transactions', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/default.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/default.ts index 1d465160eb707..49c15807208d0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/default.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/default.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { APMConfig } from '../../..'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../..'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getCPUChartData } from './shared/cpu'; import { getMemoryChartData } from './shared/memory'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts index 0f5e639c295ac..2b43a79567433 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; -import { ChartBase } from '../../../types'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ChartBase } from '../../../types'; import { fetchAndTransformGcMetrics, TIME, RATE } from './fetch_and_transform_gc_metrics'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts index 5bc31262b0d95..4e3e45e00722c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/fetch_and_transform_gc_metrics.ts @@ -11,7 +11,7 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { isFiniteNumber } from '../../../../../../common/utils/is_finite_number'; import { getMetricsDateHistogramParams } from '../../../../../lib/helpers/metrics'; -import { ChartBase } from '../../../types'; +import type { ChartBase } from '../../../types'; import { AGENT_NAME, @@ -29,8 +29,8 @@ import { environmentQuery, serviceNodeNameQuery, } from '../../../../../../common/utils/environment_query'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; export const RATE = 'rate'; export const TIME = 'time'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts index 40810accdf1c2..9cbc4c49c5d37 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_rate_chart.ts @@ -9,9 +9,9 @@ import { euiLightVars as theme } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; import { METRIC_JAVA_GC_COUNT } from '../../../../../../common/es_fields/apm'; import { fetchAndTransformGcMetrics, RATE } from './fetch_and_transform_gc_metrics'; -import { ChartBase } from '../../../types'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ChartBase } from '../../../types'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { [METRIC_JAVA_GC_COUNT]: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts index 8b1b08e5c5d20..4f957ec9c3d99 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/gc/get_gc_time_chart.ts @@ -9,9 +9,9 @@ import { euiLightVars as theme } from '@kbn/ui-theme'; import { i18n } from '@kbn/i18n'; import { METRIC_JAVA_GC_TIME } from '../../../../../../common/es_fields/apm'; import { fetchAndTransformGcMetrics, TIME } from './fetch_and_transform_gc_metrics'; -import { ChartBase } from '../../../types'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMConfig } from '../../../../..'; +import type { ChartBase } from '../../../types'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; const series = { [METRIC_JAVA_GC_TIME]: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts index 49b6146ca5db9..e47e1f199d353 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/heap_memory/index.ts @@ -19,10 +19,10 @@ import { AGENT_NAME, } from '../../../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; -import { ChartBase } from '../../../types'; +import type { ChartBase } from '../../../types'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { heapMemoryUsed: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/index.ts index 8fe91f796fc4c..23ddd3564cfbe 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/index.ts @@ -14,8 +14,8 @@ import { getMemoryChartData } from '../shared/memory'; import { getOTelSystemCPUChartDataForJava } from './otel_cpu'; import { getGcRateChart } from './gc/get_gc_rate_chart'; import { getGcTimeChart } from './gc/get_gc_time_chart'; -import { APMConfig } from '../../../..'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../..'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; export function getJavaMetricsCharts({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts index 54e47b8487fa7..e3080de983e73 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/non_heap_memory/index.ts @@ -18,11 +18,11 @@ import { LABEL_TYPE, AGENT_NAME, } from '../../../../../../common/es_fields/apm'; -import { ChartBase } from '../../../types'; +import type { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { nonHeapMemoryUsed: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/otel_cpu/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/otel_cpu/index.ts index 49d08a148e096..975286f7a94a0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/otel_cpu/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/otel_cpu/index.ts @@ -11,10 +11,10 @@ import { METRIC_OTEL_JVM_SYSTEM_CPU_PERCENT, METRIC_OTEL_JVM_PROCESS_CPU_PERCENT, } from '../../../../../../common/es_fields/apm'; -import { ChartBase } from '../../../types'; +import type { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { systemCPUMax: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts index 92ed1a45ffd10..8278770eebe0b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/java/thread_count/index.ts @@ -12,11 +12,11 @@ import { METRIC_OTEL_JVM_PROCESS_THREADS_COUNT, AGENT_NAME, } from '../../../../../../common/es_fields/apm'; -import { ChartBase } from '../../../types'; +import type { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; import { JAVA_AGENT_NAMES } from '../../../../../../common/agent_name'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { threadCount: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts index e39587a0a94dc..01cc59ba858df 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/cpu/index.ts @@ -12,10 +12,10 @@ import { METRIC_PROCESS_CPU_PERCENT, METRIC_OTEL_SYSTEM_CPU_UTILIZATION, } from '../../../../../../common/es_fields/apm'; -import { ChartBase } from '../../../types'; +import type { ChartBase } from '../../../types'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { systemCPUMax: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts index af3e7301f8e61..960f153bb6f45 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/by_agent/shared/memory/index.ts @@ -17,9 +17,9 @@ import { METRIC_OTEL_SYSTEM_MEMORY_UTILIZATION, } from '../../../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../../../fetch_and_transform_metrics'; -import { ChartBase } from '../../../types'; -import { APMConfig } from '../../../../..'; -import { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ChartBase } from '../../../types'; +import type { APMConfig } from '../../../../..'; +import type { APMEventClient } from '../../../../../lib/helpers/create_es_client/create_apm_event_client'; const series = { memoryUsedMax: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts index ad60dc67356ec..b177bb7cde384 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/fetch_and_transform_metrics.ts @@ -5,23 +5,23 @@ * 2.0. */ -import { Unionize } from 'utility-types'; +import type { Unionize } from 'utility-types'; import { euiLightVars as theme } from '@kbn/ui-theme'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import type { AggregationOptionsByType } from '@kbn/es-types'; import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getVizColorForIndex } from '../../../common/viz_colors'; -import { +import type { APMEventClient, APMEventESSearchRequest, } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getMetricsDateHistogramParams } from '../../lib/helpers/metrics'; -import { ChartBase } from './types'; +import type { ChartBase } from './types'; import { environmentQuery, serviceNodeNameQuery } from '../../../common/utils/environment_query'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; -import { ChartType, Coordinate, YUnit } from '../../../typings/timeseries'; -import { APMConfig } from '../..'; +import type { ChartType, Coordinate, YUnit } from '../../../typings/timeseries'; +import type { APMConfig } from '../..'; type MetricsAggregationMap = Unionize<{ min: AggregationOptionsByType['min']; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_metrics_chart_data_by_agent.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_metrics_chart_data_by_agent.ts index c16a63dbe4d23..3d71d1b35625f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_metrics_chart_data_by_agent.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_metrics_chart_data_by_agent.ts @@ -8,9 +8,9 @@ import { getJavaMetricsCharts } from './by_agent/java'; import { getDefaultMetricsCharts } from './by_agent/default'; import { isJavaAgentName } from '../../../common/agent_name'; -import { GenericMetricsChart } from './fetch_and_transform_metrics'; -import { APMConfig } from '../..'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { GenericMetricsChart } from './fetch_and_transform_metrics'; +import type { APMConfig } from '../..'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { hasOTelMetrics } from './has_otel_metrics'; export async function getMetricsChartDataByAgent({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_service_nodes.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_service_nodes.ts index ab6dbdb5d9b9d..2f3cdb58fcc02 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_service_nodes.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/get_service_nodes.ts @@ -24,7 +24,7 @@ import { SERVICE_NODE_NAME_MISSING } from '../../../common/service_nodes'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; import { SERVICE_NAME, SERVICE_NODE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { hasOTelMetrics } from './has_otel_metrics'; export type ServiceNodesResponse = Array<{ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/has_otel_metrics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/has_otel_metrics.ts index 1a9b2ab6e3581..52198fc874e01 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/has_otel_metrics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/has_otel_metrics.ts @@ -16,7 +16,7 @@ import { } from '../../../common/es_fields/apm'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; const hasOTelMetrics = async ({ kuery, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/queries.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/queries.test.ts index eb94bc8bdf762..06f8e5fa4c3e9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/queries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/queries.test.ts @@ -10,7 +10,8 @@ import { getMemoryChartData } from './by_agent/shared/memory'; import { getHeapMemoryChart } from './by_agent/java/heap_memory'; import { getNonHeapMemoryChart } from './by_agent/java/non_heap_memory'; import { getThreadCountChart } from './by_agent/java/thread_count'; -import { SearchParamsMock, inspectSearchParams } from '../../utils/test_helpers'; +import type { SearchParamsMock } from '../../utils/test_helpers'; +import { inspectSearchParams } from '../../utils/test_helpers'; import { SERVICE_NODE_NAME_MISSING } from '../../../common/service_nodes'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/route.ts index 63fcd8ad87e67..5238cb50642b0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/route.ts @@ -9,9 +9,10 @@ import * as t from 'io-ts'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; -import { FetchAndTransformMetrics } from './fetch_and_transform_metrics'; +import type { FetchAndTransformMetrics } from './fetch_and_transform_metrics'; import { getMetricsChartDataByAgent } from './get_metrics_chart_data_by_agent'; -import { getServiceNodes, ServiceNodesResponse } from './get_service_nodes'; +import type { ServiceNodesResponse } from './get_service_nodes'; +import { getServiceNodes } from './get_service_nodes'; import { metricsServerlessRouteRepository } from './serverless/route'; const metricsChartsRoute = createApmServerRoute({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts index 294f25e4788ed..17aff6da9d8d0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_overview.ts @@ -18,10 +18,10 @@ import { } from '../../../../common/es_fields/apm'; import { getServerlessFunctionNameFromId } from '../../../../common/serverless'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { getBucketSize } from '../../../../common/utils/get_bucket_size'; import { calcMemoryUsed } from './helper'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; interface ActiveInstanceTimeseries { serverlessDuration: Coordinate[]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts index 2f22232a8f19a..4efe74df7771c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_active_instances_timeseries.ts @@ -14,10 +14,10 @@ import { SERVICE_NODE_NAME, } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { getMetricsDateHistogramParams } from '../../../lib/helpers/metrics'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMConfig } from '../../..'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../..'; export async function getActiveInstancesTimeseries({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts index 343b4a928238e..1fda5f73bc76c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_count_chart.ts @@ -8,11 +8,11 @@ import { i18n } from '@kbn/i18n'; import { termQuery } from '@kbn/observability-plugin/server'; import { euiLightVars as theme } from '@kbn/ui-theme'; -import { APMConfig } from '../../..'; +import type { APMConfig } from '../../..'; import { FAAS_COLDSTART, FAAS_ID, METRICSET_NAME } from '../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../fetch_and_transform_metrics'; -import { ChartBase } from '../types'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ChartBase } from '../types'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; const chartBase: ChartBase = { title: i18n.translate('xpack.apm.agentMetrics.serverless.coldStart.title', { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts index dac1f94908824..a40a4a4a4a131 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_cold_start_duration_chart.ts @@ -10,10 +10,10 @@ import { euiLightVars as theme } from '@kbn/ui-theme'; import { termQuery } from '@kbn/observability-plugin/server'; import { FAAS_COLDSTART_DURATION, FAAS_ID, METRICSET_NAME } from '../../../../common/es_fields/apm'; import { fetchAndTransformMetrics } from '../fetch_and_transform_metrics'; -import { ChartBase } from '../types'; +import type { ChartBase } from '../types'; import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; -import { APMConfig } from '../../..'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../..'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; const chartBase: ChartBase = { title: i18n.translate('xpack.apm.agentMetrics.serverless.coldStartDuration', { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts index 3cdb1469295a9..b8e92dc7ac2a5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_compute_usage_chart.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { euiLightVars as theme } from '@kbn/ui-theme'; -import { APMConfig } from '../../..'; +import type { APMConfig } from '../../..'; import { FAAS_BILLED_DURATION, FAAS_ID, @@ -19,8 +19,8 @@ import { } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getMetricsDateHistogramParams } from '../../../lib/helpers/metrics'; -import { GenericMetricsChart } from '../fetch_and_transform_metrics'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { GenericMetricsChart } from '../fetch_and_transform_metrics'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { convertComputeUsageToGbSec } from './helper'; export const computeUsageAvgScript = { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_agent_metrics_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_agent_metrics_chart.ts index 6fae8dcd0fd9b..71e45257f0cae 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_agent_metrics_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_agent_metrics_chart.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { APMConfig } from '../../..'; -import { ApmTransactionDocumentType } from '../../../../common/document_type'; -import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../..'; +import type { ApmTransactionDocumentType } from '../../../../common/document_type'; +import type { RollupInterval } from '../../../../common/rollup'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { withApmSpan } from '../../../utils/with_apm_span'; import { getMemoryChartData } from '../by_agent/shared/memory'; import { getColdStartCountChart } from './get_cold_start_count_chart'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts index 57f7d4d30c674..4735855188e9d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_function_latency_chart.ts @@ -9,17 +9,18 @@ import { i18n } from '@kbn/i18n'; import { termQuery } from '@kbn/observability-plugin/server'; import { euiLightVars as theme } from '@kbn/ui-theme'; import { isEmpty } from 'lodash'; -import { APMConfig } from '../../..'; -import { ApmTransactionDocumentType } from '../../../../common/document_type'; +import type { APMConfig } from '../../..'; +import type { ApmTransactionDocumentType } from '../../../../common/document_type'; import { FAAS_BILLED_DURATION, FAAS_ID, METRICSET_NAME } from '../../../../common/es_fields/apm'; import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; -import { RollupInterval } from '../../../../common/rollup'; +import type { RollupInterval } from '../../../../common/rollup'; import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; import { getVizColorForIndex } from '../../../../common/viz_colors'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getLatencyTimeseries } from '../../transactions/get_latency_charts'; -import { fetchAndTransformMetrics, GenericMetricsChart } from '../fetch_and_transform_metrics'; -import { ChartBase } from '../types'; +import type { GenericMetricsChart } from '../fetch_and_transform_metrics'; +import { fetchAndTransformMetrics } from '../fetch_and_transform_metrics'; +import type { ChartBase } from '../types'; const billedDurationAvg = { title: i18n.translate('xpack.apm.agentMetrics.serverless.billedDurationAvg', { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts index b4dcd82c3bc15..6de5977960ef6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_functions_overview.ts @@ -19,7 +19,7 @@ import { import { getServerlessFunctionNameFromId } from '../../../../common/serverless'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { calcMemoryUsed } from './helper'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export type ServerlessFunctionsOverviewResponse = Array<{ serverlessId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts index 094120044e306..e9e3fe64fcd54 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/get_serverless_summary.ts @@ -19,7 +19,7 @@ import { } from '../../../../common/es_fields/apm'; import { RollupInterval } from '../../../../common/rollup'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { computeUsageAvgScript } from './get_compute_usage_chart'; import { calcEstimatedCost, calcMemoryUsedRate, convertComputeUsageToGbSec } from './helper'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/helper.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/helper.ts index 8f5859a748937..f67fa82d0c294 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/helper.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/helper.ts @@ -5,7 +5,7 @@ * 2.0. */ import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; -import { AwsLambdaArchitecture, AWSLambdaPriceFactor } from './get_serverless_summary'; +import type { AwsLambdaArchitecture, AWSLambdaPriceFactor } from './get_serverless_summary'; export function calcMemoryUsedRate({ memoryFree, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/route.ts index 0432409344fe4..4dc220503a16a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/serverless/route.ts @@ -14,23 +14,16 @@ import { toNumberRt } from '@kbn/io-ts-utils'; import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt, transactionDataSourceRt } from '../../default_api_types'; import { getServerlessAgentMetricsCharts } from './get_serverless_agent_metrics_chart'; -import { - ActiveInstanceOverview, - getServerlessActiveInstancesOverview, -} from './get_active_instances_overview'; -import { - getServerlessFunctionsOverview, - ServerlessFunctionsOverviewResponse, -} from './get_serverless_functions_overview'; -import { - AWSLambdaPriceFactor, - getServerlessSummary, - ServerlessSummaryResponse, -} from './get_serverless_summary'; +import type { ActiveInstanceOverview } from './get_active_instances_overview'; +import { getServerlessActiveInstancesOverview } from './get_active_instances_overview'; +import type { ServerlessFunctionsOverviewResponse } from './get_serverless_functions_overview'; +import { getServerlessFunctionsOverview } from './get_serverless_functions_overview'; +import type { AWSLambdaPriceFactor, ServerlessSummaryResponse } from './get_serverless_summary'; +import { getServerlessSummary } from './get_serverless_summary'; import { getActiveInstancesTimeseries } from './get_active_instances_timeseries'; import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; -import { FetchAndTransformMetrics } from '../fetch_and_transform_metrics'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { FetchAndTransformMetrics } from '../fetch_and_transform_metrics'; +import type { Coordinate } from '../../../../typings/timeseries'; const serverlessMetricsChartsRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/services/{serviceName}/metrics/serverless/charts', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/types.ts b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/types.ts index 0cbf1cfce0916..9c9b85a117657 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/metrics/types.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/metrics/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ChartType, YUnit } from '../../../typings/timeseries'; +import type { ChartType, YUnit } from '../../../typings/timeseries'; export interface ChartBase { title: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_buckets.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_buckets.ts index 295995236224c..32116ebb5b3ff 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_buckets.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_buckets.ts @@ -9,7 +9,7 @@ import { rangeQuery, kqlQuery, termQuery } from '@kbn/observability-plugin/serve import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { ERROR_GROUP_ID, SERVICE_NAME, ERROR_TYPE } from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getBuckets({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_distribution.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_distribution.ts index 1599ea3c8e87c..da01e7cd2ab09 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_distribution.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/get_distribution.ts @@ -9,8 +9,8 @@ import { offsetPreviousPeriodCoordinates } from '../../../../../common/utils/off import { BUCKET_TARGET_COUNT } from '../../../transactions/constants'; import { getBuckets } from './get_buckets'; import { getOffsetInMs } from '../../../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; -import { Maybe } from '../../../../../typings/common'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Maybe } from '../../../../../typings/common'; function getBucketSize({ start, end }: { start: number; end: number }) { return Math.floor((end - start) / BUCKET_TARGET_COUNT); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/queries.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/queries.test.ts index 2b41b4fb37d95..330ac18eb3a1d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/queries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/distribution/queries.test.ts @@ -6,7 +6,8 @@ */ import { getCrashDistribution } from './get_distribution'; -import { SearchParamsMock, inspectSearchParams } from '../../../../utils/test_helpers'; +import type { SearchParamsMock } from '../../../../utils/test_helpers'; +import { inspectSearchParams } from '../../../../utils/test_helpers'; import { ENVIRONMENT_ALL } from '../../../../../common/environment_filter_values'; describe('error distribution queries', () => { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_crash_groups/get_crash_group_main_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_crash_groups/get_crash_group_main_statistics.ts index c606a6b045a93..51cecac6a6989 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_crash_groups/get_crash_group_main_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_crash_groups/get_crash_group_main_statistics.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AggregationsAggregateOrder } from '@elastic/elasticsearch/lib/api/types'; +import type { AggregationsAggregateOrder } from '@elastic/elasticsearch/lib/api/types'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; @@ -25,7 +25,7 @@ import { } from '../../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../../common/utils/environment_query'; import { getErrorName } from '../../../../lib/helpers/get_error_name'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; export type MobileCrashGroupMainStatisticsResponse = Array<{ groupId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_mobile_crash_group_detailed_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_mobile_crash_group_detailed_statistics.ts index 20194b7b419ad..93d1f91c5c7e0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_mobile_crash_group_detailed_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/get_mobile_crash_group_detailed_statistics.ts @@ -8,12 +8,12 @@ import { keyBy } from 'lodash'; import { rangeQuery, kqlQuery, termQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { ERROR_GROUP_ID, ERROR_TYPE, SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; interface CrashGroupDetailedStat { groupId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/route.ts index a8dbc788836c6..bf5483605fce0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/crashes/route.ts @@ -10,15 +10,12 @@ import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../../default_api_types'; import { offsetRt } from '../../../../common/comparison_rt'; -import { - getMobileCrashGroupMainStatistics, - MobileCrashGroupMainStatisticsResponse, -} from './get_crash_groups/get_crash_group_main_statistics'; -import { - MobileCrashesGroupPeriodsResponse, - getMobileCrashesGroupPeriods, -} from './get_mobile_crash_group_detailed_statistics'; -import { CrashDistributionResponse, getCrashDistribution } from './distribution/get_distribution'; +import type { MobileCrashGroupMainStatisticsResponse } from './get_crash_groups/get_crash_group_main_statistics'; +import { getMobileCrashGroupMainStatistics } from './get_crash_groups/get_crash_group_main_statistics'; +import type { MobileCrashesGroupPeriodsResponse } from './get_mobile_crash_group_detailed_statistics'; +import { getMobileCrashesGroupPeriods } from './get_mobile_crash_group_detailed_statistics'; +import type { CrashDistributionResponse } from './distribution/get_distribution'; +import { getCrashDistribution } from './distribution/get_distribution'; const mobileCrashDistributionRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/mobile-services/{serviceName}/crashes/distribution', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_detailed_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_detailed_statistics.ts index bcf60a51c200a..9498363b17025 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_detailed_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_detailed_statistics.ts @@ -8,12 +8,12 @@ import { keyBy } from 'lodash'; import { rangeQuery, kqlQuery, termQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { ERROR_GROUP_ID, SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; interface ErrorGroupDetailedStat { groupId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_main_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_main_statistics.ts index 1181aa5b02870..f27a487c8b8bc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_main_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_error_group_main_statistics.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AggregationsAggregateOrder } from '@elastic/elasticsearch/lib/api/types'; +import type { AggregationsAggregateOrder } from '@elastic/elasticsearch/lib/api/types'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; @@ -24,7 +24,7 @@ import { } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getErrorName } from '../../../lib/helpers/get_error_name'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export type MobileErrorGroupMainStatisticsResponse = Array<{ groupId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_errors_terms_by_field.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_errors_terms_by_field.ts index e2aa04531fc14..b645d9150af5f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_errors_terms_by_field.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_errors_terms_by_field.ts @@ -9,7 +9,7 @@ import { termQuery, kqlQuery, rangeQuery } from '@kbn/observability-plugin/serve import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export type MobileErrorTermsByFieldResponse = Array<{ label: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_http_errors.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_http_errors.ts index 8672ab9313e87..2fcfd586d1683 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_http_errors.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/get_mobile_http_errors.ts @@ -7,12 +7,12 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { SERVICE_NAME, HTTP_RESPONSE_STATUS_CODE } from '../../../../common/es_fields/apm'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { BUCKET_TARGET_COUNT } from '../../transactions/constants'; interface Props { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/route.ts index e6d5628a0c0ed..61f53c065acf8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/errors/route.ts @@ -17,19 +17,14 @@ import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../../default_api_types'; import { offsetRt } from '../../../../common/comparison_rt'; -import { - getMobileErrorGroupPeriods, - MobileErrorGroupPeriodsResponse, -} from './get_mobile_error_group_detailed_statistics'; -import { - MobileErrorGroupMainStatisticsResponse, - getMobileErrorGroupMainStatistics, -} from './get_mobile_error_group_main_statistics'; -import { - getMobileErrorsTermsByField, - MobileErrorTermsByFieldResponse, -} from './get_mobile_errors_terms_by_field'; -import { MobileHttpErrorsTimeseries, getMobileHttpErrors } from './get_mobile_http_errors'; +import type { MobileErrorGroupPeriodsResponse } from './get_mobile_error_group_detailed_statistics'; +import { getMobileErrorGroupPeriods } from './get_mobile_error_group_detailed_statistics'; +import type { MobileErrorGroupMainStatisticsResponse } from './get_mobile_error_group_main_statistics'; +import { getMobileErrorGroupMainStatistics } from './get_mobile_error_group_main_statistics'; +import type { MobileErrorTermsByFieldResponse } from './get_mobile_errors_terms_by_field'; +import { getMobileErrorsTermsByField } from './get_mobile_errors_terms_by_field'; +import type { MobileHttpErrorsTimeseries } from './get_mobile_http_errors'; +import { getMobileHttpErrors } from './get_mobile_http_errors'; const mobileMobileHttpRatesRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_device_os_app.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_device_os_app.ts index 1d7d9936f6531..277abc77dab83 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_device_os_app.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_device_os_app.ts @@ -16,7 +16,7 @@ import { import { environmentQuery } from '../../../common/utils/environment_query'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getDeviceOSApp({ kuery, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts index cfd1e9f19e88d..339119c544701 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts @@ -11,10 +11,10 @@ import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_pr import { APP_LAUNCH_TIME, SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; -import { Coordinate } from '../../../typings/timeseries'; -import { Maybe } from '../../../typings/common'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { Maybe } from '../../../typings/common'; export interface AvgLaunchTimeTimeseries { currentPeriod: { timeseries: Coordinate[]; value: Maybe }; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crash_rate.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crash_rate.ts index b95e6a1615dc2..6f3282d6fef1d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crash_rate.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crash_rate.ts @@ -6,9 +6,9 @@ */ import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { Coordinate } from '../../../typings/timeseries'; -import { Maybe } from '../../../typings/common'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { Maybe } from '../../../typings/common'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { ERROR_TYPE, ERROR_ID, SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crashes_by_location.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crashes_by_location.ts index f14e6891f255a..59257049b67a9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crashes_by_location.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_crashes_by_location.ts @@ -7,7 +7,7 @@ import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ERROR_TYPE, SERVICE_NAME } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_detailed_statistics_by_field.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_detailed_statistics_by_field.ts index 09bed5a4d974d..7a4d5bbc6ed0f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_detailed_statistics_by_field.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_detailed_statistics_by_field.ts @@ -9,13 +9,13 @@ import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/serve import { keyBy } from 'lodash'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { environmentQuery } from '../../../common/utils/environment_query'; import { SERVICE_NAME, TRANSACTION_DURATION } from '../../../common/es_fields/apm'; import { getLatencyValue } from '../../lib/helpers/latency_aggregation_type'; import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../typings/timeseries'; +import type { Coordinate } from '../../../typings/timeseries'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_filters.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_filters.ts index 35b48ba06c1d3..3472ea6582a12 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_filters.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_filters.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { MobileProperty, MobilePropertyType } from '../../../common/mobile_types'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { MobilePropertyType } from '../../../common/mobile_types'; +import { MobileProperty } from '../../../common/mobile_types'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getDeviceOSApp } from './get_device_os_app'; import { getNCT } from './get_nct'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests.ts index d9f64fe9dc818..ff27e6ffe3c83 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests.ts @@ -18,10 +18,10 @@ import { environmentQuery } from '../../../common/utils/environment_query'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; -import { Maybe } from '../../../typings/common'; +import type { Maybe } from '../../../typings/common'; -import { Coordinate } from '../../../typings/timeseries'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export interface HttpRequestsTimeseries { currentPeriod: { timeseries: Coordinate[]; value: Maybe }; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests_by_location.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests_by_location.ts index 078206433a26e..e49fd8c5b3d82 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests_by_location.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_http_requests_by_location.ts @@ -9,7 +9,7 @@ import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/serve import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME, SPAN_SUBTYPE, SPAN_TYPE } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_launches_by_location.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_launches_by_location.ts index ed70a4bbcca59..009d3447620f3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_launches_by_location.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_launches_by_location.ts @@ -7,7 +7,7 @@ import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { LABEL_LIFECYCLE_STATE, SERVICE_NAME } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_location_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_location_stats.ts index 8cf5914d2b964..b389fedc4c8b1 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_location_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_location_stats.ts @@ -6,12 +6,12 @@ */ import { CLIENT_GEO_COUNTRY_NAME } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getSessionsByLocation } from './get_mobile_sessions_by_location'; import { getHttpRequestsByLocation } from './get_mobile_http_requests_by_location'; import { getCrashesByLocation } from './get_mobile_crashes_by_location'; import { getLaunchesByLocation } from './get_mobile_launches_by_location'; -import { Maybe } from '../../../typings/common'; +import type { Maybe } from '../../../typings/common'; export type Timeseries = Array<{ x: number; y: number }>; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_main_statistics_by_field.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_main_statistics_by_field.ts index 2a305e045efc3..2ad2f72cc879d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_main_statistics_by_field.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_main_statistics_by_field.ts @@ -14,7 +14,7 @@ import { ERROR_TYPE, } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getLatencyValue } from '../../lib/helpers/latency_aggregation_type'; import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { calculateThroughputWithRange } from '../../lib/helpers/calculate_throughput'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_most_used_charts/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_most_used_charts/index.ts index e15b2fc7cd7f0..24c533a2d6c16 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_most_used_charts/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_most_used_charts/index.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { mergeCountWithOther } from './merge_other_count'; -import { MobileProperty, MobilePropertyType } from '../../../../common/mobile_types'; +import type { MobilePropertyType } from '../../../../common/mobile_types'; +import { MobileProperty } from '../../../../common/mobile_types'; import { getDeviceOSApp } from '../get_device_os_app'; import { getNCT } from '../get_nct'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions.ts index 7b4dee930508b..d2800585b2ad5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions.ts @@ -10,10 +10,10 @@ import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_pr import { SERVICE_NAME, SESSION_ID, TRANSACTION_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; -import { Coordinate } from '../../../typings/timeseries'; -import { Maybe } from '../../../typings/common'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { Maybe } from '../../../typings/common'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions_by_location.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions_by_location.ts index ad65b0f84a885..33bd868070ca5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions_by_location.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_sessions_by_location.ts @@ -8,7 +8,7 @@ import { termQuery, kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { SERVICE_NAME, SESSION_ID } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { ApmDocumentType } from '../../../common/document_type'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_stats.ts index 116117426405c..4bfd7eac5b0e1 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_stats.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getMobileSessions } from './get_mobile_sessions'; import { getMobileHttpRequests } from './get_mobile_http_requests'; import { getMobileCrashRate } from './get_mobile_crash_rate'; import { getMobileAvgLaunchTime } from './get_mobile_average_launch_time'; -import { Maybe } from '../../../typings/common'; +import type { Maybe } from '../../../typings/common'; export interface Timeseries { x: number; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_terms_by_field.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_terms_by_field.ts index 2ded4691b4211..abb3b32fc9377 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_terms_by_field.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_mobile_terms_by_field.ts @@ -9,7 +9,7 @@ import { termQuery, kqlQuery, rangeQuery } from '@kbn/observability-plugin/serve import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export type MobileTermsByFieldResponse = Array<{ label: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_nct.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_nct.ts index cfd3b6ca75819..b8b89cea7f50d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_nct.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/get_nct.ts @@ -10,7 +10,7 @@ import { NETWORK_CONNECTION_TYPE, SERVICE_NAME } from '../../../common/es_fields import { environmentQuery } from '../../../common/utils/environment_query'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getNCT({ kuery, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/route.ts index d1c964e8a2f6d..8e393542fcdb4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/mobile/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/mobile/route.ts @@ -11,25 +11,25 @@ import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, rangeRt } from '../default_api_types'; import { offsetRt } from '../../../common/comparison_rt'; -import { getMobileHttpRequests, HttpRequestsTimeseries } from './get_mobile_http_requests'; -import { getMobileFilters, MobileFiltersResponse } from './get_mobile_filters'; -import { getMobileSessions, SessionsTimeseries } from './get_mobile_sessions'; -import { getMobileStatsPeriods, MobilePeriodStats } from './get_mobile_stats'; -import { getMobileLocationStatsPeriods, MobileLocationStats } from './get_mobile_location_stats'; -import { getMobileTermsByField, MobileTermsByFieldResponse } from './get_mobile_terms_by_field'; -import { - getMobileMainStatisticsByField, - MobileMainStatisticsResponse, -} from './get_mobile_main_statistics_by_field'; -import { - getMobileDetailedStatisticsByFieldPeriods, - MobileDetailedStatisticsResponse, -} from './get_mobile_detailed_statistics_by_field'; -import { MobilePropertyType } from '../../../common/mobile_types'; -import { - getMobileMostUsedCharts, - MobileMostUsedChartResponse, -} from './get_mobile_most_used_charts'; +import type { HttpRequestsTimeseries } from './get_mobile_http_requests'; +import { getMobileHttpRequests } from './get_mobile_http_requests'; +import type { MobileFiltersResponse } from './get_mobile_filters'; +import { getMobileFilters } from './get_mobile_filters'; +import type { SessionsTimeseries } from './get_mobile_sessions'; +import { getMobileSessions } from './get_mobile_sessions'; +import type { MobilePeriodStats } from './get_mobile_stats'; +import { getMobileStatsPeriods } from './get_mobile_stats'; +import type { MobileLocationStats } from './get_mobile_location_stats'; +import { getMobileLocationStatsPeriods } from './get_mobile_location_stats'; +import type { MobileTermsByFieldResponse } from './get_mobile_terms_by_field'; +import { getMobileTermsByField } from './get_mobile_terms_by_field'; +import type { MobileMainStatisticsResponse } from './get_mobile_main_statistics_by_field'; +import { getMobileMainStatisticsByField } from './get_mobile_main_statistics_by_field'; +import type { MobileDetailedStatisticsResponse } from './get_mobile_detailed_statistics_by_field'; +import { getMobileDetailedStatisticsByFieldPeriods } from './get_mobile_detailed_statistics_by_field'; +import type { MobilePropertyType } from '../../../common/mobile_types'; +import type { MobileMostUsedChartResponse } from './get_mobile_most_used_charts'; +import { getMobileMostUsedCharts } from './get_mobile_most_used_charts'; import { mobileErrorRoutes } from './errors/route'; import { mobileCrashRoutes } from './crashes/route'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_observability_overview_data.ts b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_observability_overview_data.ts index 4af9253b2fe1d..d1869eeb0d2a4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_observability_overview_data.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_observability_overview_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { withApmSpan } from '../../utils/with_apm_span'; import { getServiceCount } from './get_service_count'; import { getTransactionsPerMinute } from './get_transactions_per_minute'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_service_count.ts b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_service_count.ts index 73ada87ff7d45..1793b357f7980 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_service_count.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_service_count.ts @@ -9,7 +9,7 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getServiceCount({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts index d63aff1e99ea2..159dfa3576da3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/get_transactions_per_minute.ts @@ -13,7 +13,7 @@ import { getProcessorEventForTransactions, } from '../../lib/helpers/transactions'; import { calculateThroughputWithRange } from '../../lib/helpers/calculate_throughput'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getTransactionsPerMinute({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/has_data.ts b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/has_data.ts index 1fc2ec5474b31..30406a9100872 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/has_data.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/has_data.ts @@ -7,7 +7,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export interface HasDataResponse { hasData: boolean; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/route.ts index 9d61c885a6361..cc9a0e550c140 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/observability_overview/route.ts @@ -11,11 +11,10 @@ import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { getSearchTransactionsEvents } from '../../lib/helpers/transactions'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { rangeRt } from '../default_api_types'; -import { - getObservabilityOverviewData, - ObservabilityOverviewResponse, -} from './get_observability_overview_data'; -import { getHasData, HasDataResponse } from './has_data'; +import type { ObservabilityOverviewResponse } from './get_observability_overview_data'; +import { getObservabilityOverviewData } from './get_observability_overview_data'; +import type { HasDataResponse } from './has_data'; +import { getHasData } from './has_data'; const observabilityOverviewHasDataRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/observability_overview/has_data', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_flamegraph.ts b/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_flamegraph.ts index 7139c2481aaa5..b148b2abdbbf5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_flamegraph.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_flamegraph.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ProfilingDataAccessPluginStart } from '@kbn/profiling-data-access-plugin/server'; -import { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; +import type { ProfilingDataAccessPluginStart } from '@kbn/profiling-data-access-plugin/server'; +import type { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_functions.ts b/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_functions.ts index 5f381bcd766e9..83273961e92fb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_functions.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/profiling/fetch_functions.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ProfilingDataAccessPluginStart } from '@kbn/profiling-data-access-plugin/server'; -import { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; +import type { ProfilingDataAccessPluginStart } from '@kbn/profiling-data-access-plugin/server'; +import type { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/delete_service_group.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/delete_service_group.ts index d43f0dbcb0aa6..30ec1406114b4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/delete_service_group.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/delete_service_group.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { APM_SERVICE_GROUP_SAVED_OBJECT_TYPE } from '../../../common/service_groups'; interface Options { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group.ts index 9ae682812de05..70aba4f29ad84 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group.ts @@ -5,12 +5,9 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { - ServiceGroup, - SavedServiceGroup, - APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, -} from '../../../common/service_groups'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { ServiceGroup, SavedServiceGroup } from '../../../common/service_groups'; +import { APM_SERVICE_GROUP_SAVED_OBJECT_TYPE } from '../../../common/service_groups'; export async function getServiceGroup({ savedObjectsClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group_alerts.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group_alerts.ts index d934863f37e9c..34d52473611bd 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group_alerts.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_group_alerts.ts @@ -7,12 +7,12 @@ import { kqlQuery, termQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ALERT_RULE_PRODUCER, ALERT_STATUS, ALERT_STATUS_ACTIVE } from '@kbn/rule-data-utils'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; -import { Logger } from '@kbn/core/server'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { Logger } from '@kbn/core/server'; import { observabilityFeatureId } from '@kbn/observability-shared-plugin/common'; -import { ApmPluginRequestHandlerContext } from '../typings'; -import { SavedServiceGroup } from '../../../common/service_groups'; -import { ApmAlertsClient } from '../../lib/helpers/get_apm_alerts_client'; +import type { ApmPluginRequestHandlerContext } from '../typings'; +import type { SavedServiceGroup } from '../../../common/service_groups'; +import type { ApmAlertsClient } from '../../lib/helpers/get_apm_alerts_client'; export async function getServiceGroupAlerts({ serviceGroups, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_groups.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_groups.ts index de71dfb5c6246..e8b317871445e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_groups.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_service_groups.ts @@ -5,10 +5,9 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { ServiceGroup, SavedServiceGroup } from '../../../common/service_groups'; import { - ServiceGroup, - SavedServiceGroup, APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, MAX_NUMBER_OF_SERVICE_GROUPS, } from '../../../common/service_groups'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_services_counts.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_services_counts.ts index a22c1486ca1d0..41de4a75c0036 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_services_counts.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/get_services_counts.ts @@ -7,10 +7,10 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { rangeQuery, kqlQuery } from '@kbn/observability-plugin/server'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; -import { SavedServiceGroup } from '../../../common/service_groups'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { SavedServiceGroup } from '../../../common/service_groups'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getServicesCounts({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/lookup_services.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/lookup_services.ts index f6e09f19f6ef8..49fa60f6b120a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/lookup_services.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/lookup_services.ts @@ -7,9 +7,9 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { AGENT_NAME, SERVICE_ENVIRONMENT, SERVICE_NAME } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export type LookupServicesResponse = Array<{ serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/route.ts index 9ffc365bb4d86..dfa96c1e4b9cf 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/route.ts @@ -16,8 +16,10 @@ import { getServiceGroups } from './get_service_groups'; import { getServiceGroup } from './get_service_group'; import { saveServiceGroup } from './save_service_group'; import { deleteServiceGroup } from './delete_service_group'; -import { lookupServices, LookupServicesResponse } from './lookup_services'; -import { validateServiceGroupKuery, SavedServiceGroup } from '../../../common/service_groups'; +import type { LookupServicesResponse } from './lookup_services'; +import { lookupServices } from './lookup_services'; +import type { SavedServiceGroup } from '../../../common/service_groups'; +import { validateServiceGroupKuery } from '../../../common/service_groups'; import { getServicesCounts } from './get_services_counts'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { getServiceGroupAlerts } from './get_service_group_alerts'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/save_service_group.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/save_service_group.ts index a604103fb9a75..56144c325d9d6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/save_service_group.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_groups/save_service_group.ts @@ -5,12 +5,9 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { - APM_SERVICE_GROUP_SAVED_OBJECT_TYPE, - SavedServiceGroup, - ServiceGroup, -} from '../../../common/service_groups'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedServiceGroup, ServiceGroup } from '../../../common/service_groups'; +import { APM_SERVICE_GROUP_SAVED_OBJECT_TYPE } from '../../../common/service_groups'; interface Options { savedObjectsClient: SavedObjectsClientContract; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts index 5224ed833ff24..75e451b7a2f57 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/fetch_service_paths_from_trace_ids.ts @@ -18,12 +18,12 @@ import { SPAN_TYPE, TRACE_ID, } from '../../../common/es_fields/apm'; -import { +import type { ConnectionNode, ExternalConnectionNode, ServiceConnectionNode, } from '../../../common/service_map'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { calculateDocsPerShard } from './calculate_docs_per_shard'; const SCRIPTED_METRICS_FIELDS_TO_COPY = [ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_anomalies.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_anomalies.ts index 32a4bf02227e7..4e9cbe1a2712f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_anomalies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_anomalies.ts @@ -16,7 +16,7 @@ import { getServiceHealthStatus } from '../../../common/service_health_status'; import { defaultTransactionTypes } from '../../../common/transaction_types'; import { withApmSpan } from '../../utils/with_apm_span'; import { getMlJobsWithAPMGroup } from '../../lib/anomaly_detection/get_ml_jobs_with_apm_group'; -import { MlClient } from '../../lib/helpers/get_ml_client'; +import type { MlClient } from '../../lib/helpers/get_ml_client'; import { apmMlAnomalyQuery } from '../../lib/anomaly_detection/apm_ml_anomaly_query'; import { AnomalyDetectorType } from '../../../common/anomaly_detection/apm_ml_detectors'; import { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map.ts index 69a000f4c2a8f..debc88d3ddefd 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map.ts @@ -5,20 +5,18 @@ * 2.0. */ -import { Logger } from '@kbn/core/server'; +import type { Logger } from '@kbn/core/server'; import { chunk } from 'lodash'; -import { APMConfig } from '../..'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { MlClient } from '../../lib/helpers/get_ml_client'; +import type { APMConfig } from '../..'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { MlClient } from '../../lib/helpers/get_ml_client'; import { withApmSpan } from '../../utils/with_apm_span'; import { DEFAULT_ANOMALIES, getServiceAnomalies } from './get_service_anomalies'; import { getServiceMapFromTraceIds } from './get_service_map_from_trace_ids'; import { getServiceStats } from './get_service_stats'; import { getTraceSampleIds } from './get_trace_sample_ids'; -import { - TransformServiceMapResponse, - transformServiceMapResponses, -} from './transform_service_map_responses'; +import type { TransformServiceMapResponse } from './transform_service_map_responses'; +import { transformServiceMapResponses } from './transform_service_map_responses'; export interface IEnvOptions { mlClient?: MlClient; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts index 0550083e385a7..1b09fe9d79fc2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_dependency_node_info.ts @@ -13,12 +13,12 @@ import { SPAN_DESTINATION_SERVICE_RESPONSE_TIME_COUNT, SPAN_DESTINATION_SERVICE_RESPONSE_TIME_SUM, } from '../../../common/es_fields/apm'; -import { NodeStats } from '../../../common/service_map'; +import type { NodeStats } from '../../../common/service_map'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getBucketSize } from '../../../common/utils/get_bucket_size'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { calculateThroughputWithRange } from '../../lib/helpers/calculate_throughput'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getDocumentTypeFilterForServiceDestinationStatistics } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; import { calculateFailedTransactionRate, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.test.ts index cdd655498da34..33a2d950ef25b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.test.ts @@ -6,7 +6,7 @@ */ import { getConnections } from './get_service_map_from_trace_ids'; -import { Connection, ConnectionNode } from '../../../common/service_map'; +import type { Connection, ConnectionNode } from '../../../common/service_map'; function getConnectionsPairs(connections: Connection[]) { return connections diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.ts index d1bec0076d8f2..06885660f188f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_from_trace_ids.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Logger } from '@kbn/logging'; -import { Connection, ConnectionNode } from '../../../common/service_map'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Logger } from '@kbn/logging'; +import type { Connection, ConnectionNode } from '../../../common/service_map'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { fetchServicePathsFromTraceIds } from './fetch_service_paths_from_trace_ids'; import { getConnectionId } from './transform_service_map_responses'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts index abc3efa66ca74..3de35800000eb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_map_service_node_info.ts @@ -13,7 +13,7 @@ import { SERVICE_NAME, TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; -import { NodeStats } from '../../../common/service_map'; +import type { NodeStats } from '../../../common/service_map'; import { defaultTransactionTypes } from '../../../common/transaction_types'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; @@ -26,7 +26,7 @@ import { import { getFailedTransactionRate } from '../../lib/transaction_groups/get_failed_transaction_rate'; import { withApmSpan } from '../../utils/with_apm_span'; import { systemMemory, cgroupMemory } from '../metrics/by_agent/shared/memory'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_stats.ts index 7aa89f31f009b..d512f621bcf2a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_service_stats.ts @@ -11,7 +11,7 @@ import { AGENT_NAME, SERVICE_ENVIRONMENT, SERVICE_NAME } from '../../../common/e import { environmentQuery } from '../../../common/utils/environment_query'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { IEnvOptions } from './get_service_map'; +import type { IEnvOptions } from './get_service_map'; export async function getServiceStats({ environment, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts index 9a60fde737e66..d89c9a7a4ea48 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/get_trace_sample_ids.ts @@ -19,8 +19,8 @@ import { import { SERVICE_MAP_TIMEOUT_ERROR } from '../../../common/service_map'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMConfig } from '../..'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../..'; export async function getTraceSampleIds({ serviceName, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.test.ts index 5784944c5b995..a539a7001fa2c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ConnectionElement } from '../../../common/service_map'; +import type { ConnectionElement } from '../../../common/service_map'; import { groupResourceNodes } from './group_resource_nodes'; import expectedGroupedData from './mock_responses/group_resource_nodes_grouped.json'; import preGroupedData from './mock_responses/group_resource_nodes_pregrouped.json'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.ts index 7f5666b4f889b..53deaba0864e1 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/group_resource_nodes.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; import { compact, groupBy } from 'lodash'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { SPAN_TYPE, SPAN_SUBTYPE } from '../../../common/es_fields/apm'; -import { +import type { ConnectionEdge, ConnectionElement, ConnectionNode, - isSpanGroupingSupported, } from '../../../common/service_map'; +import { isSpanGroupingSupported } from '../../../common/service_map'; const MINIMUM_GROUP_SIZE = 4; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/route.ts index 3436874ac5bdc..100e65fb62d13 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/route.ts @@ -14,20 +14,16 @@ import { notifyFeatureUsage } from '../../feature'; import { getSearchTransactionsEvents } from '../../lib/helpers/transactions'; import { getMlClient } from '../../lib/helpers/get_ml_client'; import { getServiceMap } from './get_service_map'; -import { - getServiceMapDependencyNodeInfo, - ServiceMapServiceDependencyInfoResponse, -} from './get_service_map_dependency_node_info'; -import { - getServiceMapServiceNodeInfo, - ServiceMapServiceNodeInfoResponse, -} from './get_service_map_service_node_info'; +import type { ServiceMapServiceDependencyInfoResponse } from './get_service_map_dependency_node_info'; +import { getServiceMapDependencyNodeInfo } from './get_service_map_dependency_node_info'; +import type { ServiceMapServiceNodeInfoResponse } from './get_service_map_service_node_info'; +import { getServiceMapServiceNodeInfo } from './get_service_map_service_node_info'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, rangeRt, kueryRt } from '../default_api_types'; import { getServiceGroup } from '../service_groups/get_service_group'; import { offsetRt } from '../../../common/comparison_rt'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; -import { TransformServiceMapResponse } from './transform_service_map_responses'; +import type { TransformServiceMapResponse } from './transform_service_map_responses'; const serviceMapRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/service-map', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts index 297f6b8a123bd..26b203d945eed 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.test.ts @@ -15,10 +15,8 @@ import { SPAN_SUBTYPE, SPAN_TYPE, } from '../../../common/es_fields/apm'; -import { - transformServiceMapResponses, - ServiceMapResponse, -} from './transform_service_map_responses'; +import type { ServiceMapResponse } from './transform_service_map_responses'; +import { transformServiceMapResponses } from './transform_service_map_responses'; const nodejsService = { [SERVICE_NAME]: 'opbeans-node', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.ts b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.ts index c57a5bafb56d0..7ff4ef88021a5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/service_map/transform_service_map_responses.ts @@ -6,23 +6,24 @@ */ import { sortBy, pickBy, identity } from 'lodash'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import { SERVICE_NAME, SPAN_DESTINATION_SERVICE_RESOURCE, SPAN_TYPE, SPAN_SUBTYPE, } from '../../../common/es_fields/apm'; -import { +import type { Connection, ConnectionNode, ServiceConnectionNode, ExternalConnectionNode, ConnectionElement, } from '../../../common/service_map'; -import { ConnectionsResponse, ServicesResponse } from './get_service_map'; -import { ServiceAnomaliesResponse } from './get_service_anomalies'; -import { groupResourceNodes, GroupResourceNodesResponse } from './group_resource_nodes'; +import type { ConnectionsResponse, ServicesResponse } from './get_service_map'; +import type { ServiceAnomaliesResponse } from './get_service_anomalies'; +import type { GroupResourceNodesResponse } from './group_resource_nodes'; +import { groupResourceNodes } from './group_resource_nodes'; function getConnectionNodeId(node: ConnectionNode): string { if ('span.destination.service.resource' in node) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts index c683e308b73b8..db1c5e028f449 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_derived_service_annotations.ts @@ -11,14 +11,15 @@ import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server import { maybe } from '../../../../common/utils/maybe'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; import { isFiniteNumber } from '../../../../common/utils/is_finite_number'; -import { Annotation, AnnotationType } from '../../../../common/annotations'; +import type { Annotation } from '../../../../common/annotations'; +import { AnnotationType } from '../../../../common/annotations'; import { AT_TIMESTAMP, SERVICE_NAME, SERVICE_VERSION } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBackwardCompatibleDocumentTypeFilter, getProcessorEventForTransactions, } from '../../../lib/helpers/transactions'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getDerivedServiceAnnotations({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts index 8422373d5e8d9..32c3de156faec 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/get_stored_annotations.ts @@ -6,17 +6,18 @@ */ import { errors } from '@elastic/elasticsearch'; -import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { unwrapEsResponse, WrappedElasticsearchClientError, } from '@kbn/observability-plugin/server'; import type { ESSearchResponse } from '@kbn/es-types'; -import { Annotation as ESAnnotation } from '@kbn/observability-plugin/common/annotations'; -import { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; +import type { Annotation as ESAnnotation } from '@kbn/observability-plugin/common/annotations'; +import type { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { Annotation, AnnotationType } from '../../../../common/annotations'; +import type { Annotation } from '../../../../common/annotations'; +import { AnnotationType } from '../../../../common/annotations'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { withApmSpan } from '../../../utils/with_apm_span'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/index.ts index e50d2202ca979..8354267cd748c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/annotations/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; -import { Annotation } from '../../../../common/annotations'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; +import type { Annotation } from '../../../../common/annotations'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getDerivedServiceAnnotations } from './get_derived_service_annotations'; import { getStoredAnnotations } from './get_stored_annotations'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_agent.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_agent.ts index dd272eadf57d6..72c15d2ca66ae 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_agent.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_agent.ts @@ -16,8 +16,9 @@ import { CLOUD_PROVIDER, CLOUD_SERVICE_NAME, } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { getServerlessTypeFromCloudData, ServerlessType } from '../../../common/serverless'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ServerlessType } from '../../../common/serverless'; +import { getServerlessTypeFromCloudData } from '../../../common/serverless'; import { maybe } from '../../../common/utils/maybe'; export interface ServiceAgentResponse { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies.ts index 27dd10a63ee05..dbeca28f1d029 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { ConnectionStatsItemWithImpact } from '../../../common/connections'; +import type { ConnectionStatsItemWithImpact } from '../../../common/connections'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; import { getConnectionStatsItemsWithRelativeImpact } from '../../lib/connections/get_connection_stats/get_connection_stats_items_with_relative_impact'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; interface Options { apmEventClient: APMEventClient; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts index 270ffc6852918..d69b55a46a1ca 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_dependencies_breakdown.ts @@ -10,8 +10,8 @@ import { getNodeName } from '../../../common/connections'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getConnectionStats } from '../../lib/connections/get_connection_stats'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; export type ServiceDependenciesBreakdownResponse = Array<{ title: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts index d16910f5984fc..9fcbfa023815d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_container_metadata.ts @@ -20,9 +20,9 @@ import { KUBERNETES_CONTAINER_ID, KUBERNETES_NAMESPACE, } from '../../../common/es_fields/apm'; -import { Kubernetes } from '../../../typings/es_schemas/raw/fields/kubernetes'; +import type { Kubernetes } from '../../../typings/es_schemas/raw/fields/kubernetes'; import { maybe } from '../../../common/utils/maybe'; -import { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; +import type { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; export type ServiceInstanceContainerMetadataDetails = | { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts index 3c139f2aee0de..3b11e0e71562d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instance_metadata_details.ts @@ -8,7 +8,7 @@ import { merge } from 'lodash'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; -import { FlattenedApmEvent } from '@kbn/apm-data-access-plugin/server/utils/unflatten_known_fields'; +import type { FlattenedApmEvent } from '@kbn/apm-data-access-plugin/server/utils/unflatten_known_fields'; import { AGENT_NAME, AT_TIMESTAMP, @@ -22,13 +22,13 @@ import { getBackwardCompatibleDocumentTypeFilter, getProcessorEventForTransactions, } from '../../lib/helpers/transactions'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { Agent } from '../../../typings/es_schemas/ui/fields/agent'; -import { Service } from '../../../typings/es_schemas/raw/fields/service'; -import { Container } from '../../../typings/es_schemas/raw/fields/container'; -import { Kubernetes } from '../../../typings/es_schemas/raw/fields/kubernetes'; -import { Host } from '../../../typings/es_schemas/raw/fields/host'; -import { Cloud } from '../../../typings/es_schemas/raw/fields/cloud'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Agent } from '../../../typings/es_schemas/ui/fields/agent'; +import type { Service } from '../../../typings/es_schemas/raw/fields/service'; +import type { Container } from '../../../typings/es_schemas/raw/fields/container'; +import type { Kubernetes } from '../../../typings/es_schemas/raw/fields/kubernetes'; +import type { Host } from '../../../typings/es_schemas/raw/fields/host'; +import type { Cloud } from '../../../typings/es_schemas/raw/fields/cloud'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; import { SERVICE_METADATA_CLOUD_KEYS, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/detailed_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/detailed_statistics.ts index bf19fead68535..06454e8c41438 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/detailed_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/detailed_statistics.ts @@ -7,13 +7,13 @@ import { keyBy } from 'lodash'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../../typings/timeseries'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import type { Coordinate } from '../../../../typings/timeseries'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { joinByKey } from '../../../../common/utils/join_by_key'; import { withApmSpan } from '../../../utils/with_apm_span'; import { getServiceInstancesSystemMetricStatistics } from './get_service_instances_system_metric_statistics'; import { getServiceInstancesTransactionStatistics } from './get_service_instances_transaction_statistics'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; interface ServiceInstanceDetailedStatisticsParams { environment: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts index def01e7dcdfea..b3ad560b7520a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_system_metric_statistics.ts @@ -14,10 +14,10 @@ import { SERVICE_NODE_NAME, } from '../../../../common/es_fields/apm'; import { SERVICE_NODE_NAME_MISSING } from '../../../../common/service_nodes'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBucketSize } from '../../../../common/utils/get_bucket_size'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { systemMemory, cgroupMemory } from '../../metrics/by_agent/shared/memory'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts index 98380112a7fdb..9622278d2d31f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/get_service_instances_transaction_statistics.ts @@ -12,9 +12,9 @@ import { TRANSACTION_TYPE, } from '../../../../common/es_fields/apm'; import { EventOutcome } from '../../../../common/event_outcome'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; import { SERVICE_NODE_NAME_MISSING } from '../../../../common/service_nodes'; -import { Coordinate } from '../../../../typings/timeseries'; +import type { Coordinate } from '../../../../typings/timeseries'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getBackwardCompatibleDocumentTypeFilter, @@ -28,7 +28,7 @@ import { getLatencyValue, } from '../../../lib/helpers/latency_aggregation_type'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; interface ServiceInstanceTransactionPrimaryStatistics { serviceNodeName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/main_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/main_statistics.ts index bf567aa98c84c..63767d586e79d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/main_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_instances/main_statistics.ts @@ -6,9 +6,9 @@ */ import { keyBy, orderBy } from 'lodash'; -import { InstancesSortField } from '../../../../common/instances'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { InstancesSortField } from '../../../../common/instances'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { withApmSpan } from '../../../utils/with_apm_span'; import { getServiceInstancesSystemMetricStatistics } from './get_service_instances_system_metric_statistics'; import { getServiceInstancesTransactionStatistics } from './get_service_instances_transaction_statistics'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_details.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_details.ts index 0c8c456064362..b276b4c52c521 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_details.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_details.ts @@ -8,7 +8,7 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; -import { FlattenedApmEvent } from '@kbn/apm-data-access-plugin/server/utils/unflatten_known_fields'; +import type { FlattenedApmEvent } from '@kbn/apm-data-access-plugin/server/utils/unflatten_known_fields'; import { getAgentName } from '@kbn/elastic-agent-utils'; import { environmentQuery } from '../../../common/utils/environment_query'; import { @@ -28,8 +28,8 @@ import { AGENT_VERSION, TELEMETRY_SDK_VERSION, } from '../../../common/es_fields/apm'; -import { ContainerType } from '../../../common/service_metadata'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ContainerType } from '../../../common/service_metadata'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { should } from './get_service_metadata_icons'; import { isOpenTelemetryAgentName, hasOpenTelemetryPrefix } from '../../../common/agent_name'; import { maybe } from '../../../common/utils/maybe'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_icons.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_icons.ts index e2a3ffd22f703..e3be281e15e0f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_icons.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_metadata_icons.ts @@ -26,10 +26,12 @@ import { TELEMETRY_SDK_NAME, TELEMETRY_SDK_LANGUAGE, } from '../../../common/es_fields/apm'; -import { ContainerType, SERVICE_METADATA_KUBERNETES_KEYS } from '../../../common/service_metadata'; +import type { ContainerType } from '../../../common/service_metadata'; +import { SERVICE_METADATA_KUBERNETES_KEYS } from '../../../common/service_metadata'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { ServerlessType, getServerlessTypeFromCloudData } from '../../../common/serverless'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ServerlessType } from '../../../common/serverless'; +import { getServerlessTypeFromCloudData } from '../../../common/serverless'; export interface ServiceMetadataIcons { agentName?: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_node_metadata.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_node_metadata.ts index e3d4a25172956..437bcd77f6569 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_node_metadata.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_node_metadata.ts @@ -10,9 +10,9 @@ import { HOST_NAME, CONTAINER_ID } from '../../../common/es_fields/apm'; import { NOT_AVAILABLE_LABEL } from '../../../common/i18n'; import { SERVICE_NAME, SERVICE_NODE_NAME } from '../../../common/es_fields/apm'; import { environmentQuery, serviceNodeNameQuery } from '../../../common/utils/environment_query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { ApmServiceTransactionDocumentType } from '../../../common/document_type'; -import { RollupInterval } from '../../../common/rollup'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ApmServiceTransactionDocumentType } from '../../../common/document_type'; +import type { RollupInterval } from '../../../common/rollup'; export interface ServiceNodeMetadataResponse { host: string | number; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts index b2862169bf49b..67c6fd2bead96 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_overview_container_metadata.ts @@ -12,7 +12,7 @@ import { KUBERNETES_NAMESPACE, KUBERNETES_REPLICASET_NAME, } from '../../../common/es_fields/infra_metrics'; -import { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; +import type { InfraMetricsClient } from '../../lib/helpers/create_es_client/create_infra_metrics_client/create_infra_metrics_client'; export const getServiceOverviewContainerMetadata = async ({ infraMetricsClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts index 46932dd6c62b5..ecc6aa203ec1f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_group_detailed_statistics.ts @@ -7,21 +7,21 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { keyBy } from 'lodash'; -import { ApmTransactionDocumentType } from '../../../common/document_type'; +import type { ApmTransactionDocumentType } from '../../../common/document_type'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; -import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../typings/timeseries'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getLatencyAggregation, getLatencyValue } from '../../lib/helpers/latency_aggregation_type'; import { getDurationFieldForTransactions } from '../../lib/helpers/transactions'; import { calculateFailedTransactionRate, getOutcomeAggregation, } from '../../lib/helpers/transaction_error_rate'; -import { RollupInterval } from '../../../common/rollup'; +import type { RollupInterval } from '../../../common/rollup'; interface ServiceTransactionGroupDetailedStat { transactionName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups.ts index 31516e71783cd..88fc58f32f706 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups.ts @@ -6,18 +6,18 @@ */ import { kqlQuery, rangeQuery, wildcardQuery } from '@kbn/observability-plugin/server'; -import { ApmTransactionDocumentType } from '../../../common/document_type'; +import type { ApmTransactionDocumentType } from '../../../common/document_type'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_OVERFLOW_COUNT, TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; -import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; -import { RollupInterval } from '../../../common/rollup'; +import type { LatencyAggregationType } from '../../../common/latency_aggregation_types'; +import type { RollupInterval } from '../../../common/rollup'; import { environmentQuery } from '../../../common/utils/environment_query'; import { calculateThroughputWithRange } from '../../lib/helpers/calculate_throughput'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getLatencyAggregation, getLatencyValue } from '../../lib/helpers/latency_aggregation_type'; import { getDurationFieldForTransactions } from '../../lib/helpers/transactions'; import { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups_alerts.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups_alerts.ts index de9c73a30a186..468850073e0b6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups_alerts.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_groups_alerts.ts @@ -23,7 +23,7 @@ import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../commo import { LatencyAggregationType } from '../../../common/latency_aggregation_types'; import { AggregationType } from '../../../common/rules/apm_rule_types'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { ApmAlertsClient } from '../../lib/helpers/get_apm_alerts_client'; +import type { ApmAlertsClient } from '../../lib/helpers/get_apm_alerts_client'; import { MAX_NUMBER_OF_TX_GROUPS } from './get_service_transaction_groups'; export type ServiceTransactionGroupAlertsResponse = Array<{ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_types.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_types.ts index de3a2751c5e42..872abb15a6ad9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_types.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_service_transaction_types.ts @@ -6,10 +6,10 @@ */ import { rangeQuery } from '@kbn/observability-plugin/server'; -import { ApmServiceTransactionDocumentType } from '../../../common/document_type'; +import type { ApmServiceTransactionDocumentType } from '../../../common/document_type'; import { SERVICE_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RollupInterval } from '../../../common/rollup'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RollupInterval } from '../../../common/rollup'; export interface ServiceTransactionTypesResponse { transactionTypes: string[]; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_health_statuses.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_health_statuses.ts index f2dbeb8410bbe..27972d8bd5e79 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_health_statuses.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_health_statuses.ts @@ -6,11 +6,9 @@ */ import { getSeverity } from '../../../../common/anomaly_detection'; -import { - getServiceHealthStatus, - ServiceHealthStatus, -} from '../../../../common/service_health_status'; -import { MlClient } from '../../../lib/helpers/get_ml_client'; +import type { ServiceHealthStatus } from '../../../../common/service_health_status'; +import { getServiceHealthStatus } from '../../../../common/service_health_status'; +import type { MlClient } from '../../../lib/helpers/get_ml_client'; import { getServiceAnomalies } from '../../service_map/get_service_anomalies'; interface AggregationParams { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_alerts.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_alerts.ts index c47668bc1ee32..4ce22e64fcf05 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_alerts.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_alerts.ts @@ -20,8 +20,8 @@ import { } from '@kbn/rule-data-utils'; import { APM_ALERTING_CONSUMERS } from '../../../../common/alerting/config/apm_alerting_feature_ids'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; -import { ServiceGroup } from '../../../../common/service_groups'; -import { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; +import type { ServiceGroup } from '../../../../common/service_groups'; +import type { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { MAX_NUMBER_OF_SERVICES } from './get_services_items'; import { serviceGroupWithOverflowQuery } from '../../../lib/service_group_query_with_overflow'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_names_from_terms_enum.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_names_from_terms_enum.ts index ae3eff809f293..1a8e4179fbee4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_names_from_terms_enum.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_names_from_terms_enum.ts @@ -6,10 +6,10 @@ */ import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; -import { Environment } from '../../../../common/environment_rt'; +import type { Environment } from '../../../../common/environment_rt'; export async function getServiceNamesFromTermsEnum({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts index 69f06ee74b535..19842a6624538 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_service_transaction_stats.ts @@ -7,7 +7,7 @@ import { kqlQuery, rangeQuery, wildcardQuery } from '@kbn/observability-plugin/server'; import { getAgentName } from '@kbn/elastic-agent-utils'; -import { ApmDocumentType } from '../../../../common/document_type'; +import type { ApmDocumentType } from '../../../../common/document_type'; import { AGENT_NAME, SERVICE_ENVIRONMENT, @@ -17,14 +17,14 @@ import { TELEMETRY_SDK_NAME, TELEMETRY_SDK_LANGUAGE, } from '../../../../common/es_fields/apm'; -import { RollupInterval } from '../../../../common/rollup'; -import { ServiceGroup } from '../../../../common/service_groups'; +import type { RollupInterval } from '../../../../common/rollup'; +import type { ServiceGroup } from '../../../../common/service_groups'; import { isDefaultTransactionType } from '../../../../common/transaction_types'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { calculateThroughputWithRange } from '../../../lib/helpers/calculate_throughput'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; import { getDurationFieldForTransactions } from '../../../lib/helpers/transactions'; import { calculateFailedTransactionRate, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_items.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_items.ts index e57e8e9d20235..effb6259efc6c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_items.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_items.ts @@ -5,20 +5,21 @@ * 2.0. */ -import { Logger } from '@kbn/logging'; -import { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; -import { RollupInterval } from '../../../../common/rollup'; -import { ServiceGroup } from '../../../../common/service_groups'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; -import { MlClient } from '../../../lib/helpers/get_ml_client'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { Logger } from '@kbn/logging'; +import type { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; +import type { RollupInterval } from '../../../../common/rollup'; +import type { ServiceGroup } from '../../../../common/service_groups'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ApmAlertsClient } from '../../../lib/helpers/get_apm_alerts_client'; +import type { MlClient } from '../../../lib/helpers/get_ml_client'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; import { withApmSpan } from '../../../utils/with_apm_span'; import { getHealthStatuses } from './get_health_statuses'; import { getServicesWithoutTransactions } from './get_services_without_transactions'; import { getServicesAlerts } from './get_service_alerts'; import { getServiceTransactionStats } from './get_service_transaction_stats'; -import { MergedServiceStat, mergeServiceStats } from './merge_service_stats'; +import type { MergedServiceStat } from './merge_service_stats'; +import { mergeServiceStats } from './merge_service_stats'; export const MAX_NUMBER_OF_SERVICES = 1_000; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_without_transactions.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_without_transactions.ts index a966a37a64220..ba8592b4053cf 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_without_transactions.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/get_services_without_transactions.ts @@ -8,7 +8,7 @@ import { kqlQuery, rangeQuery, wildcardQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getAgentName } from '@kbn/elastic-agent-utils'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; import { AGENT_NAME, SERVICE_ENVIRONMENT, @@ -17,11 +17,11 @@ import { TELEMETRY_SDK_NAME, } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { ServiceGroup } from '../../../../common/service_groups'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ServiceGroup } from '../../../../common/service_groups'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { ApmDocumentType } from '../../../../common/document_type'; -import { RollupInterval } from '../../../../common/rollup'; +import type { RollupInterval } from '../../../../common/rollup'; import { serviceGroupWithOverflowQuery } from '../../../lib/service_group_query_with_overflow'; export interface ServicesWithoutTransactionsResponse { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.test.ts index d06905d17bb18..c49743ef4df06 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { ServiceHealthStatus } from '../../../../common/service_health_status'; -import { getServiceTransactionStats } from './get_service_transaction_stats'; +import type { getServiceTransactionStats } from './get_service_transaction_stats'; import { mergeServiceStats } from './merge_service_stats'; type ServiceTransactionStat = Awaited< diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.ts index f77b8fda5b3b6..ddb2733f11dde 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services/merge_service_stats.ts @@ -7,12 +7,12 @@ import { uniq } from 'lodash'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; import { joinByKey } from '../../../../common/utils/join_by_key'; -import { ServiceHealthStatusesResponse } from './get_health_statuses'; -import { ServicesWithoutTransactionsResponse } from './get_services_without_transactions'; -import { ServiceAlertsResponse } from './get_service_alerts'; -import { ServiceTransactionStatsResponse } from './get_service_transaction_stats'; -import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; -import { ServiceHealthStatus } from '../../../../common/service_health_status'; +import type { ServiceHealthStatusesResponse } from './get_health_statuses'; +import type { ServicesWithoutTransactionsResponse } from './get_services_without_transactions'; +import type { ServiceAlertsResponse } from './get_service_alerts'; +import type { ServiceTransactionStatsResponse } from './get_service_transaction_stats'; +import type { AgentName } from '../../../../typings/es_schemas/ui/fields/agent'; +import type { ServiceHealthStatus } from '../../../../common/service_health_status'; export interface MergedServiceStat { serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts index fd425d62fcb38..cda8505162041 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/get_service_transaction_detailed_statistics.ts @@ -7,15 +7,15 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { keyBy } from 'lodash'; -import { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; +import type { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; import { SERVICE_NAME, TRANSACTION_TYPE } from '../../../../common/es_fields/apm'; -import { RollupInterval } from '../../../../common/rollup'; +import type { RollupInterval } from '../../../../common/rollup'; import { isDefaultTransactionType } from '../../../../common/transaction_types'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; import { calculateThroughputWithInterval } from '../../../lib/helpers/calculate_throughput'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; import { getDurationFieldForTransactions } from '../../../lib/helpers/transactions'; import { calculateFailedTransactionRate, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/index.ts index 2820c80d72ba2..0f28ad0e1cd3d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_services_detailed_statistics/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; -import { RollupInterval } from '../../../../common/rollup'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../../lib/helpers/get_random_sampler'; +import type { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; +import type { RollupInterval } from '../../../../common/rollup'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../../lib/helpers/get_random_sampler'; import { getServiceTransactionDetailedStatsPeriods } from './get_service_transaction_detailed_statistics'; export async function getServicesDetailedStatistics({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_throughput.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_throughput.ts index b5c48484e1039..035cc1535e1e5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/get_throughput.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/get_throughput.ts @@ -4,15 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { ApmServiceTransactionDocumentType } from '../../../common/document_type'; +import type { ApmServiceTransactionDocumentType } from '../../../common/document_type'; import { SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE } from '../../../common/es_fields/apm'; -import { RollupInterval } from '../../../common/rollup'; +import type { RollupInterval } from '../../../common/rollup'; import { environmentQuery } from '../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { Maybe } from '../../../typings/common'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Maybe } from '../../../typings/common'; interface Options { environment: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/services/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/services/route.ts index 664706b8489b1..42a3ff6a101f0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/services/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/services/route.ts @@ -12,12 +12,12 @@ import { MLPrivilegesUninitialized, UnknownMLCapabilitiesError, } from '@kbn/ml-plugin/server'; -import { Annotation } from '@kbn/observability-plugin/common/annotations'; -import { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; +import type { Annotation } from '@kbn/observability-plugin/common/annotations'; +import type { ScopedAnnotationsClient } from '@kbn/observability-plugin/server'; import * as t from 'io-ts'; import { isEmpty, mergeWith, uniq } from 'lodash'; import { ML_ERRORS } from '../../../common/anomaly_detection'; -import { ServiceAnomalyTimeseries } from '../../../common/anomaly_detection/service_anomaly_timeseries'; +import type { ServiceAnomalyTimeseries } from '../../../common/anomaly_detection/service_anomaly_timeseries'; import { offsetRt } from '../../../common/comparison_rt'; import { instancesSortFieldRt } from '../../../common/instances'; import { latencyAggregationTypeRt } from '../../../common/latency_aggregation_types'; @@ -40,44 +40,39 @@ import { serviceTransactionDataSourceRt, } from '../default_api_types'; import { getServiceGroup } from '../service_groups/get_service_group'; -import { getServiceAnnotations, ServiceAnnotationResponse } from './annotations'; -import { getServicesItems, ServicesItemsResponse } from './get_services/get_services_items'; -import { getServicesAlerts, ServiceAlertsResponse } from './get_services/get_service_alerts'; -import { - getServiceTransactionDetailedStatsPeriods, - ServiceTransactionDetailedStatPeriodsResponse, -} from './get_services_detailed_statistics/get_service_transaction_detailed_statistics'; -import { getServiceAgent, ServiceAgentResponse } from './get_service_agent'; -import { getServiceDependencies, ServiceDependenciesResponse } from './get_service_dependencies'; -import { - getServiceDependenciesBreakdown, - ServiceDependenciesBreakdownResponse, -} from './get_service_dependencies_breakdown'; -import { - getServiceInstancesDetailedStatisticsPeriods, - ServiceInstancesDetailedStatisticsResponse, -} from './get_service_instances/detailed_statistics'; -import { - getServiceInstancesMainStatistics, - ServiceInstanceMainStatisticsResponse, -} from './get_service_instances/main_statistics'; -import { - getServiceInstanceContainerMetadata, - ServiceInstanceContainerMetadataDetails, -} from './get_service_instance_container_metadata'; -import { - getServiceInstanceMetadataDetails, - ServiceInstanceMetadataDetailsResponse, -} from './get_service_instance_metadata_details'; -import { getServiceMetadataDetails, ServiceMetadataDetails } from './get_service_metadata_details'; -import { getServiceMetadataIcons, ServiceMetadataIcons } from './get_service_metadata_icons'; -import { getServiceNodeMetadata, ServiceNodeMetadataResponse } from './get_service_node_metadata'; +import type { ServiceAnnotationResponse } from './annotations'; +import { getServiceAnnotations } from './annotations'; +import type { ServicesItemsResponse } from './get_services/get_services_items'; +import { getServicesItems } from './get_services/get_services_items'; +import type { ServiceAlertsResponse } from './get_services/get_service_alerts'; +import { getServicesAlerts } from './get_services/get_service_alerts'; +import type { ServiceTransactionDetailedStatPeriodsResponse } from './get_services_detailed_statistics/get_service_transaction_detailed_statistics'; +import { getServiceTransactionDetailedStatsPeriods } from './get_services_detailed_statistics/get_service_transaction_detailed_statistics'; +import type { ServiceAgentResponse } from './get_service_agent'; +import { getServiceAgent } from './get_service_agent'; +import type { ServiceDependenciesResponse } from './get_service_dependencies'; +import { getServiceDependencies } from './get_service_dependencies'; +import type { ServiceDependenciesBreakdownResponse } from './get_service_dependencies_breakdown'; +import { getServiceDependenciesBreakdown } from './get_service_dependencies_breakdown'; +import type { ServiceInstancesDetailedStatisticsResponse } from './get_service_instances/detailed_statistics'; +import { getServiceInstancesDetailedStatisticsPeriods } from './get_service_instances/detailed_statistics'; +import type { ServiceInstanceMainStatisticsResponse } from './get_service_instances/main_statistics'; +import { getServiceInstancesMainStatistics } from './get_service_instances/main_statistics'; +import type { ServiceInstanceContainerMetadataDetails } from './get_service_instance_container_metadata'; +import { getServiceInstanceContainerMetadata } from './get_service_instance_container_metadata'; +import type { ServiceInstanceMetadataDetailsResponse } from './get_service_instance_metadata_details'; +import { getServiceInstanceMetadataDetails } from './get_service_instance_metadata_details'; +import type { ServiceMetadataDetails } from './get_service_metadata_details'; +import { getServiceMetadataDetails } from './get_service_metadata_details'; +import type { ServiceMetadataIcons } from './get_service_metadata_icons'; +import { getServiceMetadataIcons } from './get_service_metadata_icons'; +import type { ServiceNodeMetadataResponse } from './get_service_node_metadata'; +import { getServiceNodeMetadata } from './get_service_node_metadata'; import { getServiceOverviewContainerMetadata } from './get_service_overview_container_metadata'; -import { - getServiceTransactionTypes, - ServiceTransactionTypesResponse, -} from './get_service_transaction_types'; -import { getThroughput, ServiceThroughputResponse } from './get_throughput'; +import type { ServiceTransactionTypesResponse } from './get_service_transaction_types'; +import { getServiceTransactionTypes } from './get_service_transaction_types'; +import type { ServiceThroughputResponse } from './get_throughput'; +import { getThroughput } from './get_throughput'; import { getServiceEntitySummary } from '../entities/services/get_service_entity_summary'; import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/convert_settings_to_string.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/convert_settings_to_string.ts index 0da0bbcf4fdf3..9390e8ad6664e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/convert_settings_to_string.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/convert_settings_to_string.ts @@ -6,7 +6,7 @@ */ import type { SearchHit } from '@kbn/es-types'; -import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; +import type { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; // needed for backwards compatability // All settings except `transaction_sample_rate` and `transaction_max_spans` are stored as strings (they are stored as float and integer respectively) diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts index 9f224647ca875..8630f69400126 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_agent_config_index.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { createOrUpdateIndex, Mappings } from '@kbn/observability-plugin/server'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { Mappings } from '@kbn/observability-plugin/server'; +import { createOrUpdateIndex } from '@kbn/observability-plugin/server'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; export async function createApmAgentConfigurationIndex({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts index 3839949df6cc4..1852385664b22 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/create_or_update_configuration.ts @@ -6,11 +6,11 @@ */ import hash from 'object-hash'; -import { +import type { AgentConfiguration, AgentConfigurationIntake, } from '../../../../common/agent_configuration/configuration_types'; -import { +import type { APMIndexDocumentParams, APMInternalESClient, } from '../../../lib/helpers/create_es_client/create_internal_es_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts index fc49660cd53e1..a608cfc015ead 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/delete_configuration.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; export async function deleteConfiguration({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts index e5e507dd1c6f1..f9a8f25392dd2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/find_exact_configuration.ts @@ -6,10 +6,10 @@ */ import type { SearchHit } from '@kbn/es-types'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { SERVICE_ENVIRONMENT, SERVICE_NAME } from '../../../../common/es_fields/apm'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; import { convertConfigSettingsToString } from './convert_settings_to_string'; import { getAgentConfigEtagMetrics } from './get_agent_config_etag_metrics'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts index 6d568532c9457..c5a9ec8b37cee 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_config_etag_metrics.ts @@ -8,7 +8,7 @@ import { termQuery, rangeQuery } from '@kbn/observability-plugin/server'; import datemath from '@kbn/datemath'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { METRICSET_NAME } from '../../../../common/es_fields/apm'; export async function getAgentConfigEtagMetrics(apmEventClient: APMEventClient, etag?: string) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts index 41c9491e9864c..40fb80f4c2a14 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_agent_name_by_service.ts @@ -8,7 +8,7 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { SERVICE_NAME } from '../../../../common/es_fields/apm'; import { AGENT_NAME } from '../../../../common/es_fields/apm'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getAgentNameByService({ serviceName, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts index 6afde1a7532cc..a36fd32441005 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/get_existing_environments_for_service.ts @@ -7,7 +7,7 @@ import { SERVICE_NAME, SERVICE_ENVIRONMENT } from '../../../../../common/es_fields/apm'; import { ALL_OPTION_VALUE } from '../../../../../common/agent_configuration/all_option'; -import { APMInternalESClient } from '../../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../../apm_indices/apm_system_index_constants'; export async function getExistingEnvironmentsForService({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/index.ts index 98964d3b2927d..19551c5cc3268 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/get_environments/index.ts @@ -9,8 +9,8 @@ import { withApmSpan } from '../../../../utils/with_apm_span'; import { getAllEnvironments } from '../../../environments/get_all_environments'; import { getExistingEnvironmentsForService } from './get_existing_environments_for_service'; import { ALL_OPTION_VALUE } from '../../../../../common/agent_configuration/all_option'; -import { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; -import { APMInternalESClient } from '../../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMEventClient } from '../../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMInternalESClient } from '../../../../lib/helpers/create_es_client/create_internal_es_client'; export type EnvironmentsResponse = Array<{ name: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts index 300ede3894c2b..6f9d9e9baf2d7 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/list_configurations.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; +import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { convertConfigSettingsToString } from './convert_settings_to_string'; import { getAgentConfigEtagMetrics } from './get_agent_config_etag_metrics'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; export async function listConfigurations({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts index 9833423e3bef6..9d01b57d97c3f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/mark_applied_by_agent.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; // We're not wrapping this function with a span as it is not blocking the request diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts index 0b0157e423d59..7e0e9cf293cc4 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/queries.test.ts @@ -8,7 +8,8 @@ import { getExistingEnvironmentsForService } from './get_environments/get_existing_environments_for_service'; import { listConfigurations } from './list_configurations'; import { searchConfigurations } from './search_configurations'; -import { SearchParamsMock, inspectSearchParams } from '../../../utils/test_helpers'; +import type { SearchParamsMock } from '../../../utils/test_helpers'; +import { inspectSearchParams } from '../../../utils/test_helpers'; import { findExactConfiguration } from './find_exact_configuration'; import { getAllEnvironments } from '../../environments/get_all_environments'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/route.ts index bda0f5aba15a9..96f7889fb8733 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/route.ts @@ -9,12 +9,13 @@ import * as t from 'io-ts'; import Boom from '@hapi/boom'; import { toBooleanRt } from '@kbn/io-ts-utils'; import { maxSuggestions } from '@kbn/observability-plugin/common'; -import { SearchHit } from '@kbn/es-types'; +import type { SearchHit } from '@kbn/es-types'; import { createOrUpdateConfiguration } from './create_or_update_configuration'; import { searchConfigurations } from './search_configurations'; import { findExactConfiguration } from './find_exact_configuration'; import { listConfigurations } from './list_configurations'; -import { EnvironmentsResponse, getEnvironments } from './get_environments'; +import type { EnvironmentsResponse } from './get_environments'; +import { getEnvironments } from './get_environments'; import { deleteConfiguration } from './delete_configuration'; import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; import { getAgentNameByService } from './get_agent_name_by_service'; @@ -27,8 +28,8 @@ import { getSearchTransactionsEvents } from '../../../lib/helpers/transactions'; import { syncAgentConfigsToApmPackagePolicies } from '../../fleet/sync_agent_configs_to_apm_package_policies'; import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; import { createInternalESClientWithResources } from '../../../lib/helpers/create_es_client/create_internal_es_client'; -import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; -import { ApmFeatureFlags } from '../../../../common/apm_feature_flags'; +import type { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; +import type { ApmFeatureFlags } from '../../../../common/apm_feature_flags'; function throwNotFoundIfAgentConfigNotAvailable(featureFlags: ApmFeatureFlags): void { if (!featureFlags.agentConfigurationAvailable) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts index 1cc37221b9993..e7411146859be 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/agent_configuration/search_configurations.ts @@ -7,9 +7,9 @@ import type { SearchHit } from '@kbn/es-types'; import { SERVICE_NAME, SERVICE_ENVIRONMENT } from '../../../../common/es_fields/apm'; -import { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; +import type { AgentConfiguration } from '../../../../common/agent_configuration/configuration_types'; import { convertConfigSettingsToString } from './convert_settings_to_string'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_AGENT_CONFIGURATION_INDEX } from '../apm_indices/apm_system_index_constants'; export async function searchConfigurations({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/route.ts index 921b86bc57f16..e4e12701666b2 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/route.ts @@ -8,7 +8,7 @@ import * as t from 'io-ts'; import Boom from '@hapi/boom'; import { maxSuggestions } from '@kbn/observability-plugin/common'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { getESCapabilities } from '../../../lib/helpers/get_es_capabilities'; import { isActivePlatinumLicense } from '../../../../common/license_check'; import { ML_ERRORS } from '../../../../common/anomaly_detection'; @@ -22,7 +22,7 @@ import { updateToV3 } from './update_to_v3'; import { environmentStringRt } from '../../../../common/environment_rt'; import { getMlJobsWithAPMGroup } from '../../../lib/anomaly_detection/get_ml_jobs_with_apm_group'; import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; -import { ApmMlJob } from '../../../../common/anomaly_detection/apm_ml_job'; +import type { ApmMlJob } from '../../../../common/anomaly_detection/apm_ml_job'; // get ML anomaly detection jobs for each environment const anomalyDetectionJobsRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/settings/anomaly-detection/jobs', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/update_to_v3.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/update_to_v3.ts index 509029288e033..0d24a0fdc7a38 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/update_to_v3.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/anomaly_detection/update_to_v3.ts @@ -4,16 +4,16 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Logger } from '@kbn/logging'; +import type { Logger } from '@kbn/logging'; import { uniq } from 'lodash'; import pLimit from 'p-limit'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { JOB_STATE } from '@kbn/ml-plugin/common'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { ElasticsearchCapabilities } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchCapabilities } from '@kbn/core-elasticsearch-server'; import { createAnomalyDetectionJobs } from '../../../lib/anomaly_detection/create_anomaly_detection_jobs'; import { getAnomalyDetectionJobs } from '../../../lib/anomaly_detection/get_anomaly_detection_jobs'; -import { MlClient } from '../../../lib/helpers/get_ml_client'; +import type { MlClient } from '../../../lib/helpers/get_ml_client'; import { withApmSpan } from '../../../utils/with_apm_span'; export async function updateToV3({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts index e9f24f0201d63..c725ae5cc88bc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/get_apm_indices.ts @@ -6,7 +6,7 @@ */ import { getApmIndicesSavedObject } from '@kbn/apm-data-access-plugin/server/saved_objects/apm_indices'; -import { APMRouteHandlerResources } from '../../apm_routes/register_apm_server_routes'; +import type { APMRouteHandlerResources } from '../../apm_routes/register_apm_server_routes'; export type ApmIndexSettingsResponse = Array<{ configurationName: 'transaction' | 'span' | 'error' | 'metric' | 'onboarding' | 'sourcemap'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/route.ts index 63bf2a145d6a0..998790cc03019 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/apm_indices/route.ts @@ -6,11 +6,12 @@ */ import * as t from 'io-ts'; -import { SavedObject } from '@kbn/core/server'; +import type { SavedObject } from '@kbn/core/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { saveApmIndices } from '@kbn/apm-data-access-plugin/server/saved_objects/apm_indices'; import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; -import { getApmIndexSettings, ApmIndexSettingsResponse } from './get_apm_indices'; +import type { ApmIndexSettingsResponse } from './get_apm_indices'; +import { getApmIndexSettings } from './get_apm_indices'; // get list of apm indices and values const apmIndexSettingsRoute = createApmServerRoute({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts index d990a3536c59b..fd57586f59e6a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_custom_link_index.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { createOrUpdateIndex, Mappings } from '@kbn/observability-plugin/server'; +import type { Mappings } from '@kbn/observability-plugin/server'; +import { createOrUpdateIndex } from '@kbn/observability-plugin/server'; import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/apm_system_index_constants'; export const createApmCustomLinkIndex = async ({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts index 3b5bf5b3f15a6..1b8831a2d92ca 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.test.ts @@ -6,9 +6,9 @@ */ import { mockNow } from '../../../utils/test_helpers'; -import { CustomLink } from '../../../../common/custom_link/custom_link_types'; +import type { CustomLink } from '../../../../common/custom_link/custom_link_types'; import { createOrUpdateCustomLink } from './create_or_update_custom_link'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; describe('Create or Update Custom link', () => { const internalClientIndexMock = jest.fn(); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts index e9f9774477107..edf65d979e60f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/create_or_update_custom_link.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { CustomLink, CustomLinkES } from '../../../../common/custom_link/custom_link_types'; +import type { CustomLink, CustomLinkES } from '../../../../common/custom_link/custom_link_types'; import { toESFormat } from './helper'; -import { +import type { APMIndexDocumentParams, APMInternalESClient, } from '../../../lib/helpers/create_es_client/create_internal_es_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts index cc000ceda963f..1fb772e57995f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/delete_custom_link.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/apm_system_index_constants'; export function deleteCustomLink({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts index a927cefea79c6..fdda2cbaba4bc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { inspectSearchParams, SearchParamsMock } from '../../../utils/test_helpers'; +import type { SearchParamsMock } from '../../../utils/test_helpers'; +import { inspectSearchParams } from '../../../utils/test_helpers'; import { getTransaction } from './get_transaction'; import { SERVICE_NAME, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.ts index 58cdd55b2d443..f1209d4588fd9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/get_transaction.ts @@ -5,13 +5,13 @@ * 2.0. */ -import * as t from 'io-ts'; +import type * as t from 'io-ts'; import { compact } from 'lodash'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; -import { filterOptionsRt } from './custom_link_types'; +import type { filterOptionsRt } from './custom_link_types'; import { splitFilterValueByComma } from './helper'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export async function getTransaction({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/helper.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/helper.ts index 9eea5a14f0f37..2b9c21e407042 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/helper.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/helper.ts @@ -6,7 +6,7 @@ */ import { isEmpty } from 'lodash'; -import { +import type { CustomLinkES, CustomLink, Filter, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts index ae99f2f1f3ee0..ae2c18f7ce68a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.test.ts @@ -6,7 +6,8 @@ */ import { listCustomLinks } from './list_custom_links'; -import { inspectSearchParams, SearchParamsMock } from '../../../utils/test_helpers'; +import type { SearchParamsMock } from '../../../utils/test_helpers'; +import { inspectSearchParams } from '../../../utils/test_helpers'; import { SERVICE_NAME, TRANSACTION_NAME } from '../../../../common/es_fields/apm'; describe('List Custom Links', () => { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts index fb79d6b31901c..abcf100010893 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/list_custom_links.ts @@ -5,12 +5,12 @@ * 2.0. */ -import * as t from 'io-ts'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { CustomLink, CustomLinkES } from '../../../../common/custom_link/custom_link_types'; +import type * as t from 'io-ts'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { CustomLink, CustomLinkES } from '../../../../common/custom_link/custom_link_types'; import { fromESFormat } from './helper'; -import { filterOptionsRt } from './custom_link_types'; -import { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; +import type { filterOptionsRt } from './custom_link_types'; +import type { APMInternalESClient } from '../../../lib/helpers/create_es_client/create_internal_es_client'; import { APM_CUSTOM_LINK_INDEX } from '../apm_indices/apm_system_index_constants'; export async function listCustomLinks({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/route.ts index 20bdd11b3f45c..5366547ac2d2b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/settings/custom_link/route.ts @@ -20,8 +20,8 @@ import { listCustomLinks } from './list_custom_links'; import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; import { getApmEventClient } from '../../../lib/helpers/get_apm_event_client'; import { createInternalESClientWithResources } from '../../../lib/helpers/create_es_client/create_internal_es_client'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; -import { CustomLink } from '../../../../common/custom_link/custom_link_types'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { CustomLink } from '../../../../common/custom_link/custom_link_types'; const customLinkTransactionRoute = createApmServerRoute({ endpoint: 'GET /internal/apm/settings/custom_links/transaction', diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts index ae16b8120f9ac..4d58ff71f3d97 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/bulk_create_apm_source_maps.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { Artifact } from '@kbn/fleet-plugin/server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { Artifact } from '@kbn/fleet-plugin/server'; import { getUnzippedArtifactBody } from '../fleet/source_maps'; import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/apm_system_index_constants'; -import { ApmSourceMap } from './create_apm_source_map_index_template'; +import type { ApmSourceMap } from './create_apm_source_map_index_template'; import { getEncodedContent, getSourceMapId } from './sourcemap_utils'; export async function bulkCreateApmSourceMaps({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map.ts index 15cb5547f4b0f..2b95b25a4b3fb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { Logger } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { Logger } from '@kbn/core/server'; import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/apm_system_index_constants'; -import { ApmSourceMap } from './create_apm_source_map_index_template'; -import { SourceMap } from './route'; +import type { ApmSourceMap } from './create_apm_source_map_index_template'; +import type { SourceMap } from './route'; import { getEncodedContent, getSourceMapId } from './sourcemap_utils'; export async function createApmSourceMap({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts index 7b641f7f0ba87..588e852ac8342 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/create_apm_source_map_index_template.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IndicesPutIndexTemplateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { IndicesPutIndexTemplateRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; import { createOrUpdateIndexTemplate } from '@kbn/observability-plugin/server'; import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/apm_system_index_constants'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.ts index 2f4723f9e470f..efacfeed41ba8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/delete_apm_sourcemap.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/apm_system_index_constants'; export async function deleteApmSourceMap({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/route.ts index 6e51002dfc81a..d386e9cb4f7f3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/route.ts @@ -5,20 +5,20 @@ * 2.0. */ import Boom from '@hapi/boom'; -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { Artifact } from '@kbn/fleet-plugin/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { Artifact } from '@kbn/fleet-plugin/server'; import { jsonRt, toNumberRt } from '@kbn/io-ts-utils'; import * as t from 'io-ts'; -import { ApmFeatureFlags } from '../../../common/apm_feature_flags'; +import type { ApmFeatureFlags } from '../../../common/apm_feature_flags'; import { getInternalSavedObjectsClient } from '../../lib/helpers/get_internal_saved_objects_client'; import { stringFromBufferRt } from '../../utils/string_from_buffer_rt'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; +import type { ListSourceMapArtifactsResponse } from '../fleet/source_maps'; import { createFleetSourceMapArtifact, deleteFleetSourcemapArtifact, getCleanedBundleFilePath, listSourceMapArtifacts, - ListSourceMapArtifactsResponse, updateSourceMapsOnFleetPolicies, } from '../fleet/source_maps'; import { createApmSourceMap } from './create_apm_source_map'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts index 2fbfc65fcce03..0e18a9b47c37a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/schedule_source_map_migration.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { FleetStartContract } from '@kbn/fleet-plugin/server'; -import { ArtifactsClientInterface } from '@kbn/fleet-plugin/server/services'; -import { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; -import { CoreStart, Logger } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { FleetStartContract } from '@kbn/fleet-plugin/server'; +import type { ArtifactsClientInterface } from '@kbn/fleet-plugin/server/services'; +import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; +import type { CoreStart, Logger } from '@kbn/core/server'; import { getApmArtifactClient } from '../fleet/source_maps'; import { bulkCreateApmSourceMaps } from './bulk_create_apm_source_maps'; import { APM_SOURCE_MAP_INDEX } from '../settings/apm_indices/apm_system_index_constants'; -import { ApmSourceMap } from './create_apm_source_map_index_template'; -import { APMPluginStartDependencies } from '../../types'; +import type { ApmSourceMap } from './create_apm_source_map_index_template'; +import type { APMPluginStartDependencies } from '../../types'; import { createApmSourceMapIndexTemplate } from './create_apm_source_map_index_template'; const PER_PAGE = 10; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/sourcemap_utils.ts b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/sourcemap_utils.ts index 20ff2fa4bd41c..abe1d6b1a30a9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/sourcemap_utils.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/source_maps/sourcemap_utils.ts @@ -6,9 +6,10 @@ */ import { deflate } from 'zlib'; -import { BinaryLike, createHash } from 'crypto'; +import type { BinaryLike } from 'crypto'; +import { createHash } from 'crypto'; import { promisify } from 'util'; -import { SourceMap } from './route'; +import type { SourceMap } from './route'; const deflateAsync = promisify(deflate); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_children.ts b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_children.ts index 2ff34698c20bc..b78585bffc3ef 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_children.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_children.ts @@ -19,7 +19,7 @@ import { TRANSACTION_ID, } from '../../../common/es_fields/apm'; import { getBufferedTimerange } from './utils'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; async function fetchLinkedChildrenOfSpan({ traceId, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_parents.ts b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_parents.ts index 59e91e0b17e6b..741fd80b6eba1 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_parents.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_linked_parents.ts @@ -13,9 +13,9 @@ import { TRANSACTION_ID, PROCESSOR_EVENT, } from '../../../common/es_fields/apm'; -import { SpanRaw } from '../../../typings/es_schemas/raw/span_raw'; -import { TransactionRaw } from '../../../typings/es_schemas/raw/transaction_raw'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { SpanRaw } from '../../../typings/es_schemas/raw/span_raw'; +import type { TransactionRaw } from '../../../typings/es_schemas/raw/transaction_raw'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getLinkedParentsOfSpan({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_span_links_details.ts b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_span_links_details.ts index 669adb1008080..e118482bf307d 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_span_links_details.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/get_span_links_details.ts @@ -24,11 +24,11 @@ import { AGENT_NAME, SERVICE_ENVIRONMENT, } from '../../../common/es_fields/apm'; -import { Environment } from '../../../common/environment_rt'; -import { SpanLinkDetails } from '../../../common/span_links'; -import { SpanLink } from '../../../typings/es_schemas/raw/fields/span_links'; +import type { Environment } from '../../../common/environment_rt'; +import type { SpanLinkDetails } from '../../../common/span_links'; +import type { SpanLink } from '../../../typings/es_schemas/raw/fields/span_links'; import { getBufferedTimerange } from './utils'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; async function fetchSpanLinksDetails({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/route.ts index 6a3531e4fa443..7c2eeeba84695 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/span_links/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/span_links/route.ts @@ -9,7 +9,7 @@ import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { getSpanLinksDetails } from './get_span_links_details'; import { getLinkedChildrenOfSpan } from './get_linked_children'; import { kueryRt, rangeRt } from '../default_api_types'; -import { SpanLinkDetails } from '../../../common/span_links'; +import type { SpanLinkDetails } from '../../../common/span_links'; import { processorEventRt } from '../../../common/processor_event'; import { getLinkedParentsOfSpan } from './get_linked_parents'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts index a44463bc70ae3..411e8f35e2867 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_service_statistics.ts @@ -6,7 +6,7 @@ */ import { termQuery, kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ApmPluginRequestHandlerContext } from '../typings'; import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, @@ -22,10 +22,10 @@ import { INDEX, } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { getTotalIndicesStats, getEstimatedSizeForDocumentsInIndex } from './indices_stats_helpers'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; async function getMainServiceStatistics({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts index ef35d765b30e1..86d3c56218361 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_size_timeseries.ts @@ -14,10 +14,10 @@ import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, } from '../../../common/storage_explorer_types'; -import { ApmPluginRequestHandlerContext } from '../typings'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { ApmPluginRequestHandlerContext } from '../typings'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; import { getTotalIndicesStats, getEstimatedSizeForDocumentsInIndex } from './indices_stats_helpers'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export type SizeTimeseriesResponse = Array<{ serviceName: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details.ts index 570e0f2aa2d6f..9ff1f463d00f0 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Environment } from '../../../common/environment_rt'; -import { IndexLifecyclePhaseSelectOption } from '../../../common/storage_explorer_types'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { Environment } from '../../../common/environment_rt'; +import type { IndexLifecyclePhaseSelectOption } from '../../../common/storage_explorer_types'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { ApmPluginRequestHandlerContext } from '../typings'; import { getStorageDetailsPerIndex, getStorageDetailsPerProcessorEvent, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts index 74c28a7290c1b..a29bc7fa683a7 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_storage_details_per_service.ts @@ -13,15 +13,15 @@ import { indexLifeCyclePhaseToDataTier, } from '../../../common/storage_explorer_types'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ApmPluginRequestHandlerContext } from '../typings'; import { getTotalIndicesStats, getEstimatedSizeForDocumentsInIndex, getIndicesLifecycleStatus, getIndicesInfo, } from './indices_stats_helpers'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getStorageDetailsPerProcessorEvent({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts index ce236a6f1654e..23f5c4263a3f5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_summary_statistics.ts @@ -12,12 +12,12 @@ import { getEstimatedSizeForDocumentsInIndex, getApmDiskSpacedUsedPct, } from './indices_stats_helpers'; -import { ApmPluginRequestHandlerContext } from '../typings'; +import type { ApmPluginRequestHandlerContext } from '../typings'; import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, } from '../../../common/storage_explorer_types'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; import { SERVICE_NAME, TIER, INDEX } from '../../../common/es_fields/apm'; import { environmentQuery } from '../../../common/utils/environment_query'; import { @@ -27,7 +27,7 @@ import { isRootTransaction, } from '../../lib/helpers/transactions'; import { calculateThroughputWithRange } from '../../lib/helpers/calculate_throughput'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; interface SharedOptions { apmEventClient: APMEventClient; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts index 7e4897096bdf8..d895077766e90 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/get_total_transactions_per_service.ts @@ -15,8 +15,8 @@ import { indexLifeCyclePhaseToDataTier, } from '../../../common/storage_explorer_types'; import { environmentQuery } from '../../../common/utils/environment_query'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getTotalTransactionsPerService({ apmEventClient, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/has_storage_explorer_privileges.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/has_storage_explorer_privileges.ts index e3ba5053640f8..9fffafc8ff0e8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/has_storage_explorer_privileges.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/has_storage_explorer_privileges.ts @@ -7,8 +7,8 @@ import { every } from 'lodash'; import { uniq } from 'lodash'; -import { ApmPluginRequestHandlerContext } from '../typings'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { ApmPluginRequestHandlerContext } from '../typings'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function hasStorageExplorerPrivileges({ context, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/indices_stats_helpers.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/indices_stats_helpers.ts index 85e3dbfb97ca1..9014daf5d16b3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/indices_stats_helpers.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/indices_stats_helpers.ts @@ -5,9 +5,9 @@ * 2.0. */ import { uniq, values, sumBy } from 'lodash'; -import { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; -import { ApmPluginRequestHandlerContext } from '../typings'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; +import type { ApmPluginRequestHandlerContext } from '../typings'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getTotalIndicesStats({ context, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts index 21b5b163e7663..243f28625eee9 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.test.ts @@ -7,7 +7,7 @@ import { isCrossClusterSearch } from './is_cross_cluster_search'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; describe('isCrossClusterSearch', () => { it('returns false when there are no remote clusters in APM indices', () => { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.ts index 409ba22335cc2..7a2f06638b073 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/is_cross_cluster_search.ts @@ -6,7 +6,7 @@ */ import { isCCSRemoteIndexName } from '@kbn/es-query'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getApmIndicesCombined } from './indices_stats_helpers'; export function isCrossClusterSearch(apmEventClient: APMEventClient) { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/route.ts index dfaf5dd8185ce..aea4e12f4aadb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/storage_explorer/route.ts @@ -19,16 +19,14 @@ import { getSearchTransactionsEvents } from '../../lib/helpers/transactions'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, kueryRt, probabilityRt, rangeRt } from '../default_api_types'; import { getServiceNamesFromTermsEnum } from '../services/get_services/get_service_names_from_terms_enum'; -import { - getServiceStatistics, - StorageExplorerServiceStatisticsResponse, -} from './get_service_statistics'; -import { getSizeTimeseries, SizeTimeseriesResponse } from './get_size_timeseries'; -import { getStorageDetails, StorageDetailsResponse } from './get_storage_details'; -import { - getSummaryStatistics, - StorageExplorerSummaryStatisticsResponse, -} from './get_summary_statistics'; +import type { StorageExplorerServiceStatisticsResponse } from './get_service_statistics'; +import { getServiceStatistics } from './get_service_statistics'; +import type { SizeTimeseriesResponse } from './get_size_timeseries'; +import { getSizeTimeseries } from './get_size_timeseries'; +import type { StorageDetailsResponse } from './get_storage_details'; +import { getStorageDetails } from './get_storage_details'; +import type { StorageExplorerSummaryStatisticsResponse } from './get_summary_statistics'; +import { getSummaryStatistics } from './get_summary_statistics'; import { hasStorageExplorerPrivileges } from './has_storage_explorer_privileges'; import { isCrossClusterSearch } from './is_cross_cluster_search'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.test.ts index 3d5368133982c..f2a8b9873df1e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getSuggestionsWithTermsAggregation } from './get_suggestions_with_terms_aggregation'; const mockSearch = jest.fn(); diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts b/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts index 9a2cea0ebf29d..ad33634726249 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_aggregation.ts @@ -8,7 +8,7 @@ import { rangeQuery, termQuery, wildcardQuery } from '@kbn/observability-plugin/ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; import { SERVICE_NAME } from '../../../common/es_fields/apm'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getSuggestionsWithTermsAggregation({ fieldName, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_enum.ts b/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_enum.ts index 766369deb669f..64e95f986cbb5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_enum.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/suggestions/get_suggestions_with_terms_enum.ts @@ -6,7 +6,7 @@ */ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { getProcessorEventForTransactions } from '../../lib/helpers/transactions'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export async function getSuggestionsWithTermsEnum({ fieldName, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/time_range_metadata/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/time_range_metadata/route.ts index dcd5fa39e97f2..eb1092a886e79 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/time_range_metadata/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/time_range_metadata/route.ts @@ -6,7 +6,7 @@ */ import { toBooleanRt } from '@kbn/io-ts-utils'; import * as t from 'io-ts'; -import { TimeRangeMetadata } from '../../../common/time_range_metadata'; +import type { TimeRangeMetadata } from '../../../common/time_range_metadata'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { getIsUsingServiceDestinationMetrics } from '../../lib/helpers/spans/get_is_using_service_destination_metrics'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts index 6a3af27aa838d..a030cf4e95945 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_aggregated_critical_path.ts @@ -7,20 +7,20 @@ import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { rangeQuery, termsQuery } from '@kbn/observability-plugin/server'; -import { Logger } from '@kbn/logging'; -import { +import type { Logger } from '@kbn/logging'; +import type { AGENT_NAME, PROCESSOR_EVENT, SERVICE_NAME, SPAN_NAME, SPAN_SUBTYPE, SPAN_TYPE, - TRACE_ID, TRANSACTION_NAME, TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import { TRACE_ID } from '../../../common/es_fields/apm'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; type OperationMetadata = { [SERVICE_NAME]: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts index ab929538cbb2b..c5e82706dd07f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_top_traces_primary_stats.ts @@ -7,7 +7,7 @@ import { sortBy } from 'lodash'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; +import type { AgentName } from '../../../typings/es_schemas/ui/fields/agent'; import { withApmSpan } from '../../utils/with_apm_span'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; import { environmentQuery } from '../../../common/utils/environment_query'; @@ -25,8 +25,8 @@ import { TRANSACTION_TYPE, TRANSACTION_NAME, } from '../../../common/es_fields/apm'; -import { RandomSampler } from '../../lib/helpers/get_random_sampler'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { RandomSampler } from '../../lib/helpers/get_random_sampler'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export type BucketKey = Record; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_items.ts b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_items.ts index 55fb0aab47f38..23df885e65266 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_items.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_items.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { Logger } from '@kbn/logging'; -import { SortResults } from '@elastic/elasticsearch/lib/api/types'; -import { QueryDslQueryContainer, Sort } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { Logger } from '@kbn/logging'; +import type { SortResults } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer, Sort } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { last, omit } from 'lodash'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; -import { APMConfig } from '../..'; +import type { APMConfig } from '../..'; import { AGENT_NAME, CHILD_ID, @@ -50,12 +50,12 @@ import { TRANSACTION_RESULT, TRANSACTION_TYPE, } from '../../../common/es_fields/apm'; -import { +import type { WaterfallError, WaterfallSpan, WaterfallTransaction, } from '../../../common/waterfall/typings'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getSpanLinksCountById } from '../span_links/get_linked_children'; import { ApmDocumentType } from '../../../common/document_type'; import { RollupInterval } from '../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts index dd1330dea4e48..241f5e3d6db1f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/traces/get_trace_samples_by_query.ts @@ -6,7 +6,7 @@ */ import { rangeQuery, kqlQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; -import { Environment } from '../../../common/environment_rt'; +import type { Environment } from '../../../common/environment_rt'; import { TraceSearchType } from '../../../common/trace_explorer'; import { environmentQuery } from '../../../common/utils/environment_query'; import { @@ -17,7 +17,7 @@ import { TRANSACTION_SAMPLED, } from '../../../common/es_fields/apm'; import { asMutableArray } from '../../../common/utils/as_mutable_array'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; export type TraceSamplesResponse = Array<{ traceId: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/traces/queries.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/traces/queries.test.ts index d94ae4f7082e9..7ec9b3e7b6269 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/traces/queries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/traces/queries.test.ts @@ -7,7 +7,8 @@ import { loggerMock } from '@kbn/logging-mocks'; import { getTraceItems } from './get_trace_items'; -import { SearchParamsMock, inspectSearchParams } from '../../utils/test_helpers'; +import type { SearchParamsMock } from '../../utils/test_helpers'; +import { inspectSearchParams } from '../../utils/test_helpers'; describe('trace queries', () => { let mock: SearchParamsMock; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/traces/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/traces/route.ts index f1a5dfdb25160..3a52e7b563e1e 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/traces/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/traces/route.ts @@ -16,18 +16,19 @@ import { type TransactionDetailRedirectInfo, getRootTransactionByTraceId, } from '../transactions/get_transaction_by_trace'; -import { - getTopTracesPrimaryStats, - TopTracesPrimaryStatsResponse, -} from './get_top_traces_primary_stats'; -import { getTraceItems, TraceItems } from './get_trace_items'; -import { getTraceSamplesByQuery, TraceSamplesResponse } from './get_trace_samples_by_query'; +import type { TopTracesPrimaryStatsResponse } from './get_top_traces_primary_stats'; +import { getTopTracesPrimaryStats } from './get_top_traces_primary_stats'; +import type { TraceItems } from './get_trace_items'; +import { getTraceItems } from './get_trace_items'; +import type { TraceSamplesResponse } from './get_trace_samples_by_query'; +import { getTraceSamplesByQuery } from './get_trace_samples_by_query'; import { getRandomSampler } from '../../lib/helpers/get_random_sampler'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; -import { CriticalPathResponse, getAggregatedCriticalPath } from './get_aggregated_critical_path'; +import type { CriticalPathResponse } from './get_aggregated_critical_path'; +import { getAggregatedCriticalPath } from './get_aggregated_critical_path'; import { getSpan } from '../transactions/get_span'; -import { Transaction } from '../../../typings/es_schemas/ui/transaction'; -import { Span } from '../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../typings/es_schemas/ui/transaction'; +import type { Span } from '../../../typings/es_schemas/ui/span'; import { getTransactionByName } from '../transactions/get_transaction_by_name'; const tracesRoute = createApmServerRoute({ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.test.ts index 7a01b793612fe..3a3bcdf3179c3 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.test.ts @@ -9,7 +9,7 @@ import { getTransactionBreakdown } from '.'; import * as constants from './constants'; import noDataResponse from './mock_responses/no_data.json'; import dataResponse from './mock_responses/data.json'; -import { APMConfig } from '../../..'; +import type { APMConfig } from '../../..'; import { ENVIRONMENT_ALL } from '../../../../common/environment_filter_values'; const mockConfig = new Proxy( diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.ts index a57d437b242aa..2c52566fd6ef8 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/breakdown/index.ts @@ -21,8 +21,8 @@ import { environmentQuery } from '../../../../common/utils/environment_query'; import { getMetricsDateHistogramParams } from '../../../lib/helpers/metrics'; import { MAX_KPIS } from './constants'; import { getVizColorForIndex } from '../../../../common/viz_colors'; -import { APMConfig } from '../../..'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMConfig } from '../../..'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export interface TransactionBreakdownResponse { timeseries: Array<{ diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_failed_transaction_rate_periods.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_failed_transaction_rate_periods.ts index c2ba9d1014a67..d577af3616dfc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_failed_transaction_rate_periods.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_failed_transaction_rate_periods.ts @@ -4,13 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { getFailedTransactionRate } from '../../lib/transaction_groups/get_failed_transaction_rate'; import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; -import { Coordinate } from '../../../typings/timeseries'; -import { ApmServiceTransactionDocumentType } from '../../../common/document_type'; -import { RollupInterval } from '../../../common/rollup'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Coordinate } from '../../../typings/timeseries'; +import type { ApmServiceTransactionDocumentType } from '../../../common/document_type'; +import type { RollupInterval } from '../../../common/rollup'; export interface FailedTransactionRateResponse { currentPeriod: { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_latency_charts/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_latency_charts/index.ts index 70e9555af4849..c305ece61769a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_latency_charts/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_latency_charts/index.ts @@ -4,22 +4,22 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { kqlQuery, rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; +import type { ApmServiceTransactionDocumentType } from '../../../../common/document_type'; import { FAAS_ID, SERVICE_NAME, TRANSACTION_NAME, TRANSACTION_TYPE, } from '../../../../common/es_fields/apm'; -import { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; -import { RollupInterval } from '../../../../common/rollup'; +import type { LatencyAggregationType } from '../../../../common/latency_aggregation_types'; +import type { RollupInterval } from '../../../../common/rollup'; import { environmentQuery } from '../../../../common/utils/environment_query'; import { getOffsetInMs } from '../../../../common/utils/get_offset_in_ms'; import { offsetPreviousPeriodCoordinates } from '../../../../common/utils/offset_previous_period_coordinate'; -import { Coordinate } from '../../../../typings/timeseries'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { Coordinate } from '../../../../typings/timeseries'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getLatencyAggregation, getLatencyValue, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_span/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_span/index.ts index dc8ab0a6aab19..6e7161f09227a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_span/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_span/index.ts @@ -8,15 +8,15 @@ import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; -import { FlattenedApmEvent } from '@kbn/apm-data-access-plugin/server/utils/unflatten_known_fields'; +import type { FlattenedApmEvent } from '@kbn/apm-data-access-plugin/server/utils/unflatten_known_fields'; import { merge, omit } from 'lodash'; import { maybe } from '../../../../common/utils/maybe'; import { SPAN_ID, SPAN_STACKTRACE, TRACE_ID } from '../../../../common/es_fields/apm'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { getTransaction } from '../get_transaction'; -import { Span } from '../../../../typings/es_schemas/ui/span'; -import { Transaction } from '../../../../typings/es_schemas/ui/transaction'; +import type { Span } from '../../../../typings/es_schemas/ui/span'; +import type { Transaction } from '../../../../typings/es_schemas/ui/transaction'; export async function getSpan({ spanId, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction/index.ts index 8fc9d93ceff87..e4076e174f9f7 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction/index.ts @@ -27,7 +27,7 @@ import { SERVICE_LANGUAGE_NAME, } from '../../../../common/es_fields/apm'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { ApmDocumentType } from '../../../../common/document_type'; import { RollupInterval } from '../../../../common/rollup'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_name/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_name/index.ts index 160e3f736580a..50589033bb859 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_name/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_name/index.ts @@ -20,8 +20,8 @@ import { } from '../../../../common/es_fields/apm'; import { RollupInterval } from '../../../../common/rollup'; import { asMutableArray } from '../../../../common/utils/as_mutable_array'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; -import { TransactionDetailRedirectInfo } from '../get_transaction_by_trace'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { TransactionDetailRedirectInfo } from '../get_transaction_by_trace'; export async function getTransactionByName({ transactionName, diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts index 803ae19a2228e..e2a361d1b1aee 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/get_transaction_by_trace/index.ts @@ -20,7 +20,7 @@ import { TRANSACTION_TYPE, SERVICE_NAME, } from '../../../../common/es_fields/apm'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; export interface TransactionDetailRedirectInfo { [AT_TIMESTAMP]: string; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/queries.test.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/queries.test.ts index e3c29c4225411..2b373d09595ee 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/queries.test.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/queries.test.ts @@ -6,7 +6,8 @@ */ import { ENVIRONMENT_ALL } from '../../../common/environment_filter_values'; -import { inspectSearchParams, SearchParamsMock } from '../../utils/test_helpers'; +import type { SearchParamsMock } from '../../utils/test_helpers'; +import { inspectSearchParams } from '../../utils/test_helpers'; import { getTransactionBreakdown } from './breakdown'; import { getTransaction } from './get_transaction'; import { getTraceSamples } from './trace_samples'; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/route.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/route.ts index 51ada72e38588..44088b5f14026 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/route.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/route.ts @@ -7,18 +7,14 @@ import { jsonRt, toBooleanRt, toNumberRt } from '@kbn/io-ts-utils'; import * as t from 'io-ts'; import { offsetRt } from '../../../common/comparison_rt'; -import { - LatencyAggregationType, - latencyAggregationTypeRt, -} from '../../../common/latency_aggregation_types'; +import type { LatencyAggregationType } from '../../../common/latency_aggregation_types'; +import { latencyAggregationTypeRt } from '../../../common/latency_aggregation_types'; import { joinByKey } from '../../../common/utils/join_by_key'; import { getApmAlertsClient } from '../../lib/helpers/get_apm_alerts_client'; import { getApmEventClient } from '../../lib/helpers/get_apm_event_client'; import { getSearchTransactionsEvents } from '../../lib/helpers/transactions'; -import { - ColdstartRateResponse, - getColdstartRatePeriods, -} from '../../lib/transaction_groups/get_coldstart_rate'; +import type { ColdstartRateResponse } from '../../lib/transaction_groups/get_coldstart_rate'; +import { getColdstartRatePeriods } from '../../lib/transaction_groups/get_coldstart_rate'; import { createApmServerRoute } from '../apm_routes/create_apm_server_route'; import { environmentRt, @@ -28,22 +24,19 @@ import { serviceTransactionDataSourceRt, transactionDataSourceRt, } from '../default_api_types'; -import { - getServiceTransactionGroups, - ServiceTransactionGroupsResponse, -} from '../services/get_service_transaction_groups'; +import type { ServiceTransactionGroupsResponse } from '../services/get_service_transaction_groups'; +import { getServiceTransactionGroups } from '../services/get_service_transaction_groups'; import { getServiceTransactionGroupsAlerts } from '../services/get_service_transaction_groups_alerts'; -import { - getServiceTransactionGroupDetailedStatisticsPeriods, - ServiceTransactionGroupDetailedStatisticsResponse, -} from '../services/get_service_transaction_group_detailed_statistics'; -import { getTransactionBreakdown, TransactionBreakdownResponse } from './breakdown'; -import { - FailedTransactionRateResponse, - getFailedTransactionRatePeriods, -} from './get_failed_transaction_rate_periods'; -import { getLatencyPeriods, TransactionLatencyResponse } from './get_latency_charts'; -import { getTraceSamples, TransactionTraceSamplesResponse } from './trace_samples'; +import type { ServiceTransactionGroupDetailedStatisticsResponse } from '../services/get_service_transaction_group_detailed_statistics'; +import { getServiceTransactionGroupDetailedStatisticsPeriods } from '../services/get_service_transaction_group_detailed_statistics'; +import type { TransactionBreakdownResponse } from './breakdown'; +import { getTransactionBreakdown } from './breakdown'; +import type { FailedTransactionRateResponse } from './get_failed_transaction_rate_periods'; +import { getFailedTransactionRatePeriods } from './get_failed_transaction_rate_periods'; +import type { TransactionLatencyResponse } from './get_latency_charts'; +import { getLatencyPeriods } from './get_latency_charts'; +import type { TransactionTraceSamplesResponse } from './trace_samples'; +import { getTraceSamples } from './trace_samples'; export interface MergedServiceTransactionGroupsResponse extends Omit { diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/trace_samples/index.ts b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/trace_samples/index.ts index 18dad19635333..8b9f18f43092b 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/transactions/trace_samples/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/transactions/trace_samples/index.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Sort, QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { Sort, QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import { unflattenKnownApmEventFields } from '@kbn/apm-data-access-plugin/server/utils'; @@ -19,7 +19,7 @@ import { TRANSACTION_TYPE, } from '../../../../common/es_fields/apm'; import { environmentQuery } from '../../../../common/utils/environment_query'; -import { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../../lib/helpers/create_es_client/create_apm_event_client'; import { withApmSpan } from '../../../utils/with_apm_span'; const TRACE_SAMPLES_SIZE = 500; diff --git a/x-pack/solutions/observability/plugins/apm/server/routes/typings.ts b/x-pack/solutions/observability/plugins/apm/server/routes/typings.ts index 830810af60cb5..117fd820f3e3a 100644 --- a/x-pack/solutions/observability/plugins/apm/server/routes/typings.ts +++ b/x-pack/solutions/observability/plugins/apm/server/routes/typings.ts @@ -16,7 +16,7 @@ import type { import type { RacApiRequestHandlerContext } from '@kbn/rule-registry-plugin/server'; import type { LicensingApiRequestHandlerContext } from '@kbn/licensing-plugin/server'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; +import type { RulesClientApi } from '@kbn/alerting-plugin/server/types'; export type ApmPluginRequestHandlerContext = CustomRequestHandlerContext<{ licensing: Pick; diff --git a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_custom_dashboards.ts b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_custom_dashboards.ts index 8d4b20757f136..56e9a8903c5de 100644 --- a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_custom_dashboards.ts +++ b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_custom_dashboards.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; import { APM_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../common/custom_dashboards'; diff --git a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_server_settings.ts b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_server_settings.ts index 08be3d98c9cfc..a8592bac69c4f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_server_settings.ts +++ b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_server_settings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; import { APM_SERVER_SCHEMA_SAVED_OBJECT_TYPE } from '../../common/apm_saved_object_constants'; diff --git a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_service_groups.ts b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_service_groups.ts index 180417d3dc42e..a6721af496453 100644 --- a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_service_groups.ts +++ b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_service_groups.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import type { SavedObjectMigrationFn } from '@kbn/core/server'; import { schema } from '@kbn/config-schema'; diff --git a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_telemetry.ts b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_telemetry.ts index 64f689b4317f5..7c78d8551920c 100644 --- a/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_telemetry.ts +++ b/x-pack/solutions/observability/plugins/apm/server/saved_objects/apm_telemetry.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { schema } from '@kbn/config-schema'; import { APM_TELEMETRY_SAVED_OBJECT_ID } from '../../common/apm_saved_object_constants'; diff --git a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/call_kibana.ts b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/call_kibana.ts index 87a28bfde6663..9a24c55f4456f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/call_kibana.ts +++ b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/call_kibana.ts @@ -4,9 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import axios, { AxiosRequestConfig, AxiosError } from 'axios'; +import type { AxiosRequestConfig, AxiosError } from 'axios'; +import axios from 'axios'; import { once } from 'lodash'; -import { Elasticsearch, Kibana } from '../create_apm_users'; +import type { Elasticsearch, Kibana } from '../create_apm_users'; const DEFAULT_HEADERS = { 'kbn-xsrf': 'true', diff --git a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_custom_role.ts b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_custom_role.ts index ac906fcbfb5e2..0f1675e253ebc 100644 --- a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_custom_role.ts +++ b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_custom_role.ts @@ -7,9 +7,10 @@ import { Client } from '@elastic/elasticsearch'; import { omit } from 'lodash'; -import { Elasticsearch, Kibana } from '../create_apm_users'; +import type { Elasticsearch, Kibana } from '../create_apm_users'; import { callKibana } from './call_kibana'; -import { customRoles, ApmCustomRolename } from '../authentication'; +import type { ApmCustomRolename } from '../authentication'; +import { customRoles } from '../authentication'; export async function createCustomRole({ elasticsearch, diff --git a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_or_update_user.ts b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_or_update_user.ts index 90a011480247e..efc6c071dbb47 100644 --- a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_or_update_user.ts +++ b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/create_or_update_user.ts @@ -8,7 +8,7 @@ /* eslint-disable no-console */ import { difference, union } from 'lodash'; -import { Elasticsearch, Kibana } from '../create_apm_users'; +import type { Elasticsearch, Kibana } from '../create_apm_users'; import { callKibana, isAxiosError } from './call_kibana'; interface User { diff --git a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/get_version.ts b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/get_version.ts index 8329d9eb7d2b2..331ad795eb88f 100644 --- a/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/get_version.ts +++ b/x-pack/solutions/observability/plugins/apm/server/test_helpers/create_apm_users/helpers/get_version.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Elasticsearch, Kibana } from '../create_apm_users'; +import type { Elasticsearch, Kibana } from '../create_apm_users'; import { AbortError } from './call_kibana'; import { callKibana, isAxiosError } from './call_kibana'; diff --git a/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/elastic_cloud.ts b/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/elastic_cloud.ts index aaeaf2c7380a4..a8049ae15d692 100644 --- a/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/elastic_cloud.ts +++ b/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/elastic_cloud.ts @@ -6,8 +6,9 @@ */ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT, TutorialSchema, InstructionSetSchema } from '@kbn/home-plugin/server'; -import { CloudSetup } from '@kbn/cloud-plugin/server'; +import type { TutorialSchema, InstructionSetSchema } from '@kbn/home-plugin/server'; +import { INSTRUCTION_VARIANT } from '@kbn/home-plugin/server'; +import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { createNodeAgentInstructions, diff --git a/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem.ts b/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem.ts index 0cd7ce8e9c26b..ae76e455cefe5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem.ts +++ b/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { INSTRUCTION_VARIANT, InstructionsSchema } from '@kbn/home-plugin/server'; +import type { InstructionsSchema } from '@kbn/home-plugin/server'; +import { INSTRUCTION_VARIANT } from '@kbn/home-plugin/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { createDjangoAgentInstructions, diff --git a/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem_apm_server_instruction_set.ts b/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem_apm_server_instruction_set.ts index 1bf4c92be43b5..6219dcca9db46 100644 --- a/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem_apm_server_instruction_set.ts +++ b/x-pack/solutions/observability/plugins/apm/server/tutorial/envs/on_prem_apm_server_instruction_set.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { InstructionsSchema, INSTRUCTION_VARIANT } from '@kbn/home-plugin/server'; +import type { InstructionsSchema } from '@kbn/home-plugin/server'; +import { INSTRUCTION_VARIANT } from '@kbn/home-plugin/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; import { createDownloadServerDeb, diff --git a/x-pack/solutions/observability/plugins/apm/server/tutorial/index.ts b/x-pack/solutions/observability/plugins/apm/server/tutorial/index.ts index bff812a93625d..b6198d95d8bd6 100644 --- a/x-pack/solutions/observability/plugins/apm/server/tutorial/index.ts +++ b/x-pack/solutions/observability/plugins/apm/server/tutorial/index.ts @@ -6,10 +6,11 @@ */ import { i18n } from '@kbn/i18n'; -import { ArtifactsSchema, TutorialsCategory, TutorialSchema } from '@kbn/home-plugin/server'; -import { CloudSetup } from '@kbn/cloud-plugin/server'; +import type { ArtifactsSchema, TutorialSchema } from '@kbn/home-plugin/server'; +import { TutorialsCategory } from '@kbn/home-plugin/server'; +import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { APMConfig } from '..'; +import type { APMConfig } from '..'; import { createElasticCloudInstructions } from './envs/elastic_cloud'; import { onPremInstructions } from './envs/on_prem'; diff --git a/x-pack/solutions/observability/plugins/apm/server/types.ts b/x-pack/solutions/observability/plugins/apm/server/types.ts index ba1d17d6af6b9..5de9e10375308 100644 --- a/x-pack/solutions/observability/plugins/apm/server/types.ts +++ b/x-pack/solutions/observability/plugins/apm/server/types.ts @@ -23,14 +23,14 @@ import type { ActionsPlugin } from '@kbn/actions-plugin/server'; import type { CloudSetup } from '@kbn/cloud-plugin/server'; import type { DataViewsServerPluginStart } from '@kbn/data-views-plugin/server'; import type { FeaturesPluginSetup, FeaturesPluginStart } from '@kbn/features-plugin/server'; -import { HomeServerPluginSetup, HomeServerPluginStart } from '@kbn/home-plugin/server'; -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import type { HomeServerPluginSetup, HomeServerPluginStart } from '@kbn/home-plugin/server'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import type { AlertingServerSetup, AlertingServerStart } from '@kbn/alerting-plugin/server'; -import { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/server'; -import { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/server'; -import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; -import { +import type { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/server'; +import type { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/server'; +import type { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; +import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { FleetSetupContract as FleetPluginSetup, FleetStartContract as FleetPluginStart, } from '@kbn/fleet-plugin/server'; @@ -60,7 +60,7 @@ import type { ProfilingDataAccessPluginSetup, ProfilingDataAccessPluginStart, } from '@kbn/profiling-data-access-plugin/server'; -import { APMConfig } from '.'; +import type { APMConfig } from '.'; export interface APMPluginSetup { config$: Observable; diff --git a/x-pack/solutions/observability/plugins/apm/server/utils/create_typed_es_client.ts b/x-pack/solutions/observability/plugins/apm/server/utils/create_typed_es_client.ts index a834a2b236ef4..22cd3961ffbcb 100644 --- a/x-pack/solutions/observability/plugins/apm/server/utils/create_typed_es_client.ts +++ b/x-pack/solutions/observability/plugins/apm/server/utils/create_typed_es_client.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; type RequiredParams = ESSearchRequest & { size: number; diff --git a/x-pack/solutions/observability/plugins/apm/server/utils/test_helpers.tsx b/x-pack/solutions/observability/plugins/apm/server/utils/test_helpers.tsx index 24624b1d16519..459b53534a5b5 100644 --- a/x-pack/solutions/observability/plugins/apm/server/utils/test_helpers.tsx +++ b/x-pack/solutions/observability/plugins/apm/server/utils/test_helpers.tsx @@ -7,10 +7,10 @@ import type { ESSearchRequest, ESSearchResponse } from '@kbn/es-types'; import type { APMIndices } from '@kbn/apm-data-access-plugin/server'; -import { APMConfig } from '..'; -import { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; -import { APMInternalESClient } from '../lib/helpers/create_es_client/create_internal_es_client'; -import { ApmAlertsClient } from '../lib/helpers/get_apm_alerts_client'; +import type { APMConfig } from '..'; +import type { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMInternalESClient } from '../lib/helpers/create_es_client/create_internal_es_client'; +import type { ApmAlertsClient } from '../lib/helpers/get_apm_alerts_client'; interface Options { mockResponse?: (request: ESSearchRequest) => ESSearchResponse; diff --git a/x-pack/solutions/observability/plugins/apm/typings/apm_rum_react.d.ts b/x-pack/solutions/observability/plugins/apm/typings/apm_rum_react.d.ts index ed52174e30692..f4a5b5e9d0207 100644 --- a/x-pack/solutions/observability/plugins/apm/typings/apm_rum_react.d.ts +++ b/x-pack/solutions/observability/plugins/apm/typings/apm_rum_react.d.ts @@ -6,7 +6,7 @@ */ declare module '@elastic/apm-rum-react' { - import { RouteProps } from 'react-router-dom'; + import type { RouteProps } from 'react-router-dom'; export const ApmRoute: React.ComponentClass; } diff --git a/x-pack/solutions/observability/plugins/apm/typings/timeseries.ts b/x-pack/solutions/observability/plugins/apm/typings/timeseries.ts index f0525590dfa8a..64ce2b59fe604 100644 --- a/x-pack/solutions/observability/plugins/apm/typings/timeseries.ts +++ b/x-pack/solutions/observability/plugins/apm/typings/timeseries.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { AccessorFn, AreaSeriesStyle, Fit, @@ -15,7 +15,7 @@ import { SeriesColorAccessorFn, SeriesColorsArray, } from '@elastic/charts'; -import { Maybe } from './common'; +import type { Maybe } from './common'; export interface Coordinate { x: number; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/common/time_range_metadata.ts b/x-pack/solutions/observability/plugins/apm_data_access/common/time_range_metadata.ts index f13ab5a89d6d1..d9216f4123d9a 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/common/time_range_metadata.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/common/time_range_metadata.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ApmDataSource } from './data_source'; +import type { ApmDataSource } from './data_source'; export interface TimeRangeMetadata { isUsingServiceDestinationMetrics: boolean; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_bucket_size/calculate_auto.ts b/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_bucket_size/calculate_auto.ts index 720a924dddcb5..1a550f464f237 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_bucket_size/calculate_auto.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_bucket_size/calculate_auto.ts @@ -5,7 +5,8 @@ * 2.0. */ -import moment, { Duration } from 'moment'; +import type { Duration } from 'moment'; +import moment from 'moment'; const d = moment.duration; type RoundingRule = [Duration, Duration]; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.test.ts b/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.test.ts index 7bc39aabb5c05..90846c4ed033a 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.test.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ApmDataSourceWithSummary } from '../data_source'; +import type { ApmDataSourceWithSummary } from '../data_source'; import { ApmDocumentType } from '../document_type'; import { RollupInterval } from '../rollup'; import { diff --git a/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.ts b/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.ts index 480b7bf4a7fb1..4b6706688114c 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/common/utils/get_preferred_bucket_size_and_data_source.ts @@ -6,7 +6,7 @@ */ import { parseInterval } from '@kbn/data-plugin/common'; import { orderBy, last } from 'lodash'; -import { ApmDataSourceWithSummary } from '../data_source'; +import type { ApmDataSourceWithSummary } from '../data_source'; import { ApmDocumentType } from '../document_type'; import { RollupInterval } from '../rollup'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/index.ts index 6b6385ded4ce4..a05263acf6c35 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/index.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; -import { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; +import type { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; const configSchema = schema.object({ indices: schema.object({ diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/check_privileges.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/check_privileges.ts index 6b8e734a10b4e..4a665693b463b 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/check_privileges.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/check_privileges.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core-http-server'; -import { SecurityPluginStart } from '@kbn/security-plugin-types-server'; +import type { KibanaRequest } from '@kbn/core-http-server'; +import type { SecurityPluginStart } from '@kbn/security-plugin-types-server'; import { mapValues } from 'lodash'; -import { APMIndices } from '..'; +import type { APMIndices } from '..'; export interface ApmDataAccessPrivilegesCheck { request: KibanaRequest; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/call_async_with_debug.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/call_async_with_debug.ts index 9fbd6eb4cefa5..58fd18f1d4472 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/call_async_with_debug.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/call_async_with_debug.ts @@ -10,7 +10,7 @@ import chalk from 'chalk'; import type { KibanaRequest } from '@kbn/core/server'; import { RequestStatus } from '@kbn/inspector-plugin/common'; -import { WrappedElasticsearchClientError } from '@kbn/observability-plugin/server'; +import type { WrappedElasticsearchClientError } from '@kbn/observability-plugin/server'; import { getInspectResponse } from '@kbn/observability-shared-plugin/common'; import type { InspectResponse } from '@kbn/observability-plugin/typings/common'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.test.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.test.ts index 79084daeb22e6..788a2298b5838 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.test.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.test.ts @@ -15,7 +15,7 @@ import type { } from '@elastic/elasticsearch/lib/api/types'; import supertest from 'supertest'; import { APMEventClient, type APMEventESSearchRequest, type APMEventFieldCapsRequest } from '.'; -import { APMIndices } from '../../../..'; +import type { APMIndices } from '../../../..'; import * as cancelEsRequestOnAbortModule from '../cancel_es_request_on_abort'; import * as observabilityPluginModule from '@kbn/observability-plugin/server'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.ts index 9f04bb9a750f3..0d671447a1ce3 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/create_es_client/create_apm_event_client/index.ts @@ -19,7 +19,7 @@ import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import { ProcessorEvent } from '@kbn/observability-plugin/common'; import { unwrapEsResponse } from '@kbn/observability-plugin/server'; import { compact, omit } from 'lodash'; -import { ValuesType } from 'utility-types'; +import type { ValuesType } from 'utility-types'; import type { APMError, Metric, Span, Transaction, Event } from '@kbn/apm-types/es_schemas_ui'; import type { InspectResponse } from '@kbn/observability-plugin/typings/common'; import type { DataTier } from '@kbn/observability-shared-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/transactions/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/transactions/index.ts index c93d549e2b1dd..8e360dce2cdb3 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/transactions/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/lib/helpers/transactions/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { TRANSACTION_DURATION_HISTOGRAM, METRICSET_INTERVAL, diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/plugin.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/plugin.ts index 680079d080c82..ce449ea085aa0 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/plugin.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { PluginInitializerContext, CoreSetup, CoreStart, @@ -13,8 +13,8 @@ import { SavedObjectsClientContract, Logger, } from '@kbn/core/server'; -import { APMDataAccessConfig } from '.'; -import { +import type { APMDataAccessConfig } from '.'; +import type { ApmDataAccessPluginSetup, ApmDataAccessPluginStart, ApmDataAccessServerDependencies, @@ -25,7 +25,8 @@ import { getApmIndicesSavedObject, } from './saved_objects/apm_indices'; import { getServices } from './services/get_services'; -import { ApmDataAccessPrivilegesCheck, checkPrivileges } from './lib/check_privileges'; +import type { ApmDataAccessPrivilegesCheck } from './lib/check_privileges'; +import { checkPrivileges } from './lib/check_privileges'; export class ApmDataAccessPlugin implements Plugin diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/apm_indices.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/apm_indices.ts index 6fe10e655fbe2..bc9c95923b9b3 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/apm_indices.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/apm_indices.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; import { SavedObjectsErrorHelpers } from '@kbn/core/server'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { updateApmOssIndexPaths } from './migrations/update_apm_oss_index_paths'; -import { APMIndices } from '..'; +import type { APMIndices } from '..'; export const APM_INDEX_SETTINGS_SAVED_OBJECT_TYPE = 'apm-indices'; export const APM_INDEX_SETTINGS_SAVED_OBJECT_ID = 'apm-indices'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.ts index 6e1b989146e04..8acba04651bc8 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware.ts @@ -8,8 +8,8 @@ import type { CoreStart, Logger, ISavedObjectsRepository } from '@kbn/core/serve import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import type { APMIndices } from '../..'; +import type { APMIndicesSavedObjectBody } from '../apm_indices'; import { - APMIndicesSavedObjectBody, APM_INDEX_SETTINGS_SAVED_OBJECT_ID, APM_INDEX_SETTINGS_SAVED_OBJECT_TYPE, } from '../apm_indices'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/save_apm_indices.test.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/save_apm_indices.test.ts index 22278e6c16b56..614117aec2de5 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/save_apm_indices.test.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/saved_objects/save_apm_indices.test.ts @@ -6,7 +6,7 @@ */ import { saveApmIndices } from './apm_indices'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; describe('saveApmIndices', () => { it('should trim and strip empty settings', async () => { diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/get_document_sources.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/get_document_sources.ts index 3e1c9fcbb1c78..4491b679f7198 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/get_document_sources.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/get_document_sources.ts @@ -7,10 +7,10 @@ import { kqlQuery, rangeQuery } from '@kbn/observability-plugin/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { RollupInterval } from '../../../common/rollup'; -import { TimeRangeMetadata } from '../../../common/time_range_metadata'; +import type { TimeRangeMetadata } from '../../../common/time_range_metadata'; import { isDurationSummaryNotSupportedFilter } from '../../lib/helpers/transactions'; import { ApmDocumentType } from '../../../common/document_type'; -import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; import { getConfigForDocumentType } from '../../lib/helpers/create_es_client/document_type'; const QUERY_INDEX = { diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/index.ts index e8bee4e431dc3..3e38941f55cba 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_sources/index.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ApmDataAccessServicesParams } from '../get_services'; +import type { ApmDataAccessServicesParams } from '../get_services'; import { getDocumentSources, type DocumentSourcesRequest } from './get_document_sources'; export function createGetDocumentSources({ apmEventClient }: ApmDataAccessServicesParams) { diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_type_config/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_type_config/index.ts index 52bf53291fb0c..f9b9ad8052d5e 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_type_config/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_document_type_config/index.ts @@ -7,7 +7,7 @@ import { getBucketSize, type TimeRangeMetadata } from '../../../common'; import { getPreferredBucketSizeAndDataSource } from '../../../common/utils/get_preferred_bucket_size_and_data_source'; -import { ApmDocumentType } from '../../../common/document_type'; +import type { ApmDocumentType } from '../../../common/document_type'; import { getConfigForDocumentType } from '../../lib/helpers/create_es_client/document_type'; export interface GetDocumentTypeParams { diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_names/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_names/index.ts index 938ec68a7fc5a..f51bcb502190a 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_names/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_names/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { HOST_NAME } from '@kbn/apm-types/es_fields'; import { castArray } from 'lodash'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_services/index.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_services/index.ts index b83320d162f3c..eb2383e7e23ff 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_services/index.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_host_services/index.ts @@ -13,10 +13,10 @@ import { METRICSET_NAME, SERVICE_NAME, } from '@kbn/apm-types/es_fields'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { TimeRangeMetadata } from '../../../common'; import { RollupInterval, - TimeRangeMetadata, getBucketSize, getPreferredBucketSizeAndDataSource, } from '../../../common'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_services.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_services.ts index 71ae961b256b6..082c8c474584f 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_services.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/services/get_services.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; +import type { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; import { createGetDocumentSources } from './get_document_sources'; import { getDocumentTypeConfig } from './get_document_type_config'; import { createGetHostNames } from './get_host_names'; diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/types.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/types.ts index f10c23c1fd994..46ed3ab0dd4c4 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/types.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { SecurityPluginStart } from '@kbn/security-plugin-types-server'; import type { APMIndices } from '.'; -import { getServices } from './services/get_services'; +import type { getServices } from './services/get_services'; import type { ApmDataAccessPrivilegesCheck } from './lib/check_privileges'; export interface ApmDataAccessPluginSetup { diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/utils/unflatten_known_fields.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/utils/unflatten_known_fields.ts index 6c9fe4c39b001..4f98fc40b50d9 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/utils/unflatten_known_fields.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/utils/unflatten_known_fields.ts @@ -11,9 +11,9 @@ import type { ValuesType } from 'utility-types'; import { unflattenObject } from '@kbn/observability-utils-common/object/unflatten_object'; import { mergePlainObjects } from '@kbn/observability-utils-common/object/merge_plain_objects'; import { castArray, isArray } from 'lodash'; -import { AgentName } from '@kbn/elastic-agent-utils'; -import { EventOutcome } from '@kbn/apm-types/src/es_schemas/raw/fields'; -import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import type { AgentName } from '@kbn/elastic-agent-utils'; +import type { EventOutcome } from '@kbn/apm-types/src/es_schemas/raw/fields'; +import type { ProcessorEvent } from '@kbn/observability-plugin/common'; const { CLOUD, diff --git a/x-pack/solutions/observability/plugins/apm_data_access/server/utils/with_apm_span.ts b/x-pack/solutions/observability/plugins/apm_data_access/server/utils/with_apm_span.ts index 1343970f04a3f..0353aa36fd471 100644 --- a/x-pack/solutions/observability/plugins/apm_data_access/server/utils/with_apm_span.ts +++ b/x-pack/solutions/observability/plugins/apm_data_access/server/utils/with_apm_span.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { withSpan, SpanOptions, parseSpanOptions } from '@kbn/apm-utils'; +import type { SpanOptions } from '@kbn/apm-utils'; +import { withSpan, parseSpanOptions } from '@kbn/apm-utils'; export function withApmSpan( optionsOrName: SpanOptions | string, diff --git a/x-pack/solutions/observability/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts b/x-pack/solutions/observability/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts index e2e656fe1831c..689b50eea22b3 100644 --- a/x-pack/solutions/observability/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts +++ b/x-pack/solutions/observability/plugins/infra/common/alerting/logs/log_threshold/query_helpers.ts @@ -7,7 +7,8 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { RuleParams, Comparator, CountCriteria, Criterion, ExecutionTimeRange } from '.'; +import type { RuleParams, CountCriteria, Criterion, ExecutionTimeRange } from '.'; +import { Comparator } from '.'; import { getIntervalInSeconds } from '../../../utils/get_interval_in_seconds'; diff --git a/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.test.ts b/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.test.ts index ea483e129e2e7..7e819bb195d95 100644 --- a/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.test.ts +++ b/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common/parse_technical_fields'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common/parse_technical_fields'; import { ALERT_RULE_PARAMETERS, TIMESTAMP } from '@kbn/rule-data-utils'; import rison from '@kbn/rison'; import { @@ -13,7 +13,7 @@ import { flatAlertRuleParams, getMetricsViewInAppUrl, } from './alert_link'; -import { +import type { InventoryLocator, AssetDetailsLocator, InventoryLocatorParams, diff --git a/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.ts b/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.ts index a0df751014e78..a1098638f34a5 100644 --- a/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.ts +++ b/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/alert_link.ts @@ -8,12 +8,12 @@ import { ALERT_RULE_PARAMETERS, TIMESTAMP } from '@kbn/rule-data-utils'; import moment from 'moment'; import { encode } from '@kbn/rison'; -import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common/parse_technical_fields'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common/parse_technical_fields'; import { type InventoryItemType, findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import type { LocatorPublic } from '@kbn/share-plugin/common'; import { SupportedAssetTypes } from '@kbn/observability-shared-plugin/common'; +import type { MetricsExplorerLocatorParams } from '@kbn/observability-shared-plugin/common'; import { - MetricsExplorerLocatorParams, type AssetDetailsLocatorParams, type InventoryLocatorParams, } from '@kbn/observability-shared-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/types.ts b/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/types.ts index d1adb75d51134..143e6f8ebb476 100644 --- a/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/types.ts +++ b/x-pack/solutions/observability/plugins/infra/common/alerting/metrics/types.ts @@ -4,12 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; -import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; -import { COMPARATORS } from '@kbn/alerting-comparators'; -import { LEGACY_COMPARATORS } from '@kbn/observability-plugin/common/utils/convert_legacy_outside_comparator'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { COMPARATORS } from '@kbn/alerting-comparators'; +import type { LEGACY_COMPARATORS } from '@kbn/observability-plugin/common/utils/convert_legacy_outside_comparator'; export { INFRA_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; -import { SnapshotCustomMetricInput } from '../../http_api'; +import type { SnapshotCustomMetricInput } from '../../http_api'; export const METRIC_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.threshold'; export const METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.inventory.threshold'; diff --git a/x-pack/solutions/observability/plugins/infra/common/constants.ts b/x-pack/solutions/observability/plugins/infra/common/constants.ts index c86d39cddb3fb..24e77e870fac3 100644 --- a/x-pack/solutions/observability/plugins/infra/common/constants.ts +++ b/x-pack/solutions/observability/plugins/infra/common/constants.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { AlertConsumers, ValidFeatureId } from '@kbn/rule-data-utils'; +import type { ValidFeatureId } from '@kbn/rule-data-utils'; +import { AlertConsumers } from '@kbn/rule-data-utils'; export const METRICS_INDEX_PATTERN = 'metrics-*,metricbeat-*'; export const LOGS_INDEX_PATTERN = 'logs-*,filebeat-*,kibana_sample_data_logs*'; diff --git a/x-pack/solutions/observability/plugins/infra/common/custom_dashboards.ts b/x-pack/solutions/observability/plugins/infra/common/custom_dashboards.ts index 0861934653fe9..886f9f396a53d 100644 --- a/x-pack/solutions/observability/plugins/infra/common/custom_dashboards.ts +++ b/x-pack/solutions/observability/plugins/infra/common/custom_dashboards.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; export type InfraCustomDashboardAssetType = InventoryItemType; diff --git a/x-pack/solutions/observability/plugins/infra/common/formatters/get_custom_metric_label.ts b/x-pack/solutions/observability/plugins/infra/common/formatters/get_custom_metric_label.ts index 67c56e413922a..c644482a42345 100644 --- a/x-pack/solutions/observability/plugins/infra/common/formatters/get_custom_metric_label.ts +++ b/x-pack/solutions/observability/plugins/infra/common/formatters/get_custom_metric_label.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { SnapshotCustomMetricInput } from '../http_api/snapshot_api'; +import type { SnapshotCustomMetricInput } from '../http_api/snapshot_api'; export const getCustomMetricLabel = (metric: SnapshotCustomMetricInput) => { const METRIC_LABELS = { diff --git a/x-pack/solutions/observability/plugins/infra/common/formatters/index.ts b/x-pack/solutions/observability/plugins/infra/common/formatters/index.ts index 4c60a46ffe2af..ffcd4b0ba9f60 100644 --- a/x-pack/solutions/observability/plugins/infra/common/formatters/index.ts +++ b/x-pack/solutions/observability/plugins/infra/common/formatters/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryFormatterType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryFormatterType } from '@kbn/metrics-data-access-plugin/common'; import { createBytesFormatter } from './bytes'; import { formatNumber } from './number'; import { formatPercent } from './percent'; diff --git a/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/create_inventory_view.ts b/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/create_inventory_view.ts index 67a3bd7df1a70..ed3cfbe867be4 100644 --- a/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/create_inventory_view.ts +++ b/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/create_inventory_view.ts @@ -6,7 +6,8 @@ */ import * as rt from 'io-ts'; -import { inventoryViewAttributesRT, inventoryViewRT } from '../../../inventory_views'; +import type { inventoryViewRT } from '../../../inventory_views'; +import { inventoryViewAttributesRT } from '../../../inventory_views'; export const createInventoryViewAttributesRequestPayloadRT = rt.exact( rt.intersection([ diff --git a/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/get_inventory_view.ts b/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/get_inventory_view.ts index a13541c1e8a44..203da3c86bca7 100644 --- a/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/get_inventory_view.ts +++ b/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/get_inventory_view.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { inventoryViewRT } from '../../../inventory_views'; +import type { inventoryViewRT } from '../../../inventory_views'; export const getInventoryViewRequestParamsRT = rt.type({ inventoryViewId: rt.string, diff --git a/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/update_inventory_view.ts b/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/update_inventory_view.ts index 5698ab2a0b2c9..270f777c5dbd4 100644 --- a/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/update_inventory_view.ts +++ b/x-pack/solutions/observability/plugins/infra/common/http_api/inventory_views/v1/update_inventory_view.ts @@ -6,7 +6,8 @@ */ import * as rt from 'io-ts'; -import { inventoryViewAttributesRT, inventoryViewRT } from '../../../inventory_views'; +import type { inventoryViewRT } from '../../../inventory_views'; +import { inventoryViewAttributesRT } from '../../../inventory_views'; export const updateInventoryViewAttributesRequestPayloadRT = rt.exact( rt.intersection([ diff --git a/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/create_metrics_explorer_view.ts b/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/create_metrics_explorer_view.ts index 1947f013bc389..df69566008d7a 100644 --- a/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/create_metrics_explorer_view.ts +++ b/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/create_metrics_explorer_view.ts @@ -6,10 +6,8 @@ */ import * as rt from 'io-ts'; -import { - metricsExplorerViewAttributesRT, - metricsExplorerViewRT, -} from '../../../metrics_explorer_views'; +import type { metricsExplorerViewRT } from '../../../metrics_explorer_views'; +import { metricsExplorerViewAttributesRT } from '../../../metrics_explorer_views'; export const createMetricsExplorerViewAttributesRequestPayloadRT = rt.intersection([ metricsExplorerViewAttributesRT, diff --git a/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/get_metrics_explorer_view.ts b/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/get_metrics_explorer_view.ts index b7ef763a72916..94c50f19e3c67 100644 --- a/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/get_metrics_explorer_view.ts +++ b/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/get_metrics_explorer_view.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { metricsExplorerViewRT } from '../../../metrics_explorer_views'; +import type { metricsExplorerViewRT } from '../../../metrics_explorer_views'; export const getMetricsExplorerViewRequestParamsRT = rt.type({ metricsExplorerViewId: rt.string, diff --git a/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/update_metrics_explorer_view.ts b/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/update_metrics_explorer_view.ts index 19c9760c00c84..e711051c8d0a8 100644 --- a/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/update_metrics_explorer_view.ts +++ b/x-pack/solutions/observability/plugins/infra/common/http_api/metrics_explorer_views/v1/update_metrics_explorer_view.ts @@ -6,10 +6,8 @@ */ import * as rt from 'io-ts'; -import { - metricsExplorerViewAttributesRT, - metricsExplorerViewRT, -} from '../../../metrics_explorer_views'; +import type { metricsExplorerViewRT } from '../../../metrics_explorer_views'; +import { metricsExplorerViewAttributesRT } from '../../../metrics_explorer_views'; export const updateMetricsExplorerViewAttributesRequestPayloadRT = rt.intersection([ metricsExplorerViewAttributesRT, diff --git a/x-pack/solutions/observability/plugins/infra/common/log_analysis/job_parameters.ts b/x-pack/solutions/observability/plugins/infra/common/log_analysis/job_parameters.ts index 22fcdea971e23..2ae16976083b0 100644 --- a/x-pack/solutions/observability/plugins/infra/common/log_analysis/job_parameters.ts +++ b/x-pack/solutions/observability/plugins/infra/common/log_analysis/job_parameters.ts @@ -7,7 +7,7 @@ import * as rt from 'io-ts'; import { v5 } from 'uuid'; -import { IdFormat, JobType } from '../http_api/latest'; +import type { IdFormat, JobType } from '../http_api/latest'; export const bucketSpan = 900000; diff --git a/x-pack/solutions/observability/plugins/infra/common/log_search_result/log_search_result.ts b/x-pack/solutions/observability/plugins/infra/common/log_search_result/log_search_result.ts index eeedaef75323c..18d0990a80be5 100644 --- a/x-pack/solutions/observability/plugins/infra/common/log_search_result/log_search_result.ts +++ b/x-pack/solutions/observability/plugins/infra/common/log_search_result/log_search_result.ts @@ -7,7 +7,8 @@ import { bisector } from 'd3-array'; -import { compareToTimeKey, TimeKey } from '../time'; +import type { TimeKey } from '../time'; +import { compareToTimeKey } from '../time'; export interface SearchResult { gid: string; diff --git a/x-pack/solutions/observability/plugins/infra/common/log_search_summary/log_search_summary.ts b/x-pack/solutions/observability/plugins/infra/common/log_search_summary/log_search_summary.ts index 507f2babd30bf..09132029261a2 100644 --- a/x-pack/solutions/observability/plugins/infra/common/log_search_summary/log_search_summary.ts +++ b/x-pack/solutions/observability/plugins/infra/common/log_search_summary/log_search_summary.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SearchResult } from '../log_search_result'; +import type { SearchResult } from '../log_search_result'; export interface SearchSummaryBucket { start: number; diff --git a/x-pack/solutions/observability/plugins/infra/common/metrics_explorer_views/defaults.ts b/x-pack/solutions/observability/plugins/infra/common/metrics_explorer_views/defaults.ts index 1eb1a46245ae5..2cd20eafb56f5 100644 --- a/x-pack/solutions/observability/plugins/infra/common/metrics_explorer_views/defaults.ts +++ b/x-pack/solutions/observability/plugins/infra/common/metrics_explorer_views/defaults.ts @@ -8,11 +8,8 @@ import { i18n } from '@kbn/i18n'; import type { NonEmptyString } from '@kbn/io-ts-utils'; import { Color } from '../color_palette'; -import { - MetricsExplorerChartType, - MetricsExplorerViewAttributes, - MetricsExplorerYAxisMode, -} from './types'; +import type { MetricsExplorerViewAttributes } from './types'; +import { MetricsExplorerChartType, MetricsExplorerYAxisMode } from './types'; export const staticMetricsExplorerViewId = '0'; diff --git a/x-pack/solutions/observability/plugins/infra/common/metrics_sources/index.ts b/x-pack/solutions/observability/plugins/infra/common/metrics_sources/index.ts index 09b1530ad5986..7176978798a20 100644 --- a/x-pack/solutions/observability/plugins/infra/common/metrics_sources/index.ts +++ b/x-pack/solutions/observability/plugins/infra/common/metrics_sources/index.ts @@ -11,7 +11,7 @@ import { SourceConfigurationRT, SourceStatusRuntimeType, } from '../source_configuration/source_configuration'; -import { DeepPartial } from '../utility_types'; +import type { DeepPartial } from '../utility_types'; /** * Properties specific to the Metrics Source Configuration. diff --git a/x-pack/solutions/observability/plugins/infra/common/saved_views/types.ts b/x-pack/solutions/observability/plugins/infra/common/saved_views/types.ts index 0b4e19abf197b..81ebc6ae244ed 100644 --- a/x-pack/solutions/observability/plugins/infra/common/saved_views/types.ts +++ b/x-pack/solutions/observability/plugins/infra/common/saved_views/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { QueryObserverBaseResult, UseMutateAsyncFunction, UseMutateFunction, diff --git a/x-pack/solutions/observability/plugins/infra/common/source_configuration/defaults.ts b/x-pack/solutions/observability/plugins/infra/common/source_configuration/defaults.ts index 05988909e3f36..ec3c07211f6eb 100644 --- a/x-pack/solutions/observability/plugins/infra/common/source_configuration/defaults.ts +++ b/x-pack/solutions/observability/plugins/infra/common/source_configuration/defaults.ts @@ -6,7 +6,7 @@ */ import { METRICS_INDEX_PATTERN } from '../constants'; -import { InfraSourceConfiguration } from './source_configuration'; +import type { InfraSourceConfiguration } from './source_configuration'; export const defaultSourceConfiguration: InfraSourceConfiguration = { name: 'Default', diff --git a/x-pack/solutions/observability/plugins/infra/common/time/time_scale.ts b/x-pack/solutions/observability/plugins/infra/common/time/time_scale.ts index cf449ddc8d6fb..d629a8b85ecdb 100644 --- a/x-pack/solutions/observability/plugins/infra/common/time/time_scale.ts +++ b/x-pack/solutions/observability/plugins/infra/common/time/time_scale.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { TimeUnit, timeUnitLabels } from './time_unit'; +import type { TimeUnit } from './time_unit'; +import { timeUnitLabels } from './time_unit'; export interface TimeScale { unit: TimeUnit; diff --git a/x-pack/solutions/observability/plugins/infra/common/typed_json.ts b/x-pack/solutions/observability/plugins/infra/common/typed_json.ts index 95d5d4274c3b6..81f337b2876ee 100644 --- a/x-pack/solutions/observability/plugins/infra/common/typed_json.ts +++ b/x-pack/solutions/observability/plugins/infra/common/typed_json.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { JsonArray, JsonObject, JsonValue } from '@kbn/utility-types'; +import type { JsonArray, JsonObject, JsonValue } from '@kbn/utility-types'; export type { JsonArray, JsonObject, JsonValue }; diff --git a/x-pack/solutions/observability/plugins/infra/common/url_state_storage_service.ts b/x-pack/solutions/observability/plugins/infra/common/url_state_storage_service.ts index ece3d1ccb09bf..9eeaa86b9aebf 100644 --- a/x-pack/solutions/observability/plugins/infra/common/url_state_storage_service.ts +++ b/x-pack/solutions/observability/plugins/infra/common/url_state_storage_service.ts @@ -9,12 +9,13 @@ import { url } from '@kbn/kibana-utils-plugin/common'; import { encode } from '@kbn/rison'; import type { Query } from '@kbn/es-query'; import { parse, stringify } from 'query-string'; -import moment, { DurationInputObject } from 'moment'; +import type { DurationInputObject } from 'moment'; +import moment from 'moment'; +import type { LogViewReference } from '@kbn/logs-shared-plugin/common'; import { defaultFilterStateKey, defaultPositionStateKey, DEFAULT_REFRESH_INTERVAL, - LogViewReference, } from '@kbn/logs-shared-plugin/common'; import type { FilterStateInUrl } from '../public/observability_logs/log_stream_query_state'; import type { PositionStateInUrl } from '../public/observability_logs/log_stream_position_state/src/url_state_storage_service'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx index e4284d154c104..860568f5ff5cb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/metrics_alert_dropdown.tsx @@ -18,7 +18,7 @@ import { usePluginConfig } from '../../../containers/plugin_config_context'; import { PrefilledInventoryAlertFlyout } from '../../inventory/components/alert_flyout'; import { PrefilledMetricThresholdAlertFlyout } from '../../metric_threshold/components/alert_flyout'; import { AlertFlyout as CustomThresholdAlertFlyout } from '../../custom_threshold'; -import { InfraClientStartDeps } from '../../../types'; +import type { InfraClientStartDeps } from '../../../types'; type VisibleFlyoutType = 'inventory' | 'metricThreshold' | 'customThreshold'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.stories.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.stories.tsx index 195a868ff0af2..4928916bf875d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.stories.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.stories.tsx @@ -6,10 +6,11 @@ */ import React from 'react'; -import { ComponentMeta } from '@storybook/react'; +import type { ComponentMeta } from '@storybook/react'; import { LIGHT_THEME } from '@elastic/charts'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { Props, Threshold as Component } from './threshold'; +import type { Props } from './threshold'; +import { Threshold as Component } from './threshold'; export default { component: Component, diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.test.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.test.tsx index 32d70920c5a73..754665c18adf3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.test.tsx @@ -9,7 +9,8 @@ import { COMPARATORS } from '@kbn/alerting-comparators'; import { Metric, LIGHT_THEME } from '@elastic/charts'; import { render } from '@testing-library/react'; import React from 'react'; -import { Props, Threshold } from './threshold'; +import type { Props } from './threshold'; +import { Threshold } from './threshold'; jest.mock('@elastic/charts', () => { const actual = jest.requireActual('@elastic/charts'); diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.tsx index c3e7cb93c44d2..fd92be789f47d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/components/threshold.tsx @@ -10,7 +10,7 @@ import { Chart, Metric, Settings } from '@elastic/charts'; import { EuiIcon, EuiPanel, type UseEuiTheme, useEuiTheme } from '@elastic/eui'; import type { PartialTheme, Theme } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; -import { COMPARATORS } from '@kbn/alerting-comparators'; +import type { COMPARATORS } from '@kbn/alerting-comparators'; export interface ChartProps { theme?: UseEuiTheme<{}>; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/criterion_preview_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/criterion_preview_chart.tsx index ea82c453958a3..e11fe7bf510d5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/criterion_preview_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/criterion_preview_chart.tsx @@ -5,15 +5,17 @@ * 2.0. */ -import React, { useMemo, FC, PropsWithChildren } from 'react'; -import { niceTimeFormatter, TooltipProps } from '@elastic/charts'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useMemo } from 'react'; +import type { TooltipProps } from '@elastic/charts'; +import { niceTimeFormatter } from '@elastic/charts'; import moment from 'moment'; import { i18n } from '@kbn/i18n'; import { EuiLoadingChart, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { sum, min as getMin, max as getMax } from 'lodash'; import { formatNumber } from '../../../../common/formatters/number'; -import { GetLogAlertsChartPreviewDataSuccessResponsePayload } from '../../../../common/http_api'; +import type { GetLogAlertsChartPreviewDataSuccessResponsePayload } from '../../../../common/http_api'; type Series = GetLogAlertsChartPreviewDataSuccessResponsePayload['data']['series']; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/threshold_annotations.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/threshold_annotations.tsx index 82258a493537f..ebd5efa819555 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/threshold_annotations.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/criterion_preview_chart/threshold_annotations.tsx @@ -8,7 +8,8 @@ import { AnnotationDomainType, LineAnnotation, RectAnnotation } from '@elastic/c import { first, last } from 'lodash'; import React from 'react'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { Color, colorTransformer } from '../../../../common/color_palette'; +import type { Color } from '../../../../common/color_palette'; +import { colorTransformer } from '../../../../common/color_palette'; interface ThresholdAnnotationsProps { threshold: number[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/group_by_expression.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/group_by_expression.tsx index a7ed12eda1ed7..c8a2e8aa370e8 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/group_by_expression.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/group_by_expression.tsx @@ -14,7 +14,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo, useState } from 'react'; -import { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; import { GroupBySelector } from './selector'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/selector.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/selector.tsx index dc7e02f7d782f..12c557d277e17 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/selector.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/common/group_by_expression/selector.tsx @@ -7,7 +7,7 @@ import { EuiComboBox } from '@elastic/eui'; import React, { useCallback, useMemo } from 'react'; -import { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; interface Props { selectedGroups?: string[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx index 22fe45922ad3d..9d812e723163a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx @@ -7,10 +7,10 @@ import React, { useCallback, useContext, useMemo } from 'react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { TriggerActionsContext } from '../../../containers/triggers_actions_context'; import { METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID } from '../../../../common/alerting/metrics'; -import { InfraWaffleMapOptions } from '../../../common/inventory/types'; +import type { InfraWaffleMapOptions } from '../../../common/inventory/types'; import { useAlertPrefillContext } from '../../use_alert_prefill'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.test.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.test.tsx index 6317c5367efbe..1ddcf4f9d383d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.test.tsx @@ -8,14 +8,16 @@ import { mountWithIntl, nextTick, shallowWithIntl } from '@kbn/test-jest-helpers'; import React from 'react'; import { act } from 'react-dom/test-utils'; -import { DataView, type FieldSpec } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import { type FieldSpec } from '@kbn/data-views-plugin/common'; // We are using this inside a `jest.mock` call. Jest requires dynamic dependencies to be prefixed with `mock` import { coreMock as mockCoreMock } from '@kbn/core/public/mocks'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { InventoryMetricConditions } from '../../../../common/alerting/metrics'; -import { AlertContextMeta, defaultExpression, ExpressionRow, Expressions } from './expression'; +import type { InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import type { AlertContextMeta } from './expression'; +import { defaultExpression, ExpressionRow, Expressions } from './expression'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; -import { ResolvedDataView } from '../../../utils/data_view'; +import type { ResolvedDataView } from '../../../utils/data_view'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; import type { SnapshotCustomMetricInput } from '../../../../common/http_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.tsx index 89579ac74a326..d00542f09315d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression.tsx @@ -20,24 +20,17 @@ import { import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; -import { - ForLastExpression, +import type { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; +import type { IErrorObject, RuleTypeParamsExpressionProps, - ThresholdExpression, } from '@kbn/triggers-actions-ui-plugin/public'; +import { ForLastExpression, ThresholdExpression } from '@kbn/triggers-actions-ui-plugin/public'; import { debounce, omit } from 'lodash'; -import React, { - ChangeEvent, - useCallback, - useEffect, - useMemo, - useState, - FC, - PropsWithChildren, -} from 'react'; +import type { ChangeEvent, FC, PropsWithChildren } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import useToggle from 'react-use/lib/useToggle'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { findInventoryModel, awsEC2SnapshotMetricTypes, @@ -47,21 +40,14 @@ import { containerSnapshotMetricTypes, hostSnapshotMetricTypes, podSnapshotMetricTypes, - InventoryItemType, - SnapshotMetricType, SnapshotMetricTypeRT, } from '@kbn/metrics-data-access-plugin/common'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; -import { - SnapshotCustomMetricInput, - SnapshotCustomMetricInputRT, -} from '../../../../common/http_api'; -import { - FilterQuery, - InventoryMetricConditions, - QUERY_INVALID, -} from '../../../../common/alerting/metrics'; +import type { SnapshotCustomMetricInput } from '../../../../common/http_api'; +import { SnapshotCustomMetricInputRT } from '../../../../common/http_api'; +import type { FilterQuery, InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import { QUERY_INVALID } from '../../../../common/alerting/metrics'; import { toMetricOpt } from '../../../../common/snapshot_metric_i18n'; import { useMetricsDataViewContext, diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression_chart.tsx index 52664a1f86f8f..d18e1a6ecce75 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/expression_chart.tsx @@ -11,12 +11,12 @@ import { first, last } from 'lodash'; import moment from 'moment'; import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; -import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; import { useTimelineChartTheme } from '../../../hooks/use_timeline_chart_theme'; -import { InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import type { InventoryMetricConditions } from '../../../../common/alerting/metrics'; import { Color } from '../../../../common/color_palette'; -import { MetricsExplorerAggregation, MetricsExplorerRow } from '../../../../common/http_api'; +import type { MetricsExplorerAggregation, MetricsExplorerRow } from '../../../../common/http_api'; import { useSnapshot } from '../../../pages/metrics/inventory_view/hooks/use_snaphot'; import { createInventoryMetricFormatter } from '../../../pages/metrics/inventory_view/lib/create_inventory_metric_formatter'; import { calculateDomain } from '../../../pages/metrics/metrics_explorer/components/helpers/calculate_domain'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx index dccd03414f3d5..56cfd113872dd 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/manage_alerts_context_menu_item.tsx @@ -9,7 +9,7 @@ import { EuiContextMenuItem } from '@elastic/eui'; import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { InfraClientStartDeps } from '../../../types'; +import type { InfraClientStartDeps } from '../../../types'; export const ManageAlertsContextMenuItem = () => { const { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/metric.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/metric.tsx index e112001b7f662..ddf94c68c4b81 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/metric.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/metric.tsx @@ -24,15 +24,17 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { debounce } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; -import { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; +import type { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { HOST_METRICS_DOC_HREF } from '../../../common/visualizations'; import { useMetricsDataViewContext } from '../../../containers/metrics_source'; import { getCustomMetricLabel } from '../../../../common/formatters/get_custom_metric_label'; -import { +import type { SnapshotCustomAggregation, - SnapshotCustomAggregationRT, SnapshotCustomMetricInput, +} from '../../../../common/http_api/snapshot_api'; +import { + SnapshotCustomAggregationRT, SnapshotCustomMetricInputRT, SNAPSHOT_CUSTOM_AGGREGATIONS, } from '../../../../common/http_api/snapshot_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/node_type.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/node_type.tsx index 31c4ae45c105b..6ba084394651d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/node_type.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/node_type.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiExpression, EuiPopover, EuiFlexGroup, EuiFlexItem, EuiSelect } from '@elastic/eui'; import { EuiPopoverTitle, EuiButtonIcon } from '@elastic/eui'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; interface WhenExpressionProps { value: InventoryItemType; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/validation.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/validation.tsx index ab44ab589882f..a12015d1af2a6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/validation.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/components/validation.tsx @@ -8,11 +8,8 @@ import { i18n } from '@kbn/i18n'; import type { ValidationResult } from '@kbn/triggers-actions-ui-plugin/public'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { - FilterQuery, - InventoryMetricConditions, - QUERY_INVALID, -} from '../../../../common/alerting/metrics'; +import type { FilterQuery, InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import { QUERY_INVALID } from '../../../../common/alerting/metrics'; export function validateMetricThreshold({ criteria, diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/hooks/use_inventory_alert_prefill.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/hooks/use_inventory_alert_prefill.ts index fe889273cb509..7cfcdf2c6f5a4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/hooks/use_inventory_alert_prefill.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/hooks/use_inventory_alert_prefill.ts @@ -6,8 +6,8 @@ */ import { useState } from 'react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricInput, SnapshotCustomMetricInput, } from '../../../../common/http_api/snapshot_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/index.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/index.ts index 0d0fd398909a0..11b8b12950c1b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/index.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/index.ts @@ -7,17 +7,15 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; -import { RuleTypeParams } from '@kbn/alerting-plugin/common'; -import { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; +import type { RuleTypeParams } from '@kbn/alerting-plugin/common'; +import type { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; import type { LocatorPublic } from '@kbn/share-plugin/common'; import type { AssetDetailsLocatorParams, InventoryLocatorParams, } from '@kbn/observability-shared-plugin/common'; -import { - InventoryMetricConditions, - METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, -} from '../../../common/alerting/metrics'; +import type { InventoryMetricConditions } from '../../../common/alerting/metrics'; +import { METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID } from '../../../common/alerting/metrics'; import { validateMetricThreshold } from './components/validation'; import { getRuleFormat } from './rule_data_formatters'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/rule_data_formatters.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/rule_data_formatters.ts index c9a12a6c6182a..062b19d9bc29b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/rule_data_formatters.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/inventory/rule_data_formatters.ts @@ -6,7 +6,7 @@ */ import { ALERT_REASON } from '@kbn/rule-data-utils'; -import { ObservabilityRuleTypeFormatter } from '@kbn/observability-plugin/public'; +import type { ObservabilityRuleTypeFormatter } from '@kbn/observability-plugin/public'; import type { LocatorPublic } from '@kbn/share-plugin/common'; import type { AssetDetailsLocatorParams, diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx index a399414f24c54..d6ab1d1055c05 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx @@ -5,33 +5,36 @@ * 2.0. */ -import React, { FC, useEffect, useMemo, useState } from 'react'; +import type { FC } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import moment from 'moment'; import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiTitle } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { LOG_RATE_ANALYSIS_TYPE, type LogRateAnalysisType, } from '@kbn/aiops-log-rate-analysis/log_rate_analysis_type'; import { getLogRateAnalysisParametersFromAlert } from '@kbn/aiops-log-rate-analysis/get_log_rate_analysis_parameters_from_alert'; import { LogRateAnalysisContent, type LogRateAnalysisResultsData } from '@kbn/aiops-plugin/public'; -import { Rule } from '@kbn/alerting-plugin/common'; -import { TopAlert } from '@kbn/observability-plugin/public'; +import type { Rule } from '@kbn/alerting-plugin/common'; +import type { TopAlert } from '@kbn/observability-plugin/public'; import { ALERT_END } from '@kbn/rule-data-utils'; import type { Message } from '@kbn/observability-ai-assistant-plugin/public'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { i18n } from '@kbn/i18n'; import { pick, orderBy } from 'lodash'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { Color, colorTransformer } from '../../../../../../common/color_palette'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; -import { +import type { CountRuleParams, - isRatioRuleParams, PartialRuleParams, +} from '../../../../../../common/alerting/logs/log_threshold'; +import { + isRatioRuleParams, ruleParamsRT, } from '../../../../../../common/alerting/logs/log_threshold'; import { getESQueryForLogRateAnalysis } from '../log_rate_analysis_query'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts index a6feb02a2bc61..382c812e40a61 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/create_lens_definition.ts @@ -6,8 +6,9 @@ */ import moment from 'moment'; -import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; -import { EuiThemeComputed, transparentize } from '@elastic/eui'; +import type { TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import type { EuiThemeComputed } from '@elastic/eui'; +import { transparentize } from '@elastic/eui'; export interface IndexPattern { pattern: string; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_count_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_count_chart.tsx index 4a474ea7f5ef1..e72d1521c2e1b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_count_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_count_chart.tsx @@ -8,12 +8,8 @@ import React from 'react'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { useEuiTheme } from '@elastic/eui'; import { useKibanaContextForPlugin } from '../../../../../../hooks/use_kibana'; -import { - createLensDefinitionForCountChart, - IndexPattern, - Threshold, - Timerange, -} from './create_lens_definition'; +import type { IndexPattern, Threshold, Timerange } from './create_lens_definition'; +import { createLensDefinitionForCountChart } from './create_lens_definition'; interface LogThresholdCountChartProps { index: IndexPattern; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_ratio_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_ratio_chart.tsx index 2e415b0e5468d..be10c0248aa1c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_ratio_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/components/threhsold_chart/log_threshold_ratio_chart.tsx @@ -8,12 +8,8 @@ import React from 'react'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { useEuiTheme } from '@elastic/eui'; import { useKibanaContextForPlugin } from '../../../../../../hooks/use_kibana'; -import { - createLensDefinitionForRatioChart, - IndexPattern, - Threshold, - Timerange, -} from './create_lens_definition'; +import type { IndexPattern, Threshold, Timerange } from './create_lens_definition'; +import { createLensDefinitionForRatioChart } from './create_lens_definition'; interface LogThresholdRatioChartProps { index: IndexPattern; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx index 92a4e61554e29..e42fa7c17719b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/index.tsx @@ -29,7 +29,7 @@ import { isRatioRule, type PartialCriterion, } from '../../../../../common/alerting/logs/log_threshold'; -import { AlertDetailsAppSectionProps } from './types'; +import type { AlertDetailsAppSectionProps } from './types'; import { Threshold } from '../../../common/components/threshold'; import { LogRateAnalysis } from './components/log_rate_analysis'; import { LogThresholdCountChart, LogThresholdRatioChart } from './components/threhsold_chart'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_analysis_query.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_analysis_query.ts index 382af37442121..9bcc585d92a43 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_analysis_query.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/log_rate_analysis_query.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { TopAlert } from '@kbn/observability-plugin/public'; +import type { TopAlert } from '@kbn/observability-plugin/public'; import { ALERT_CONTEXT } from '@kbn/rule-data-utils'; import { get } from 'lodash'; -import { RuleParams, CountCriteria } from '../../../../../common/alerting/logs/log_threshold'; +import type { RuleParams, CountCriteria } from '../../../../../common/alerting/logs/log_threshold'; import { buildFiltersFromCriteria } from '../../../../../common/alerting/logs/log_threshold/query_helpers'; export const getESQueryForLogRateAnalysis = ( diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/types.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/types.ts index 61a0859670549..8ecf9955e6e9e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/alert_details_app_section/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { Rule } from '@kbn/alerting-plugin/common'; -import { TopAlert } from '@kbn/observability-plugin/public'; -import { PartialRuleParams } from '../../../../../common/alerting/logs/log_threshold'; +import type { Rule } from '@kbn/alerting-plugin/common'; +import type { TopAlert } from '@kbn/observability-plugin/public'; +import type { PartialRuleParams } from '../../../../../common/alerting/logs/log_threshold'; export interface AlertDetailsAppSectionProps { rule: Rule; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criteria.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criteria.tsx index f821d7510b3bf..386aeff48535c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criteria.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criteria.tsx @@ -14,17 +14,19 @@ import type { ResolvedLogViewField, } from '@kbn/logs-shared-plugin/common'; import { Criterion } from './criterion'; -import { +import type { PartialRuleParams, PartialCountCriteria as PartialCountCriteriaType, PartialCriteria as PartialCriteriaType, PartialCriterion as PartialCriterionType, PartialRatioCriteria as PartialRatioCriteriaType, +} from '../../../../../common/alerting/logs/log_threshold/types'; +import { isRatioRule, getNumerator, getDenominator, } from '../../../../../common/alerting/logs/log_threshold/types'; -import { Errors, CriterionErrors } from '../../validation'; +import type { Errors, CriterionErrors } from '../../validation'; import { ExpressionLike } from './editor'; import { CriterionPreview } from './criterion_preview_chart'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx index 4991584520b8f..d1a06a96ebc78 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion.tsx @@ -5,10 +5,10 @@ * 2.0. */ +import type { EuiComboBoxProps } from '@elastic/eui'; import { EuiButtonIcon, EuiComboBox, - EuiComboBoxProps, EuiExpression, EuiFieldNumber, EuiFieldText, @@ -24,10 +24,10 @@ import { isFinite, isNumber } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; import type { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; import type { ResolvedLogViewField } from '@kbn/logs-shared-plugin/common'; +import type { Criterion as CriterionType } from '../../../../../common/alerting/logs/log_threshold/types'; import { Comparator, ComparatorToi18nMap, - Criterion as CriterionType, } from '../../../../../common/alerting/logs/log_threshold/types'; const firstCriterionFieldPrefix = i18n.translate( diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion_preview_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion_preview_chart.tsx index d361cefcd14cb..15446a69d9e0d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion_preview_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/criterion_preview_chart.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactElement, useMemo } from 'react'; +import type { ReactElement } from 'react'; +import React, { useMemo } from 'react'; import useDebounce from 'react-use/lib/useDebounce'; import { i18n } from '@kbn/i18n'; import { @@ -22,10 +23,10 @@ import { } from '@elastic/charts'; import { EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { useTimelineChartTheme } from '../../../../hooks/use_timeline_chart_theme'; -import { ExecutionTimeRange } from '../../../../types'; +import type { ExecutionTimeRange } from '../../../../types'; import { ChartContainer, LoadingState, @@ -38,17 +39,15 @@ import { yAxisFormatter, NUM_BUCKETS, } from '../../../common/criterion_preview_chart/criterion_preview_chart'; -import { +import type { PartialRuleParams, Threshold, Criterion, - Comparator, } from '../../../../../common/alerting/logs/log_threshold/types'; +import { Comparator } from '../../../../../common/alerting/logs/log_threshold/types'; import { Color, colorTransformer } from '../../../../../common/color_palette'; -import { - GetLogAlertsChartPreviewDataAlertParamsSubset, - getLogAlertsChartPreviewDataAlertParamsSubsetRT, -} from '../../../../../common/http_api'; +import type { GetLogAlertsChartPreviewDataAlertParamsSubset } from '../../../../../common/http_api'; +import { getLogAlertsChartPreviewDataAlertParamsSubsetRT } from '../../../../../common/http_api'; import { useChartPreviewData } from './hooks/use_chart_preview_data'; import { useKibanaTimeZoneSetting } from '../../../../hooks/use_kibana_time_zone_setting'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx index 85935143da399..d85195345d533 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx @@ -7,27 +7,31 @@ import { EuiButton, EuiCallOut, EuiLoadingSpinner, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import React, { useCallback, useMemo, useState, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import useMount from 'react-use/lib/useMount'; -import { - ForLastExpression, - RuleTypeParamsExpressionProps, -} from '@kbn/triggers-actions-ui-plugin/public'; +import type { RuleTypeParamsExpressionProps } from '@kbn/triggers-actions-ui-plugin/public'; +import { ForLastExpression } from '@kbn/triggers-actions-ui-plugin/public'; import { LogViewProvider, useLogViewContext } from '@kbn/logs-shared-plugin/public'; -import { PersistedLogViewReference, ResolvedLogViewField } from '@kbn/logs-shared-plugin/common'; +import type { + PersistedLogViewReference, + ResolvedLogViewField, +} from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { - Comparator, - isOptimizableGroupedThreshold, - isRatioRule, +import type { PartialCountRuleParams, PartialCriteria as PartialCriteriaType, PartialRatioRuleParams, PartialRuleParams, ThresholdType, +} from '../../../../../common/alerting/logs/log_threshold/types'; +import { + Comparator, + isOptimizableGroupedThreshold, + isRatioRule, timeUnitRT, } from '../../../../../common/alerting/logs/log_threshold/types'; -import { ObjectEntries } from '../../../../../common/utility_types'; +import type { ObjectEntries } from '../../../../../common/utility_types'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { GroupByExpression } from '../../../common/group_by_expression/group_by_expression'; import { errorsRT } from '../../validation'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/hooks/use_chart_preview_data.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/hooks/use_chart_preview_data.tsx index 409b25239c3da..d5c160f7b4c5a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/hooks/use_chart_preview_data.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/hooks/use_chart_preview_data.tsx @@ -5,20 +5,22 @@ * 2.0. */ -import { HttpHandler } from '@kbn/core/public'; +import type { HttpHandler } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useMemo, useState } from 'react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { isRatioRule } from '../../../../../../common/alerting/logs/log_threshold'; -import { +import type { GetLogAlertsChartPreviewDataAlertParamsSubset, - getLogAlertsChartPreviewDataRequestPayloadRT, GetLogAlertsChartPreviewDataSuccessResponsePayload, +} from '../../../../../../common/http_api'; +import { + getLogAlertsChartPreviewDataRequestPayloadRT, getLogAlertsChartPreviewDataSuccessResponsePayloadRT, LOG_ALERTS_CHART_PREVIEW_DATA_PATH, } from '../../../../../../common/http_api'; -import { ExecutionTimeRange } from '../../../../../types'; +import type { ExecutionTimeRange } from '../../../../../types'; import { useTrackedPromise } from '../../../../../hooks/use_tracked_promise'; interface Options { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/log_view_switcher.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/log_view_switcher.tsx index 8dfa7295b6769..ddecad232c1ca 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/log_view_switcher.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/log_view_switcher.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFlexItem, EuiFlexGroup, EuiExpression, EuiToolTip } from '@elastic/eui'; -import { ResolvedLogView } from '@kbn/logs-shared-plugin/common'; +import type { ResolvedLogView } from '@kbn/logs-shared-plugin/common'; const description = i18n.translate('xpack.infra.logs.alertFlyout.logViewDescription', { defaultMessage: 'Log View', diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/threshold.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/threshold.tsx index d7fe1b99206e8..9795fde2e11fa 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/threshold.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/threshold.tsx @@ -18,11 +18,11 @@ import { import { i18n } from '@kbn/i18n'; import { isFinite, isNumber } from 'lodash'; import React, { useState } from 'react'; -import { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; +import type { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; +import type { RuleParams } from '../../../../../common/alerting/logs/log_threshold/types'; import { Comparator, ComparatorToi18nMap, - RuleParams, } from '../../../../../common/alerting/logs/log_threshold/types'; const thresholdPrefix = i18n.translate('xpack.infra.logs.alertFlyout.thresholdPrefix', { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/type_switcher.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/type_switcher.tsx index adbab47b0fdd5..2f9d653a940b2 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/type_switcher.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/components/expression_editor/type_switcher.tsx @@ -8,11 +8,11 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFlexItem, EuiFlexGroup, EuiPopover, EuiSelect, EuiExpression } from '@elastic/eui'; -import { +import type { PartialCriteria, ThresholdType, - isRatioRule, } from '../../../../../common/alerting/logs/log_threshold/types'; +import { isRatioRule } from '../../../../../common/alerting/logs/log_threshold/types'; import { ExpressionLike } from './editor'; const typePrefix = i18n.translate('xpack.infra.logs.alertFlyout.thresholdTypePrefix', { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx index 8eb75c94703b7..8c9e209b7f716 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/log_threshold_rule_type.tsx @@ -6,15 +6,13 @@ */ import { i18n } from '@kbn/i18n'; -import { UrlService } from '@kbn/share-plugin/common/url_service'; +import type { UrlService } from '@kbn/share-plugin/common/url_service'; import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; -import { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; -import { - LOG_DOCUMENT_COUNT_RULE_TYPE_ID, - PartialRuleParams, -} from '../../../common/alerting/logs/log_threshold'; +import type { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; +import type { PartialRuleParams } from '../../../common/alerting/logs/log_threshold'; +import { LOG_DOCUMENT_COUNT_RULE_TYPE_ID } from '../../../common/alerting/logs/log_threshold'; import { createLazyComponentWithKibanaContext } from '../../hooks/use_kibana'; -import { InfraClientCoreSetup } from '../../types'; +import type { InfraClientCoreSetup } from '../../types'; import { createRuleFormatter } from './rule_data_formatters'; import { validateExpression } from './validation'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/validation.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/validation.ts index 59cae9c53c7ff..1bcf803418f8b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/validation.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/log_threshold/validation.ts @@ -8,14 +8,16 @@ import { i18n } from '@kbn/i18n'; import * as rt from 'io-ts'; import { isNumber, isFinite } from 'lodash'; -import { IErrorObject, ValidationResult } from '@kbn/triggers-actions-ui-plugin/public'; -import { +import type { IErrorObject, ValidationResult } from '@kbn/triggers-actions-ui-plugin/public'; +import type { PartialCountCriteria, + PartialRequiredRuleParams, + PartialCriteria, +} from '../../../common/alerting/logs/log_threshold/types'; +import { isRatioRule, getNumerator, getDenominator, - PartialRequiredRuleParams, - PartialCriteria, } from '../../../common/alerting/logs/log_threshold/types'; export const criterionErrorRT = rt.type({ diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx index b23bfe38d1d39..cb7a0cbc55ebc 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_details_app_section.tsx @@ -19,9 +19,9 @@ import { useEuiTheme, } from '@elastic/eui'; -import { RuleConditionChart, TopAlert } from '@kbn/observability-plugin/public'; +import { RuleConditionChart } from '@kbn/observability-plugin/public'; import { ALERT_END, ALERT_START, ALERT_EVALUATION_VALUES, ALERT_GROUP } from '@kbn/rule-data-utils'; -import { Rule, RuleTypeParams } from '@kbn/alerting-plugin/common'; +import type { Rule, RuleTypeParams } from '@kbn/alerting-plugin/common'; import { getPaddedAlertTimeRange } from '@kbn/observability-get-padded-alert-time-range-util'; import type { EventAnnotationConfig, @@ -30,13 +30,13 @@ import type { } from '@kbn/event-annotation-common'; import { getGroupFilters } from '@kbn/observability-plugin/public'; -import type { GenericAggType } from '@kbn/observability-plugin/public'; +import type { GenericAggType, TopAlert } from '@kbn/observability-plugin/public'; import { metricValueFormatter } from '../../../../common/alerting/metrics/metric_value_formatter'; import { Threshold } from '../../common/components/threshold'; import { useMetricsDataViewContext, withSourceProvider } from '../../../containers/metrics_source'; import { generateUniqueKey } from '../lib/generate_unique_key'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; -import { AlertParams } from '../types'; +import type { AlertParams } from '../types'; // TODO Use a generic props for app sections https://github.com/elastic/kibana/issues/152690 export type MetricThresholdRule = Rule; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_flyout.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_flyout.tsx index 73678d1b6d64c..8101f0c832dc0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_flyout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/alert_flyout.tsx @@ -8,8 +8,8 @@ import React, { useCallback, useContext, useMemo } from 'react'; import { TriggerActionsContext } from '../../../containers/triggers_actions_context'; import { METRIC_THRESHOLD_ALERT_TYPE_ID } from '../../../../common/alerting/metrics'; -import { MetricsExplorerSeries } from '../../../../common/http_api/metrics_explorer'; -import { MetricsExplorerOptions } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; +import type { MetricsExplorerSeries } from '../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; import { useAlertPrefillContext } from '../../use_alert_prefill'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.stories.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.stories.tsx index 4cb0cc5aabb03..07318fa53a3af 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.stories.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.stories.tsx @@ -5,16 +5,18 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react/types-6-0'; +import type { Meta, Story } from '@storybook/react/types-6-0'; import React, { useCallback, useEffect, useState } from 'react'; -import { TimeUnitChar } from '@kbn/observability-plugin/common'; -import { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; +import type { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { Aggregators, MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; import { decorateWithGlobalStorybookThemeProviders } from '../../../../test_utils/use_global_storybook_theme'; -import { CustomEquationEditor, CustomEquationEditorProps } from './custom_equation_editor'; +import type { CustomEquationEditorProps } from './custom_equation_editor'; +import { CustomEquationEditor } from './custom_equation_editor'; import { aggregationType } from '../expression_row'; -import { MetricExpression } from '../../types'; +import type { MetricExpression } from '../../types'; import { validateMetricThreshold } from '../validation'; export default { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.tsx index 4339b7c3025fc..3bfb21967ed9d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/custom_equation_editor.tsx @@ -15,17 +15,17 @@ import { import React, { useState, useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { omit, range, first, xor, debounce } from 'lodash'; -import { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; +import type { IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; import { FormattedMessage } from '@kbn/i18n-react'; -import { DataViewBase } from '@kbn/es-query'; +import type { DataViewBase } from '@kbn/es-query'; import { OMITTED_AGGREGATIONS_FOR_CUSTOM_METRICS } from '../../../../../common/http_api'; -import { - Aggregators, +import type { CustomMetricAggTypes, MetricExpressionCustomMetric, } from '../../../../../common/alerting/metrics'; -import { MetricExpression } from '../../types'; -import { CustomMetrics, AggregationTypes, NormalizedFields } from './types'; +import { Aggregators } from '../../../../../common/alerting/metrics'; +import type { MetricExpression } from '../../types'; +import type { CustomMetrics, AggregationTypes, NormalizedFields } from './types'; import { MetricRowWithAgg } from './metric_row_with_agg'; import { MetricRowWithCount } from './metric_row_with_count'; import { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_agg.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_agg.tsx index 20aa93d05c196..dfc963236b94c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_agg.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_agg.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiFormRow, EuiHorizontalRule, @@ -12,15 +13,15 @@ import { EuiFlexGroup, EuiSelect, EuiComboBox, - EuiComboBoxOptionOption, } from '@elastic/eui'; import React, { useMemo, useCallback } from 'react'; import { get } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { ValidNormalizedTypes } from '@kbn/triggers-actions-ui-plugin/public'; -import { Aggregators, CustomMetricAggTypes } from '../../../../../common/alerting/metrics'; +import type { ValidNormalizedTypes } from '@kbn/triggers-actions-ui-plugin/public'; +import type { CustomMetricAggTypes } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; import { MetricRowControls } from './metric_row_controls'; -import { NormalizedFields, MetricRowBaseProps } from './types'; +import type { NormalizedFields, MetricRowBaseProps } from './types'; interface MetricRowWithAggProps extends MetricRowBaseProps { aggType?: CustomMetricAggTypes; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_count.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_count.tsx index dc3f691deda84..8948b4b7e7c66 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_count.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/metric_row_with_count.tsx @@ -8,9 +8,10 @@ import { EuiFormRow, EuiHorizontalRule, EuiFlexItem, EuiFlexGroup, EuiSelect } f import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { MetricsExplorerKueryBar } from '../../../../pages/metrics/metrics_explorer/components/kuery_bar'; -import { Aggregators, CustomMetricAggTypes } from '../../../../../common/alerting/metrics'; +import type { CustomMetricAggTypes } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; import { MetricRowControls } from './metric_row_controls'; -import { MetricRowBaseProps } from './types'; +import type { MetricRowBaseProps } from './types'; interface MetricRowWithCountProps extends MetricRowBaseProps { agg?: Aggregators; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/types.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/types.ts index 60069c6bb79d2..bdaca7e511311 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/custom_equation/types.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { AggregationType, IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; -import { MetricExpressionCustomMetric } from '../../../../../common/alerting/metrics'; -import { MetricExpression } from '../../types'; +import type { AggregationType, IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; +import type { MetricExpressionCustomMetric } from '../../../../../common/alerting/metrics'; +import type { MetricExpression } from '../../types'; export type CustomMetrics = MetricExpression['customMetrics']; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.test.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.test.tsx index ae45bcac5cf9f..ae0160fd2e18c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.test.tsx @@ -11,11 +11,11 @@ import { act } from 'react-dom/test-utils'; // We are using this inside a `jest.mock` call. Jest requires dynamic dependencies to be prefixed with `mock` import { coreMock as mockCoreMock } from '@kbn/core/public/mocks'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { MetricsExplorerMetric } from '../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../common/http_api/metrics_explorer'; import { Expressions } from './expression'; import type { DataView } from '@kbn/data-views-plugin/common'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { ResolvedDataView } from '../../../utils/data_view'; +import type { ResolvedDataView } from '../../../utils/data_view'; const mockDataView = { id: 'mock-id', diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.tsx index 42eb0daa7806d..d4201cf63af4a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react'; +import type { ChangeEvent } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { EuiAccordion, EuiButtonEmpty, @@ -19,15 +20,16 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { debounce } from 'lodash'; -import { - ForLastExpression, +import type { IErrorObject, RuleTypeParams, RuleTypeParamsExpressionProps, } from '@kbn/triggers-actions-ui-plugin/public'; -import { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; +import { ForLastExpression } from '@kbn/triggers-actions-ui-plugin/public'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { GenericAggType, RuleConditionChart } from '@kbn/observability-plugin/public'; +import type { GenericAggType } from '@kbn/observability-plugin/public'; +import { RuleConditionChart } from '@kbn/observability-plugin/public'; import { Aggregators, QUERY_INVALID } from '../../../../common/alerting/metrics'; import { useMetricsDataViewContext, @@ -36,9 +38,9 @@ import { } from '../../../containers/metrics_source'; import { MetricsExplorerGroupBy } from '../../../pages/metrics/metrics_explorer/components/group_by'; import { MetricsExplorerKueryBar } from '../../../pages/metrics/metrics_explorer/components/kuery_bar'; -import { MetricsExplorerOptions } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; +import type { MetricsExplorerOptions } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; import { convertKueryToElasticSearchQuery } from '../../../utils/kuery'; -import { AlertContextMeta, AlertParams, MetricExpression } from '../types'; +import type { AlertContextMeta, AlertParams, MetricExpression } from '../types'; import { ExpressionRow } from './expression_row'; const FILTER_TYPING_DEBOUNCE_MS = 500; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.test.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.test.tsx index 7e775dba71d9f..c2217fb0ec513 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.test.tsx @@ -5,19 +5,20 @@ * 2.0. */ -import React, { ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import React from 'react'; import { act } from 'react-dom/test-utils'; -import { LineAnnotation, RectAnnotation } from '@elastic/charts'; +import type { LineAnnotation, RectAnnotation } from '@elastic/charts'; import { mountWithIntl, nextTick } from '@kbn/test-jest-helpers'; // We are using this inside a `jest.mock` call. Jest requires dynamic dependencies to be prefixed with `mock` import { coreMock as mockCoreMock } from '@kbn/core/public/mocks'; import { Aggregators } from '../../../../common/alerting/metrics'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { MetricExpression } from '../types'; +import type { MetricExpression } from '../types'; import type { DataView } from '@kbn/data-views-plugin/common'; import { ExpressionChart } from './expression_chart'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { ResolvedDataView } from '../../../utils/data_view'; +import type { ResolvedDataView } from '../../../utils/data_view'; const mockDataView = { id: 'mock-id', diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx index e759724e5b420..de3f020f3cb6a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_chart.tsx @@ -5,17 +5,10 @@ * 2.0. */ -import React, { ReactElement, useRef } from 'react'; -import { - Axis, - Chart, - LineAnnotation, - niceTimeFormatter, - Position, - RectAnnotation, - Settings, - Tooltip, -} from '@elastic/charts'; +import type { ReactElement } from 'react'; +import React, { useRef } from 'react'; +import type { LineAnnotation, RectAnnotation } from '@elastic/charts'; +import { Axis, Chart, niceTimeFormatter, Position, Settings, Tooltip } from '@elastic/charts'; import { EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { useActiveCursor } from '@kbn/charts-plugin/public'; @@ -25,13 +18,11 @@ import { i18n } from '@kbn/i18n'; import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; import { useTimelineChartTheme } from '../../../hooks/use_timeline_chart_theme'; import { Color } from '../../../../common/color_palette'; -import { MetricsExplorerRow, MetricsExplorerAggregation } from '../../../../common/http_api'; +import type { MetricsExplorerRow, MetricsExplorerAggregation } from '../../../../common/http_api'; import { MetricExplorerSeriesChart } from '../../../pages/metrics/metrics_explorer/components/series_chart'; -import { MetricExpression, TimeRange } from '../types'; -import { - MetricsExplorerChartType, - MetricsExplorerOptionsMetric, -} from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; +import type { MetricExpression, TimeRange } from '../types'; +import type { MetricsExplorerOptionsMetric } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; +import { MetricsExplorerChartType } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; import { createFormatterForMetric } from '../../../pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metric'; import { calculateDomain } from '../../../pages/metrics/metrics_explorer/components/helpers/calculate_domain'; import { useMetricsExplorerChartData } from '../hooks/use_metrics_explorer_chart_data'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.test.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.test.tsx index d00ad83dd837d..51e8088d2db57 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.test.tsx @@ -5,15 +5,16 @@ * 2.0. */ -import { ResolvedDataView } from '../../../utils/data_view'; +import type { ResolvedDataView } from '../../../utils/data_view'; import { mountWithIntl, nextTick } from '@kbn/test-jest-helpers'; import React from 'react'; import { act } from 'react-dom/test-utils'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { MetricExpression } from '../types'; +import type { MetricExpression } from '../types'; import { ExpressionRow } from './expression_row'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { DataView, type FieldSpec } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import { type FieldSpec } from '@kbn/data-views-plugin/common'; const mockDataView = { id: 'mock-id', diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.tsx index fc922aa7297ad..bd0adc63a95aa 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/expression_row.tsx @@ -17,11 +17,11 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { omit } from 'lodash'; -import React, { PropsWithChildren, useCallback, useMemo, useState } from 'react'; +import type { PropsWithChildren } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import styled from '@emotion/styled'; +import type { AggregationType, IErrorObject } from '@kbn/triggers-actions-ui-plugin/public'; import { - AggregationType, - IErrorObject, OfExpression, ThresholdExpression, WhenExpression, @@ -32,7 +32,8 @@ import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; import { Aggregators } from '../../../../common/alerting/metrics'; import { useMetricsDataViewContext } from '../../../containers/metrics_source'; import { decimalToPct, pctToDecimal } from '../../../../common/utils/corrected_percent_convert'; -import { AGGREGATION_TYPES, MetricExpression } from '../types'; +import type { MetricExpression } from '../types'; +import { AGGREGATION_TYPES } from '../types'; import { CustomEquationEditor } from './custom_equation'; import { CUSTOM_EQUATION } from '../i18n_strings'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/validation.tsx b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/validation.tsx index 3080f16ba6ca6..090a24299bbf8 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/validation.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/components/validation.tsx @@ -7,16 +7,15 @@ import { fromKueryExpression } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; -import { ValidationResult } from '@kbn/triggers-actions-ui-plugin/public'; +import type { ValidationResult } from '@kbn/triggers-actions-ui-plugin/public'; import { isEmpty } from 'lodash'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { - Aggregators, +import type { CustomMetricExpressionParams, FilterQuery, MetricExpressionParams, - QUERY_INVALID, } from '../../../../common/alerting/metrics'; +import { Aggregators, QUERY_INVALID } from '../../../../common/alerting/metrics'; export const EQUATION_REGEX = /[^A-Z|+|\-|\s|\d+|\.|\(|\)|\/|\*|>|<|=|\?|\:|&|\!|\|]+/g; const isCustomMetricExpressionParams = ( diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metric_threshold_alert_prefill.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metric_threshold_alert_prefill.ts index 068c33ea2c31f..622b2aa20d3a0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metric_threshold_alert_prefill.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metric_threshold_alert_prefill.ts @@ -7,7 +7,7 @@ import { isEqual } from 'lodash'; import { useState } from 'react'; -import { MetricsExplorerMetric } from '../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../common/http_api/metrics_explorer'; export interface MetricThresholdPrefillOptions { groupBy: string | string[] | undefined; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts index 73bafecee1000..5d593caf0f27a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/hooks/use_metrics_explorer_chart_data.ts @@ -7,14 +7,14 @@ import DateMath from '@kbn/datemath'; import { useMemo } from 'react'; -import { MetricExpressionCustomMetric } from '../../../../common/alerting/metrics'; -import { MetricExpression, TimeRange } from '../types'; -import { +import type { MetricExpressionCustomMetric } from '../../../../common/alerting/metrics'; +import type { MetricExpression, TimeRange } from '../types'; +import type { MetricsExplorerOptions, MetricsExplorerTimestamp, } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; import { useMetricsExplorerData } from '../../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data'; -import { MetricExplorerCustomMetricAggregations } from '../../../../common/http_api/metrics_explorer'; +import type { MetricExplorerCustomMetricAggregations } from '../../../../common/http_api/metrics_explorer'; const DEFAULT_TIME_RANGE = {}; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/index.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/index.ts index 3f831e4c8e2c0..4f00f9ed0455f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/index.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/index.ts @@ -7,17 +7,15 @@ import { i18n } from '@kbn/i18n'; import { lazy } from 'react'; -import { RuleTypeParams } from '@kbn/alerting-plugin/common'; -import { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; -import { LocatorPublic } from '@kbn/share-plugin/common'; -import { +import type { RuleTypeParams } from '@kbn/alerting-plugin/common'; +import type { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; +import type { AssetDetailsLocatorParams, MetricsExplorerLocatorParams, } from '@kbn/observability-shared-plugin/common'; -import { - MetricExpressionParams, - METRIC_THRESHOLD_ALERT_TYPE_ID, -} from '../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../common/alerting/metrics'; +import { METRIC_THRESHOLD_ALERT_TYPE_ID } from '../../../common/alerting/metrics'; import { validateMetricThreshold } from './components/validation'; import { getRuleFormat } from './rule_data_formatters'; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.test.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.test.ts index a47bc517676a9..7bb024d64f8da 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.test.ts @@ -6,7 +6,7 @@ */ import { COMPARATORS } from '@kbn/alerting-comparators'; import { Aggregators } from '../../../../common/alerting/metrics'; -import { MetricExpression } from '../types'; +import type { MetricExpression } from '../types'; import { generateUniqueKey } from './generate_unique_key'; describe('generateUniqueKey', () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.ts index ec83311055a08..e90c2bef64a23 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/generate_unique_key.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricExpression } from '../types'; +import type { MetricExpression } from '../types'; export const generateUniqueKey = (criterion: MetricExpression) => { const metric = criterion.metric ? `(${criterion.metric})` : ''; diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/transform_metrics_explorer_data.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/transform_metrics_explorer_data.ts index 032696d26977d..021aa7ae2301f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/transform_metrics_explorer_data.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/lib/transform_metrics_explorer_data.ts @@ -6,8 +6,8 @@ */ import { first } from 'lodash'; -import { MetricsExplorerResponse } from '../../../../common/http_api/metrics_explorer'; -import { MetricThresholdAlertParams, ExpressionChartSeries } from '../types'; +import type { MetricsExplorerResponse } from '../../../../common/http_api/metrics_explorer'; +import type { MetricThresholdAlertParams, ExpressionChartSeries } from '../types'; export const transformMetricsExplorerData = ( params: MetricThresholdAlertParams, diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/mocks/metric_threshold_rule.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/mocks/metric_threshold_rule.ts index f7ec9022b4cad..fe551ac96d5eb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/mocks/metric_threshold_rule.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/mocks/metric_threshold_rule.ts @@ -8,7 +8,10 @@ import { v4 as uuidv4 } from 'uuid'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { Aggregators } from '../../../../common/alerting/metrics'; -import { MetricThresholdAlert, MetricThresholdRule } from '../components/alert_details_app_section'; +import type { + MetricThresholdAlert, + MetricThresholdRule, +} from '../components/alert_details_app_section'; export const buildMetricThresholdRule = ( rule: Partial = {} diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/rule_data_formatters.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/rule_data_formatters.ts index 17132055bd210..54e4ee4732a0c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/rule_data_formatters.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/rule_data_formatters.ts @@ -6,8 +6,8 @@ */ import { ALERT_REASON, ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; -import { ObservabilityRuleTypeFormatter } from '@kbn/observability-plugin/public'; -import { LocatorPublic } from '@kbn/share-plugin/common'; +import type { ObservabilityRuleTypeFormatter } from '@kbn/observability-plugin/public'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; import type { AssetDetailsLocatorParams, MetricsExplorerLocatorParams, diff --git a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/types.ts b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/types.ts index 3f89afcbba88a..671daab939b2a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/alerting/metric_threshold/types.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { +import type { CustomMetricExpressionParams, FilterQuery, MetricExpressionParams, NonCountMetricExpressionParams, } from '../../../common/alerting/metrics'; -import { MetricsExplorerSeries } from '../../../common/http_api/metrics_explorer'; -import { MetricsExplorerOptions } from '../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; +import type { MetricsExplorerSeries } from '../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions } from '../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; export interface AlertContextMeta { currentOptions?: Partial; diff --git a/x-pack/solutions/observability/plugins/infra/public/apps/common_providers.tsx b/x-pack/solutions/observability/plugins/infra/public/apps/common_providers.tsx index 392e3f250ada0..7ed34b91c5d31 100644 --- a/x-pack/solutions/observability/plugins/infra/public/apps/common_providers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/apps/common_providers.tsx @@ -5,21 +5,22 @@ * 2.0. */ -import { AppMountParameters, CoreStart } from '@kbn/core/public'; -import React, { FC, PropsWithChildren } from 'react'; +import type { AppMountParameters, CoreStart } from '@kbn/core/public'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; -import { Storage } from '@kbn/kibana-utils-plugin/public'; +import type { Storage } from '@kbn/kibana-utils-plugin/public'; import { NavigationWarningPromptProvider } from '@kbn/observability-shared-plugin/public'; -import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import type { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import { type KibanaEnvContext, useKibanaContextForPluginProvider, useKibanaEnvironmentContextProvider, } from '../hooks/use_kibana'; -import { InfraClientStartDeps, InfraClientStartExports } from '../types'; +import type { InfraClientStartDeps, InfraClientStartExports } from '../types'; import { HeaderActionMenuProvider } from '../containers/header_action_menu_provider'; import { TriggersActionsProvider } from '../containers/triggers_actions_context'; import { useIsDarkMode } from '../hooks/use_is_dark_mode'; diff --git a/x-pack/solutions/observability/plugins/infra/public/apps/logs_app.tsx b/x-pack/solutions/observability/plugins/infra/public/apps/logs_app.tsx index 51749d8095481..0147e8ebca600 100644 --- a/x-pack/solutions/observability/plugins/infra/public/apps/logs_app.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/apps/logs_app.tsx @@ -5,17 +5,18 @@ * 2.0. */ -import { History } from 'history'; -import { CoreStart } from '@kbn/core/public'; +import type { History } from 'history'; +import type { CoreStart } from '@kbn/core/public'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Routes, Route } from '@kbn/shared-ux-router'; -import { AppMountParameters } from '@kbn/core/public'; +import type { AppMountParameters } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { AllDatasetsLocatorParams, ALL_DATASETS_LOCATOR_ID } from '@kbn/deeplinks-observability'; +import type { AllDatasetsLocatorParams } from '@kbn/deeplinks-observability'; +import { ALL_DATASETS_LOCATOR_ID } from '@kbn/deeplinks-observability'; import { LinkToLogsPage } from '../pages/link_to/link_to_logs'; import { LogsPage } from '../pages/logs'; -import { InfraClientStartDeps, InfraClientStartExports } from '../types'; +import type { InfraClientStartDeps, InfraClientStartExports } from '../types'; import { CommonInfraProviders, CoreProviders } from './common_providers'; import { prepareMountElement } from './common_styles'; import { KbnUrlStateStorageFromRouterProvider } from '../containers/kbn_url_state_context'; diff --git a/x-pack/solutions/observability/plugins/infra/public/apps/metrics_app.tsx b/x-pack/solutions/observability/plugins/infra/public/apps/metrics_app.tsx index ab6ffcb6b5299..69baa383ebd04 100644 --- a/x-pack/solutions/observability/plugins/infra/public/apps/metrics_app.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/apps/metrics_app.tsx @@ -5,17 +5,17 @@ * 2.0. */ import { PerformanceContextProvider } from '@kbn/ebt-tools'; -import { History } from 'history'; -import { CoreStart } from '@kbn/core/public'; +import type { History } from 'history'; +import type { CoreStart } from '@kbn/core/public'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Routes, Route } from '@kbn/shared-ux-router'; -import { AppMountParameters } from '@kbn/core/public'; +import type { AppMountParameters } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; -import { InfraPublicConfig } from '../../common/plugin_config_types'; +import type { InfraPublicConfig } from '../../common/plugin_config_types'; import { LinkToMetricsPage } from '../pages/link_to/link_to_metrics'; import { InfrastructurePage } from '../pages/metrics'; -import { InfraClientStartDeps, InfraClientStartExports } from '../types'; +import type { InfraClientStartDeps, InfraClientStartExports } from '../types'; import { CommonInfraProviders, CoreProviders } from './common_providers'; import { prepareMountElement } from './common_styles'; import { SourceProvider, MetricsDataViewProvider } from '../containers/metrics_source'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts index 543b46ceb17b9..720a7a1035cac 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GetMetricsHostsAnomaliesSuccessResponsePayload } from '../../../../../../common/http_api/infra_ml'; +import type { GetMetricsHostsAnomaliesSuccessResponsePayload } from '../../../../../../common/http_api/infra_ml'; const anomalies: GetMetricsHostsAnomaliesSuccessResponsePayload = { data: { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/metadata.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/metadata.ts index 6f691ba78a65f..e68592172f055 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/metadata.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/metadata.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { InfraMetadata } from '../../../../../../common/http_api'; +import type { InfraMetadata } from '../../../../../../common/http_api'; export const HOST_ID = 'host-1'; export const hostMetadata: InfraMetadata = { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/processes.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/processes.ts index 425801377f21a..193c53bc93f99 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/processes.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/context/fixtures/processes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { ProcessListAPIResponse, ProcessListAPIChartResponse, } from '../../../../../../common/http_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/decorator.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/decorator.tsx index e4686a54e551c..5cde2fc3ca1ae 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/decorator.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/__stories__/decorator.tsx @@ -11,7 +11,8 @@ import { KibanaContextProvider, type KibanaReactContextValue, } from '@kbn/kibana-react-plugin/public'; -import { Observable, of } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { action } from '@storybook/addon-actions'; import type { DecoratorFn } from '@storybook/react'; import { useParameter } from '@storybook/addons'; @@ -21,7 +22,7 @@ import type { IKibanaSearchRequest, ISearchOptions } from '@kbn/search-types'; import type { SearchSessionState } from '@kbn/data-plugin/public'; import type { Theme } from '@elastic/charts/dist/utils/themes/theme'; import { defaultLogViewAttributes } from '@kbn/logs-shared-plugin/common'; -import { DataView, DataViewField } from '@kbn/data-views-plugin/common'; +import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { MemoryRouter } from 'react-router-dom'; import { AlertPrefillProvider } from '../../../alerting/use_alert_prefill'; import { PluginConfigProvider } from '../../../containers/plugin_config_context'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/constants.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/constants.ts index 01da12c5f59ad..80a4e280709ae 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/constants.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/constants.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; import { i18n } from '@kbn/i18n'; -import { AddDataPanelProps } from '@kbn/observability-shared-plugin/public'; -import { LocatorPublic } from '@kbn/share-plugin/common'; +import type { AddDataPanelProps } from '@kbn/observability-shared-plugin/public'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; import { OnboardingFlow } from '../../shared/templates/no_data_config'; export type AddMetricsCalloutKey = diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/index.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/index.tsx index bd749baed7114..b7bb993b39f7b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/index.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/add_metrics_callout/index.tsx @@ -7,12 +7,11 @@ import React from 'react'; import { AddDataPanel } from '@kbn/observability-shared-plugin/public'; -import { - OBSERVABILITY_ONBOARDING_LOCATOR, - ObservabilityOnboardingLocatorParams, -} from '@kbn/deeplinks-observability'; -import { AddMetricsCalloutEventParams } from '../../../services/telemetry'; -import { addMetricsCalloutDefinitions, AddMetricsCalloutKey } from './constants'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; +import type { AddMetricsCalloutEventParams } from '../../../services/telemetry'; +import type { AddMetricsCalloutKey } from './constants'; +import { addMetricsCalloutDefinitions } from './constants'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; export interface AddMetricsCalloutProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart.tsx index 366b11bf0cb11..100515a3f13a0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart.tsx @@ -12,7 +12,8 @@ import { resolveDataView } from '../../../utils/data_view'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { METRIC_CHART_HEIGHT } from '../../../common/visualizations/constants'; import { buildCombinedAssetFilter } from '../../../utils/filters/build'; -import { type BrushEndArgs, LensChart, type OnFilterEvent, LensChartProps } from '../../lens'; +import type { LensChartProps } from '../../lens'; +import { type BrushEndArgs, LensChart, type OnFilterEvent } from '../../lens'; import { useDatePickerContext } from '../hooks/use_date_picker'; import { extractRangeFromChartFilterEvent } from './chart_utils'; import { useSearchSessionContext } from '../../../hooks/use_search_session'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.test.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.test.ts index a93fc4c2d0ce6..8c38af7d2b43d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.test.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { DatatableColumn, DatatableRow } from '@kbn/expressions-plugin/common/expression_types'; +import type { + DatatableColumn, + DatatableRow, +} from '@kbn/expressions-plugin/common/expression_types'; import { calculateChartRowsTimeInterval, extractRangeFromChartFilterEvent, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.ts index f810f3693ad46..b5555f58fc3df 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/chart_utils.ts @@ -5,9 +5,12 @@ * 2.0. */ -import { MultiValueClickContext } from '@kbn/embeddable-plugin/public'; -import { TimeRange } from '@kbn/es-query'; -import { DatatableColumn, DatatableRow } from '@kbn/expressions-plugin/common/expression_types'; +import type { MultiValueClickContext } from '@kbn/embeddable-plugin/public'; +import type { TimeRange } from '@kbn/es-query'; +import type { + DatatableColumn, + DatatableRow, +} from '@kbn/expressions-plugin/common/expression_types'; import type { OnFilterEvent } from '../../lens'; type ChartClickContextData = MultiValueClickContext['data']['data']; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/docker_charts.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/docker_charts.tsx index b474de0ae8e49..45951be1521c7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/docker_charts.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/docker_charts.tsx @@ -17,7 +17,7 @@ import { Chart } from './chart'; import { TitleWithTooltip } from '../components/section_title'; import { CONTAINER_METRIC_GROUP_TITLES } from '../translations'; import { CONTAINER_METRICS_DOC_HREF } from '../../../common/visualizations/constants'; -import { MetricsChartsFields, ContainerMetricTypes } from './types'; +import type { MetricsChartsFields, ContainerMetricTypes } from './types'; interface Props extends MetricsChartsFields { metric: ContainerMetricTypes; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/host_charts.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/host_charts.tsx index 658091312d7f5..2c1e84d48d600 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/host_charts.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/host_charts.tsx @@ -16,7 +16,7 @@ import { ChartsGrid } from '../charts_grid/charts_grid'; import { Chart } from './chart'; import { useHostCharts } from '../hooks/use_host_metrics_charts'; import { TitleWithTooltip } from '../components/section_title'; -import { MetricsChartsFields, HostMetricTypes } from './types'; +import type { MetricsChartsFields, HostMetricTypes } from './types'; interface Props extends MetricsChartsFields { metric: Exclude; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/kubernetes_charts.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/kubernetes_charts.tsx index b9f78aa0bdf93..11a1d97a023d5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/kubernetes_charts.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/charts/kubernetes_charts.tsx @@ -19,7 +19,7 @@ import { Chart } from './chart'; import { useIntegrationCheck } from '../hooks/use_integration_check'; import { useK8sContainerPageViewMetricsCharts } from '../hooks/use_container_metrics_charts'; import { CONTAINER_METRICS_DOC_HREF } from '../../../common/visualizations/constants'; -import { KubernetesContainerMetrics, MetricsChartsFields } from './types'; +import type { KubernetesContainerMetrics, MetricsChartsFields } from './types'; const FRAGMENT_BASE = 'key-metrics'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/components/metadata_explanation.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/components/metadata_explanation.tsx index eb24ed2c38131..77bda373785b1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/components/metadata_explanation.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/components/metadata_explanation.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiText, EuiLink } from '@elastic/eui'; import { FormattedDate, FormattedMessage, FormattedTime } from '@kbn/i18n-react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; import { Popover } from '../tabs/common/popover'; import { useMetadataStateContext } from '../hooks/use_metadata_state'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts.tsx index 135c7e2ce77e0..bd168744ff7eb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts.tsx @@ -6,11 +6,11 @@ */ import React from 'react'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { type SnapshotMetricType, findInventoryModel, type InventoryModels, - InventoryItemType, } from '@kbn/metrics-data-access-plugin/common'; import { useAssetDetailsUrlState } from '../hooks/use_asset_details_url_state'; import { useAssetDetailsRenderPropsContext } from '../hooks/use_asset_details_render_props'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts/legacy_metric_callout.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts/legacy_metric_callout.tsx index 19e41abffac07..42f1b5f12deed 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts/legacy_metric_callout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/content/callouts/legacy_metric_callout.tsx @@ -7,11 +7,11 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiCallOut, EuiLink } from '@elastic/eui'; -import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import useLocalStorage from 'react-use/lib/useLocalStorage'; import { toMetricOpt } from '../../../../../common/snapshot_metric_i18n'; import { useAssetDetailsRenderPropsContext } from '../../hooks/use_asset_details_render_props'; -import { ContentTabIds } from '../../types'; +import type { ContentTabIds } from '../../types'; import { useTabSwitcherContext } from '../../hooks/use_tab_switcher'; export const HOST_LEGACY_METRICS_DOC_HREF = 'https://ela.st/host-metrics-legacy'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/context_providers.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/context_providers.tsx index 87220691b50fc..8f76e3de99d5a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/context_providers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/context_providers.tsx @@ -11,7 +11,7 @@ import { AssetDetailsRenderPropsProvider } from './hooks/use_asset_details_rende import { DatePickerProvider } from './hooks/use_date_picker'; import { LoadingStateProvider } from './hooks/use_loading_state'; import { MetadataStateProvider } from './hooks/use_metadata_state'; -import { AssetDetailsProps, RenderMode } from './types'; +import type { AssetDetailsProps, RenderMode } from './types'; const RenderWithOptionalSearchSessionProvider = ({ renderMode, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.test.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.test.ts index 496029a8b436b..35fc2ee622941 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.test.ts @@ -6,7 +6,7 @@ */ import { waitFor, renderHook } from '@testing-library/react'; -import { ContainerMetricTypes } from '../charts/types'; +import type { ContainerMetricTypes } from '../charts/types'; import { useK8sContainerPageViewMetricsCharts, useDockerContainerPageViewMetricsCharts, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.ts index c453725f3f527..36fbee734c16b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_container_metrics_charts.ts @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import useAsync from 'react-use/lib/useAsync'; -import { ContainerMetricTypes } from '../charts/types'; +import type { ContainerMetricTypes } from '../charts/types'; import { useChartSeriesColor } from './use_chart_series_color'; const getSubtitleFromFormula = (value: string) => diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_date_picker.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_date_picker.ts index 4cb20bfc4f3d5..a35bda74e22a3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_date_picker.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_date_picker.ts @@ -12,7 +12,7 @@ import useEffectOnce from 'react-use/lib/useEffectOnce'; import { BehaviorSubject } from 'rxjs'; import { useSearchSessionContext } from '../../../hooks/use_search_session'; import { parseDateRange } from '../../../utils/datemath'; -import { AssetDetailsProps } from '../types'; +import type { AssetDetailsProps } from '../types'; import { getDefaultDateRange, toTimestampRange } from '../utils'; import { useAssetDetailsUrlState } from './use_asset_details_url_state'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts index f95ab156222eb..abaea88359b57 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.test.ts @@ -6,7 +6,7 @@ */ import { waitFor, renderHook } from '@testing-library/react'; -import { HostMetricTypes } from '../charts/types'; +import type { HostMetricTypes } from '../charts/types'; import { useHostKpiCharts, useHostCharts, useKubernetesCharts } from './use_host_metrics_charts'; const dataViewId = 'metricsDataViewId'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts index ba3e3f973b35f..eee835176f0ed 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_host_metrics_charts.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { useMemo } from 'react'; import useAsync from 'react-use/lib/useAsync'; -import { HostMetricTypes } from '../charts/types'; +import type { HostMetricTypes } from '../charts/types'; import { useChartSeriesColor } from './use_chart_series_color'; export const useHostCharts = ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_intersecting_state.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_intersecting_state.ts index a9e7fba7d4447..61f42b34b1f24 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_intersecting_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_intersecting_state.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { useEffect, useState, useRef, RefObject } from 'react'; +import type { RefObject } from 'react'; +import { useEffect, useState, useRef } from 'react'; export const useIntersectingState = (ref: RefObject, currentState: T) => { const [intersectionObserverEntry, setIntersectionObserverEntry] = diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_log_charts.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_log_charts.ts index e373e214a63c2..1bdbc2d941cef 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_log_charts.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_log_charts.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { useMemo } from 'react'; -import { LensConfig } from '@kbn/lens-embeddable-utils/config_builder'; +import type { LensConfig } from '@kbn/lens-embeddable-utils/config_builder'; import { useChartSeriesColor } from './use_chart_series_color'; const LOG_RATE = i18n.translate('xpack.infra.assetDetails.charts.logRate', { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata.ts index 9fc2ea6dd5d0f..d0fdeacc52b29 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata.ts @@ -6,7 +6,7 @@ */ import type { InventoryItemType, InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; -import { BehaviorSubject } from 'rxjs'; +import type { BehaviorSubject } from 'rxjs'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { isPending, useFetcher } from '../../../hooks/use_fetcher'; import { InfraMetadataRT } from '../../../../common/http_api/metadata_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata_state.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata_state.ts index c0efe79157b97..d1c739e2d6b78 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/hooks/use_metadata_state.ts @@ -9,7 +9,7 @@ import { useEffect, useMemo } from 'react'; import createContainer from 'constate'; import { useSourceContext } from '../../../containers/metrics_source'; import { useMetadata } from './use_metadata'; -import { AssetDetailsProps } from '../types'; +import type { AssetDetailsProps } from '../types'; import { useDatePickerContext } from './use_date_picker'; import { useAssetDetailsUrlState } from './use_asset_details_url_state'; import { useRequestObservable } from './use_request_observable'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/links/link_to_apm_service.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/links/link_to_apm_service.tsx index 92424d85f1861..578463d0cf507 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/links/link_to_apm_service.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/links/link_to_apm_service.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiBadge, EuiText } from '@elastic/eui'; import { AgentIcon } from '@kbn/custom-icons'; -import { AgentName } from '@kbn/elastic-agent-utils'; +import type { AgentName } from '@kbn/elastic-agent-utils'; import { i18n } from '@kbn/i18n'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/actions/save_dashboard_modal.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/actions/save_dashboard_modal.tsx index 5bd6cc0e1fc6c..442a3ba49e7aa 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/actions/save_dashboard_modal.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/actions/save_dashboard_modal.tsx @@ -6,6 +6,7 @@ */ import React, { useCallback, useMemo, useState } from 'react'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; import { EuiButton, EuiModal, @@ -15,7 +16,6 @@ import { EuiSwitch, EuiModalBody, EuiComboBox, - EuiComboBoxOptionOption, EuiFlexGroup, EuiToolTip, EuiIcon, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboard_selector.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboard_selector.tsx index e8ff7000581da..6e884c0bf897a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboard_selector.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboard_selector.tsx @@ -9,7 +9,7 @@ import React, { useEffect, useState, useCallback } from 'react'; import useMount from 'react-use/lib/useMount'; import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { DashboardItemWithTitle } from '../../../../../common/custom_dashboards'; +import type { DashboardItemWithTitle } from '../../../../../common/custom_dashboards'; import { useAssetDetailsUrlState } from '../../hooks/use_asset_details_url_state'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx index 694fe5cd1ed2b..9a26715127fd4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/dashboards/dashboards.tsx @@ -18,11 +18,8 @@ import { } from '@elastic/eui'; import { ViewMode } from '@kbn/embeddable-plugin/public'; -import { - DashboardApi, - DashboardCreationOptions, - DashboardRenderer, -} from '@kbn/dashboard-plugin/public'; +import type { DashboardApi, DashboardCreationOptions } from '@kbn/dashboard-plugin/public'; +import { DashboardRenderer } from '@kbn/dashboard-plugin/public'; import type { DashboardSearchOut } from '@kbn/dashboard-plugin/server/content_management'; import type { SerializableRecord } from '@kbn/utility-types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/logs/logs.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/logs/logs.tsx index 6c2ab5ace2133..c8000a2f7f5c6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/logs/logs.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/logs/logs.tsx @@ -11,11 +11,8 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { EuiFieldSearch, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { LogStream } from '@kbn/logs-shared-plugin/public'; -import { - DEFAULT_LOG_VIEW, - getLogsLocatorsFromUrlService, - LogViewReference, -} from '@kbn/logs-shared-plugin/common'; +import type { LogViewReference } from '@kbn/logs-shared-plugin/common'; +import { DEFAULT_LOG_VIEW, getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; import { OpenInLogsExplorerButton } from '@kbn/logs-shared-plugin/public'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/add_pin_to_row.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/add_pin_to_row.tsx index 42245552b664c..5b7ef55ce8aa0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/add_pin_to_row.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/add_pin_to_row.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { Dispatch } from 'react'; +import type { Dispatch } from 'react'; +import React from 'react'; import { css } from '@emotion/css'; import { i18n } from '@kbn/i18n'; import { EuiToolTip, EuiButtonIcon, useEuiTheme, euiCanAnimate } from '@elastic/eui'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/build_metadata_filter.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/build_metadata_filter.ts index 8464d34073414..a8f4949f4f55f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/build_metadata_filter.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/build_metadata_filter.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { buildPhrasesFilter, buildPhraseFilter, FilterStateStore } from '@kbn/es-query'; +import type { FilterStateStore } from '@kbn/es-query'; +import { buildPhrasesFilter, buildPhraseFilter } from '@kbn/es-query'; import type { DataView } from '@kbn/data-views-plugin/common'; export function buildMetadataFilter({ diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/table.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/table.tsx index fedf54a2d10a0..8ab34376b2766 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/table.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metadata/table.tsx @@ -5,13 +5,8 @@ * 2.0. */ -import { - EuiText, - EuiIcon, - EuiInMemoryTable, - EuiSearchBarProps, - type HorizontalAlignment, -} from '@elastic/eui'; +import type { EuiSearchBarProps } from '@elastic/eui'; +import { EuiText, EuiIcon, EuiInMemoryTable, type HorizontalAlignment } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useMemo, useState } from 'react'; import { debounce } from 'lodash'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/host_metrics.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/host_metrics.tsx index 9d08a628aec5f..d0df7574efa36 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/host_metrics.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/host_metrics.tsx @@ -12,7 +12,7 @@ import { useDataViewsContext } from '../../hooks/use_data_views'; import { useIntersectingState } from '../../hooks/use_intersecting_state'; import { MetricsTemplate } from './metrics_template'; import { HostCharts, KubernetesNodeCharts } from '../../charts'; -import { HostMetricTypes } from '../../charts/types'; +import type { HostMetricTypes } from '../../charts/types'; const METRIC_TYPES: Array> = [ 'cpu', diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/metrics_template.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/metrics_template.tsx index 9206f4cc188e2..f4a261ee38fa3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/metrics_template.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/metrics/metrics_template.tsx @@ -27,7 +27,7 @@ import { import { css, cx } from '@emotion/css'; import { useAssetDetailsRenderPropsContext } from '../../hooks/use_asset_details_render_props'; import { useTabSwitcherContext } from '../../hooks/use_tab_switcher'; -import { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; +import type { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; import { AddMetricsCallout } from '../../add_metrics_callout'; import { useEntitySummary } from '../../hooks/use_entity_summary'; import { isMetricsSignal } from '../../utils/get_data_stream_types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metadata_summary/metadata_summary_list.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metadata_summary/metadata_summary_list.tsx index f3fd06d657a48..b3ae62111bb71 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metadata_summary/metadata_summary_list.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metadata_summary/metadata_summary_list.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { EuiButtonEmpty, EuiFlexGroup, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metrics/metrics.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metrics/metrics.tsx index f3ad7da1b99f5..c7323e395f910 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metrics/metrics.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/metrics/metrics.tsx @@ -7,7 +7,7 @@ import React, { useMemo } from 'react'; import type { TimeRange } from '@kbn/es-query'; import type { DataView } from '@kbn/data-views-plugin/public'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { HostMetrics } from './host_metrics'; import { ContainerMetrics } from './container_metrics'; import { Section } from '../../../components/section'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/overview.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/overview.tsx index a25ee35cb75fa..0e2f999269164 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/overview.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/overview/overview.tsx @@ -24,7 +24,7 @@ import { CpuProfilingPrompt } from './kpis/cpu_profiling_prompt'; import { ServicesContent } from './services'; import { MetricsContent } from './metrics/metrics'; import { AddMetricsCallout } from '../../add_metrics_callout'; -import { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; +import type { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; import { useEntitySummary } from '../../hooks/use_entity_summary'; import { isMetricsSignal, isLogsSignal } from '../../utils/get_data_stream_types'; import { LogsContent } from './logs'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row.tsx index f39316ed43816..27adb2cdbab03 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row.tsx @@ -25,7 +25,7 @@ import styled from '@emotion/styled'; import useToggle from 'react-use/lib/useToggle'; import { type Message } from '@kbn/observability-ai-assistant-plugin/public'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import { Process } from './types'; +import type { Process } from './types'; import { ProcessRowCharts } from './process_row_charts'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row_charts.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row_charts.tsx index f3a0c0dc775ea..80bbd66077321 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row_charts.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/process_row_charts.tsx @@ -30,11 +30,9 @@ import { useTimelineChartTheme } from '../../../../hooks/use_timeline_chart_them import { MetricExplorerSeriesChart } from '../../../../pages/metrics/metrics_explorer/components/series_chart'; import { Color } from '../../../../../common/color_palette'; import { createFormatter } from '../../../../../common/formatters'; -import { - MetricsExplorerAggregation, - ProcessListAPIChartResponseRT, -} from '../../../../../common/http_api'; -import { Process } from './types'; +import type { MetricsExplorerAggregation } from '../../../../../common/http_api'; +import { ProcessListAPIChartResponseRT } from '../../../../../common/http_api'; +import type { Process } from './types'; import { MetricsExplorerChartType } from '../../../../../common/metrics_explorer_views/types'; import { MetricNotAvailableExplanationTooltip } from '../../components/metric_not_available_explanation'; import { useProcessListContext } from '../../hooks/use_process_list'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/processes.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/processes.tsx index 57a07d4dc296e..7503ebf2f5b28 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/processes.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/processes.tsx @@ -39,7 +39,7 @@ import { TopProcessesTooltip } from '../../components/top_processes_tooltip'; import { ProcessListAPIResponseRT } from '../../../../../common/http_api'; import { useRequestObservable } from '../../hooks/use_request_observable'; import { useTabSwitcherContext } from '../../hooks/use_tab_switcher'; -import { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; +import type { AddMetricsCalloutKey } from '../../add_metrics_callout/constants'; import { AddMetricsCallout } from '../../add_metrics_callout'; import { useEntitySummary } from '../../hooks/use_entity_summary'; import { isMetricsSignal } from '../../utils/get_data_stream_types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/types.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/types.ts index 61366d2fcf7a5..53546ff1f5fae 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/processes/types.ts @@ -6,7 +6,7 @@ */ import type { MetricsExplorerSeries } from '../../../../../common/http_api'; -import { STATE_NAMES } from './states'; +import type { STATE_NAMES } from './states'; export interface Process { command: string; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/profiling/profiling_links.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/profiling/profiling_links.tsx index 5f0d3795f4743..e412a6608429a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/profiling/profiling_links.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/tabs/profiling/profiling_links.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; -import { +import type { TopNFunctionsLocator, StacktracesLocator, FlamegraphLocator, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/template/page.tsx b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/template/page.tsx index 5c187bb6186d6..74301e7c7593c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/template/page.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/template/page.tsx @@ -20,7 +20,7 @@ import { useAssetDetailsRenderPropsContext } from '../hooks/use_asset_details_re import { useMetadataStateContext } from '../hooks/use_metadata_state'; import { usePageHeader } from '../hooks/use_page_header'; import { useTabSwitcherContext } from '../hooks/use_tab_switcher'; -import { ContentTemplateProps } from '../types'; +import type { ContentTemplateProps } from '../types'; import { getIntegrationsAvailable } from '../utils'; import { InfraPageTemplate } from '../../shared/templates/infra_page_template'; import { OnboardingFlow } from '../../shared/templates/no_data_config'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/types.ts b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/types.ts index e49ed5afca20d..20fcd7405d6e8 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/asset_details/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/asset_details/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { TimeRange } from '@kbn/es-query'; -import { Search } from 'history'; +import type { TimeRange } from '@kbn/es-query'; +import type { Search } from 'history'; import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import type { InfraWaffleMapOptions } from '../../common/inventory/types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx b/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx index c1b362c46bd07..23e0317c8e746 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/autocomplete_field.tsx @@ -7,7 +7,7 @@ import { EuiFieldSearch, EuiOutsideClickDetector, EuiPanel } from '@elastic/eui'; import React from 'react'; -import { QuerySuggestion } from '@kbn/unified-search-plugin/public'; +import type { QuerySuggestion } from '@kbn/unified-search-plugin/public'; import styled from '@emotion/styled'; import { composeStateUpdaters } from '../../utils/typed_react'; import { SuggestionItem } from './suggestion_item'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/suggestion_item.tsx b/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/suggestion_item.tsx index 486d41d2c9c93..55fcfd80c5be5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/suggestion_item.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/autocomplete_field/suggestion_item.tsx @@ -9,7 +9,8 @@ import React from 'react'; import { EuiIcon, useEuiFontSize } from '@elastic/eui'; import styled from '@emotion/styled'; import type { Theme } from '@emotion/react'; -import { QuerySuggestion, QuerySuggestionTypes } from '@kbn/unified-search-plugin/public'; +import type { QuerySuggestion } from '@kbn/unified-search-plugin/public'; +import { QuerySuggestionTypes } from '@kbn/unified-search-plugin/public'; import { transparentize } from 'polished'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/empty_states/no_indices.tsx b/x-pack/solutions/observability/plugins/infra/public/components/empty_states/no_indices.tsx index d2f05502b2e6e..cb1ff7d87a861 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/empty_states/no_indices.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/empty_states/no_indices.tsx @@ -7,7 +7,7 @@ import React from 'react'; import styled from '@emotion/styled'; -import { EuiEmptyPromptProps } from '@elastic/eui'; +import type { EuiEmptyPromptProps } from '@elastic/eui'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; import { PageTemplate } from '../page_template'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/fixed_datepicker.tsx b/x-pack/solutions/observability/plugins/infra/public/components/fixed_datepicker.tsx index a33550399ae4e..3519670c36186 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/fixed_datepicker.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/fixed_datepicker.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiDatePicker, EuiDatePickerProps } from '@elastic/eui'; +import type { EuiDatePickerProps } from '@elastic/eui'; +import { EuiDatePicker } from '@elastic/eui'; import React from 'react'; import styled, { type StyledComponent } from '@emotion/styled'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/help_center_content.tsx b/x-pack/solutions/observability/plugins/infra/public/components/help_center_content.tsx index 76b8475dc7d42..c2ec7d08c37d3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/help_center_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/help_center_content.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { useEffect } from 'react'; +import type React from 'react'; +import { useEffect } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; interface HelpCenterContentProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_chart.tsx index 56d69fa9b6c7c..c8cc3e58b8c95 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_chart.tsx @@ -13,8 +13,8 @@ import { EuiLink, type EuiPanelProps, } from '@elastic/eui'; -import { Action } from '@kbn/ui-actions-plugin/public'; -import { UserMessage } from '@kbn/lens-plugin/public'; +import type { Action } from '@kbn/ui-actions-plugin/public'; +import type { UserMessage } from '@kbn/lens-plugin/public'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/react'; import { useLensAttributes, type UseLensAttributesParams } from '../../hooks/use_lens_attributes'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_wrapper.tsx b/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_wrapper.tsx index 01ce60b593462..0350b16a512a3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_wrapper.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/lens/lens_wrapper.tsx @@ -6,10 +6,10 @@ */ import React, { useEffect, useState, useRef, useCallback } from 'react'; import { ViewMode } from '@kbn/embeddable-plugin/public'; -import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import type { TypedLensByValueInput } from '@kbn/lens-plugin/public'; import { css } from '@emotion/react'; import { useEuiTheme } from '@elastic/eui'; -import { LensAttributes } from '@kbn/lens-embeddable-utils'; +import type { LensAttributes } from '@kbn/lens-embeddable-utils'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; import { ChartLoadingProgress, ChartPlaceholder } from './chart_placeholder'; import type { LensWrapperProps } from './types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/lens/metric_explanation/tooltip_content.tsx b/x-pack/solutions/observability/plugins/infra/public/components/lens/metric_explanation/tooltip_content.tsx index 52459e70e2b05..53e956768e787 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/lens/metric_explanation/tooltip_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/lens/metric_explanation/tooltip_content.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { HTMLAttributes } from 'react'; +import type { HTMLAttributes } from 'react'; +import React from 'react'; import { EuiText, EuiLink } from '@elastic/eui'; import { css } from '@emotion/react'; import { FormattedMessage } from '@kbn/i18n-react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/loading/__examples__/index.stories.tsx b/x-pack/solutions/observability/plugins/infra/public/components/loading/__examples__/index.stories.tsx index 161708b2bd358..1810698a09bff 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/loading/__examples__/index.stories.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/loading/__examples__/index.stories.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Meta, Story } from '@storybook/react/types-6-0'; +import type { Meta, Story } from '@storybook/react/types-6-0'; import React from 'react'; import { InfraLoadingPanel } from '..'; import { decorateWithGlobalStorybookThemeProviders } from '../../../test_utils/use_global_storybook_theme'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/loading_overlay_wrapper.tsx b/x-pack/solutions/observability/plugins/infra/public/components/loading_overlay_wrapper.tsx index 08bb2f33dec75..409f2c952c3cc 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/loading_overlay_wrapper.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/loading_overlay_wrapper.tsx @@ -7,7 +7,8 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { transparentize } from 'polished'; -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import styled from '@emotion/styled'; export const LoadingOverlayWrapper: React.FC< diff --git a/x-pack/solutions/observability/plugins/infra/public/components/loading_page.tsx b/x-pack/solutions/observability/plugins/infra/public/components/loading_page.tsx index 2b2859707a20d..9fd22bd8ab8a6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/loading_page.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/loading_page.tsx @@ -6,7 +6,8 @@ */ import { EuiEmptyPrompt, EuiLoadingSpinner, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { PageTemplate } from './page_template'; interface LoadingPageProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/log_stream/log_stream_react_embeddable.tsx b/x-pack/solutions/observability/plugins/infra/public/components/log_stream/log_stream_react_embeddable.tsx index f5fee9d94ea0e..5fada1aadcf6f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/log_stream/log_stream_react_embeddable.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/log_stream/log_stream_react_embeddable.tsx @@ -5,19 +5,20 @@ * 2.0. */ -import React, { FC, PropsWithChildren, useEffect, useMemo, useState } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiCallOut, EuiLink, useEuiTheme } from '@elastic/eui'; -import { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import type { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { initializeTimeRange, initializeTitles, useFetchContext, } from '@kbn/presentation-publishing'; import { LogStream } from '@kbn/logs-shared-plugin/public'; -import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import type { AppMountParameters, CoreStart } from '@kbn/core/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; -import { Query } from '@kbn/es-query'; +import type { Query } from '@kbn/es-query'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import useLocalStorage from 'react-use/lib/useLocalStorage'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -25,7 +26,7 @@ import type { LogStreamApi, LogStreamSerializedState, Services } from './types'; import { datemathToEpochMillis } from '../../utils/datemath'; import { LOG_STREAM_EMBEDDABLE } from './constants'; import { useKibanaContextForPluginProvider } from '../../hooks/use_kibana'; -import { InfraClientStartDeps, InfraClientStartExports } from '../../types'; +import type { InfraClientStartDeps, InfraClientStartExports } from '../../types'; export function getLogStreamEmbeddableFactory(services: Services) { const factory: ReactEmbeddableFactory< diff --git a/x-pack/solutions/observability/plugins/infra/public/components/log_stream/types.ts b/x-pack/solutions/observability/plugins/infra/public/components/log_stream/types.ts index 26a9201c41a94..5c2a3ae5bb723 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/log_stream/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/log_stream/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; -import { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; -import { SerializedTimeRange, SerializedTitles } from '@kbn/presentation-publishing'; -import { InfraClientStartDeps, InfraClientStartExports } from '../../types'; +import type { CoreStart } from '@kbn/core/public'; +import type { DefaultEmbeddableApi } from '@kbn/embeddable-plugin/public'; +import type { SerializedTimeRange, SerializedTitles } from '@kbn/presentation-publishing'; +import type { InfraClientStartDeps, InfraClientStartExports } from '../../types'; export type LogStreamSerializedState = SerializedTitles & SerializedTimeRange; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/inline_log_view_splash_page.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/inline_log_view_splash_page.tsx index c2df977d972b1..579290f45051c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/inline_log_view_splash_page.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/inline_log_view_splash_page.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; +import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; import { EuiEmptyPrompt } from '@elastic/eui'; import { EuiText } from '@elastic/eui'; import { PageTemplate } from '../page_template'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/notices_section.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/notices_section.tsx index faf7d61f9e1b2..e4108b08d0c23 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/notices_section.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/notices_section.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { QualityWarning } from '../../../../common/log_analysis'; +import type { QualityWarning } from '../../../../common/log_analysis'; import { LogAnalysisJobProblemIndicator } from './log_analysis_job_problem_indicator'; import { CategoryQualityWarnings } from './quality_warning_notices'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.stories.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.stories.tsx index e9522c257a62f..b91621fab67ce 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.stories.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.stories.tsx @@ -8,7 +8,7 @@ import { action } from '@storybook/addon-actions'; import { storiesOf } from '@storybook/react'; import React from 'react'; -import { QualityWarning } from '../../../../common/log_analysis'; +import type { QualityWarning } from '../../../../common/log_analysis'; import { decorateWithGlobalStorybookThemeProviders } from '../../../test_utils/use_global_storybook_theme'; import { CategoryQualityWarnings } from './quality_warning_notices'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.tsx index e3b4ef43106be..c1704ba985ebd 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/quality_warning_notices.tsx @@ -18,11 +18,11 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { groupBy } from 'lodash'; import React, { Fragment, useState } from 'react'; import styled from '@emotion/styled'; -import { +import type { CategoryQualityWarning, CategoryQualityWarningReason, - getFriendlyNameForPartitionId, } from '../../../../common/log_analysis'; +import { getFriendlyNameForPartitionId } from '../../../../common/log_analysis'; import { RecreateJobCallout } from './recreate_job_callout'; export const CategoryQualityWarnings: React.FC<{ diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/recreate_job_callout.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/recreate_job_callout.tsx index 4a94825443212..5cc221624b969 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/recreate_job_callout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_job_status/recreate_job_callout.tsx @@ -6,7 +6,8 @@ */ import { EuiCallOut } from '@elastic/eui'; -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { RecreateJobButton } from '../log_analysis_setup/create_job_button'; export const RecreateJobCallout: FC< diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_results/datasets_selector.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_results/datasets_selector.tsx index b7faed1c2281f..17c22bcb66742 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_results/datasets_selector.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_results/datasets_selector.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useMemo } from 'react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/create_job_button.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/create_job_button.tsx index bc45896450897..2c35f7c7062ff 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/create_job_button.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/create_job_button.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiButton, PropsOf } from '@elastic/eui'; +import type { PropsOf } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { MissingSetupPrivilegesToolTip } from './missing_setup_privileges_tooltip'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_indices_form.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_indices_form.tsx index 7c0963aa2d9d3..ab79e5dc2c905 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_indices_form.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_indices_form.tsx @@ -9,12 +9,12 @@ import { EuiTitle, EuiText, EuiFormRow, EuiFlexGroup, EuiFlexItem, EuiLink } fro import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useMemo } from 'react'; -import { ApplicationStart } from '@kbn/core-application-browser'; +import type { ApplicationStart } from '@kbn/core-application-browser'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import { DatasetFilter, QualityWarning } from '../../../../../common/log_analysis'; +import type { DatasetFilter, QualityWarning } from '../../../../../common/log_analysis'; import { LoadingOverlayWrapper } from '../../../loading_overlay_wrapper'; import { IndexSetupRow } from './index_setup_row'; -import { AvailableIndex, ValidationIndicesError } from './validation'; +import type { AvailableIndex, ValidationIndicesError } from './validation'; function getKibanaAdvancedSettingsHref(application: ApplicationStart) { return application.getUrlForApp('management', { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_timerange_form.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_timerange_form.tsx index 8ad9769c29fb1..0541269bbbc09 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_timerange_form.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/analysis_setup_timerange_form.tsx @@ -8,10 +8,11 @@ import { EuiTitle, EuiText, EuiFlexGroup, EuiFlexItem, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import moment, { Moment } from 'moment'; +import type { Moment } from 'moment'; +import moment from 'moment'; import React, { useMemo, useState } from 'react'; import { FixedDatePicker } from '../../../fixed_datepicker'; -import { TimeRangeValidationError } from './validation'; +import type { TimeRangeValidationError } from './validation'; const startTimeLabel = i18n.translate('xpack.infra.analysisSetup.startTimeLabel', { defaultMessage: 'Start time', diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_dataset_filter.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_dataset_filter.tsx index af961e0c6a555..d35a6ea7b24b6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_dataset_filter.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_dataset_filter.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiSelectableOption } from '@elastic/eui'; import { EuiFilterButton, EuiFilterGroup, @@ -12,11 +13,10 @@ import { EuiPopover, EuiPopoverTitle, EuiSelectable, - EuiSelectableOption, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useMemo } from 'react'; -import { DatasetFilter, QualityWarning } from '../../../../../common/log_analysis'; +import type { DatasetFilter, QualityWarning } from '../../../../../common/log_analysis'; import { useVisibilityState } from '../../../../hooks/use_visibility_state'; import { CategoryQualityWarningReasonDescription } from '../../log_analysis_job_status/quality_warning_notices'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_row.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_row.tsx index d444cb59842c4..c10e48c013ee3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_row.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/index_setup_row.tsx @@ -8,9 +8,9 @@ import { EuiCheckbox, EuiCode, EuiIconTip, EuiSpacer, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useMemo } from 'react'; -import { DatasetFilter, QualityWarning } from '../../../../../common/log_analysis'; +import type { DatasetFilter, QualityWarning } from '../../../../../common/log_analysis'; import { IndexSetupDatasetFilter } from './index_setup_dataset_filter'; -import { AvailableIndex, ValidationUIError } from './validation'; +import type { AvailableIndex, ValidationUIError } from './validation'; export const IndexSetupRow: React.FC<{ index: AvailableIndex; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/initial_configuration_step.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/initial_configuration_step.tsx index bf8872edb6a7b..23713b6d9433e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/initial_configuration_step.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/initial_configuration_step.tsx @@ -6,21 +6,20 @@ */ import { EuiCallOut, EuiForm, EuiSpacer } from '@elastic/eui'; -import { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; +import type { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo } from 'react'; -import { QualityWarning, SetupStatus } from '../../../../../common/log_analysis'; +import type { QualityWarning, SetupStatus } from '../../../../../common/log_analysis'; import { AnalysisSetupIndicesForm } from './analysis_setup_indices_form'; import { AnalysisSetupTimerangeForm } from './analysis_setup_timerange_form'; -import { +import type { AvailableIndex, TimeRangeValidationError, - timeRangeValidationErrorRT, ValidationIndicesError, - validationIndicesErrorRT, ValidationUIError, } from './validation'; +import { timeRangeValidationErrorRT, validationIndicesErrorRT } from './validation'; interface InitialConfigurationStepProps { setStartTime: (startTime: number | undefined) => void; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx index 67b3fa164d90c..98648b04af807 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/initial_configuration_step/validation.tsx @@ -6,8 +6,9 @@ */ import * as rt from 'io-ts'; -import { ValidationIndicesError, validationIndicesErrorRT } from '../../../../../common/http_api'; -import { DatasetFilter } from '../../../../../common/log_analysis'; +import type { ValidationIndicesError } from '../../../../../common/http_api'; +import { validationIndicesErrorRT } from '../../../../../common/http_api'; +import type { DatasetFilter } from '../../../../../common/log_analysis'; export type { ValidationIndicesError }; export { validationIndicesErrorRT }; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/manage_jobs_button.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/manage_jobs_button.tsx index 7a97542729414..8453b9abe6dfa 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/manage_jobs_button.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/manage_jobs_button.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiButton, PropsOf } from '@elastic/eui'; +import type { PropsOf } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/missing_setup_privileges_tooltip.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/missing_setup_privileges_tooltip.tsx index 4d402a7be834d..c6e381053040f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/missing_setup_privileges_tooltip.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/missing_setup_privileges_tooltip.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiToolTip, PropsOf } from '@elastic/eui'; +import type { PropsOf } from '@elastic/eui'; +import { EuiToolTip } from '@elastic/eui'; import React from 'react'; import { missingMlPrivilegesTitle, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/process_step/process_step.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/process_step/process_step.tsx index 9225ef1de78ad..82f768d251895 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/process_step/process_step.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/process_step/process_step.tsx @@ -15,12 +15,12 @@ import { EuiCallOut, EuiCode, } from '@elastic/eui'; -import { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; +import type { EuiContainedStepProps } from '@elastic/eui/src/components/steps/steps'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { SetupStatus } from '../../../../../common/log_analysis'; +import type { SetupStatus } from '../../../../../common/log_analysis'; import { CreateMLJobsButton } from './create_ml_jobs_button'; import { RecreateMLJobsButton } from './recreate_ml_jobs_button'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/module_list_card.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/module_list_card.tsx index 6e79ef2a748bb..46ab072230a9a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/module_list_card.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/module_list_card.tsx @@ -9,7 +9,7 @@ import { EuiButtonEmpty, EuiCard, EuiIcon, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useEffect, useState } from 'react'; -import { SetupStatus } from '../../../../../common/log_analysis'; +import type { SetupStatus } from '../../../../../common/log_analysis'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { CreateJobButton, RecreateJobButton } from '../create_job_button'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/setup_flyout.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/setup_flyout.tsx index f11c04ab1c262..88276808760ee 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/setup_flyout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/setup_flyout/setup_flyout.tsx @@ -15,11 +15,13 @@ import { EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { LogEntryCategoriesSetupView } from './log_entry_categories_setup_view'; import { LogEntryRateSetupView } from './log_entry_rate_setup_view'; import { LogAnalysisModuleList } from './module_list'; -import { ModuleId, moduleIds, useLogAnalysisSetupFlyoutStateContext } from './setup_flyout_state'; +import type { ModuleId } from './setup_flyout_state'; +import { moduleIds, useLogAnalysisSetupFlyoutStateContext } from './setup_flyout_state'; const FLYOUT_HEADING_ID = 'logAnalysisSetupFlyoutHeading'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/user_management_link.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/user_management_link.tsx index 6f4428ff339d3..b889f30cb49e1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/user_management_link.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_analysis_setup/user_management_link.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiButton, EuiButtonProps } from '@elastic/eui'; +import type { EuiButtonProps } from '@elastic/eui'; +import { EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_datepicker.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_datepicker.tsx index 097f2fbf755d7..214085dc6c6ce 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_datepicker.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_datepicker.tsx @@ -6,13 +6,8 @@ */ import React, { useCallback } from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiSuperDatePicker, - EuiButton, - OnTimeChangeProps, -} from '@elastic/eui'; +import type { OnTimeChangeProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiSuperDatePicker, EuiButton } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; interface LogDatepickerProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_entry_examples/log_entry_examples.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_entry_examples/log_entry_examples.tsx index c124866dad8e9..911c5c0e68458 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_entry_examples/log_entry_examples.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_entry_examples/log_entry_examples.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import styled from '@emotion/styled'; import { LogEntryExampleMessagesEmptyIndicator } from './log_entry_examples_empty_indicator'; import { LogEntryExampleMessagesFailureIndicator } from './log_entry_examples_failure_indicator'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/density_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/density_chart.tsx index d45fe0c3c42c3..bcf9b4338b1c4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/density_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/density_chart.tsx @@ -10,7 +10,7 @@ import { area, curveMonotoneY } from 'd3-shape'; import { max } from 'lodash'; import * as React from 'react'; import styled from '@emotion/styled'; -import { LogEntriesSummaryBucket } from '@kbn/logs-shared-plugin/common'; +import type { LogEntriesSummaryBucket } from '@kbn/logs-shared-plugin/common'; import { COLOR_MODES_STANDARD } from '@elastic/eui'; interface DensityChartProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx index a2c1121ff2ba0..bc9c61db300da 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/log_minimap.tsx @@ -6,7 +6,7 @@ */ import styled from '@emotion/styled'; -import { +import type { LogEntriesSummaryBucket, LogEntriesSummaryHighlightsBucket, LogEntryTime, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker.tsx index d651dc0885ad7..12ec50da28eaa 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker.tsx @@ -8,7 +8,10 @@ import { FormattedMessage } from '@kbn/i18n-react'; import styled from '@emotion/styled'; import { keyframes } from '@emotion/react'; -import { LogEntriesSummaryHighlightsBucket, LogEntryTime } from '@kbn/logs-shared-plugin/common'; +import type { + LogEntriesSummaryHighlightsBucket, + LogEntryTime, +} from '@kbn/logs-shared-plugin/common'; import * as React from 'react'; import { SearchMarkerTooltip } from './search_marker_tooltip'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker_tooltip.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker_tooltip.tsx index a451241ce1bb4..64561a528051d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker_tooltip.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_marker_tooltip.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { calculatePopoverPosition, EuiPortal, withEuiTheme, WithEuiThemeProps } from '@elastic/eui'; +import type { WithEuiThemeProps } from '@elastic/eui'; +import { calculatePopoverPosition, EuiPortal, withEuiTheme } from '@elastic/eui'; // @ts-expect-error style types not defined import { euiToolTipStyles } from '@elastic/eui/lib/components/tool_tip/tool_tip.styles'; import { css } from '@emotion/react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_markers.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_markers.tsx index d0b401d213098..3fc7da615492e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_markers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_minimap/search_markers.tsx @@ -5,7 +5,10 @@ * 2.0. */ -import { LogEntriesSummaryHighlightsBucket, LogEntryTime } from '@kbn/logs-shared-plugin/common'; +import type { + LogEntriesSummaryHighlightsBucket, + LogEntryTime, +} from '@kbn/logs-shared-plugin/common'; import classNames from 'classnames'; import { scaleTime } from 'd3-scale'; import * as React from 'react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_buttons.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_buttons.tsx index 7c66f690b9ec2..dacbbb78eb93f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_buttons.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_buttons.tsx @@ -7,7 +7,7 @@ import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { LogEntryTime } from '@kbn/logs-shared-plugin/common'; +import type { LogEntryTime } from '@kbn/logs-shared-plugin/common'; import classNames from 'classnames'; import * as React from 'react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_controls.tsx index 6533bebf74fc6..a834408037d93 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_search_controls/log_search_controls.tsx @@ -9,7 +9,7 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import classNames from 'classnames'; import * as React from 'react'; -import { LogEntryTime } from '@kbn/logs-shared-plugin/common'; +import type { LogEntryTime } from '@kbn/logs-shared-plugin/common'; import { LogSearchButtons } from './log_search_buttons'; import { LogSearchInput } from './log_search_input'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_text_scale_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_text_scale_controls.tsx index ec3de87b654af..eb00a998cf42a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logging/log_text_scale_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logging/log_text_scale_controls.tsx @@ -9,7 +9,8 @@ import { EuiFormRow, EuiRadioGroup } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import * as React from 'react'; -import { isTextScale, TextScale } from '../../../common/log_text_scale'; +import type { TextScale } from '../../../common/log_text_scale'; +import { isTextScale } from '../../../common/log_text_scale'; interface LogTextScaleControlsProps { availableTextScales: TextScale[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/logs_deprecation_callout.tsx b/x-pack/solutions/observability/plugins/infra/public/components/logs_deprecation_callout.tsx index a9b14688888c3..04dc05b81a265 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/logs_deprecation_callout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/logs_deprecation_callout.tsx @@ -12,8 +12,9 @@ import { EuiButton } from '@elastic/eui'; import { getRouterLinkProps } from '@kbn/router-utils'; import useLocalStorage from 'react-use/lib/useLocalStorage'; import { css } from '@emotion/react'; -import { LocatorPublic } from '@kbn/share-plugin/common'; -import { DISCOVER_APP_LOCATOR, DiscoverAppLocatorParams } from '@kbn/discover-plugin/common'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; +import type { DiscoverAppLocatorParams } from '@kbn/discover-plugin/common'; +import { DISCOVER_APP_LOCATOR } from '@kbn/discover-plugin/common'; import { useKibanaContextForPlugin } from '../hooks/use_kibana'; const pageConfigurations = { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/annomaly_summary.tsx b/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/annomaly_summary.tsx index 7c2f5e61363b1..c0e155f0aa880 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/annomaly_summary.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/annomaly_summary.tsx @@ -8,7 +8,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { MetricsHostsAnomaly } from '../../../../../common/http_api/infra_ml/results'; +import type { MetricsHostsAnomaly } from '../../../../../common/http_api/infra_ml/results'; import { formatOneDecimalPlace } from '../../../../../common/log_analysis'; export const AnomalySummary = ({ anomaly }: { anomaly: MetricsHostsAnomaly }) => { diff --git a/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx b/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx index 95b42ab8f0f57..78200f6084d77 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/anomalies_table/anomalies_table.tsx @@ -6,7 +6,13 @@ */ import { i18n } from '@kbn/i18n'; -import React, { ChangeEvent, useCallback, useEffect, useMemo, useState } from 'react'; +import type { ChangeEvent } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import type { + EuiTableFieldDataColumnType, + EuiTableActionsColumnType, + Criteria, +} from '@elastic/eui'; import { EuiSuperDatePicker, useEuiTheme, @@ -14,9 +20,6 @@ import { EuiFieldSearch, EuiBasicTable, EuiFlexGroup, - EuiTableFieldDataColumnType, - EuiTableActionsColumnType, - Criteria, EuiContextMenuItem, EuiComboBox, EuiButtonIcon, @@ -34,7 +37,7 @@ import { type HostsLocatorParams, HOSTS_LOCATOR_ID } from '@kbn/observability-sh import { HOST_NAME_FIELD } from '../../../../../common/constants'; import { buildCombinedAssetFilter } from '../../../../utils/filters/build'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import { FetcherOptions } from '../../../../hooks/use_fetcher'; +import type { FetcherOptions } from '../../../../hooks/use_fetcher'; import { datemathToEpochMillis } from '../../../../utils/datemath'; import { useSorting } from '../../../../hooks/use_sorting'; import { useMetricsK8sAnomaliesResults } from '../../../../pages/metrics/inventory_view/hooks/use_metrics_k8s_anomalies'; @@ -49,10 +52,8 @@ import { AnomalySummary } from './annomaly_summary'; import { AnomalySeverityIndicator } from '../../../logging/log_analysis_results/anomaly_severity_indicator'; import { useMetricsDataViewContext, useSourceContext } from '../../../../containers/metrics_source'; import { createResultsUrl } from '../flyout_home'; -import { - useWaffleViewState, - WaffleViewState, -} from '../../../../pages/metrics/inventory_view/hooks/use_waffle_view_state'; +import type { WaffleViewState } from '../../../../pages/metrics/inventory_view/hooks/use_waffle_view_state'; +import { useWaffleViewState } from '../../../../pages/metrics/inventory_view/hooks/use_waffle_view_state'; type JobType = 'k8s' | 'hosts'; type SortField = 'anomalyScore' | 'startTime'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/job_setup_screen.tsx b/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/job_setup_screen.tsx index e2ee8a127a881..b777b1b4c5ca7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/job_setup_screen.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/ml/anomaly_detection/job_setup_screen.tsx @@ -27,7 +27,8 @@ import { useEuiTheme, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import moment, { Moment } from 'moment'; +import type { Moment } from 'moment'; +import moment from 'moment'; import { i18n } from '@kbn/i18n'; import { FeatureFeedbackButton, useUiTracker } from '@kbn/observability-shared-plugin/public'; import { css } from '@emotion/react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/saved_views/manage_views_flyout.tsx b/x-pack/solutions/observability/plugins/infra/public/components/saved_views/manage_views_flyout.tsx index 67235c96a8bcc..0a82091fe4e71 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/saved_views/manage_views_flyout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/saved_views/manage_views_flyout.tsx @@ -22,9 +22,9 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { EuiBasicTableColumn } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiButtonIcon } from '@elastic/eui'; -import { SavedViewOperations, SavedViewItem } from '../../../common/saved_views'; +import type { SavedViewOperations, SavedViewItem } from '../../../common/saved_views'; export interface ManageViewsFlyoutProps { views?: SavedViewItem[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/saved_views/toolbar_control.tsx b/x-pack/solutions/observability/plugins/infra/public/components/saved_views/toolbar_control.tsx index 91a3cfb067489..74062024b7691 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/saved_views/toolbar_control.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/saved_views/toolbar_control.tsx @@ -9,9 +9,9 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiButton, EuiPopover, EuiListGroup, EuiListGroupItem } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { NonEmptyString } from '@kbn/io-ts-utils'; +import type { NonEmptyString } from '@kbn/io-ts-utils'; import { useBoolean } from '@kbn/react-hooks'; -import { +import type { SavedViewState, SavedViewOperations, SavedViewItem, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/saved_views/upsert_modal.tsx b/x-pack/solutions/observability/plugins/infra/public/components/saved_views/upsert_modal.tsx index 08476357cec01..56f4ee3c812c7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/saved_views/upsert_modal.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/saved_views/upsert_modal.tsx @@ -8,6 +8,7 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; +import type { EuiSwitchEvent } from '@elastic/eui'; import { EuiButtonEmpty, EuiButton, @@ -19,10 +20,9 @@ import { EuiFieldText, EuiSpacer, EuiSwitch, - EuiSwitchEvent, EuiText, } from '@elastic/eui'; -import { NonEmptyString } from '@kbn/io-ts-utils'; +import type { NonEmptyString } from '@kbn/io-ts-utils'; interface Props { onClose(): void; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_overview.tsx b/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_overview.tsx index e1143948f1674..66d6a976e78d3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_overview.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_overview.tsx @@ -10,10 +10,10 @@ import type { TimeRange } from '@kbn/es-query'; import { useSummaryTimeRange } from '@kbn/observability-plugin/public'; import { AlertConsumers, OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { BrushEndListener, XYBrushEvent } from '@elastic/charts'; +import type { BrushEndListener, XYBrushEvent } from '@elastic/charts'; import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { INFRA_ALERT_CONSUMERS } from '../../../../common/constants'; -import { AlertsCount } from '../../../hooks/use_alerts_count'; +import type { AlertsCount } from '../../../hooks/use_alerts_count'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { createAlertsEsQuery } from '../../../utils/filters/create_alerts_es_query'; import { ALERT_STATUS_ALL } from './constants'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_status_filter.tsx b/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_status_filter.tsx index 7c89fd0ed1c2a..3d64c6f702c6b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_status_filter.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/alerts_status_filter.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiButtonGroup, EuiButtonGroupOptionProps } from '@elastic/eui'; +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; +import { EuiButtonGroup } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import type { AlertStatus } from '@kbn/observability-plugin/common/typings'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/links/link_to_alerts_page.test.tsx b/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/links/link_to_alerts_page.test.tsx index c2fed1888c6d2..5527f03b47d9f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/links/link_to_alerts_page.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/shared/alerts/links/link_to_alerts_page.test.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import { LinkToAlertsPage, LinkToAlertsPageProps } from './link_to_alerts_page'; +import type { LinkToAlertsPageProps } from './link_to_alerts_page'; +import { LinkToAlertsPage } from './link_to_alerts_page'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { coreMock } from '@kbn/core/public/mocks'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/infra_page_template.tsx b/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/infra_page_template.tsx index 61130564a2753..faa43d22f8fd0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/infra_page_template.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/infra_page_template.tsx @@ -8,14 +8,15 @@ import { i18n } from '@kbn/i18n'; import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; import React, { useEffect } from 'react'; -import { GetHasDataResponse } from '../../../../common/metrics_sources/get_has_data'; +import type { GetHasDataResponse } from '../../../../common/metrics_sources/get_has_data'; import { NoRemoteCluster } from '../../empty_states'; import { SourceErrorPage } from '../../source_error_page'; import { useMetricsDataViewContext, useSourceContext } from '../../../containers/metrics_source'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { ErrorCallout } from '../../error_callout'; import { isPending, useFetcher } from '../../../hooks/use_fetcher'; -import { OnboardingFlow, getNoDataConfig } from './no_data_config'; +import type { OnboardingFlow } from './no_data_config'; +import { getNoDataConfig } from './no_data_config'; export const InfraPageTemplate = ({ 'data-test-subj': _dataTestSubj, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/no_data_config.ts b/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/no_data_config.ts index 28e0d00c751a8..e5e5eb70c764e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/no_data_config.ts +++ b/x-pack/solutions/observability/plugins/infra/public/components/shared/templates/no_data_config.ts @@ -8,8 +8,8 @@ import { i18n } from '@kbn/i18n'; import type { EuiCardProps } from '@elastic/eui'; import type { NoDataConfig } from '@kbn/shared-ux-page-kibana-template'; -import { NoDataPageProps } from '@kbn/shared-ux-page-no-data-types'; -import { LocatorClient } from '@kbn/share-plugin/common/url_service'; +import type { NoDataPageProps } from '@kbn/shared-ux-page-no-data-types'; +import type { LocatorClient } from '@kbn/share-plugin/common/url_service'; import { OBSERVABILITY_ONBOARDING_LOCATOR, type ObservabilityOnboardingLocatorParams, diff --git a/x-pack/solutions/observability/plugins/infra/public/components/try_it_button.tsx b/x-pack/solutions/observability/plugins/infra/public/components/try_it_button.tsx index d58deec1274cd..28d2b1ea5fbce 100644 --- a/x-pack/solutions/observability/plugins/infra/public/components/try_it_button.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/components/try_it_button.tsx @@ -8,9 +8,10 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiBetaBadge, EuiLink } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { LinkDescriptor, useLinkProps } from '@kbn/observability-shared-plugin/public'; +import type { LinkDescriptor } from '@kbn/observability-shared-plugin/public'; +import { useLinkProps } from '@kbn/observability-shared-plugin/public'; import { css } from '@emotion/react'; -import { EuiLinkColor } from '@elastic/eui'; +import type { EuiLinkColor } from '@elastic/eui'; import { BetaBadge } from './beta_badge'; type OnClickEvent = React.MouseEvent | React.MouseEvent; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/header_action_menu_provider.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/header_action_menu_provider.tsx index b5177bf3f5aba..e19705f94dcdd 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/header_action_menu_provider.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/header_action_menu_provider.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import React, { PropsWithChildren } from 'react'; -import { AppMountParameters } from '@kbn/core/public'; +import type { PropsWithChildren } from 'react'; +import React from 'react'; +import type { AppMountParameters } from '@kbn/core/public'; interface ContextProps { setHeaderActionMenu?: AppMountParameters['setHeaderActionMenu']; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/kbn_url_state_context.ts b/x-pack/solutions/observability/plugins/infra/public/containers/kbn_url_state_context.ts index 7a751e30f4082..4f7bce78f93b4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/kbn_url_state_context.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/kbn_url_state_context.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { IToasts } from '@kbn/core-notifications-browser'; +import type { IToasts } from '@kbn/core-notifications-browser'; import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; import createContainer from 'constate'; -import { History } from 'history'; +import type { History } from 'history'; import { useState } from 'react'; const useKbnUrlStateStorageFromRouter = ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts index 13c959841b2d7..a17137c417d66 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/get_latest_categories_datasets_stats.ts @@ -5,13 +5,15 @@ * 2.0. */ -import { HttpHandler } from '@kbn/core/public'; +import type { HttpHandler } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { +import type { CategorizerStatus, + LogEntryCategoriesDatasetStats, +} from '../../../../../common/http_api'; +import { getLatestLogEntryCategoryDatasetsStatsRequestPayloadRT, getLatestLogEntryCategoryDatasetsStatsSuccessResponsePayloadRT, - LogEntryCategoriesDatasetStats, LOG_ANALYSIS_GET_LATEST_LOG_ENTRY_CATEGORY_DATASETS_STATS_PATH, } from '../../../../../common/http_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_cleanup.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_cleanup.ts index 72cddce4ed632..1ee2f212bce13 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_cleanup.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_cleanup.ts @@ -9,7 +9,7 @@ import * as rt from 'io-ts'; import type { HttpHandler } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat, JobType } from '../../../../../common/http_api/latest'; +import type { IdFormat, JobType } from '../../../../../common/http_api/latest'; import { getDatafeedId, getJobId } from '../../../../../common/log_analysis'; interface DeleteJobsRequestArgs { diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_get_jobs_summary_api.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_get_jobs_summary_api.ts index e1de17cb95a02..182b0b2d9caaf 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_get_jobs_summary_api.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/ml_get_jobs_summary_api.ts @@ -9,7 +9,7 @@ import * as rt from 'io-ts'; import type { HttpHandler } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat, JobType } from '../../../../../common/http_api/latest'; +import type { IdFormat, JobType } from '../../../../../common/http_api/latest'; import { getJobId, jobCustomSettingsRT } from '../../../../../common/log_analysis'; interface RequestArgs { diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/validate_indices.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/validate_indices.ts index e1686df4899eb..d7797e1d11a8f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/validate_indices.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/api/validate_indices.ts @@ -9,9 +9,9 @@ import type { HttpHandler } from '@kbn/core/public'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { decodeOrThrow } from '@kbn/io-ts-utils'; +import type { ValidationIndicesFieldSpecification } from '../../../../../common/http_api'; import { LOG_ANALYSIS_VALIDATE_INDICES_PATH, - ValidationIndicesFieldSpecification, validationIndicesRequestPayloadRT, validationIndicesResponsePayloadRT, } from '../../../../../common/http_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_capabilities.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_capabilities.tsx index 9dbcee8f7c4f0..e2982a260bc9c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_capabilities.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_capabilities.tsx @@ -9,10 +9,8 @@ import createContainer from 'constate'; import { useMemo, useState, useEffect } from 'react'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; -import { - getMlCapabilitiesResponsePayloadRT, - GetMlCapabilitiesResponsePayload, -} from './api/ml_api_types'; +import type { GetMlCapabilitiesResponsePayload } from './api/ml_api_types'; +import { getMlCapabilitiesResponsePayloadRT } from './api/ml_api_types'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; export const useLogAnalysisCapabilities = () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_cleanup.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_cleanup.tsx index b70ca688f53d6..aad8660f19260 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_cleanup.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_cleanup.tsx @@ -6,7 +6,7 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { IdFormat, JobType } from '../../../../common/http_api/latest'; +import type { IdFormat, JobType } from '../../../../common/http_api/latest'; import { getJobId } from '../../../../common/log_analysis'; import { callDeleteJobs, callGetJobDeletionTasks, callStopDatafeeds } from './api/ml_cleanup'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module.tsx index 5bc78bb1b1bf5..6b3237e3edd10 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module.tsx @@ -8,12 +8,12 @@ import { useCallback, useMemo } from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import { useLogMlJobIdFormatsShimContext } from '../../../pages/logs/shared/use_log_ml_job_id_formats_shim'; -import { IdFormat, JobType } from '../../../../common/http_api/latest'; -import { DatasetFilter } from '../../../../common/log_analysis'; +import type { IdFormat, JobType } from '../../../../common/http_api/latest'; +import type { DatasetFilter } from '../../../../common/log_analysis'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; import { useModuleStatus } from './log_analysis_module_status'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; export const useLogAnalysisModule = ({ sourceConfiguration, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_configuration.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_configuration.ts index 5cf26d75e9f00..795c7ad6900a7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_configuration.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_configuration.ts @@ -7,9 +7,9 @@ import { useMemo } from 'react'; import equal from 'fast-deep-equal'; -import { JobType } from '../../../../common/http_api/latest'; -import { JobSummary } from './api/ml_get_jobs_summary_api'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; +import type { JobType } from '../../../../common/http_api/latest'; +import type { JobSummary } from './api/ml_get_jobs_summary_api'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; export const useLogAnalysisModuleConfiguration = ({ moduleDescriptor, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_definition.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_definition.tsx index faff4a9d3d3c2..d787ede7b8f26 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_definition.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_definition.tsx @@ -6,13 +6,13 @@ */ import { useCallback, useMemo, useState } from 'react'; -import { IdFormat, JobType } from '../../../../common/http_api/latest'; +import type { IdFormat, JobType } from '../../../../common/http_api/latest'; import { getJobId } from '../../../../common/log_analysis'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; -import { JobSummary } from './api/ml_get_jobs_summary_api'; -import { GetMlModuleResponsePayload, JobDefinition } from './api/ml_get_module'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; +import type { JobSummary } from './api/ml_get_jobs_summary_api'; +import type { GetMlModuleResponsePayload, JobDefinition } from './api/ml_get_module'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; export const useLogAnalysisModuleDefinition = ({ sourceConfiguration: { spaceId, sourceId }, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_status.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_status.tsx index b6ce4085286e6..a0dbe3a3fae7f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_status.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_status.tsx @@ -7,17 +7,12 @@ import { useReducer } from 'react'; -import { IdFormat, JobType } from '../../../../common/http_api/latest'; -import { - JobStatus, - getDatafeedId, - getJobId, - isJobStatusWithResults, - SetupStatus, -} from '../../../../common/log_analysis'; -import { FetchJobStatusResponsePayload, JobSummary } from './api/ml_get_jobs_summary_api'; -import { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; -import { MandatoryProperty } from '../../../../common/utility_types'; +import type { IdFormat, JobType } from '../../../../common/http_api/latest'; +import type { JobStatus, SetupStatus } from '../../../../common/log_analysis'; +import { getDatafeedId, getJobId, isJobStatusWithResults } from '../../../../common/log_analysis'; +import type { FetchJobStatusResponsePayload, JobSummary } from './api/ml_get_jobs_summary_api'; +import type { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; +import type { MandatoryProperty } from '../../../../common/utility_types'; interface StatusReducerState { jobStatus: Record; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts index 2e0a6b742ce11..506e16f418fcf 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_module_types.ts @@ -7,16 +7,16 @@ import type { HttpHandler } from '@kbn/core/public'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { IdFormat, JobType } from '../../../../common/http_api/latest'; -import { +import type { IdFormat, JobType } from '../../../../common/http_api/latest'; +import type { ValidateLogEntryDatasetsResponsePayload, ValidationIndicesResponsePayload, } from '../../../../common/http_api'; -import { DatasetFilter } from '../../../../common/log_analysis'; -import { DeleteJobsResponsePayload } from './api/ml_cleanup'; -import { FetchJobStatusResponsePayload } from './api/ml_get_jobs_summary_api'; -import { GetMlModuleResponsePayload } from './api/ml_get_module'; -import { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; +import type { DatasetFilter } from '../../../../common/log_analysis'; +import type { DeleteJobsResponsePayload } from './api/ml_cleanup'; +import type { FetchJobStatusResponsePayload } from './api/ml_get_jobs_summary_api'; +import type { GetMlModuleResponsePayload } from './api/ml_get_module'; +import type { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; export type { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_setup_state.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_setup_state.ts index fa611194b092f..97728cc9eaf5a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_setup_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/log_analysis_setup_state.ts @@ -8,21 +8,21 @@ import { isEqual } from 'lodash'; import { useCallback, useEffect, useMemo, useState } from 'react'; import usePrevious from 'react-use/lib/usePrevious'; -import { JobType } from '../../../../common/http_api/latest'; +import type { JobType } from '../../../../common/http_api/latest'; +import type { DatasetFilter } from '../../../../common/log_analysis'; import { combineDatasetFilters, - DatasetFilter, filterDatasetFilter, isExampleDataIndex, } from '../../../../common/log_analysis'; -import { +import type { AvailableIndex, ValidationIndicesError, ValidationUIError, } from '../../../components/logging/log_analysis_setup/initial_configuration_step'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './log_analysis_module_types'; type SetupHandler = ( indices: string[], diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/module_descriptor.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/module_descriptor.ts index fbcc4d166d4b4..09dc53d65e487 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/module_descriptor.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/module_descriptor.ts @@ -8,14 +8,16 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { i18n } from '@kbn/i18n'; import type { HttpHandler } from '@kbn/core/public'; -import { IdFormat } from '../../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../../common/http_api/latest'; +import type { + DatasetFilter, + LogEntryCategoriesJobType, +} from '../../../../../../common/log_analysis'; import { bucketSpan, categoriesMessageField, - DatasetFilter, getJobId, logEntryCategoriesJobType, - LogEntryCategoriesJobType, logEntryCategoriesJobTypes, partitionField, } from '../../../../../../common/log_analysis'; @@ -25,7 +27,7 @@ import { callSetupMlModuleAPI } from '../../api/ml_setup_module_api'; import { callValidateDatasetsAPI } from '../../api/validate_datasets'; import { callValidateIndicesAPI } from '../../api/validate_indices'; import { cleanUpJobsAndDatafeeds } from '../../log_analysis_cleanup'; -import { ModuleDescriptor, ModuleSourceConfiguration } from '../../log_analysis_module_types'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from '../../log_analysis_module_types'; const moduleId = 'logs_ui_categories'; const moduleName = i18n.translate('xpack.infra.logs.analysis.logEntryCategoriesModuleName', { diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_module.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_module.tsx index 98d6213ad4357..901bda6b068d4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_module.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_module.tsx @@ -8,11 +8,11 @@ import createContainer from 'constate'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { useMemo } from 'react'; -import { IdFormat } from '../../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../../common/http_api/latest'; import { useLogAnalysisModule } from '../../log_analysis_module'; import { useLogAnalysisModuleConfiguration } from '../../log_analysis_module_configuration'; import { useLogAnalysisModuleDefinition } from '../../log_analysis_module_definition'; -import { ModuleSourceConfiguration } from '../../log_analysis_module_types'; +import type { ModuleSourceConfiguration } from '../../log_analysis_module_types'; import { logEntryCategoriesModule } from './module_descriptor'; import { useLogEntryCategoriesQuality } from './use_log_entry_categories_quality'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_quality.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_quality.ts index e2f2a958dd961..9dc0c0cd2b96d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_quality.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_categories/use_log_entry_categories_quality.ts @@ -7,17 +7,15 @@ import { useMemo, useState } from 'react'; import useDeepCompareEffect from 'react-use/lib/useDeepCompareEffect'; -import { +import type { CategoryQualityWarningReason, QualityWarning, } from '../../../../../../common/log_analysis'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; import { useTrackedPromise } from '../../../../../hooks/use_tracked_promise'; -import { - callGetLatestCategoriesDatasetsStatsAPI, - LogEntryCategoriesDatasetStats, -} from '../../api/get_latest_categories_datasets_stats'; -import { JobModelSizeStats, JobSummary } from '../../log_analysis_module_types'; +import type { LogEntryCategoriesDatasetStats } from '../../api/get_latest_categories_datasets_stats'; +import { callGetLatestCategoriesDatasetsStatsAPI } from '../../api/get_latest_categories_datasets_stats'; +import type { JobModelSizeStats, JobSummary } from '../../log_analysis_module_types'; export const useLogEntryCategoriesQuality = ({ jobSummaries }: { jobSummaries: JobSummary[] }) => { const { diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/module_descriptor.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/module_descriptor.ts index a0dc8e68bf9a7..84710dfa292b1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/module_descriptor.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/module_descriptor.ts @@ -8,17 +8,16 @@ import { i18n } from '@kbn/i18n'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { HttpHandler } from '@kbn/core/public'; -import { IdFormat } from '../../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../../common/http_api/latest'; +import type { DatasetFilter, LogEntryRateJobType } from '../../../../../../common/log_analysis'; import { bucketSpan, - DatasetFilter, getJobId, logEntryRateJobType, - LogEntryRateJobType, logEntryRateJobTypes, partitionField, } from '../../../../../../common/log_analysis'; -import { ModuleDescriptor, ModuleSourceConfiguration } from '../../log_analysis_module_types'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from '../../log_analysis_module_types'; import { cleanUpJobsAndDatafeeds } from '../../log_analysis_cleanup'; import { callJobsSummaryAPI } from '../../api/ml_get_jobs_summary_api'; import { callGetMlModuleAPI } from '../../api/ml_get_module'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/use_log_entry_rate_module.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/use_log_entry_rate_module.tsx index fa3d13294a634..a867491eeadad 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/use_log_entry_rate_module.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/log_analysis/modules/log_entry_rate/use_log_entry_rate_module.tsx @@ -8,8 +8,8 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import createContainer from 'constate'; import { useMemo } from 'react'; -import { IdFormat } from '../../../../../../common/http_api/latest'; -import { ModuleSourceConfiguration } from '../../log_analysis_module_types'; +import type { IdFormat } from '../../../../../../common/http_api/latest'; +import type { ModuleSourceConfiguration } from '../../log_analysis_module_types'; import { useLogAnalysisModule } from '../../log_analysis_module'; import { useLogAnalysisModuleConfiguration } from '../../log_analysis_module_configuration'; import { useLogAnalysisModuleDefinition } from '../../log_analysis_module_definition'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/view_log_in_context/view_log_in_context.ts b/x-pack/solutions/observability/plugins/infra/public/containers/logs/view_log_in_context/view_log_in_context.ts index 8327a14c28256..ecb84f3535711 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/view_log_in_context/view_log_in_context.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/view_log_in_context/view_log_in_context.ts @@ -7,7 +7,7 @@ import { useState } from 'react'; import createContainer from 'constate'; -import { LogEntry, LogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { LogEntry, LogViewReference } from '@kbn/logs-shared-plugin/common'; interface ViewLogInContextProps { logViewReference: LogViewReference; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/logs/with_log_textview.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/logs/with_log_textview.tsx index f57368709467d..7a394cd94fc13 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/logs/with_log_textview.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/logs/with_log_textview.tsx @@ -8,11 +8,8 @@ import React, { useMemo } from 'react'; import { UrlStateContainer } from '../../utils/url_state'; -import { - availableTextScales, - useLogViewConfigurationContext, - TextScale, -} from './log_view_configuration'; +import type { TextScale } from './log_view_configuration'; +import { availableTextScales, useLogViewConfigurationContext } from './log_view_configuration'; interface LogTextviewUrlState { textScale?: TextScale; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/metrics_source/source.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/metrics_source/source.tsx index 5e9a83f38ab01..4dfec43056b1d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/metrics_source/source.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/metrics_source/source.tsx @@ -8,7 +8,7 @@ import createContainer from 'constate'; import React, { useEffect, useState } from 'react'; -import { IHttpFetchError } from '@kbn/core-http-browser'; +import type { IHttpFetchError } from '@kbn/core-http-browser'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; import type { MetricsSourceConfigurationResponse, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_capabilities.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_capabilities.tsx index be8dd903fb550..3c15b0248b10a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_capabilities.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_capabilities.tsx @@ -12,10 +12,8 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { identity } from 'fp-ts/lib/function'; import { throwErrors, createPlainError } from '@kbn/io-ts-utils'; import { useTrackedPromise } from '../../hooks/use_tracked_promise'; -import { - getMlCapabilitiesResponsePayloadRT, - GetMlCapabilitiesResponsePayload, -} from './api/ml_api_types'; +import type { GetMlCapabilitiesResponsePayload } from './api/ml_api_types'; +import { getMlCapabilitiesResponsePayloadRT } from './api/ml_api_types'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; export const useInfraMLCapabilities = () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_cleanup.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_cleanup.tsx index a5c89e93b0f63..449d9bc2c4886 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_cleanup.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_cleanup.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpHandler } from '@kbn/core/public'; +import type { HttpHandler } from '@kbn/core/public'; import { getJobId } from '../../../common/infra_ml'; import { callDeleteJobs, callGetJobDeletionTasks, callStopDatafeeds } from './api/ml_cleanup'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module.tsx index 3d0534935e019..f11762264b556 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module.tsx @@ -9,7 +9,7 @@ import { useCallback, useMemo } from 'react'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; import { useTrackedPromise } from '../../hooks/use_tracked_promise'; import { useModuleStatus } from './infra_ml_module_status'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './infra_ml_module_types'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './infra_ml_module_types'; export const useInfraMLModule = ({ sourceConfiguration, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_configuration.ts b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_configuration.ts index c258debdddbca..4d78c915ea375 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_configuration.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_configuration.ts @@ -6,8 +6,8 @@ */ import { useMemo } from 'react'; -import { JobSummary } from './api/ml_get_jobs_summary_api'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './infra_ml_module_types'; +import type { JobSummary } from './api/ml_get_jobs_summary_api'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './infra_ml_module_types'; export const useInfraMLModuleConfiguration = ({ moduleDescriptor, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_definition.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_definition.tsx index 47dd4430c739d..b7243ed52f872 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_definition.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_definition.tsx @@ -9,9 +9,9 @@ import { useCallback, useMemo, useState } from 'react'; import { getJobId } from '../../../common/infra_ml'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; import { useTrackedPromise } from '../../hooks/use_tracked_promise'; -import { JobSummary } from './api/ml_get_jobs_summary_api'; -import { GetMlModuleResponsePayload, JobDefinition } from './api/ml_get_module'; -import { ModuleDescriptor, ModuleSourceConfiguration } from './infra_ml_module_types'; +import type { JobSummary } from './api/ml_get_jobs_summary_api'; +import type { GetMlModuleResponsePayload, JobDefinition } from './api/ml_get_module'; +import type { ModuleDescriptor, ModuleSourceConfiguration } from './infra_ml_module_types'; export const useInfraMLModuleDefinition = ({ sourceConfiguration: { spaceId, sourceId }, diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_status.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_status.tsx index 26b8a51da6d2b..9bad341dfbff6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_status.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_status.tsx @@ -7,16 +7,11 @@ import { useReducer } from 'react'; -import { - JobStatus, - getDatafeedId, - getJobId, - isJobStatusWithResults, - SetupStatus, -} from '../../../common/infra_ml'; -import { FetchJobStatusResponsePayload, JobSummary } from './api/ml_get_jobs_summary_api'; -import { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; -import { MandatoryProperty } from '../../../common/utility_types'; +import type { JobStatus, SetupStatus } from '../../../common/infra_ml'; +import { getDatafeedId, getJobId, isJobStatusWithResults } from '../../../common/infra_ml'; +import type { FetchJobStatusResponsePayload, JobSummary } from './api/ml_get_jobs_summary_api'; +import type { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; +import type { MandatoryProperty } from '../../../common/utility_types'; interface StatusReducerState { jobStatus: Record; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_types.ts b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_types.ts index 9f939a3f15ac9..0a47d6d60a56e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/infra_ml_module_types.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { HttpHandler } from '@kbn/core/public'; -import { +import type { HttpHandler } from '@kbn/core/public'; +import type { ValidateLogEntryDatasetsResponsePayload, ValidationIndicesResponsePayload, } from '../../../common/http_api'; -import { DeleteJobsResponsePayload } from './api/ml_cleanup'; -import { FetchJobStatusResponsePayload } from './api/ml_get_jobs_summary_api'; -import { GetMlModuleResponsePayload } from './api/ml_get_module'; -import { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; +import type { DeleteJobsResponsePayload } from './api/ml_cleanup'; +import type { FetchJobStatusResponsePayload } from './api/ml_get_jobs_summary_api'; +import type { GetMlModuleResponsePayload } from './api/ml_get_module'; +import type { SetupMlModuleResponsePayload } from './api/ml_setup_module_api'; export type { JobModelSizeStats, JobSummary } from './api/ml_get_jobs_summary_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module.tsx index f200ab22c043f..c49bb0be05e1b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module.tsx @@ -10,7 +10,7 @@ import { useMemo } from 'react'; import { useInfraMLModule } from '../../infra_ml_module'; import { useInfraMLModuleConfiguration } from '../../infra_ml_module_configuration'; import { useInfraMLModuleDefinition } from '../../infra_ml_module_definition'; -import { ModuleSourceConfiguration } from '../../infra_ml_module_types'; +import type { ModuleSourceConfiguration } from '../../infra_ml_module_types'; import { metricHostsModule } from './module_descriptor'; export const useMetricHostsModule = ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts index 1b7899e517999..51e137d296111 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_hosts/module_descriptor.ts @@ -6,24 +6,20 @@ */ import { i18n } from '@kbn/i18n'; -import { HttpHandler } from '@kbn/core/public'; +import type { HttpHandler } from '@kbn/core/public'; import MemoryJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/hosts_memory_usage.json'; import MemoryDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/datafeed_hosts_memory_usage.json'; import NetworkInJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/hosts_network_in.json'; import NetworkInDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/datafeed_hosts_network_in.json'; import NetworkOutJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/hosts_network_out.json'; import NetworkOutDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_hosts/ml/datafeed_hosts_network_out.json'; -import { ModuleDescriptor, SetUpModuleArgs } from '../../infra_ml_module_types'; +import type { ModuleDescriptor, SetUpModuleArgs } from '../../infra_ml_module_types'; import { cleanUpJobsAndDatafeeds } from '../../infra_ml_cleanup'; import { callJobsSummaryAPI } from '../../api/ml_get_jobs_summary_api'; import { callGetMlModuleAPI } from '../../api/ml_get_module'; import { callSetupMlModuleAPI } from '../../api/ml_setup_module_api'; -import { - metricsHostsJobTypes, - getJobId, - MetricsHostsJobType, - bucketSpan, -} from '../../../../../common/infra_ml'; +import type { MetricsHostsJobType } from '../../../../../common/infra_ml'; +import { metricsHostsJobTypes, getJobId, bucketSpan } from '../../../../../common/infra_ml'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; type JobType = 'hosts_memory_usage' | 'hosts_network_in' | 'hosts_network_out'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module.tsx index 08f4f49058dbe..6c2964b57e409 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module.tsx @@ -10,7 +10,7 @@ import { useMemo } from 'react'; import { useInfraMLModule } from '../../infra_ml_module'; import { useInfraMLModuleConfiguration } from '../../infra_ml_module_configuration'; import { useInfraMLModuleDefinition } from '../../infra_ml_module_definition'; -import { ModuleSourceConfiguration } from '../../infra_ml_module_types'; +import type { ModuleSourceConfiguration } from '../../infra_ml_module_types'; import { metricHostsModule } from './module_descriptor'; export const useMetricK8sModule = ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts index 88fe64e91f3ed..739ef1fd72913 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/ml/modules/metrics_k8s/module_descriptor.ts @@ -6,24 +6,20 @@ */ import { i18n } from '@kbn/i18n'; -import { HttpHandler } from '@kbn/core/public'; +import type { HttpHandler } from '@kbn/core/public'; import MemoryJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/k8s_memory_usage.json'; import MemoryDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/datafeed_k8s_memory_usage.json'; import NetworkInJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/k8s_network_in.json'; import NetworkInDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/datafeed_k8s_network_in.json'; import NetworkOutJob from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/k8s_network_out.json'; import NetworkOutDatafeed from '@kbn/ml-plugin/server/models/data_recognizer/modules/metrics_ui_k8s/ml/datafeed_k8s_network_out.json'; -import { ModuleDescriptor, SetUpModuleArgs } from '../../infra_ml_module_types'; +import type { ModuleDescriptor, SetUpModuleArgs } from '../../infra_ml_module_types'; import { cleanUpJobsAndDatafeeds } from '../../infra_ml_cleanup'; import { callJobsSummaryAPI } from '../../api/ml_get_jobs_summary_api'; import { callGetMlModuleAPI } from '../../api/ml_get_module'; import { callSetupMlModuleAPI } from '../../api/ml_setup_module_api'; -import { - metricsK8SJobTypes, - getJobId, - MetricK8sJobType, - bucketSpan, -} from '../../../../../common/infra_ml'; +import type { MetricK8sJobType } from '../../../../../common/infra_ml'; +import { metricsK8SJobTypes, getJobId, bucketSpan } from '../../../../../common/infra_ml'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; type JobType = 'k8s_memory_usage' | 'k8s_network_in' | 'k8s_network_out'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/plugin_config_context.ts b/x-pack/solutions/observability/plugins/infra/public/containers/plugin_config_context.ts index a9b91c3f1aaa3..7313805509329 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/plugin_config_context.ts +++ b/x-pack/solutions/observability/plugins/infra/public/containers/plugin_config_context.ts @@ -6,7 +6,7 @@ */ import { createContext, useContext } from 'react'; -import { InfraPublicConfig } from '../../common/plugin_config_types'; +import type { InfraPublicConfig } from '../../common/plugin_config_types'; const PluginConfigContext = createContext(undefined); diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/react_query_provider.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/react_query_provider.tsx index cc47833ae3217..3a425aead3517 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/react_query_provider.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/react_query_provider.tsx @@ -7,7 +7,8 @@ import React, { useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { QueryClient, QueryClientConfig, QueryClientProvider } from '@tanstack/react-query'; +import type { QueryClientConfig } from '@tanstack/react-query'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import merge from 'lodash/merge'; import { EuiButtonIcon } from '@elastic/eui'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/triggers_actions_context.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/triggers_actions_context.tsx index 4851d5ddb1aa0..dd881f7441dd0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/triggers_actions_context.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/triggers_actions_context.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; -import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; +import type { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; interface ContextProps { triggersActionsUI: TriggersAndActionsUIPublicPluginStart | null; diff --git a/x-pack/solutions/observability/plugins/infra/public/containers/with_kuery_autocompletion.tsx b/x-pack/solutions/observability/plugins/infra/public/containers/with_kuery_autocompletion.tsx index 26711bd7649b2..cbac00b379f84 100644 --- a/x-pack/solutions/observability/plugins/infra/public/containers/with_kuery_autocompletion.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/containers/with_kuery_autocompletion.tsx @@ -6,14 +6,11 @@ */ import React from 'react'; -import { - withKibana, - KibanaReactContextValue, - KibanaServices, -} from '@kbn/kibana-react-plugin/public'; +import type { KibanaReactContextValue, KibanaServices } from '@kbn/kibana-react-plugin/public'; +import { withKibana } from '@kbn/kibana-react-plugin/public'; import type { DataView } from '@kbn/data-views-plugin/public'; -import { QuerySuggestion } from '@kbn/unified-search-plugin/public'; -import { InfraClientStartDeps } from '../types'; +import type { QuerySuggestion } from '@kbn/unified-search-plugin/public'; +import type { InfraClientStartDeps } from '../types'; interface WithKueryAutocompletionLifecycleProps { kibana: KibanaReactContextValue; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.test.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.test.ts index e6f0e63c2c29b..028f18ec5559c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.test.ts @@ -9,10 +9,11 @@ import { waitFor, renderHook } from '@testing-library/react'; import { ALERT_STATUS } from '@kbn/rule-data-utils'; import { useAlertsCount } from './use_alerts_count'; -import { KibanaReactContextValue, useKibana } from '@kbn/kibana-react-plugin/public'; -import { InfraClientStartDeps } from '../types'; +import type { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import type { InfraClientStartDeps } from '../types'; import { coreMock } from '@kbn/core/public/mocks'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; const mockedAlertsCountResponse = { aggregations: { diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.ts index aab542d597f92..5330d0a58755d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_alerts_count.ts @@ -9,12 +9,12 @@ import { useEffect, useRef } from 'react'; import useAsyncFn from 'react-use/lib/useAsyncFn'; import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common/constants'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import type { HttpSetup } from '@kbn/core/public'; import { ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED } from '@kbn/rule-data-utils'; -import { InfraClientCoreStart } from '../types'; +import type { InfraClientCoreStart } from '../types'; interface UseAlertsCountProps { ruleTypeIds: string[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_document_title.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_document_title.tsx index 82fb5a669eb91..809052ac6fbb4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_document_title.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_document_title.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { useEffect } from 'react'; import { observabilityTitle } from '../translations'; import { useKibanaContextForPlugin } from './use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_fetcher.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_fetcher.tsx index c0a96986098a0..de061680d6235 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_fetcher.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_fetcher.tsx @@ -6,10 +6,11 @@ */ import { i18n } from '@kbn/i18n'; -import React, { DependencyList, useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { HttpFetchOptions, HttpSetup } from '@kbn/core-http-browser'; -import { BehaviorSubject } from 'rxjs'; -import { InfraHttpError } from '../types'; +import type { DependencyList } from 'react'; +import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import type { HttpFetchOptions, HttpSetup } from '@kbn/core-http-browser'; +import type { BehaviorSubject } from 'rxjs'; +import type { InfraHttpError } from '../types'; import { useKibanaContextForPlugin } from './use_kibana'; import { useSearchSessionContext } from './use_search_session'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_inventory_views.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_inventory_views.ts index d334baa0e5fdf..3a53e5ef20b57 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_inventory_views.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_inventory_views.ts @@ -10,14 +10,14 @@ import { fold } from 'fp-ts/lib/Either'; import { constant, identity } from 'fp-ts/lib/function'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { useUiTracker, useUrlState } from '@kbn/observability-shared-plugin/public'; -import { +import type { MutationContext, SavedViewResult, ServerError, UpdateViewParams, } from '../../common/saved_views'; -import { MetricsSourceConfigurationResponse } from '../../common/metrics_sources'; -import { +import type { MetricsSourceConfigurationResponse } from '../../common/metrics_sources'; +import type { CreateInventoryViewAttributesRequestPayload, UpdateInventoryViewAttributesRequestPayload, } from '../../common/http_api/latest'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_is_dark_mode.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_is_dark_mode.ts index 93260405cce59..18fde942f69e3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_is_dark_mode.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_is_dark_mode.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreTheme } from '@kbn/core/public'; +import type { CoreTheme } from '@kbn/core/public'; import useObservable from 'react-use/lib/useObservable'; import { of } from 'rxjs'; import { useKibanaContextForPlugin } from './use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana.tsx index 5dde349e4de5b..33e1b16c76910 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana.tsx @@ -6,21 +6,12 @@ */ import type { PropsOf } from '@elastic/eui'; -import React, { - useMemo, - createElement, - createContext, - useContext, - FC, - PropsWithChildren, -} from 'react'; -import { CoreStart } from '@kbn/core/public'; -import { - createKibanaReactContext, - KibanaReactContextValue, - useKibana, -} from '@kbn/kibana-react-plugin/public'; -import { InfraClientCoreSetup, InfraClientStartDeps, InfraClientStartExports } from '../types'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useMemo, createElement, createContext, useContext } from 'react'; +import type { CoreStart } from '@kbn/core/public'; +import type { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; +import { createKibanaReactContext, useKibana } from '@kbn/kibana-react-plugin/public'; +import type { InfraClientCoreSetup, InfraClientStartDeps, InfraClientStartExports } from '../types'; export type PluginKibanaContextValue = CoreStart & InfraClientStartDeps & InfraClientStartExports; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_index_patterns.mock.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_index_patterns.mock.tsx index 5eb3cb0e13886..cbbeeac06d052 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_index_patterns.mock.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_index_patterns.mock.tsx @@ -5,15 +5,16 @@ * 2.0. */ -import React, { useMemo, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useMemo } from 'react'; import { firstValueFrom, from, of } from 'rxjs'; import { delay } from 'rxjs'; -import { CoreStart } from '@kbn/core/public'; -import { FieldSpec } from '@kbn/data-views-plugin/common'; -import { DataView, DataViewsContract } from '@kbn/data-views-plugin/public'; +import type { CoreStart } from '@kbn/core/public'; +import type { FieldSpec } from '@kbn/data-views-plugin/common'; +import type { DataView, DataViewsContract } from '@kbn/data-views-plugin/public'; import { DataViewField } from '@kbn/data-views-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import { Pick2 } from '../../common/utility_types'; +import type { Pick2 } from '../../common/utility_types'; type MockIndexPattern = Pick< DataView, diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_timefilter_time.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_timefilter_time.tsx index 5e1b73b018881..bd27225e4eac1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_timefilter_time.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_kibana_timefilter_time.tsx @@ -10,7 +10,7 @@ import { useCallback, useEffect } from 'react'; import useUpdateEffect from 'react-use/lib/useUpdateEffect'; import useMount from 'react-use/lib/useMount'; import type { TimeRange } from '@kbn/es-query'; -import { TimefilterContract } from '@kbn/data-plugin/public'; +import type { TimefilterContract } from '@kbn/data-plugin/public'; import { useKibanaContextForPlugin } from './use_kibana'; export const useKibanaTimefilterTime = ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_lazy_ref.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_lazy_ref.ts index 371029e82cfcf..347d19812ea92 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_lazy_ref.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_lazy_ref.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { useRef, MutableRefObject } from 'react'; +import type { MutableRefObject } from 'react'; +import { useRef } from 'react'; export const useLazyRef = (initializer: () => Type) => { const ref = useRef(null); diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.test.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.test.ts index 5e5f00fd66139..6eb42a98d5a8b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.test.ts @@ -10,7 +10,7 @@ import { waitFor, renderHook } from '@testing-library/react'; import { useLensAttributes } from './use_lens_attributes'; import { coreMock } from '@kbn/core/public/mocks'; import { type KibanaReactContextValue, useKibana } from '@kbn/kibana-react-plugin/public'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import type { InfraClientStartDeps } from '../types'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { lensPluginMock } from '@kbn/lens-plugin/public/mocks'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.ts index b1248a1f05e1e..dc386b205e706 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_lens_attributes.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; +import type { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import type { Action, ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; import { i18n } from '@kbn/i18n'; import useAsync from 'react-use/lib/useAsync'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_log_view_reference.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_log_view_reference.ts index da68b88115584..db7874e57fb83 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_log_view_reference.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_log_view_reference.ts @@ -7,7 +7,8 @@ import useAsync from 'react-use/lib/useAsync'; import { v4 as uuidv4 } from 'uuid'; -import { DEFAULT_LOG_VIEW, LogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { LogViewReference } from '@kbn/logs-shared-plugin/common'; +import { DEFAULT_LOG_VIEW } from '@kbn/logs-shared-plugin/common'; import { useCallback } from 'react'; import { useLazyRef } from './use_lazy_ref'; import { useKibanaContextForPlugin } from './use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_logs_breadcrumbs.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_logs_breadcrumbs.tsx index 2eba7845b8d24..ad4632ad8ecde 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_logs_breadcrumbs.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_logs_breadcrumbs.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { useBreadcrumbs, useLinkProps } from '@kbn/observability-shared-plugin/public'; import { LOGS_APP } from '../../common/constants'; import { logsTitle } from '../translations'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_breadcrumbs.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_breadcrumbs.tsx index d5a6011a68e8e..92c580d58179e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_breadcrumbs.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_breadcrumbs.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { useBreadcrumbs, useLinkProps } from '@kbn/observability-shared-plugin/public'; import { METRICS_APP } from '../../common/constants'; import { metricsTitle } from '../translations'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_explorer_views.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_explorer_views.ts index ddf27da96e1a7..9ae2cebcabbca 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_explorer_views.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_metrics_explorer_views.ts @@ -11,18 +11,18 @@ import { constant, identity } from 'fp-ts/lib/function'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { useUiTracker, useUrlState } from '@kbn/observability-shared-plugin/public'; -import { +import type { MutationContext, SavedViewResult, ServerError, UpdateViewParams, } from '../../common/saved_views'; -import { MetricsSourceConfigurationResponse } from '../../common/metrics_sources'; -import { +import type { MetricsSourceConfigurationResponse } from '../../common/metrics_sources'; +import type { CreateMetricsExplorerViewAttributesRequestPayload, UpdateMetricsExplorerViewAttributesRequestPayload, } from '../../common/http_api/latest'; -import { MetricsExplorerView } from '../../common/metrics_explorer_views'; +import type { MetricsExplorerView } from '../../common/metrics_explorer_views'; import { useSavedViewsNotifier } from './use_saved_views_notifier'; import { useSourceContext } from '../containers/metrics_source'; import { useKibanaContextForPlugin } from './use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_observable.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_observable.ts index 2634a156be986..167f55dfea546 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_observable.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_observable.ts @@ -6,14 +6,8 @@ */ import { useEffect, useRef, useState } from 'react'; -import { - BehaviorSubject, - Observable, - OperatorFunction, - PartialObserver, - ReplaySubject, - Subscription, -} from 'rxjs'; +import type { OperatorFunction, PartialObserver, Subscription } from 'rxjs'; +import { BehaviorSubject, Observable, ReplaySubject } from 'rxjs'; import { switchMap } from 'rxjs'; export const useLatest = (value: Value) => { diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_parent_breadcrumb_resolver.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_parent_breadcrumb_resolver.ts index 532d3dbe00adb..f76bfb454d93c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_parent_breadcrumb_resolver.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_parent_breadcrumb_resolver.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common/inventory_models/types'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common/inventory_models/types'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; import { useLocation } from 'react-router-dom'; import type { LinkProps } from '@kbn/observability-shared-plugin/public/hooks/use_link_props'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_sorting.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_sorting.tsx index a11586766ab9e..f6b1702387492 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_sorting.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_sorting.tsx @@ -6,7 +6,7 @@ */ import { useState } from 'react'; -import { CriteriaWithPagination } from '@elastic/eui/src/components/basic_table/basic_table'; +import type { CriteriaWithPagination } from '@elastic/eui/src/components/basic_table/basic_table'; export function useSorting(defaultSorting: CriteriaWithPagination['sort']) { const [sorting, setSorting] = useState['sort']>(defaultSorting); diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_timeline_chart_theme.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_timeline_chart_theme.ts index 61a4206903e09..4653ffbcbfc76 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_timeline_chart_theme.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_timeline_chart_theme.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SettingsProps } from '@elastic/charts'; +import type { SettingsProps } from '@elastic/charts'; import { useEuiTheme } from '@elastic/eui'; import { useKibanaContextForPlugin } from './use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_tracked_promise.ts b/x-pack/solutions/observability/plugins/infra/public/hooks/use_tracked_promise.ts index d12749ea69fdc..2ecde4be6be2b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_tracked_promise.ts +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_tracked_promise.ts @@ -7,7 +7,8 @@ /* eslint-disable max-classes-per-file */ -import { DependencyList, useEffect, useMemo, useRef, useState, useCallback } from 'react'; +import type { DependencyList } from 'react'; +import { useEffect, useMemo, useRef, useState, useCallback } from 'react'; import useMountedState from 'react-use/lib/useMountedState'; interface UseTrackedPromiseArgs { diff --git a/x-pack/solutions/observability/plugins/infra/public/hooks/use_trial_status.tsx b/x-pack/solutions/observability/plugins/infra/public/hooks/use_trial_status.tsx index 0667904393b01..b5d50a99977b3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/hooks/use_trial_status.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/hooks/use_trial_status.tsx @@ -8,7 +8,7 @@ import { boolean } from 'io-ts'; import { i18n } from '@kbn/i18n'; import { useState } from 'react'; -import { HttpStart, NotificationsStart } from '@kbn/core/public'; +import type { HttpStart, NotificationsStart } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { API_BASE_PATH as LICENSE_MANAGEMENT_API_BASE_PATH } from '@kbn/license-management-plugin/common/constants'; diff --git a/x-pack/solutions/observability/plugins/infra/public/index.ts b/x-pack/solutions/observability/plugins/infra/public/index.ts index e5fbe7269050a..4054d9f7deae5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/index.ts +++ b/x-pack/solutions/observability/plugins/infra/public/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; +import type { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; import { Plugin } from './plugin'; -import { +import type { InfraClientSetupExports, InfraClientStartExports, InfraClientSetupDeps, diff --git a/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.test.ts b/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.test.ts index e4704c69b446b..0aa4045acd0ca 100644 --- a/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.test.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import moment from 'moment'; import { coreMock } from '@kbn/core/public/mocks'; import { createMetricsFetchData, createMetricsHasData } from './metrics_overview_fetchers'; import { createInfraPluginStartMock } from './mocks'; import { FAKE_OVERVIEW_RESPONSE } from './test_utils'; -import { InfraClientStartDeps, InfraClientStartExports } from './types'; +import type { InfraClientStartDeps, InfraClientStartExports } from './types'; function setup() { const core = coreMock.createStart(); diff --git a/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.ts b/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.ts index 9a78d72ad2413..c53481e760bd4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.ts +++ b/x-pack/solutions/observability/plugins/infra/public/metrics_overview_fetchers.ts @@ -13,10 +13,10 @@ * 2.0. */ -import { FetchDataParams, MetricsFetchDataResponse } from '@kbn/observability-plugin/public'; -import { TopNodesRequest, TopNodesResponse } from '../common/http_api/overview_api'; -import { InfraStaticSourceConfiguration } from '../common/source_configuration/source_configuration'; -import { InfraClientStartServicesAccessor } from './types'; +import type { FetchDataParams, MetricsFetchDataResponse } from '@kbn/observability-plugin/public'; +import type { TopNodesRequest, TopNodesResponse } from '../common/http_api/overview_api'; +import type { InfraStaticSourceConfiguration } from '../common/source_configuration/source_configuration'; +import type { InfraClientStartServicesAccessor } from './types'; export const createMetricsHasData = (getStartServices: InfraClientStartServicesAccessor) => async () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/mocks.tsx b/x-pack/solutions/observability/plugins/infra/public/mocks.tsx index 7a31161b2d6b7..9b343c34a19d3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/mocks.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/mocks.tsx @@ -8,7 +8,7 @@ import { createInventoryViewsServiceStartMock } from './services/inventory_views/inventory_views_service.mock'; import { createMetricsExplorerViewsServiceStartMock } from './services/metrics_explorer_views/metrics_explorer_views_service.mock'; import { createTelemetryServiceMock } from './services/telemetry/telemetry_service.mock'; -import { InfraClientStartExports } from './types'; +import type { InfraClientStartExports } from './types'; export const createInfraPluginStartMock = () => ({ inventoryViews: createInventoryViewsServiceStartMock(), diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/initial_parameters_service.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/initial_parameters_service.ts index 431d2df5d99a1..4f307e3a3152e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/initial_parameters_service.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/initial_parameters_service.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { RefreshInterval } from '@kbn/data-plugin/public'; -import { InvokeCreator, Receiver } from 'xstate'; -import { TimeKey } from '../../../../../common/time'; -import { VisiblePositions } from '../../../log_stream_position_state'; -import { ExtendedTimeRange, ParsedQuery, Timestamps } from '../../../log_stream_query_state'; -import { LogStreamPageContext, LogStreamPageEvent } from './types'; +import type { RefreshInterval } from '@kbn/data-plugin/public'; +import type { InvokeCreator, Receiver } from 'xstate'; +import type { TimeKey } from '../../../../../common/time'; +import type { VisiblePositions } from '../../../log_stream_position_state'; +import type { ExtendedTimeRange, ParsedQuery, Timestamps } from '../../../log_stream_query_state'; +import type { LogStreamPageContext, LogStreamPageEvent } from './types'; export const waitForInitialQueryParameters = (): InvokeCreator => diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/selectors.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/selectors.ts index 6f00ce32097e9..b173620892478 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/selectors.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/selectors.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { MatchedStateFromActor } from '@kbn/xstate-utils'; -import { LogStreamQueryActorRef } from '../../../log_stream_query_state'; -import { LogStreamPageActorRef } from './state_machine'; +import type { MatchedStateFromActor } from '@kbn/xstate-utils'; +import type { LogStreamQueryActorRef } from '../../../log_stream_query_state'; +import type { LogStreamPageActorRef } from './state_machine'; type LogStreamPageStateWithLogViewIndices = | MatchedStateFromActor diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/state_machine.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/state_machine.ts index e2755b29d21e3..0797d629885f6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/state_machine.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/state_machine.ts @@ -5,18 +5,19 @@ * 2.0. */ -import { RefreshInterval } from '@kbn/data-plugin/public'; -import { TimeRange } from '@kbn/es-query'; -import { actions, ActorRefFrom, createMachine, EmittedFrom } from 'xstate'; +import type { RefreshInterval } from '@kbn/data-plugin/public'; +import type { TimeRange } from '@kbn/es-query'; +import type { ActorRefFrom, EmittedFrom } from 'xstate'; +import { actions, createMachine } from 'xstate'; import { DEFAULT_REFRESH_INTERVAL } from '@kbn/logs-shared-plugin/common'; import type { LogViewNotificationChannel } from '@kbn/logs-shared-plugin/public'; -import { OmitDeprecatedState } from '@kbn/xstate-utils'; +import type { OmitDeprecatedState } from '@kbn/xstate-utils'; import { datemathToEpochMillis } from '../../../../utils/datemath'; import { createLogStreamPositionStateMachine } from '../../../log_stream_position_state/src/state_machine'; +import type { LogStreamQueryStateMachineDependencies } from '../../../log_stream_query_state'; import { createLogStreamQueryStateMachine, DEFAULT_TIMERANGE, - LogStreamQueryStateMachineDependencies, } from '../../../log_stream_query_state'; import { waitForInitialQueryParameters, diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/types.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/types.ts index 31c808d307bbe..1a705bcc5c380 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_page/state/src/types.ts @@ -5,28 +5,28 @@ * 2.0. */ -import { TimeRange } from '@kbn/es-query'; +import type { TimeRange } from '@kbn/es-query'; import type { LogViewStatus } from '@kbn/logs-shared-plugin/common'; import type { LogViewContextWithError, LogViewContextWithResolvedLogView, LogViewNotificationEvent, } from '@kbn/logs-shared-plugin/public'; -import { TimeKey } from '../../../../../common/time'; -import { +import type { TimeKey } from '../../../../../common/time'; +import type { JumpToTargetPositionEvent, LogStreamPositionContext, ReportVisiblePositionsEvent, VisiblePositions, } from '../../../log_stream_position_state'; -import { LogStreamPositionNotificationEvent } from '../../../log_stream_position_state/src/notifications'; -import { +import type { LogStreamPositionNotificationEvent } from '../../../log_stream_position_state/src/notifications'; +import type { LogStreamQueryContextWithTime, ParsedQuery, UpdateRefreshIntervalEvent, UpdateTimeRangeEvent, } from '../../../log_stream_query_state'; -import { LogStreamQueryNotificationEvent } from '../../../log_stream_query_state/src/notifications'; +import type { LogStreamQueryNotificationEvent } from '../../../log_stream_query_state/src/notifications'; export interface ReceivedInitialQueryParametersEvent { type: 'RECEIVED_INITIAL_QUERY_PARAMETERS'; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/notifications.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/notifications.ts index 59eda6dd5da5c..f036bec8cb512 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/notifications.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/notifications.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { LogStreamPositionContext, LogStreamPositionContextWithLatestPosition, LogStreamPositionContextWithTargetPosition, diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/state_machine.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/state_machine.ts index 0cc26d3e6ed35..87d0cb8e4ec69 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/state_machine.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/state_machine.ts @@ -5,12 +5,14 @@ * 2.0. */ -import { IToasts } from '@kbn/core-notifications-browser'; -import { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import type { IToasts } from '@kbn/core-notifications-browser'; +import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; import { convertISODateToNanoPrecision } from '@kbn/logs-shared-plugin/common'; import moment from 'moment'; -import { actions, ActorRefFrom, createMachine, EmittedFrom, SpecialTargets } from 'xstate'; -import { OmitDeprecatedState, sendIfDefined } from '@kbn/xstate-utils'; +import type { ActorRefFrom, EmittedFrom } from 'xstate'; +import { actions, createMachine, SpecialTargets } from 'xstate'; +import type { OmitDeprecatedState } from '@kbn/xstate-utils'; +import { sendIfDefined } from '@kbn/xstate-utils'; import { isSameTimeKey } from '../../../../common/time'; import { DESIRED_BUFFER_PAGES, RELATIVE_END_UPDATE_DELAY } from './defaults'; import { LogStreamPositionNotificationEventSelectors } from './notifications'; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/types.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/types.ts index 980ca00b7c8e9..398d7e8addbf5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/types.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { TimeKey } from '../../../../common/time'; -import { ReceivedInitialQueryParametersEvent } from '../../log_stream_page/state'; -import { TimeChangedEvent } from '../../log_stream_query_state/src/notifications'; +import type { TimeKey } from '../../../../common/time'; +import type { ReceivedInitialQueryParametersEvent } from '../../log_stream_page/state'; +import type { TimeChangedEvent } from '../../log_stream_query_state/src/notifications'; export interface VisiblePositions { startKey: TimeKey | null; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/url_state_storage_service.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/url_state_storage_service.ts index 181a87b3728a4..d23d708e84877 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/url_state_storage_service.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_position_state/src/url_state_storage_service.ts @@ -5,11 +5,12 @@ * 2.0. */ import * as rt from 'io-ts'; -import { IToasts } from '@kbn/core-notifications-browser'; -import { IKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import type { IToasts } from '@kbn/core-notifications-browser'; +import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import { withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; import * as Either from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/function'; -import { InvokeCreator } from 'xstate'; +import type { InvokeCreator } from 'xstate'; import { createPlainError, formatErrors } from '@kbn/io-ts-utils'; import { minimalTimeKeyRT, pickTimeKey } from '../../../../common/time'; import type { LogStreamPositionContext, LogStreamPositionEvent } from './types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/notifications.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/notifications.ts index 51fba835c22ad..928671d4d67ca 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/notifications.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/notifications.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { RefreshInterval } from '@kbn/data-plugin/public'; -import { ExtendedTimeRange, LogStreamQueryContext, ParsedQuery, Timestamps } from './types'; +import type { RefreshInterval } from '@kbn/data-plugin/public'; +import type { ExtendedTimeRange, LogStreamQueryContext, ParsedQuery, Timestamps } from './types'; export interface TimeChangedEvent { type: 'TIME_CHANGED'; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/search_bar_state_service.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/search_bar_state_service.ts index 592bda4a9f97f..d7bb762a63b6b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/search_bar_state_service.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/search_bar_state_service.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FilterManager, QueryStringContract } from '@kbn/data-plugin/public'; +import type { FilterManager, QueryStringContract } from '@kbn/data-plugin/public'; import { map } from 'rxjs'; import type { InvokeCreator } from 'xstate'; import type { LogStreamQueryContext, LogStreamQueryEvent } from './types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/state_machine.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/state_machine.ts index 5570faf16f3f8..6ad01bd1e8598 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/state_machine.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/state_machine.ts @@ -5,17 +5,19 @@ * 2.0. */ -import { IToasts } from '@kbn/core-notifications-browser'; +import type { IToasts } from '@kbn/core-notifications-browser'; import type { FilterManager, QueryStringContract, TimefilterContract, } from '@kbn/data-plugin/public'; -import { EsQueryConfig } from '@kbn/es-query'; -import { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; -import { actions, ActorRefFrom, createMachine, SpecialTargets, send } from 'xstate'; +import type { EsQueryConfig } from '@kbn/es-query'; +import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import type { ActorRefFrom } from 'xstate'; +import { actions, createMachine, SpecialTargets, send } from 'xstate'; import { DEFAULT_REFRESH_INTERVAL } from '@kbn/logs-shared-plugin/common'; -import { OmitDeprecatedState, sendIfDefined } from '@kbn/xstate-utils'; +import type { OmitDeprecatedState } from '@kbn/xstate-utils'; +import { sendIfDefined } from '@kbn/xstate-utils'; import { logStreamQueryNotificationEventSelectors } from './notifications'; import { subscribeToFilterSearchBarChanges, diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/time_filter_state_service.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/time_filter_state_service.ts index c7ce0ac8b9c18..96a2aa6bbc4e6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/time_filter_state_service.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/time_filter_state_service.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { RefreshInterval, TimefilterContract } from '@kbn/data-plugin/public'; -import { TimeRange } from '@kbn/es-query'; +import type { RefreshInterval, TimefilterContract } from '@kbn/data-plugin/public'; +import type { TimeRange } from '@kbn/es-query'; import { map, merge } from 'rxjs'; -import { actions, InvokeCreator } from 'xstate'; +import type { InvokeCreator } from 'xstate'; +import { actions } from 'xstate'; import { datemathToEpochMillis } from '../../../utils/datemath'; import { DEFAULT_REFRESH_TIME_RANGE } from './defaults'; -import { LogStreamQueryContext, LogStreamQueryEvent } from './types'; +import type { LogStreamQueryContext, LogStreamQueryEvent } from './types'; export interface TimefilterState { timeRange: TimeRange; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/types.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/types.ts index b56ce2148a17e..5e058626de9d1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/types.ts @@ -5,9 +5,16 @@ * 2.0. */ -import { RefreshInterval } from '@kbn/data-plugin/public'; -import { AggregateQuery, BoolQuery, DataViewBase, Query, Filter, TimeRange } from '@kbn/es-query'; -import { PageEndBufferReachedEvent } from '../../log_stream_position_state/src/notifications'; +import type { RefreshInterval } from '@kbn/data-plugin/public'; +import type { + AggregateQuery, + BoolQuery, + DataViewBase, + Query, + Filter, + TimeRange, +} from '@kbn/es-query'; +import type { PageEndBufferReachedEvent } from '../../log_stream_position_state/src/notifications'; export type AnyQuery = Query | AggregateQuery; diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/url_state_storage_service.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/url_state_storage_service.ts index 07b05f31fc35c..bfa7625a2beb1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/url_state_storage_service.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/url_state_storage_service.ts @@ -5,13 +5,14 @@ * 2.0. */ -import { IToasts } from '@kbn/core-notifications-browser'; -import { IKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import type { IToasts } from '@kbn/core-notifications-browser'; +import type { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; +import { withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; import * as Array from 'fp-ts/lib/Array'; import * as Either from 'fp-ts/lib/Either'; import { identity, pipe } from 'fp-ts/lib/function'; import * as rt from 'io-ts'; -import { InvokeCreator } from 'xstate'; +import type { InvokeCreator } from 'xstate'; import { defaultFilterStateKey, defaultPositionStateKey, diff --git a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/validate_query_service.ts b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/validate_query_service.ts index 05227ad2234fd..5834b40f838c7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/validate_query_service.ts +++ b/x-pack/solutions/observability/plugins/infra/public/observability_logs/log_stream_query_state/src/validate_query_service.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { IToasts } from '@kbn/core-notifications-browser'; -import { buildEsQuery, EsQueryConfig, isOfQueryType } from '@kbn/es-query'; +import type { IToasts } from '@kbn/core-notifications-browser'; +import type { EsQueryConfig } from '@kbn/es-query'; +import { buildEsQuery, isOfQueryType } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import type { InvokeCreator } from 'xstate'; import { QueryParsingError, UnsupportedLanguageError } from './errors'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_logs.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_logs.tsx index 0e2e6eea6c49b..66c778d262999 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_logs.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_logs.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { match as RouteMatch, Redirect } from 'react-router-dom'; +import type { match as RouteMatch } from 'react-router-dom'; +import { Redirect } from 'react-router-dom'; import { Routes, Route } from '@kbn/shared-ux-router'; import { inventoryModels } from '@kbn/metrics-data-access-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_metrics.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_metrics.tsx index 64724c210a8f4..66413b074dab2 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_metrics.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/link_to_metrics.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { match as RouteMatch, Redirect } from 'react-router-dom'; +import type { match as RouteMatch } from 'react-router-dom'; +import { Redirect } from 'react-router-dom'; import { Routes, Route } from '@kbn/shared-ux-router'; import { inventoryModels } from '@kbn/metrics-data-access-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/query_params.ts b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/query_params.ts index 45e1bc9a7991d..caa0d813b4bab 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/query_params.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/query_params.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Location } from 'history'; +import type { Location } from 'history'; import { getParamFromQueryString, getQueryStringFromLocation } from '../../utils/url_state'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_host_detail_via_ip.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_host_detail_via_ip.tsx index d8522aa0f4d59..0740a456c722f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_host_detail_via_ip.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_host_detail_via_ip.tsx @@ -6,7 +6,7 @@ */ import React, { useEffect } from 'react'; -import { RouteComponentProps } from 'react-router-dom'; +import type { RouteComponentProps } from 'react-router-dom'; import { i18n } from '@kbn/i18n'; import type { SerializableRecord } from '@kbn/utility-types'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_inventory.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_inventory.tsx index 5f24a855d01df..e4f122e61d77d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_inventory.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_inventory.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import React, { useEffect } from 'react'; +import type React from 'react'; +import { useEffect } from 'react'; import { parse } from 'query-string'; -import { RouteComponentProps } from 'react-router-dom'; +import type { RouteComponentProps } from 'react-router-dom'; import type { SerializableRecord } from '@kbn/utility-types'; import { INVENTORY_LOCATOR_ID } from '@kbn/observability-shared-plugin/common'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx index 79f2dac921554..151152694f44e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/redirect_to_node_logs.tsx @@ -6,9 +6,10 @@ */ import { useEffect } from 'react'; -import { RouteComponentProps } from 'react-router-dom'; +import type { RouteComponentProps } from 'react-router-dom'; import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; -import { findInventoryFields, InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; import { getFilterFromLocation, getTimeFromLocation } from './query_params'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/use_host_ip_to_name.ts b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/use_host_ip_to_name.ts index 29b9dd20d61ce..7d2ba219d6749 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/link_to/use_host_ip_to_name.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/link_to/use_host_ip_to_name.ts @@ -7,7 +7,7 @@ import { useState, useEffect } from 'react'; import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { IpToHostResponse } from '../../../common/http_api/ip_to_hostname'; +import type { IpToHostResponse } from '../../../common/http_api/ip_to_hostname'; export const useHostIpToName = (ipAddress: string | null, indexPattern: string | null) => { const fetch = useKibana().services.http?.fetch; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx index f7a749eb6a312..eeff62bdc2257 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_providers.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { useLogSourcesContext } from '@kbn/logs-data-access-plugin/public'; import { logEntryCategoriesJobType } from '../../../../common/log_analysis'; import { LogAnalysisSetupFlyoutStateProvider } from '../../../components/logging/log_analysis_setup/setup_flyout'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx index 337f0535e2bf0..6ac9dce90e421 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx @@ -17,7 +17,7 @@ import { MLJobsAwaitingNodeWarning, ML_PAGES, useMlHref } from '@kbn/ml-plugin/p import { useTrackPageview } from '@kbn/observability-shared-plugin/public'; import { useLogViewContext } from '@kbn/logs-shared-plugin/public'; import { logEntryCategoriesJobType } from '../../../../common/log_analysis'; -import { TimeRange } from '../../../../common/time/time_range'; +import type { TimeRange } from '../../../../common/time/time_range'; import { CategoryJobNoticesSection } from '../../../components/logging/log_analysis_job_status'; import { AnalyzeInMlButton } from '../../../components/logging/log_analysis_results'; import { DatasetsSelector } from '../../../components/logging/log_analysis_results/datasets_selector'; @@ -30,11 +30,9 @@ import { LogsPageTemplate } from '../shared/page_template'; import { PageViewLogInContext } from '../stream/page_view_log_in_context'; import { TopCategoriesSection } from './sections/top_categories'; import { useLogEntryCategoriesResults } from './use_log_entry_categories_results'; -import { - StringTimeRange, - useLogEntryCategoriesResultsUrlState, -} from './use_log_entry_categories_results_url_state'; -import { IdFormat } from '../../../../common/http_api/latest'; +import type { StringTimeRange } from './use_log_entry_categories_results_url_state'; +import { useLogEntryCategoriesResultsUrlState } from './use_log_entry_categories_results_url_state'; +import type { IdFormat } from '../../../../common/http_api/latest'; const JOB_STATUS_POLLING_INTERVAL = 30000; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/analyze_dataset_in_ml_action.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/analyze_dataset_in_ml_action.tsx index 088f54a149974..eb66f4034a9a4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/analyze_dataset_in_ml_action.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/analyze_dataset_in_ml_action.tsx @@ -12,7 +12,7 @@ import React, { useCallback } from 'react'; import { useMlHref, ML_PAGES } from '@kbn/ml-plugin/public'; import { shouldHandleLinkEvent } from '@kbn/observability-shared-plugin/public'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { partitionField } from '../../../../../../common/log_analysis/job_parameters'; export const AnalyzeCategoryDatasetInMlAction: React.FunctionComponent<{ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/anomaly_severity_indicator_list.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/anomaly_severity_indicator_list.tsx index d706189621a3e..5579e32a4ec7c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/anomaly_severity_indicator_list.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/anomaly_severity_indicator_list.tsx @@ -7,7 +7,7 @@ import React from 'react'; -import { LogEntryCategoryDataset } from '../../../../../../common/log_analysis'; +import type { LogEntryCategoryDataset } from '../../../../../../common/log_analysis'; import { getFriendlyNameForPartitionId } from '../../../../../../common/log_analysis'; import { AnomalySeverityIndicator } from '../../../../../components/logging/log_analysis_results/anomaly_severity_indicator'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_details_row.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_details_row.tsx index c6fccd3d4ff82..1301db1029954 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_details_row.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_details_row.tsx @@ -6,11 +6,11 @@ */ import React, { useEffect } from 'react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { logEntryCategoriesJobType } from '../../../../../../common/log_analysis'; import { useLogEntryCategoryExamples } from '../../use_log_entry_category_examples'; import { LogEntryExampleMessages } from '../../../../../components/logging/log_entry_examples/log_entry_examples'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { CategoryExampleMessage } from './category_example_message'; import { useLogMlJobIdFormatsShimContext } from '../../../shared/use_log_ml_job_id_formats_shim'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_example_message.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_example_message.tsx index fda6dad009609..59885c7ce3b1b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_example_message.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/category_example_message.tsx @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { LogEntry, LogEntryContext } from '@kbn/logs-shared-plugin/common'; +import type { LogEntry, LogEntryContext } from '@kbn/logs-shared-plugin/common'; import { LogEntryColumn, LogEntryContextMenu, @@ -23,9 +23,9 @@ import { getFriendlyNameForPartitionId, partitionField, } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time'; +import type { TimeRange } from '../../../../../../common/time'; import { useViewLogInProviderContext } from '../../../../../containers/logs/view_log_in_context'; -import { LogColumnConfiguration } from '../../../../../utils/source_configuration'; +import type { LogColumnConfiguration } from '../../../../../utils/source_configuration'; export const exampleMessageScale = 'medium' as const; export const exampleTimestampFormat = 'dateTime' as const; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_action_list.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_action_list.tsx index 99ad8e6092a76..c19cdcef0c5cb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_action_list.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_action_list.tsx @@ -7,8 +7,8 @@ import React from 'react'; -import { LogEntryCategoryDataset } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time'; +import type { LogEntryCategoryDataset } from '../../../../../../common/log_analysis'; +import type { TimeRange } from '../../../../../../common/time'; import { getFriendlyNameForPartitionId } from '../../../../../../common/log_analysis'; import { AnalyzeCategoryDatasetInMlAction } from './analyze_dataset_in_ml_action'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_list.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_list.tsx index a737a1de4a32b..12545478bee9d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_list.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/datasets_list.tsx @@ -7,7 +7,7 @@ import React from 'react'; import styled from '@emotion/styled'; -import { LogEntryCategoryDataset } from '../../../../../../common/log_analysis'; +import type { LogEntryCategoryDataset } from '../../../../../../common/log_analysis'; import { getFriendlyNameForPartitionId } from '../../../../../../common/log_analysis'; export const DatasetsList: React.FunctionComponent<{ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/log_entry_count_sparkline.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/log_entry_count_sparkline.tsx index ee3a35420ff92..6223a2ac8022e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/log_entry_count_sparkline.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/log_entry_count_sparkline.tsx @@ -7,8 +7,8 @@ import React, { useMemo } from 'react'; -import { LogEntryCategoryHistogram } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time'; +import type { LogEntryCategoryHistogram } from '../../../../../../common/log_analysis'; +import type { TimeRange } from '../../../../../../common/time'; import { SingleMetricComparison } from './single_metric_comparison'; import { SingleMetricSparkline } from './single_metric_sparkline'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/single_metric_sparkline.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/single_metric_sparkline.tsx index 5c38c0055cf38..56fcfb6794853 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/single_metric_sparkline.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/single_metric_sparkline.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { Chart, Settings, AreaSeries, ScaleType, TooltipType, Tooltip } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import { useKibanaTimeZoneSetting } from '../../../../../hooks/use_kibana_time_zone_setting'; -import { TimeRange } from '../../../../../../common/time'; +import type { TimeRange } from '../../../../../../common/time'; import { useChartThemes } from '../../../../../hooks/use_chart_themes'; interface TimeSeriesPoint { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_section.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_section.tsx index 6dd07a80c8652..7b9f662326e5c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_section.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_section.tsx @@ -9,12 +9,12 @@ import { EuiLoadingSpinner } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; -import { LogEntryCategory } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { LogEntryCategory } from '../../../../../../common/log_analysis'; +import type { TimeRange } from '../../../../../../common/time'; import { LoadingOverlayWrapper } from '../../../../../components/loading_overlay_wrapper'; import { TopCategoriesTable } from './top_categories_table'; -import { SortOptions, ChangeSortOptions } from '../../use_log_entry_categories_results'; +import type { SortOptions, ChangeSortOptions } from '../../use_log_entry_categories_results'; export const TopCategoriesSection: React.FunctionComponent<{ isLoadingTopCategories?: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_table.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_table.tsx index 377738ff00821..6fa7c716455a8 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_table.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/sections/top_categories/top_categories_table.tsx @@ -5,20 +5,21 @@ * 2.0. */ -import { Criteria, EuiBasicTable, EuiBasicTableColumn } from '@elastic/eui'; +import type { Criteria, EuiBasicTableColumn } from '@elastic/eui'; +import { EuiBasicTable } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; import React, { useMemo, useCallback } from 'react'; import useSet from 'react-use/lib/useSet'; import styled from '@emotion/styled'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; -import { - categoriesSortRT, +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { LogEntryCategory, LogEntryCategoryDataset, LogEntryCategoryHistogram, } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time'; +import { categoriesSortRT } from '../../../../../../common/log_analysis'; +import type { TimeRange } from '../../../../../../common/time'; import { RowExpansionButton } from '../../../../../components/basic_table'; import { AnomalySeverityIndicatorList } from './anomaly_severity_indicator_list'; import { CategoryDetailsRow } from './category_details_row'; @@ -26,7 +27,7 @@ import { RegularExpressionRepresentation } from '../../../../../components/loggi import { DatasetActionsList } from './datasets_action_list'; import { DatasetsList } from './datasets_list'; import { LogEntryCountSparkline } from './log_entry_count_sparkline'; -import { SortOptions, ChangeSortOptions } from '../../use_log_entry_categories_results'; +import type { SortOptions, ChangeSortOptions } from '../../use_log_entry_categories_results'; export const TopCategoriesTable = styled( ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_datasets.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_datasets.ts index 34752f5792e03..ebcfbbefba2ae 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_datasets.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_datasets.ts @@ -6,9 +6,9 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat } from '../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../common/http_api/latest'; import { getLogEntryCategoryDatasetsRequestPayloadRT, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_examples.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_examples.ts index bdf5c80079c1e..8a1eeaf9f2cb0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_examples.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_log_entry_category_examples.ts @@ -6,9 +6,9 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat } from '../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../common/http_api/latest'; import { getLogEntryCategoryExamplesRequestPayloadRT, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_top_log_entry_categories.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_top_log_entry_categories.ts index 14cd49a5d8f83..8c04ce1ec1581 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_top_log_entry_categories.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/service_calls/get_top_log_entry_categories.ts @@ -6,16 +6,16 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat } from '../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../common/http_api/latest'; import { getLogEntryCategoriesRequestPayloadRT, getLogEntryCategoriesSuccessReponsePayloadRT, LOG_ANALYSIS_GET_LOG_ENTRY_CATEGORIES_PATH, } from '../../../../../common/http_api'; -import { CategoriesSort } from '../../../../../common/log_analysis'; +import type { CategoriesSort } from '../../../../../common/log_analysis'; interface RequestArgs { logViewReference: PersistedLogViewReference; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_categories_results.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_categories_results.ts index e3b42ee2519cc..3207dc305bbca 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_categories_results.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_categories_results.ts @@ -7,13 +7,13 @@ import { useMemo, useState } from 'react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; -import { IdFormat } from '../../../../common/http_api/latest'; -import { +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { IdFormat } from '../../../../common/http_api/latest'; +import type { GetLogEntryCategoriesSuccessResponsePayload, GetLogEntryCategoryDatasetsSuccessResponsePayload, } from '../../../../common/http_api'; -import { CategoriesSort } from '../../../../common/log_analysis'; +import type { CategoriesSort } from '../../../../common/log_analysis'; import { useTrackedPromise, CanceledPromiseError } from '../../../hooks/use_tracked_promise'; import { callGetTopLogEntryCategoriesAPI } from './service_calls/get_top_log_entry_categories'; import { callGetLogEntryCategoryDatasetsAPI } from './service_calls/get_log_entry_category_datasets'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_category_examples.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_category_examples.tsx index 7e51c66b53c0d..e795ae460deef 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_category_examples.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_categories/use_log_entry_category_examples.tsx @@ -6,10 +6,10 @@ */ import { useMemo, useState } from 'react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; -import { IdFormat } from '../../../../common/http_api/latest'; -import { LogEntryCategoryExample } from '../../../../common/http_api'; +import type { IdFormat } from '../../../../common/http_api/latest'; +import type { LogEntryCategoryExample } from '../../../../common/http_api'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; import { callGetLogEntryCategoryExamplesAPI } from './service_calls/get_log_entry_category_examples'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx index a57eac0a16cd8..0974a94c185a4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_providers.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { useLogSourcesContext } from '@kbn/logs-data-access-plugin/public'; import { logEntryCategoriesJobType, logEntryRateJobType } from '../../../../common/log_analysis'; import { LogAnalysisSetupFlyoutStateProvider } from '../../../components/logging/log_analysis_setup/setup_flyout'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx index 21eb5aacb2cec..b7216888b116f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/page_results_content.tsx @@ -15,13 +15,13 @@ import { useKibana } from '@kbn/kibana-react-plugin/public'; import { MLJobsAwaitingNodeWarning } from '@kbn/ml-plugin/public'; import { useTrackPageview } from '@kbn/observability-shared-plugin/public'; import { useLogViewContext, LogEntryFlyout } from '@kbn/logs-shared-plugin/public'; -import { IdFormatByJobType } from '../../../../common/http_api/latest'; +import type { IdFormatByJobType } from '../../../../common/http_api/latest'; import { isJobStatusWithResults, logEntryCategoriesJobType, logEntryRateJobType, } from '../../../../common/log_analysis'; -import { TimeKey } from '../../../../common/time'; +import type { TimeKey } from '../../../../common/time'; import { CategoryJobNoticesSection, LogAnalysisJobProblemIndicator, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/anomalies_swimlane_visualisation.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/anomalies_swimlane_visualisation.tsx index 92499cf3af44e..2247887abaa5e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/anomalies_swimlane_visualisation.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/anomalies_swimlane_visualisation.tsx @@ -10,9 +10,9 @@ import React, { useMemo } from 'react'; import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '@kbn/ml-plugin/public'; import { MissingEmbeddableFactoryCallout } from '../../../../../components/missing_embeddable_factory_callout'; import { partitionField } from '../../../../../../common/infra_ml'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; -import { AutoRefresh } from '../../use_log_entry_rate_results_url_state'; +import type { AutoRefresh } from '../../use_log_entry_rate_results_url_state'; interface Props { timeRange: TimeRange; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx index 49d539a6783ca..43dfb32796301 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/expanded_row.tsx @@ -12,12 +12,9 @@ import React from 'react'; import useMount from 'react-use/lib/useMount'; import styled from '@emotion/styled'; import { useLogViewContext } from '@kbn/logs-shared-plugin/public'; -import { - isCategoryAnomaly, - LogEntryAnomaly, - logEntryRateJobType, -} from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { LogEntryAnomaly } from '../../../../../../common/log_analysis'; +import { isCategoryAnomaly, logEntryRateJobType } from '../../../../../../common/log_analysis'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { LogEntryExampleMessages } from '../../../../../components/logging/log_entry_examples/log_entry_examples'; import { useLogEntryExamples } from '../../use_log_entry_examples'; import { LogEntryExampleMessage, LogEntryExampleMessageHeaders } from './log_entry_example'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/index.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/index.tsx index 7741414f79046..51e037f92e743 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/index.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/index.tsx @@ -14,10 +14,10 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { AnomaliesSwimlaneVisualisation } from './anomalies_swimlane_visualisation'; import { AnomaliesTable } from './table'; -import { +import type { ChangePaginationOptions, ChangeSortOptions, FetchNextPage, @@ -28,7 +28,7 @@ import { SortOptions, } from '../../use_log_entry_anomalies_results'; import { LoadingOverlayWrapper } from '../../../../../components/loading_overlay_wrapper'; -import { AutoRefresh } from '../../use_log_entry_rate_results_url_state'; +import type { AutoRefresh } from '../../use_log_entry_rate_results_url_state'; export const AnomaliesResults: React.FunctionComponent<{ isLoadingAnomaliesResults: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx index 60399d70f2826..61b1685cf36e7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/log_entry_example.tsx @@ -12,6 +12,7 @@ import { i18n } from '@kbn/i18n'; import { useMlHref, ML_PAGES } from '@kbn/ml-plugin/public'; import styled from '@emotion/styled'; import { useLinkProps, shouldHandleLinkEvent } from '@kbn/observability-shared-plugin/public'; +import type { LogEntryColumnWidths } from '@kbn/logs-shared-plugin/public'; import { LogEntryColumn, LogEntryFieldColumn, @@ -19,24 +20,24 @@ import { LogEntryRowWrapper, LogEntryTimestampColumn, LogEntryContextMenu, - LogEntryColumnWidths, iconColumnId, LogColumnHeadersWrapper, LogColumnHeader, } from '@kbn/logs-shared-plugin/public'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; import { getFriendlyNameForPartitionId } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { partitionField } from '../../../../../../common/log_analysis/job_parameters'; -import { LogEntryExample, isCategoryAnomaly } from '../../../../../../common/log_analysis'; +import type { LogEntryExample } from '../../../../../../common/log_analysis'; +import { isCategoryAnomaly } from '../../../../../../common/log_analysis'; +import type { LogColumnConfiguration } from '../../../../../utils/source_configuration'; import { - LogColumnConfiguration, isTimestampLogColumnConfiguration, isFieldLogColumnConfiguration, isMessageLogColumnConfiguration, } from '../../../../../utils/source_configuration'; import { localizedDate } from '../../../../../../common/formatters/datetime'; -import { LogEntryAnomaly } from '../../../../../../common/log_analysis'; +import type { LogEntryAnomaly } from '../../../../../../common/log_analysis'; import { useLogEntryFlyoutContext } from '../../../../../containers/logs/log_flyout'; export const exampleMessageScale = 'medium' as const; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/table.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/table.tsx index a0c8eb762e9f1..9cf1bb0964638 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/table.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/sections/anomalies/table.tsx @@ -5,10 +5,9 @@ * 2.0. */ +import type { Criteria, EuiBasicTableColumn } from '@elastic/eui'; import { - Criteria, EuiBasicTable, - EuiBasicTableColumn, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, @@ -20,20 +19,20 @@ import { i18n } from '@kbn/i18n'; import moment from 'moment'; import React, { useCallback, useMemo } from 'react'; import useSet from 'react-use/lib/useSet'; +import type { AnomalyType } from '../../../../../../common/log_analysis'; import { anomaliesSortRT, - AnomalyType, formatOneDecimalPlace, getFriendlyNameForPartitionId, isCategoryAnomaly, } from '../../../../../../common/log_analysis'; -import { TimeRange } from '../../../../../../common/time/time_range'; +import type { TimeRange } from '../../../../../../common/time/time_range'; import { RowExpansionButton } from '../../../../../components/basic_table'; import { LoadingOverlayWrapper } from '../../../../../components/loading_overlay_wrapper'; import { AnomalySeverityIndicator } from '../../../../../components/logging/log_analysis_results/anomaly_severity_indicator'; import { RegularExpressionRepresentation } from '../../../../../components/logging/log_analysis_results/category_expression'; import { useKibanaUiSetting } from '../../../../../hooks/use_kibana_ui_setting'; -import { +import type { ChangePaginationOptions, ChangeSortOptions, FetchNextPage, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies.ts index f474059b84bab..c170dcddf4d1f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies.ts @@ -6,15 +6,15 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormatByJobType } from '../../../../../common/http_api/latest'; +import type { IdFormatByJobType } from '../../../../../common/http_api/latest'; import { getLogEntryAnomaliesRequestPayloadRT, getLogEntryAnomaliesSuccessReponsePayloadRT, LOG_ANALYSIS_GET_LOG_ENTRY_ANOMALIES_PATH, } from '../../../../../common/http_api'; -import { AnomaliesSort, Pagination } from '../../../../../common/log_analysis'; +import type { AnomaliesSort, Pagination } from '../../../../../common/log_analysis'; interface RequestArgs { logViewReference: PersistedLogViewReference; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies_datasets.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies_datasets.ts index 8bb1d1ab2fe30..3dd9cd226e36d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies_datasets.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_anomalies_datasets.ts @@ -6,9 +6,9 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormatByJobType } from '../../../../../common/http_api/latest'; +import type { IdFormatByJobType } from '../../../../../common/http_api/latest'; import { getLogEntryAnomaliesDatasetsRequestPayloadRT, getLogEntryAnomaliesDatasetsSuccessReponsePayloadRT, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_examples.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_examples.ts index 9733ab9c934be..9a39ebb73a011 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_examples.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/service_calls/get_log_entry_examples.ts @@ -6,9 +6,9 @@ */ import type { HttpHandler } from '@kbn/core/public'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat } from '../../../../../common/http_api/latest'; +import type { IdFormat } from '../../../../../common/http_api/latest'; import { getLogEntryExamplesRequestPayloadRT, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts index 6f19fb1c0549c..ad44af02befc5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_dataset_filtering.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; import { useEffect, useReducer, useCallback } from 'react'; import { CONTROLLED_BY_SWIM_LANE_FILTER } from '@kbn/ml-plugin/public'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_anomalies_results.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_anomalies_results.ts index 82f447966955c..adea891bbe507 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_anomalies_results.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_anomalies_results.ts @@ -7,13 +7,13 @@ import { useMemo, useState, useCallback, useEffect, useReducer } from 'react'; import useMount from 'react-use/lib/useMount'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; -import { IdFormatByJobType } from '../../../../common/http_api/latest'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { IdFormatByJobType } from '../../../../common/http_api/latest'; import { useTrackedPromise, CanceledPromiseError } from '../../../hooks/use_tracked_promise'; import { callGetLogEntryAnomaliesAPI } from './service_calls/get_log_entry_anomalies'; import { callGetLogEntryAnomaliesDatasetsAPI } from './service_calls/get_log_entry_anomalies_datasets'; -import { GetLogEntryAnomaliesDatasetsSuccessResponsePayload } from '../../../../common/http_api'; -import { +import type { GetLogEntryAnomaliesDatasetsSuccessResponsePayload } from '../../../../common/http_api'; +import type { AnomaliesSort, Pagination, PaginationCursor, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_examples.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_examples.ts index 8f67d826cdb50..b2def24be30d1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_examples.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_examples.ts @@ -6,10 +6,10 @@ */ import { useMemo, useState } from 'react'; -import { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference } from '@kbn/logs-shared-plugin/common'; -import { IdFormat } from '../../../../common/http_api/latest'; -import { LogEntryExample } from '../../../../common/log_analysis'; +import type { IdFormat } from '../../../../common/http_api/latest'; +import type { LogEntryExample } from '../../../../common/log_analysis'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; import { callGetLogEntryExamplesAPI } from './service_calls/get_log_entry_examples'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_rate_results_url_state.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_rate_results_url_state.tsx index f669d82f76f0f..c622061e54db5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_rate_results_url_state.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/log_entry_rate/use_log_entry_rate_results_url_state.tsx @@ -13,7 +13,7 @@ import * as rt from 'io-ts'; import type { TimeRange as KibanaTimeRange } from '@kbn/es-query'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { useUrlState } from '@kbn/observability-shared-plugin/public'; -import { TimeRange } from '../../../../common/time/time_range'; +import type { TimeRange } from '../../../../common/time/time_range'; import { useKibanaTimefilterTime, useSyncKibanaTimeFilterTime, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/page.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/page.tsx index ef3acfe6787c3..3f4e308ef7ed7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/page.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/page.tsx @@ -7,7 +7,7 @@ import { EuiErrorBoundary } from '@elastic/eui'; import React from 'react'; -import { RouteComponentProps } from 'react-router-dom'; +import type { RouteComponentProps } from 'react-router-dom'; import { LogsPageContent } from './page_content'; import { LogsPageProviders } from './page_providers'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_content.tsx index bdb738c33315c..cd28fe24c390c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_content.tsx @@ -11,11 +11,13 @@ import React, { useContext } from 'react'; import { Routes, Route } from '@kbn/shared-ux-router'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { HeaderMenuPortal, useLinkProps } from '@kbn/observability-shared-plugin/public'; -import { SharePublicStart } from '@kbn/share-plugin/public/plugin'; -import { +import type { SharePublicStart } from '@kbn/share-plugin/public/plugin'; +import type { ObservabilityOnboardingLocatorParams, - OBSERVABILITY_ONBOARDING_LOCATOR, AllDatasetsLocatorParams, +} from '@kbn/deeplinks-observability'; +import { + OBSERVABILITY_ONBOARDING_LOCATOR, ALL_DATASETS_LOCATOR_ID, } from '@kbn/deeplinks-observability'; import { dynamic } from '@kbn/shared-ux-utility'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_providers.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_providers.tsx index a0cd7f8639b24..ae525cc199c01 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_providers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/page_providers.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { useState, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useState } from 'react'; import { LogViewProvider, initializeFromUrl as createInitializeFromUrl, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx index bb0b55cbbabf3..1b0fe39429609 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/add_log_column_popover.tsx @@ -5,19 +5,13 @@ * 2.0. */ -import { - EuiBadge, - EuiButton, - EuiPopover, - EuiPopoverTitle, - EuiSelectable, - EuiSelectableOption, -} from '@elastic/eui'; +import type { EuiSelectableOption } from '@elastic/eui'; +import { EuiBadge, EuiButton, EuiPopover, EuiPopoverTitle, EuiSelectable } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useMemo } from 'react'; import { v4 as uuidv4 } from 'uuid'; import styled from '@emotion/styled'; -import { LogColumnConfiguration } from '../../../utils/source_configuration'; +import type { LogColumnConfiguration } from '../../../utils/source_configuration'; import { useVisibilityState } from '../../../hooks/use_visibility_state'; interface SelectableColumnOption { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_elements.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_elements.tsx index 8058a10bcd269..151a070a328b0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_elements.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_elements.tsx @@ -8,8 +8,8 @@ import equal from 'fast-deep-equal'; import { useCallback, useMemo, useState } from 'react'; import useAsync from 'react-use/lib/useAsync'; -import { ObjectEntries } from '../../../../common/utility_types'; -import { ChildFormValidationError, GenericValidationError } from './validation_errors'; +import type { ObjectEntries } from '../../../../common/utility_types'; +import type { ChildFormValidationError, GenericValidationError } from './validation_errors'; const unsetValue = Symbol('unset form value'); diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_field_props.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_field_props.tsx index 81711f7464da8..27f8c50db74f9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_field_props.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/form_field_props.tsx @@ -5,9 +5,9 @@ * 2.0. */ import React from 'react'; -import { FormElement } from './form_elements'; +import type { FormElement } from './form_elements'; import { LogSourceConfigurationFormError } from './source_configuration_form_errors'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; export const getFormRowProps = (formElement: FormElement) => ({ error: diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_names_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_names_configuration_panel.tsx index 0b6a9b1a5e86e..cf6629df42215 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_names_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_names_configuration_panel.tsx @@ -9,10 +9,10 @@ import { EuiCode, EuiDescribedFormGroup, EuiFieldText, EuiFormRow } from '@elast import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { useTrackPageview } from '@kbn/observability-shared-plugin/public'; -import { LogIndexNameReference } from '@kbn/logs-shared-plugin/common'; -import { FormElement } from './form_elements'; +import type { LogIndexNameReference } from '@kbn/logs-shared-plugin/common'; +import type { FormElement } from './form_elements'; import { getFormRowProps, getInputFieldProps } from './form_field_props'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; export const IndexNamesConfigurationPanel: React.FC<{ isLoading: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_configuration_panel.tsx index 5f10fcbf6688a..caca8bcf72594 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_configuration_panel.tsx @@ -10,11 +10,11 @@ import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useMemo } from 'react'; import { useTrackPageview } from '@kbn/observability-shared-plugin/public'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; -import { LogDataViewReference } from '@kbn/logs-shared-plugin/common'; -import { FormElement } from './form_elements'; +import type { LogDataViewReference } from '@kbn/logs-shared-plugin/common'; +import type { FormElement } from './form_elements'; import { getFormRowProps } from './form_field_props'; import { IndexPatternSelector } from './index_pattern_selector'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; export const IndexPatternConfigurationPanel: React.FC<{ isLoading: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_selector.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_selector.tsx index c63b27f6d0ce1..7283cbeea47bb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_selector.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/index_pattern_selector.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useEffect, useMemo } from 'react'; import { useKibanaIndexPatternTitles } from '../../../hooks/use_kibana_index_patterns'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts index 581d8d3011cd6..46f3980c95323 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_form_state.ts @@ -8,17 +8,19 @@ import { useMemo } from 'react'; import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/common'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; -import { +import type { LogDataViewReference, LogIndexNameReference, - logIndexNameReferenceRT, LogSourcesKibanaAdvancedSettingReference, +} from '@kbn/logs-shared-plugin/common'; +import { + logIndexNameReferenceRT, logSourcesKibanaAdvancedSettingRT, } from '@kbn/logs-shared-plugin/common'; import { useKibanaIndexPatternService } from '../../../hooks/use_kibana_index_patterns'; import { useFormElement } from './form_elements'; +import type { FormValidationError } from './validation_errors'; import { - FormValidationError, validateIndexPattern, validateStringNotEmpty, validateStringNoSpaces, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.stories.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.stories.tsx index 4c4638d495a31..864797635312e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.stories.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.stories.tsx @@ -5,17 +5,17 @@ * 2.0. */ -import { EuiCodeBlock, EuiPage, EuiPageBody, EuiPanel, PropsOf } from '@elastic/eui'; +import type { PropsOf } from '@elastic/eui'; +import { EuiCodeBlock, EuiPage, EuiPageBody, EuiPanel } from '@elastic/eui'; import { I18nProvider } from '@kbn/i18n-react'; -import { Meta, Story } from '@storybook/react/types-6-0'; +import type { Meta, Story } from '@storybook/react/types-6-0'; import React from 'react'; import { KBN_FIELD_TYPES } from '@kbn/data-plugin/public'; -import { - MockIndexPatternsKibanaContextProvider, - MockIndexPatternSpec, -} from '../../../hooks/use_kibana_index_patterns.mock'; +import type { MockIndexPatternSpec } from '../../../hooks/use_kibana_index_patterns.mock'; +import { MockIndexPatternsKibanaContextProvider } from '../../../hooks/use_kibana_index_patterns.mock'; import { decorateWithGlobalStorybookThemeProviders } from '../../../test_utils/use_global_storybook_theme'; -import { LogIndicesFormState, useLogIndicesFormElement } from './indices_configuration_form_state'; +import type { LogIndicesFormState } from './indices_configuration_form_state'; +import { useLogIndicesFormElement } from './indices_configuration_form_state'; import { IndicesConfigurationPanel } from './indices_configuration_panel'; export default { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx index 0e16a404cbd54..70c59259a2c52 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/indices_configuration_panel.tsx @@ -9,11 +9,10 @@ import { EuiCheckableCard, EuiFormFieldset, EuiSpacer, EuiTitle } from '@elastic import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback, useEffect, useState } from 'react'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; +import type { LogDataViewReference, LogIndexReference } from '@kbn/logs-shared-plugin/common'; import { logIndexNameReferenceRT, - LogDataViewReference, logDataViewReferenceRT, - LogIndexReference, logSourcesKibanaAdvancedSettingRT, } from '@kbn/logs-shared-plugin/common'; import { EuiCallOut } from '@elastic/eui'; @@ -21,13 +20,15 @@ import { i18n } from '@kbn/i18n'; import { loadRuleAggregations } from '@kbn/triggers-actions-ui-plugin/public'; import { AlertConsumers, LOG_THRESHOLD_ALERT_TYPE_ID } from '@kbn/rule-data-utils'; -import { rulesLocatorID, RulesParams } from '@kbn/observability-plugin/public'; +import type { RulesParams } from '@kbn/observability-plugin/public'; +import { rulesLocatorID } from '@kbn/observability-plugin/public'; import { EuiLink } from '@elastic/eui'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; -import { FormElement, isFormElementForType } from './form_elements'; +import type { FormElement } from './form_elements'; +import { isFormElementForType } from './form_elements'; import { IndexNamesConfigurationPanel } from './index_names_configuration_panel'; import { IndexPatternConfigurationPanel } from './index_pattern_configuration_panel'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; import { KibanaAdvancedSettingConfigurationPanel } from './kibana_advanced_setting_configuration_panel'; export const IndicesConfigurationPanel = React.memo<{ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx index 80eb44de9da9d..79526ec853055 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_form_state.tsx @@ -6,9 +6,10 @@ */ import { useMemo } from 'react'; -import { LogColumnConfiguration } from '../../../utils/source_configuration'; +import type { LogColumnConfiguration } from '../../../utils/source_configuration'; import { useFormElement } from './form_elements'; -import { FormValidationError, validateColumnListNotEmpty } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; +import { validateColumnListNotEmpty } from './validation_errors'; export const useLogColumnsFormElement = (initialValue: LogColumnConfiguration[]) => { const logColumnsFormElement = useFormElement({ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx index 0b884f5529a66..4e0139c9d78c7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/log_columns_configuration_panel.tsx @@ -23,19 +23,21 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useCallback } from 'react'; import type { DropResult, DragHandleProps } from '../../../types'; -import { +import type { FieldLogColumnConfiguration, - getLogColumnConfigurationId, - isMessageLogColumnConfiguration, - isTimestampLogColumnConfiguration, LogColumnConfiguration, MessageLogColumnConfiguration, TimestampLogColumnConfiguration, } from '../../../utils/source_configuration'; +import { + getLogColumnConfigurationId, + isMessageLogColumnConfiguration, + isTimestampLogColumnConfiguration, +} from '../../../utils/source_configuration'; import { AddLogColumnButtonAndPopover } from './add_log_column_popover'; -import { FormElement } from './form_elements'; +import type { FormElement } from './form_elements'; import { LogSourceConfigurationFormError } from './source_configuration_form_errors'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; export const LogColumnsConfigurationPanel = React.memo<{ availableFields: string[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_form_state.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_form_state.tsx index f97ece074c4a3..ae653f8d06f6a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_form_state.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_form_state.tsx @@ -7,7 +7,8 @@ import { useMemo } from 'react'; import { useFormElement } from './form_elements'; -import { FormValidationError, validateStringNotEmpty } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; +import { validateStringNotEmpty } from './validation_errors'; export const useNameFormElement = (initialValue: string) => { const nameFormElement = useFormElement({ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_panel.tsx index 11758dd32077d..d319753d49f49 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/name_configuration_panel.tsx @@ -15,9 +15,9 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo } from 'react'; -import { FormElement } from './form_elements'; +import type { FormElement } from './form_elements'; import { getFormRowProps, getStringInputFieldProps } from './form_field_props'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; export const NameConfigurationPanel = React.memo<{ isLoading: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_errors.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_errors.tsx index d046173f4461e..2ed1237ca786a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_errors.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_errors.tsx @@ -9,7 +9,7 @@ import { EuiCallOut, EuiCode } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { FormValidationError } from './validation_errors'; +import type { FormValidationError } from './validation_errors'; export const LogSourceConfigurationFormErrors: React.FC<{ errors: FormValidationError[] }> = ({ errors, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx index 01035f8259a0f..eee7dd8f516e7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/source_configuration_form_state.tsx @@ -6,7 +6,7 @@ */ import { useMemo } from 'react'; -import { LogViewAttributes } from '@kbn/logs-shared-plugin/common'; +import type { LogViewAttributes } from '@kbn/logs-shared-plugin/common'; import { useCompositeFormElement } from './form_elements'; import { useLogIndicesFormElement } from './indices_configuration_form_state'; import { useLogColumnsFormElement } from './log_columns_configuration_form_state'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/validation_errors.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/validation_errors.ts index b769bb68f8d2a..b2671601bde45 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/validation_errors.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/settings/validation_errors.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DataView } from '@kbn/data-views-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; import { KBN_FIELD_TYPES } from '@kbn/data-plugin/public'; export interface GenericValidationError { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/call_get_log_analysis_id_formats.ts b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/call_get_log_analysis_id_formats.ts index dd2e15d415b69..53f641f7653e6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/call_get_log_analysis_id_formats.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/call_get_log_analysis_id_formats.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HttpHandler } from '@kbn/core/public'; +import type { HttpHandler } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { getLogAnalysisIdFormatsRequestPayloadRT, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_log_view_error.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_log_view_error.tsx index 64a307f1bdd6c..8914eb36f8c20 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_log_view_error.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_log_view_error.tsx @@ -7,7 +7,8 @@ import { EuiButton, EuiButtonEmpty, EuiCallOut, EuiEmptyPrompt, EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { useCallback, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useCallback } from 'react'; import { SavedObjectNotFound } from '@kbn/kibana-utils-plugin/common'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; import { useSelector } from '@xstate/react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_template.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_template.tsx index c0dfc79641dde..f98ed8a53242c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_template.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/page_template.tsx @@ -9,7 +9,7 @@ import React, { useEffect } from 'react'; import { i18n } from '@kbn/i18n'; import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; -import { NoDataConfig } from '@kbn/shared-ux-page-kibana-template'; +import type { NoDataConfig } from '@kbn/shared-ux-page-kibana-template'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; export interface LogsPageTemplateProps extends LazyObservabilityPageTemplateProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/use_log_ml_job_id_formats_shim.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/use_log_ml_job_id_formats_shim.tsx index ee581763225a3..dac93b656d81f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/use_log_ml_job_id_formats_shim.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/shared/use_log_ml_job_id_formats_shim.tsx @@ -8,7 +8,7 @@ import createContainer from 'constate'; import { useState, useEffect, useCallback } from 'react'; import { useLogViewContext } from '@kbn/logs-shared-plugin/public'; -import { IdFormatByJobType, JobType } from '../../../../common/http_api/latest'; +import type { IdFormatByJobType, JobType } from '../../../../common/http_api/latest'; import { useActiveKibanaSpace } from '../../../hooks/use_kibana_space'; import { useTrackedPromise } from '../../../hooks/use_tracked_promise'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/components/stream_page_template.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/components/stream_page_template.tsx index 5ea865351ef38..fbe7a34837031 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/components/stream_page_template.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/components/stream_page_template.tsx @@ -12,7 +12,8 @@ import { useLogViewContext } from '@kbn/logs-shared-plugin/public'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiBadge, EuiToolTip } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { fullHeightContentStyles } from '../../../../page_template.styles'; -import { LogsPageTemplate, LogsPageTemplateProps } from '../../shared/page_template'; +import type { LogsPageTemplateProps } from '../../shared/page_template'; +import { LogsPageTemplate } from '../../shared/page_template'; export const LogStreamPageTemplate: React.FC = (props) => { const { logView, isInlineLogView, revertToDefaultLogView } = useLogViewContext(); diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_content.tsx index e14d52fe1693b..8ec0031f535c1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_content.tsx @@ -5,17 +5,17 @@ * 2.0. */ -import { TimeRange } from '@kbn/es-query'; +import type { TimeRange } from '@kbn/es-query'; import { useActor } from '@xstate/react'; import React, { useMemo } from 'react'; -import { VisiblePositions } from '../../../observability_logs/log_stream_position_state'; -import { TimeKey } from '../../../../common/time'; +import type { VisiblePositions } from '../../../observability_logs/log_stream_position_state'; +import type { TimeKey } from '../../../../common/time'; import { SourceLoadingPage } from '../../../components/source_loading_page'; -import { +import type { LogStreamPageCallbacks, LogStreamPageState, - useLogStreamPageStateContext, } from '../../../observability_logs/log_stream_page/state'; +import { useLogStreamPageStateContext } from '../../../observability_logs/log_stream_page/state'; import { InvalidStateCallout } from '../../../observability_logs/xstate_helpers'; import { ConnectedLogViewErrorPage } from '../shared/page_log_view_error'; import { LogStreamPageTemplate } from './components/stream_page_template'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_logs_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_logs_content.tsx index 7ab709b837cc9..ad12c1f719a21 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_logs_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_logs_content.tsx @@ -8,27 +8,30 @@ import { EuiSpacer } from '@elastic/eui'; import type { Query } from '@kbn/es-query'; import styled from '@emotion/styled'; -import { LogEntry, convertISODateToNanoPrecision } from '@kbn/logs-shared-plugin/common'; +import type { LogEntry } from '@kbn/logs-shared-plugin/common'; +import { convertISODateToNanoPrecision } from '@kbn/logs-shared-plugin/common'; +import type { + LogEntryStreamItem, + UpdatedDateRange, + VisibleInterval, + WithSummaryProps, +} from '@kbn/logs-shared-plugin/public'; import { LogEntryFlyout, - LogEntryStreamItem, ScrollableLogTextStreamView, - UpdatedDateRange, useLogHighlightsStateContext, useLogPositionStateContext, useLogStreamContext, useLogViewContext, - VisibleInterval, WithSummary, - WithSummaryProps, } from '@kbn/logs-shared-plugin/public'; import { useSelector } from '@xstate/react'; import stringify from 'json-stable-stringify'; import React, { useCallback, useEffect, useMemo } from 'react'; import usePrevious from 'react-use/lib/usePrevious'; -import { MatchedStateFromActor } from '@kbn/xstate-utils'; +import type { MatchedStateFromActor } from '@kbn/xstate-utils'; import { LogsDeprecationCallout } from '../../../components/logs_deprecation_callout'; -import { TimeKey } from '../../../../common/time'; +import type { TimeKey } from '../../../../common/time'; import { AutoSizer } from '../../../components/auto_sizer'; import { LogMinimap } from '../../../components/logging/log_minimap'; import { PageContent } from '../../../components/page'; @@ -40,11 +43,11 @@ import { useLogViewConfigurationContext } from '../../../containers/logs/log_vie import { useViewLogInProviderContext } from '../../../containers/logs/view_log_in_context'; import { WithLogTextviewUrlState } from '../../../containers/logs/with_log_textview'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; -import { +import type { LogStreamPageActorRef, LogStreamPageCallbacks, - useLogStreamPageStateContext, } from '../../../observability_logs/log_stream_page/state'; +import { useLogStreamPageStateContext } from '../../../observability_logs/log_stream_page/state'; import { type ParsedQuery } from '../../../observability_logs/log_stream_query_state'; import { datemathToEpochMillis, isValidDatemath } from '../../../utils/datemath'; import { LogsToolbar } from './page_toolbar'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_providers.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_providers.tsx index 497329782d879..cbeb08e3c4f38 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_providers.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_providers.tsx @@ -6,7 +6,8 @@ */ import stringify from 'json-stable-stringify'; -import React, { useMemo, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useMemo } from 'react'; import { LogHighlightsStateProvider, LogPositionStateProvider, @@ -15,8 +16,8 @@ import { useLogStreamContext, useLogViewContext, } from '@kbn/logs-shared-plugin/public'; -import { MatchedStateFromActor } from '@kbn/xstate-utils'; -import { +import type { MatchedStateFromActor } from '@kbn/xstate-utils'; +import type { LogStreamPageActorRef, LogStreamPageCallbacks, } from '../../../observability_logs/log_stream_page/state'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx index 0b458e925c082..c32b7ff9005b7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/logs/stream/page_view_log_in_context.tsx @@ -17,7 +17,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { isEmpty } from 'lodash'; import React, { useCallback, useMemo } from 'react'; import styled from '@emotion/styled'; -import { LogEntry } from '@kbn/logs-shared-plugin/common'; +import type { LogEntry } from '@kbn/logs-shared-plugin/common'; import { LogStream } from '@kbn/logs-shared-plugin/public'; import { useViewLogInProviderContext } from '../../../containers/logs/view_log_in_context'; import { useViewportDimensions } from '../../../hooks/use_viewport_dimensions'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx index 39f4b99e808f1..6103f76a07369 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useEffect, useRef, CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React, { useEffect, useRef } from 'react'; import { Chart, Metric, Settings, type MetricWNumber, type MetricWTrend } from '@elastic/charts'; import { EuiPanel, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx index 703f58aa84cc4..ac782beb012d4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/hosts_table.tsx @@ -10,7 +10,8 @@ import { usePerformanceContext } from '@kbn/ebt-tools'; import { EuiBasicTable } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { EuiEmptyPrompt } from '@elastic/eui'; -import { HostNodeRow, useHostsTableContext } from '../hooks/use_hosts_table'; +import type { HostNodeRow } from '../hooks/use_hosts_table'; +import { useHostsTableContext } from '../hooks/use_hosts_table'; import { useHostsViewContext } from '../hooks/use_hosts_view'; import { useHostCountContext } from '../hooks/use_host_count'; import { FlyoutWrapper } from './host_details_flyout/flyout_wrapper'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts index 75e2469974768..67a0702b288de 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/control_panels_config.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ControlPanels } from '@kbn/observability-shared-plugin/public'; +import type { ControlPanels } from '@kbn/observability-shared-plugin/public'; export const availableControlsPanels = { HOST_OS_NAME: 'host.os.name', diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx index f0b9b2b0c3b76..cabb89bf68b81 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/controls_content.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import { - ControlGroupRenderer, +import type { ControlGroupRendererApi, ControlGroupRuntimeState, DataControlApi, } from '@kbn/controls-plugin/public'; -import { DataView } from '@kbn/data-views-plugin/public'; +import { ControlGroupRenderer } from '@kbn/controls-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/public'; import type { Filter, Query, TimeRange } from '@kbn/es-query'; import styled from '@emotion/styled'; import { useControlPanels } from '@kbn/observability-shared-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/limit_options.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/limit_options.tsx index 8969ed97e2aff..f87cae84621ff 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/limit_options.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/limit_options.tsx @@ -6,9 +6,9 @@ */ import React, { useCallback, useState } from 'react'; +import type { EuiButtonGroupOptionProps } from '@elastic/eui'; import { EuiButtonGroup, - EuiButtonGroupOptionProps, EuiFlexGroup, EuiFlexItem, EuiIcon, @@ -18,7 +18,7 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { HOST_LIMIT_OPTIONS } from '../../constants'; -import { HostLimitOptions } from '../../types'; +import type { HostLimitOptions } from '../../types'; interface Props { limit: HostLimitOptions; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/unified_search_bar.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/unified_search_bar.tsx index 084584c37c147..426cc275d52d0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/unified_search_bar.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/search_bar/unified_search_bar.tsx @@ -15,7 +15,7 @@ import { useUnifiedSearchContext } from '../../hooks/use_unified_search'; import { ControlsContent } from './controls_content'; import { useMetricsDataViewContext } from '../../../../../containers/metrics_source'; import { LimitOptions } from './limit_options'; -import { HostLimitOptions } from '../../types'; +import type { HostLimitOptions } from '../../types'; export const UnifiedSearchBar = () => { const { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/table/add_data_troubleshooting_popover.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/table/add_data_troubleshooting_popover.tsx index 419f78a892352..c5f51ddb7b66c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/table/add_data_troubleshooting_popover.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/table/add_data_troubleshooting_popover.tsx @@ -18,10 +18,8 @@ import { EuiText, } from '@elastic/eui'; -import { - ObservabilityOnboardingLocatorParams, - OBSERVABILITY_ONBOARDING_LOCATOR, -} from '@kbn/deeplinks-observability'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; import { i18n } from '@kbn/i18n'; import { useBoolean } from '@kbn/react-hooks'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx index 34726a68ab2dd..077a0b3ba284d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/alerts/alerts_tab_content.tsx @@ -7,7 +7,8 @@ import React from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { AlertConsumers, OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; -import { BrushEndListener, type XYBrushEvent } from '@elastic/charts'; +import type { BrushEndListener } from '@elastic/charts'; +import { type XYBrushEvent } from '@elastic/charts'; import { useSummaryTimeRange } from '@kbn/observability-plugin/public'; import { useBoolean } from '@kbn/react-hooks'; import type { TimeRange } from '@kbn/es-query'; @@ -17,7 +18,7 @@ import { HeightRetainer } from '../../../../../../components/height_retainer'; import { useUnifiedSearchContext } from '../../../hooks/use_unified_search'; import { useAlertsQuery } from '../../../hooks/use_alerts_query'; import type { HostsState } from '../../../hooks/use_unified_search_url_state'; -import { AlertsEsQuery } from '../../../../../../utils/filters/create_alerts_es_query'; +import type { AlertsEsQuery } from '../../../../../../utils/filters/create_alerts_es_query'; import { ALERTS_PER_PAGE, ALERTS_TABLE_ID, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx index 7dc615517f827..d594f02d36ce5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_link_to_stream.tsx @@ -5,7 +5,8 @@ * 2.0. */ import React from 'react'; -import { getLogsLocatorsFromUrlService, LogViewReference } from '@kbn/logs-shared-plugin/common'; +import type { LogViewReference } from '@kbn/logs-shared-plugin/common'; +import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { OpenInLogsExplorerButton } from '@kbn/logs-shared-plugin/public'; import { useKibanaContextForPlugin } from '../../../../../../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_tab_content.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_tab_content.tsx index 68a5db6d4d484..577fcf0dfe528 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_tab_content.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/components/tabs/logs/logs_tab_content.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/constants.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/constants.ts index acd7e1e36cd81..a38441629e219 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/constants.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/constants.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { HostLimitOptions } from './types'; +import type { HostLimitOptions } from './types'; export const DEFAULT_HOST_LIMIT: HostLimitOptions = 100; export const DEFAULT_PAGE_SIZE = 10; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts index 641194c82888a..bf1d6ada26ec2 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_host_count.test.ts @@ -8,7 +8,7 @@ import { renderHook } from '@testing-library/react'; import { useFetcher } from '../../../../hooks/use_fetcher'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import * as useKibanaContextForPluginHook from '../../../../hooks/use_kibana'; +import type * as useKibanaContextForPluginHook from '../../../../hooks/use_kibana'; import * as useUnifiedSearchHooks from './use_unified_search'; import { useHostCount } from './use_host_count'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts index abae2d5cadbff..309f6929d5085 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts @@ -7,7 +7,7 @@ import { type HostNodeRow, useHostsTable } from './use_hosts_table'; import { renderHook } from '@testing-library/react'; -import { InfraAssetMetricsItem } from '../../../../../common/http_api'; +import type { InfraAssetMetricsItem } from '../../../../../common/http_api'; import * as useUnifiedSearchHooks from './use_unified_search'; import * as useHostsViewHooks from './use_hosts_view'; import * as useKibanaContextForPluginHook from '../../../../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx index 95f951fd82ff3..cc05ae2002197 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_table.tsx @@ -6,18 +6,17 @@ */ import React, { useCallback, useMemo, useState } from 'react'; -import { +import type { EuiBasicTableColumn, CriteriaWithPagination, EuiTableSelectionType, - EuiText, - EuiLink, } from '@elastic/eui'; +import { EuiText, EuiLink } from '@elastic/eui'; import createContainer from 'constate'; import useAsync from 'react-use/lib/useAsync'; import { isEqual } from 'lodash'; import { isNumber } from 'lodash/fp'; -import { CloudProvider } from '@kbn/custom-icons'; +import type { CloudProvider } from '@kbn/custom-icons'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { EuiToolTip } from '@elastic/eui'; import { EuiBadge } from '@elastic/eui'; @@ -33,7 +32,8 @@ import type { InfraAssetMetricsItem, InfraAssetMetricType, } from '../../../../../common/http_api'; -import { Sorting, useHostsTableUrlState } from './use_hosts_table_url_state'; +import type { Sorting } from './use_hosts_table_url_state'; +import { useHostsTableUrlState } from './use_hosts_table_url_state'; import { useHostsViewContext } from './use_hosts_view'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; import { ColumnHeader } from '../components/table/column_header'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts index 941c537acc13c..f176beb626191 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts @@ -14,16 +14,16 @@ import { useMemo } from 'react'; import createContainer from 'constate'; -import { BoolQuery } from '@kbn/es-query'; +import type { BoolQuery } from '@kbn/es-query'; import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { useUnifiedSearchContext } from './use_unified_search'; -import { +import type { GetInfraMetricsRequestBodyPayloadClient, GetInfraMetricsResponsePayload, InfraAssetMetricType, } from '../../../../../common/http_api'; -import { StringDateRange } from './use_unified_search_url_state'; +import type { StringDateRange } from './use_unified_search_url_state'; const HOST_TABLE_METRICS: InfraAssetMetricType[] = [ 'cpuV2', diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search.ts index 291f95554e89c..cfbb8aeb7ee80 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search.ts @@ -6,7 +6,8 @@ */ import createContainer from 'constate'; import { useCallback, useEffect, useState } from 'react'; -import { buildEsQuery, Filter, fromKueryExpression, TimeRange, type Query } from '@kbn/es-query'; +import type { Filter, TimeRange } from '@kbn/es-query'; +import { buildEsQuery, fromKueryExpression, type Query } from '@kbn/es-query'; import { Subscription, map, tap } from 'rxjs'; import deepEqual from 'fast-deep-equal'; import useEffectOnce from 'react-use/lib/useEffectOnce'; @@ -16,11 +17,11 @@ import { useSearchSessionContext } from '../../../../hooks/use_search_session'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { telemetryTimeRangeFormatter } from '../../../../../common/formatters/telemetry_time_range'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; +import type { StringDateRange } from './use_unified_search_url_state'; import { useHostsUrlState, type HostsState, type StringDateRangeTimestamp, - StringDateRange, } from './use_unified_search_url_state'; import { retrieveFieldsFromFilter } from '../../../../utils/filters/build'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search_url_state.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search_url_state.ts index c7bcf09271a3e..5b45a24b389e3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search_url_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/hooks/use_unified_search_url_state.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { Dispatch, useReducer } from 'react'; +import type { Dispatch } from 'react'; +import { useReducer } from 'react'; import deepEqual from 'fast-deep-equal'; import * as rt from 'io-ts'; import { pipe } from 'fp-ts/lib/pipeable'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/types.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/types.ts index d4267f198ebf7..7b04eb9767518 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/hosts/types.ts @@ -4,6 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { HOST_LIMIT_OPTIONS } from './constants'; +import type { HOST_LIMIT_OPTIONS } from './constants'; export type HostLimitOptions = (typeof HOST_LIMIT_OPTIONS)[number]; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/index.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/index.tsx index 7a0289d461af7..b1ab334395dfc 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/index.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/index.tsx @@ -19,11 +19,9 @@ import { } from '@elastic/eui'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { HeaderMenuPortal, useLinkProps } from '@kbn/observability-shared-plugin/public'; -import { SharePublicStart } from '@kbn/share-plugin/public/plugin'; -import { - ObservabilityOnboardingLocatorParams, - OBSERVABILITY_ONBOARDING_LOCATOR, -} from '@kbn/deeplinks-observability'; +import type { SharePublicStart } from '@kbn/share-plugin/public/plugin'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; import { dynamic } from '@kbn/shared-ux-utility'; import { HelpCenterContent } from '../../components/help_center_content'; import { useReadOnlyBadge } from '../../hooks/use_readonly_badge'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/bottom_drawer.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/bottom_drawer.tsx index 6ac2c09bc81b9..53636878d8f26 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/bottom_drawer.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/bottom_drawer.tsx @@ -11,10 +11,10 @@ import { EuiFlexGroup, EuiFlexItem, EuiButtonEmpty, EuiPanel } from '@elastic/eu import styled from '@emotion/styled'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import useLocalStorage from 'react-use/lib/useLocalStorage'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { TryItButton } from '../../../../components/try_it_button'; import { useWaffleOptionsContext } from '../hooks/use_waffle_options'; -import { InfraFormatter } from '../../../../common/inventory/types'; +import type { InfraFormatter } from '../../../../common/inventory/types'; import { Timeline } from './timeline/timeline'; const showHistory = i18n.translate('xpack.infra.showHistory', { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/dropdown_button.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/dropdown_button.tsx index 50b69b94c803e..bdc4a183a2c52 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/dropdown_button.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/dropdown_button.tsx @@ -5,15 +5,16 @@ * 2.0. */ +import type { WithEuiThemeProps } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiButtonEmpty, withEuiTheme, - WithEuiThemeProps, type EuiThemeComputed, } from '@elastic/eui'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { KubernetesTour } from './kubernetes_tour'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/kubernetes_tour.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/kubernetes_tour.tsx index 787aa9f416266..786ed2bc75c16 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/kubernetes_tour.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/kubernetes_tour.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactElement } from 'react'; +import type { ReactElement } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { EuiTourStep, EuiText, EuiButtonEmpty } from '@elastic/eui'; import useLocalStorage from 'react-use/lib/useLocalStorage'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx index 304b44840a042..e36057c0ee5e9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout.tsx @@ -10,20 +10,18 @@ import useInterval from 'react-use/lib/useInterval'; import { css } from '@emotion/react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import styled from '@emotion/styled'; -import { InventoryView } from '../../../../../common/inventory_views'; -import { SnapshotNode } from '../../../../../common/http_api'; +import type { InventoryView } from '../../../../../common/inventory_views'; +import type { SnapshotNode } from '../../../../../common/http_api'; import { AutoSizer } from '../../../../components/auto_sizer'; import { NodesOverview } from './nodes_overview'; import { calculateBoundsFromNodes } from '../lib/calculate_bounds_from_nodes'; import { PageContent } from '../../../../components/page'; import { useWaffleTimeContext } from '../hooks/use_waffle_time'; import { useWaffleFiltersContext } from '../hooks/use_waffle_filters'; -import { - DEFAULT_LEGEND, - useWaffleOptionsContext, - WaffleLegendOptions, -} from '../hooks/use_waffle_options'; -import { InfraFormatterType, InfraWaffleMapBounds } from '../../../../common/inventory/types'; +import type { WaffleLegendOptions } from '../hooks/use_waffle_options'; +import { DEFAULT_LEGEND, useWaffleOptionsContext } from '../hooks/use_waffle_options'; +import type { InfraWaffleMapBounds } from '../../../../common/inventory/types'; +import { InfraFormatterType } from '../../../../common/inventory/types'; import { Toolbar } from './toolbars/toolbar'; import { ViewSwitcher } from './waffle/view_switcher'; import { createInventoryMetricFormatter } from '../lib/create_inventory_metric_formatter'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout_view.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout_view.tsx index a6e1ba67174c9..74e39b4b40331 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout_view.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/layout_view.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { useInventoryViews } from '../../../../hooks/use_inventory_views'; -import { SnapshotNode } from '../../../../../common/http_api'; +import type { SnapshotNode } from '../../../../../common/http_api'; import { Layout } from './layout'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx index d012aeb532491..af800a2478e65 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/nodes_overview.tsx @@ -10,8 +10,8 @@ import { usePerformanceContext } from '@kbn/ebt-tools'; import React, { useCallback, useMemo } from 'react'; import { useCurrentEuiBreakpoint } from '@elastic/eui'; import styled from '@emotion/styled'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InfraWaffleMapBounds, InfraWaffleMapOptions, InfraFormatter, @@ -20,7 +20,7 @@ import { NoData } from '../../../../components/empty_states'; import { InfraLoadingPanel } from '../../../../components/loading'; import { Map } from './waffle/map'; import { TableView } from './table_view'; -import { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; +import type { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; import { calculateBoundsFromNodes } from '../lib/calculate_bounds_from_nodes'; import { Legend } from './waffle/legend'; import { useAssetDetailsFlyoutState } from '../hooks/use_asset_details_flyout_url_state'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/table_view.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/table_view.tsx index e41bf377e40e1..0de30f273a0f2 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/table_view.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/table_view.tsx @@ -5,18 +5,19 @@ * 2.0. */ -import { EuiButtonEmpty, EuiInMemoryTable, EuiToolTip, EuiBasicTableColumn } from '@elastic/eui'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import { EuiButtonEmpty, EuiInMemoryTable, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { last, first } from 'lodash'; import React, { useState, useMemo } from 'react'; import { EuiPopover } from '@elastic/eui'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { createWaffleMapNode } from '../lib/nodes_to_wafflemap'; -import { InfraWaffleMapNode, InfraWaffleMapOptions } from '../../../../common/inventory/types'; +import type { InfraWaffleMapNode, InfraWaffleMapOptions } from '../../../../common/inventory/types'; import { fieldToName } from '../lib/field_to_display_name'; import { NodeContextMenu } from './waffle/node_context_menu'; -import { SnapshotNode, SnapshotNodePath } from '../../../../../common/http_api/snapshot_api'; +import type { SnapshotNode, SnapshotNodePath } from '../../../../../common/http_api/snapshot_api'; import { useAssetDetailsFlyoutState } from '../hooks/use_asset_details_flyout_url_state'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx index a40bab58d70fa..170cad2fb4024 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/timeline/timeline.tsx @@ -11,27 +11,29 @@ import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; import { first, last } from 'lodash'; import { EuiLoadingChart, EuiText, EuiEmptyPrompt, EuiButton, useEuiTheme } from '@elastic/eui'; +import type { + ElementClickListener, + RectAnnotationDatum, + XYChartElementEvent, + TooltipProps, +} from '@elastic/charts'; import { Axis, Chart, Settings, Position, niceTimeFormatter, - ElementClickListener, RectAnnotation, - RectAnnotationDatum, - XYChartElementEvent, - TooltipProps, Tooltip, } from '@elastic/charts'; import { EuiFlexItem } from '@elastic/eui'; import { EuiFlexGroup } from '@elastic/eui'; import { EuiIcon } from '@elastic/eui'; import styled from '@emotion/styled'; -import { Metric } from '../../../../../../common/http_api/infra_ml'; +import type { Metric } from '../../../../../../common/http_api/infra_ml'; import { useTimelineChartTheme } from '../../../../../hooks/use_timeline_chart_theme'; import { toMetricOpt } from '../../../../../../common/snapshot_metric_i18n'; -import { MetricsExplorerAggregation } from '../../../../../../common/http_api'; +import type { MetricsExplorerAggregation } from '../../../../../../common/http_api'; import { colorTransformer, Color } from '../../../../../../common/color_palette'; import { useSourceContext } from '../../../../../containers/metrics_source'; import { useTimeline } from '../../hooks/use_timeline'; @@ -41,7 +43,7 @@ import { useWaffleFiltersContext } from '../../hooks/use_waffle_filters'; import { MetricExplorerSeriesChart } from '../../../metrics_explorer/components/series_chart'; import { MetricsExplorerChartType } from '../../../metrics_explorer/hooks/use_metrics_explorer_options'; import { calculateDomain } from '../../../metrics_explorer/components/helpers/calculate_domain'; -import { InfraFormatter } from '../../../../../common/inventory/types'; +import type { InfraFormatter } from '../../../../../common/inventory/types'; import { useMetricsHostsAnomaliesResults } from '../../hooks/use_metrics_hosts_anomalies'; import { useMetricsK8sAnomaliesResults } from '../../hooks/use_metrics_k8s_anomalies'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/aws_ec2_toolbar_items.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/aws_ec2_toolbar_items.tsx index 3a5697aebcbcf..18dfe1b396076 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/aws_ec2_toolbar_items.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/aws_ec2_toolbar_items.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { awsEC2SnapshotMetricTypes } from '@kbn/metrics-data-access-plugin/common'; import { MetricsAndGroupByToolbarItems } from './metrics_and_groupby_toolbar_items'; import { CloudToolbarItems } from './cloud_toolbar_items'; -import { ToolbarProps } from './types'; +import type { ToolbarProps } from './types'; export const ec2groupByFields = [ 'cloud.availability_zone', diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx index 81a82bd93f766..aca957b42dc1e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/metrics_and_groupby_toolbar_items.tsx @@ -7,7 +7,7 @@ import { EuiFlexItem } from '@elastic/eui'; import React, { useMemo } from 'react'; -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { toMetricOpt } from '../../../../../../common/snapshot_metric_i18n'; import { WaffleMetricControls } from '../waffle/metric_control'; import { WaffleGroupByControls } from '../waffle/waffle_group_by_controls'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx index 44afa9cecc2da..49ea4902f1d10 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar.tsx @@ -7,7 +7,7 @@ import { EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { InventoryMetaResponseRT } from '../../../../../../common/http_api/inventory_meta_api'; import { useFetcher } from '../../../../../hooks/use_fetcher'; @@ -20,7 +20,7 @@ import { ContainerToolbarItems } from './container_toolbar_items'; import { HostToolbarItems } from './host_toolbar_items'; import { PodToolbarItems } from './pod_toolbar_items'; import { ToolbarWrapper } from './toolbar_wrapper'; -import { ToolbarProps } from './types'; +import type { ToolbarProps } from './types'; interface Props { nodeType: InventoryItemType; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar_wrapper.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar_wrapper.tsx index e1ff4674d9e8d..6bc892e7c4b27 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar_wrapper.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/toolbar_wrapper.tsx @@ -10,7 +10,7 @@ import { EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; import { fieldToName } from '../../lib/field_to_display_name'; import { useWaffleOptionsContext } from '../../hooks/use_waffle_options'; import { WaffleInventorySwitcher } from '../waffle/waffle_inventory_switcher'; -import { ToolbarProps } from './types'; +import type { ToolbarProps } from './types'; interface Props { children: (props: Omit) => React.ReactElement; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/types.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/types.ts index 19e032366885f..0671660653ca0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/toolbars/types.ts @@ -4,14 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { InventoryCloudAccount } from '../../../../../../common/http_api/inventory_meta_api'; -import { +import type { InventoryCloudAccount } from '../../../../../../common/http_api/inventory_meta_api'; +import type { SnapshotCustomMetricInput, SnapshotGroupBy, SnapshotMetricInput, } from '../../../../../../common/http_api/snapshot_api'; -import { InfraGroupByOptions } from '../../../../../common/inventory/types'; -import { WaffleOptionsState, WaffleSortOption } from '../../hooks/use_waffle_options'; +import type { InfraGroupByOptions } from '../../../../../common/inventory/types'; +import type { WaffleOptionsState, WaffleSortOption } from '../../hooks/use_waffle_options'; export interface ToolbarProps extends Omit { changeMetric: (payload: SnapshotMetricInput) => void; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx index a4d18eba34aef..200dfb3f41cf4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx @@ -8,15 +8,16 @@ import React from 'react'; import { mount } from 'enzyme'; import { ConditionalToolTip } from './conditional_tooltip'; -import { SnapshotNodeResponse } from '../../../../../../common/http_api'; -import { InfraWaffleMapNode } from '../../../../../common/inventory/types'; +import type { SnapshotNodeResponse } from '../../../../../../common/http_api'; +import type { InfraWaffleMapNode } from '../../../../../common/inventory/types'; jest.mock('../../../../../containers/metrics_source', () => ({ useSourceContext: () => ({ sourceId: 'default' }), })); jest.mock('../../hooks/use_snaphot'); -import { useSnapshot, UseSnapshotRequest } from '../../hooks/use_snaphot'; +import type { UseSnapshotRequest } from '../../hooks/use_snaphot'; +import { useSnapshot } from '../../hooks/use_snaphot'; jest.mock('../../hooks/use_waffle_options'); import { useWaffleOptionsContext } from '../../hooks/use_waffle_options'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx index 1d35503cf66f9..bb0f92278c39e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx @@ -9,15 +9,12 @@ import React, { useRef } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import { first } from 'lodash'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; -import { - InventoryItemType, - SnapshotMetricType, - SnapshotMetricTypeRT, -} from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import { SnapshotMetricTypeRT } from '@kbn/metrics-data-access-plugin/common'; import { getCustomMetricLabel } from '../../../../../../common/formatters/get_custom_metric_label'; -import { SnapshotCustomMetricInput } from '../../../../../../common/http_api'; +import type { SnapshotCustomMetricInput } from '../../../../../../common/http_api'; import { useSourceContext } from '../../../../../containers/metrics_source'; -import { InfraWaffleMapNode } from '../../../../../common/inventory/types'; +import type { InfraWaffleMapNode } from '../../../../../common/inventory/types'; import { useSnapshot } from '../../hooks/use_snaphot'; import { createInventoryMetricFormatter } from '../../lib/create_inventory_metric_formatter'; import { getSnapshotMetricTranslations } from '../../../../../../common/inventory_models/intl_strings'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx index 30950c0439229..8ed306c068856 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/custom_field_panel.tsx @@ -9,7 +9,7 @@ import { EuiButton, EuiComboBox, EuiForm, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useMetricsDataViewContext } from '../../../../../containers/metrics_source'; -import { InfraGroupByOptions } from '../../../../../common/inventory/types'; +import type { InfraGroupByOptions } from '../../../../../common/inventory/types'; interface Props { onSubmit: (field: string) => void; currentOptions: InfraGroupByOptions[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/gradient_legend.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/gradient_legend.tsx index f76f1af711970..f80cc50cd3ec0 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/gradient_legend.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/gradient_legend.tsx @@ -8,7 +8,7 @@ import React from 'react'; import styled from '@emotion/styled'; import { useEuiFontSize } from '@elastic/eui'; -import { +import type { InfraFormatter, InfraWaffleMapBounds, InfraWaffleMapGradientLegend, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_name.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_name.tsx index eeafce9a7ae49..75d409695d33e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_name.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_name.tsx @@ -8,7 +8,10 @@ import { EuiLink, EuiToolTip, useEuiFontSize } from '@elastic/eui'; import React from 'react'; import styled from '@emotion/styled'; -import { InfraWaffleMapGroup, InfraWaffleMapOptions } from '../../../../../common/inventory/types'; +import type { + InfraWaffleMapGroup, + InfraWaffleMapOptions, +} from '../../../../../common/inventory/types'; interface Props { onDrilldown: (filter: string) => void; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_groups.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_groups.tsx index bb09b568ceb9a..b136ea7d781d9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_groups.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_groups.tsx @@ -7,8 +7,8 @@ import React from 'react'; import styled from '@emotion/styled'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InfraWaffleMapBounds, InfraWaffleMapGroupOfGroups, InfraWaffleMapOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_nodes.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_nodes.tsx index 07185ad58f26b..95437c21b7b01 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_nodes.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/group_of_nodes.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; import { isEqual } from 'lodash'; import styled from '@emotion/styled'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InfraWaffleMapBounds, InfraWaffleMapGroupOfNodes, InfraWaffleMapOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend.tsx index 6544bb7c81eb2..8a982f26a5604 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend.tsx @@ -7,10 +7,12 @@ import React from 'react'; import styled from '@emotion/styled'; -import { +import type { InfraFormatter, InfraWaffleMapBounds, InfraWaffleMapLegend, +} from '../../../../../common/inventory/types'; +import { SteppedGradientLegendRT, StepLegendRT, GradientLegendRT, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx index ce66c788bd1b2..6b1cb1a02676f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/legend_controls.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiSwitchEvent } from '@elastic/eui'; import { EuiButtonEmpty, EuiButton, @@ -16,7 +17,6 @@ import { EuiPopoverTitle, EuiSpacer, EuiSwitch, - EuiSwitchEvent, EuiSelect, EuiRange, EuiFlexGroup, @@ -25,9 +25,10 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import styled from '@emotion/styled'; -import React, { SyntheticEvent, useState, useCallback, useEffect } from 'react'; +import type { SyntheticEvent } from 'react'; +import React, { useState, useCallback, useEffect } from 'react'; import { first, last } from 'lodash'; -import { EuiRangeProps, EuiSelectProps } from '@elastic/eui'; +import type { EuiRangeProps, EuiSelectProps } from '@elastic/eui'; import type { WaffleLegendOptions } from '../../hooks/use_waffle_options'; import { type InfraWaffleMapBounds, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/map.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/map.tsx index 27fb0e501639b..4d45a36df981e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/map.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/map.tsx @@ -7,15 +7,18 @@ import React from 'react'; import styled from '@emotion/styled'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { nodesToWaffleMap } from '../../lib/nodes_to_wafflemap'; import { isWaffleMapGroupWithGroups, isWaffleMapGroupWithNodes } from '../../lib/type_guards'; -import { InfraWaffleMapBounds, InfraWaffleMapOptions } from '../../../../../common/inventory/types'; +import type { + InfraWaffleMapBounds, + InfraWaffleMapOptions, +} from '../../../../../common/inventory/types'; import { AutoSizer } from '../../../../../components/auto_sizer'; import { GroupOfGroups } from './group_of_groups'; import { GroupOfNodes } from './group_of_nodes'; import { applyWaffleMapLayout } from '../../lib/apply_wafflemap_layout'; -import { SnapshotNode } from '../../../../../../common/http_api/snapshot_api'; +import type { SnapshotNode } from '../../../../../../common/http_api/snapshot_api'; import { sortNodes } from '../../lib/sort_nodes'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx index 4d866dd474a23..77e082d161d86 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/custom_metric_form.tsx @@ -7,6 +7,7 @@ import React, { useState, useCallback } from 'react'; import { v4 as uuidv4 } from 'uuid'; +import type { WithEuiThemeProps } from '@elastic/eui'; import { EuiForm, EuiButton, @@ -19,14 +20,15 @@ import { EuiFlexItem, EuiText, EuiPopoverTitle, - WithEuiThemeProps, withEuiTheme, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { +import type { SnapshotCustomAggregation, SnapshotCustomMetricInput, +} from '../../../../../../../common/http_api/snapshot_api'; +import { SNAPSHOT_CUSTOM_AGGREGATIONS, SnapshotCustomAggregationRT, } from '../../../../../../../common/http_api/snapshot_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx index 4f366094e4d60..588fd916a5bbb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/index.tsx @@ -8,19 +8,19 @@ import { EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useState, useCallback } from 'react'; -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { SNAPSHOT_API_MAX_METRICS } from '../../../../../../../common/constants'; import { getCustomMetricLabel } from '../../../../../../../common/formatters/get_custom_metric_label'; -import { +import type { SnapshotMetricInput, SnapshotCustomMetricInput, - SnapshotCustomMetricInputRT, } from '../../../../../../../common/http_api/snapshot_api'; +import { SnapshotCustomMetricInputRT } from '../../../../../../../common/http_api/snapshot_api'; import { CustomMetricForm } from './custom_metric_form'; import { MetricsContextMenu } from './metrics_context_menu'; import { ModeSwitcher } from './mode_switcher'; import { MetricsEditMode } from './metrics_edit_mode'; -import { CustomMetricMode } from './types'; +import type { CustomMetricMode } from './types'; import { DropdownButton } from '../../dropdown_button'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_context_menu.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_context_menu.tsx index 3ce49b08d0e2a..e518e36763d78 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_context_menu.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_context_menu.tsx @@ -6,14 +6,16 @@ */ import React, { useCallback } from 'react'; -import { EuiContextMenuPanelDescriptor, EuiContextMenu } from '@elastic/eui'; -import { SnapshotMetricTypeRT, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiContextMenu } from '@elastic/eui'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import { SnapshotMetricTypeRT } from '@kbn/metrics-data-access-plugin/common'; import { getCustomMetricLabel } from '../../../../../../../common/formatters/get_custom_metric_label'; -import { +import type { SnapshotMetricInput, SnapshotCustomMetricInput, - SnapshotCustomMetricInputRT, } from '../../../../../../../common/http_api/snapshot_api'; +import { SnapshotCustomMetricInputRT } from '../../../../../../../common/http_api/snapshot_api'; interface Props { options: Array<{ text: string; value: string }>; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_edit_mode.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_edit_mode.tsx index afff11a467b27..c984ab805a196 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_edit_mode.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/metrics_edit_mode.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { getCustomMetricLabel } from '../../../../../../../common/formatters/get_custom_metric_label'; -import { SnapshotCustomMetricInput } from '../../../../../../../common/http_api/snapshot_api'; +import type { SnapshotCustomMetricInput } from '../../../../../../../common/http_api/snapshot_api'; interface Props { customMetrics: SnapshotCustomMetricInput[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/mode_switcher.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/mode_switcher.tsx index 256d7827bc773..e3062947569d3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/mode_switcher.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/metric_control/mode_switcher.tsx @@ -17,8 +17,8 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { SNAPSHOT_API_MAX_METRICS } from '../../../../../../../common/constants'; -import { CustomMetricMode } from './types'; -import { SnapshotCustomMetricInput } from '../../../../../../../common/http_api/snapshot_api'; +import type { CustomMetricMode } from './types'; +import type { SnapshotCustomMetricInput } from '../../../../../../../common/http_api/snapshot_api'; interface Props { onEdit: () => void; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx index 02e4e634d30d1..c55e360af5747 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node.tsx @@ -9,9 +9,9 @@ import React from 'react'; import { first } from 'lodash'; import { EuiPopover, EuiToolTip } from '@elastic/eui'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { useBoolean } from '@kbn/react-hooks'; -import { +import type { InfraWaffleMapBounds, InfraWaffleMapNode, InfraWaffleMapOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx index c1fa99a6e652b..d88f147432d5c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_context_menu.tsx @@ -10,9 +10,9 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React, { useMemo, useState } from 'react'; +import type { SectionLinkProps } from '@kbn/observability-shared-plugin/public'; import { Section, - SectionLinkProps, SectionTitle, SectionSubtitle, SectionLinks, @@ -30,7 +30,10 @@ import { getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { uptimeOverviewLocatorID } from '@kbn/observability-plugin/common'; import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; import { AlertFlyout } from '../../../../../alerting/inventory/components/alert_flyout'; -import { InfraWaffleMapNode, InfraWaffleMapOptions } from '../../../../../common/inventory/types'; +import type { + InfraWaffleMapNode, + InfraWaffleMapOptions, +} from '../../../../../common/inventory/types'; import { navigateToUptime } from '../../lib/navigate_to_uptime'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx index ef6747b059b84..385219311397c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/node_square.tsx @@ -6,10 +6,11 @@ */ import { darken, readableColor } from 'polished'; -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; -import { UseBooleanHandlers } from '@kbn/react-hooks'; +import type { UseBooleanHandlers } from '@kbn/react-hooks'; import { useEuiTheme } from '@elastic/eui'; type NodeProps = React.DetailedHTMLProps, T> & { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/stepped_gradient_legend.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/stepped_gradient_legend.tsx index dbbe8afe00b5f..1c410003c3611 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/stepped_gradient_legend.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/stepped_gradient_legend.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { EuiText } from '@elastic/eui'; import styled from '@emotion/styled'; -import { +import type { InfraWaffleMapBounds, InfraFormatter, InfraWaffleMapSteppedGradientLegend, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/steps_legend.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/steps_legend.tsx index 2c4ab09fa82d3..2e990647fef7c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/steps_legend.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/steps_legend.tsx @@ -9,12 +9,12 @@ import { darken } from 'polished'; import React from 'react'; import styled from '@emotion/styled'; import { useEuiFontSize } from '@elastic/eui'; -import { +import type { InfraFormatter, - InfraWaffleMapRuleOperator, InfraWaffleMapStepLegend, InfraWaffleMapStepRule, } from '../../../../../common/inventory/types'; +import { InfraWaffleMapRuleOperator } from '../../../../../common/inventory/types'; const OPERATORS = { [InfraWaffleMapRuleOperator.gte]: '>=', diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/view_switcher.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/view_switcher.tsx index 8e911f7f82917..6b8d44fe8ff31 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/view_switcher.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/view_switcher.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiButtonGroup, EuiButtonGroupProps } from '@elastic/eui'; +import type { EuiButtonGroupProps } from '@elastic/eui'; +import { EuiButtonGroup } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_accounts_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_accounts_controls.tsx index 422bedb0a7275..e5f24515136f1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_accounts_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_accounts_controls.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import { EuiContextMenuPanelDescriptor, EuiPopover, EuiContextMenu } from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiPopover, EuiContextMenu } from '@elastic/eui'; import React, { useCallback, useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; -import { InventoryCloudAccount } from '../../../../../../common/http_api/inventory_meta_api'; +import type { InventoryCloudAccount } from '../../../../../../common/http_api/inventory_meta_api'; import { DropdownButton } from '../dropdown_button'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx index bca1a3858f5c9..f63a0856df2bf 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_group_by_controls.tsx @@ -5,22 +5,20 @@ * 2.0. */ -import { - EuiBadge, - EuiContextMenu, +import type { EuiContextMenuPanelDescriptor, EuiContextMenuPanelItemDescriptor, - EuiPopover, } from '@elastic/eui'; +import { EuiBadge, EuiContextMenu, EuiPopover } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { css } from '@emotion/react'; import { useBoolean } from '@kbn/react-hooks'; -import { InfraGroupByOptions } from '../../../../../common/inventory/types'; +import type { InfraGroupByOptions } from '../../../../../common/inventory/types'; import { CustomFieldPanel } from './custom_field_panel'; -import { SnapshotGroupBy } from '../../../../../../common/http_api/snapshot_api'; +import type { SnapshotGroupBy } from '../../../../../../common/http_api/snapshot_api'; import { DropdownButton } from '../dropdown_button'; const maxGroupByTooltip = i18n.translate('xpack.infra.waffle.maxGroupByTooltip', { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx index d7b88870b6450..0c66b65677caf 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_inventory_switcher.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import { EuiPopover, EuiContextMenu, EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiPopover, EuiContextMenu } from '@elastic/eui'; import React, { useCallback, useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { useWaffleOptionsContext } from '../../hooks/use_waffle_options'; import { DropdownButton } from '../dropdown_button'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_region_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_region_controls.tsx index 1ab2bd17b250c..62733a8699643 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_region_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_region_controls.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiContextMenuPanelDescriptor, EuiPopover, EuiContextMenu } from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiPopover, EuiContextMenu } from '@elastic/eui'; import React, { useCallback, useState, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { DropdownButton } from '../dropdown_button'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_sort_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_sort_controls.tsx index a2ec9dcccfe56..9f5444bd97b60 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_sort_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_sort_controls.tsx @@ -5,17 +5,12 @@ * 2.0. */ -import React, { useCallback, useMemo, useState, ReactNode } from 'react'; -import { - EuiSwitch, - EuiContextMenuPanelDescriptor, - EuiPopover, - EuiContextMenu, - withEuiTheme, - WithEuiThemeProps, -} from '@elastic/eui'; +import type { ReactNode } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; +import type { EuiContextMenuPanelDescriptor, WithEuiThemeProps } from '@elastic/eui'; +import { EuiSwitch, EuiPopover, EuiContextMenu, withEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { WaffleSortOption } from '../../hooks/use_waffle_options'; +import type { WaffleSortOption } from '../../hooks/use_waffle_options'; import { DropdownButton } from '../dropdown_button'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_time_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_time_controls.tsx index a723958246c10..342cf9efa2ea4 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_time_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/components/waffle/waffle_time_controls.tsx @@ -5,17 +5,18 @@ * 2.0. */ +import type { WithEuiThemeProps } from '@elastic/eui'; import { EuiButton, EuiDatePicker, EuiFlexGroup, EuiFlexItem, EuiToolTip, - WithEuiThemeProps, withEuiTheme, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import moment, { Moment } from 'moment'; +import type { Moment } from 'moment'; +import moment from 'moment'; import React, { useCallback } from 'react'; import { convertIntervalToString } from '../../../../../utils/convert_interval_to_string'; import { useWaffleTimeContext } from '../../hooks/use_waffle_time'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_hosts_anomalies.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_hosts_anomalies.ts index 06eead35a32f4..b8695c1ce8949 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_hosts_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_hosts_anomalies.ts @@ -6,19 +6,21 @@ */ import { useState, useCallback, useEffect, useReducer } from 'react'; -import { BehaviorSubject } from 'rxjs'; +import type { BehaviorSubject } from 'rxjs'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { isPending, isFailure, useFetcher } from '../../../../hooks/use_fetcher'; -import { - INFA_ML_GET_METRICS_HOSTS_ANOMALIES_PATH, +import type { Sort, Pagination, PaginationCursor, - getMetricsHostsAnomaliesRequestPayloadRT, MetricsHostsAnomaly, - getMetricsHostsAnomaliesSuccessReponsePayloadRT, Metric, } from '../../../../../common/http_api/infra_ml'; +import { + INFA_ML_GET_METRICS_HOSTS_ANOMALIES_PATH, + getMetricsHostsAnomaliesRequestPayloadRT, + getMetricsHostsAnomaliesSuccessReponsePayloadRT, +} from '../../../../../common/http_api/infra_ml'; export type SortOptions = Sort; export type PaginationOptions = Pick; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_k8s_anomalies.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_k8s_anomalies.ts index 812e6b76bfe58..eb8f56d28d2e1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_k8s_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_metrics_k8s_anomalies.ts @@ -6,18 +6,20 @@ */ import { useState, useCallback, useEffect, useReducer } from 'react'; -import { BehaviorSubject } from 'rxjs'; +import type { BehaviorSubject } from 'rxjs'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { isFailure, isPending, useFetcher } from '../../../../hooks/use_fetcher'; -import { +import type { Sort, Pagination, PaginationCursor, + MetricsK8sAnomaly, + Metric, +} from '../../../../../common/http_api/infra_ml'; +import { INFA_ML_GET_METRICS_K8S_ANOMALIES_PATH, getMetricsK8sAnomaliesSuccessReponsePayloadRT, getMetricsK8sAnomaliesRequestPayloadRT, - MetricsK8sAnomaly, - Metric, } from '../../../../../common/http_api/infra_ml'; export type SortOptions = Sort; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts index 0f16700b14932..9e0ee6e5c5414 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_snaphot.ts @@ -8,11 +8,11 @@ import { useMemo } from 'react'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; -import { +import type { InfraTimerangeInput, - SnapshotNodeResponseRT, SnapshotRequest, } from '../../../../../common/http_api/snapshot_api'; +import { SnapshotNodeResponseRT } from '../../../../../common/http_api/snapshot_api'; export interface UseSnapshotRequest extends Omit { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts index 1733c648afeac..b7577ad031353 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts @@ -9,7 +9,7 @@ import { first } from 'lodash'; import { useEffect, useMemo } from 'react'; import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { getIntervalInSeconds } from '../../../../../common/utils/get_interval_in_seconds'; -import { InfraTimerangeInput } from '../../../../../common/http_api/snapshot_api'; +import type { InfraTimerangeInput } from '../../../../../common/http_api/snapshot_api'; import { useSnapshot } from './use_snaphot'; const ONE_MINUTE = 60; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.test.ts index 533857130b114..04933f7769792 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_filters.test.ts @@ -6,10 +6,11 @@ */ import { renderHook, act } from '@testing-library/react'; -import { DataView } from '@kbn/data-views-plugin/common'; -import { useWaffleFilters, WaffleFiltersState } from './use_waffle_filters'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import type { WaffleFiltersState } from './use_waffle_filters'; +import { useWaffleFilters } from './use_waffle_filters'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; -import { ResolvedDataView } from '../../../../utils/data_view'; +import type { ResolvedDataView } from '../../../../utils/data_view'; // Mock useUrlState hook jest.mock('react-router-dom', () => ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.test.ts index 757a0e955b4df..d6acdf107ea69 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.test.ts @@ -7,7 +7,8 @@ import { renderHook, act } from '@testing-library/react'; -import { useWaffleOptions, WaffleOptionsState } from './use_waffle_options'; +import type { WaffleOptionsState } from './use_waffle_options'; +import { useWaffleOptions } from './use_waffle_options'; // Mock useUrlState hook jest.mock('react-router-dom', () => ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.ts index 41b91bce9c4ee..ab8be52fbec38 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_options.ts @@ -12,7 +12,7 @@ import { constant, identity } from 'fp-ts/lib/function'; import createContainer from 'constate'; import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { useUrlState } from '@kbn/observability-shared-plugin/public'; -import { InventoryViewOptions } from '../../../../../common/inventory_views/types'; +import type { InventoryViewOptions } from '../../../../../common/inventory_views/types'; import { type InventoryLegendOptions, type InventoryOptionsState, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_view_state.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_view_state.ts index c1ff4c67addbb..c524f8d9ccba5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_view_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/hooks/use_waffle_view_state.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { InventoryViewAttributes } from '../../../../../common/inventory_views'; +import type { InventoryViewAttributes } from '../../../../../common/inventory_views'; import { useWaffleOptionsContext, DEFAULT_WAFFLE_OPTIONS_STATE } from './use_waffle_options'; import { useWaffleTimeContext, DEFAULT_WAFFLE_TIME_STATE } from './use_waffle_time'; import { useWaffleFiltersContext, DEFAULT_WAFFLE_FILTERS_STATE } from './use_waffle_filters'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/apply_wafflemap_layout.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/apply_wafflemap_layout.ts index bd3978687ca28..9f0cc75904dca 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/apply_wafflemap_layout.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/apply_wafflemap_layout.ts @@ -7,7 +7,7 @@ import { first, sortBy } from 'lodash'; import { isWaffleMapGroupWithGroups, isWaffleMapGroupWithNodes } from './type_guards'; -import { InfraWaffleMapGroup } from '../../../../common/inventory/types'; +import type { InfraWaffleMapGroup } from '../../../../common/inventory/types'; import { sizeOfSquares } from './size_of_squares'; export function getColumns(n: number, w = 1, h = 1) { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.test.ts index 15b4b70bd391f..a8913fa22046a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.test.ts @@ -6,7 +6,7 @@ */ import { calculateBoundsFromNodes } from './calculate_bounds_from_nodes'; -import { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; +import type { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; const nodes: SnapshotNode[] = [ { name: 'host-01', diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.ts index 8b6f3e734cb41..bad76d846a3b9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/calculate_bounds_from_nodes.ts @@ -6,8 +6,8 @@ */ import { first, min, max, isFinite } from 'lodash'; -import { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; -import { InfraWaffleMapBounds } from '../../../../common/inventory/types'; +import type { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; +import type { InfraWaffleMapBounds } from '../../../../common/inventory/types'; export const calculateBoundsFromNodes = (nodes: SnapshotNode[]): InfraWaffleMapBounds => { const values = nodes.map((node) => { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/color_from_value.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/color_from_value.ts index e9be23a064320..f821778171655 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/color_from_value.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/color_from_value.ts @@ -7,15 +7,17 @@ import { isEqual, first, gt, gte, last, lt, lte, sortBy } from 'lodash'; import { mix, parseToRgb, toColorString } from 'polished'; -import { +import type { InfraWaffleMapBounds, InfraWaffleMapLegend, + InfraWaffleMapStepRule, + InfraWaffleMapGradientRule, +} from '../../../../common/inventory/types'; +import { InfraWaffleMapRuleOperator, GradientLegendRT, SteppedGradientLegendRT, StepLegendRT, - InfraWaffleMapStepRule, - InfraWaffleMapGradientRule, } from '../../../../common/inventory/types'; const OPERATOR_TO_FN = { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/convert_bounds_to_percents.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/convert_bounds_to_percents.ts index 660719d2f6e0b..28bf126324fd5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/convert_bounds_to_percents.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/convert_bounds_to_percents.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraWaffleMapBounds } from '../../../../common/inventory/types'; +import type { InfraWaffleMapBounds } from '../../../../common/inventory/types'; export const convertBoundsToPercents = (bounds: InfraWaffleMapBounds) => ({ min: bounds.min * 100, max: (bounds.max || 1) * 100, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts index ce7b0a5561e4e..98d93847ba389 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/create_inventory_metric_formatter.ts @@ -6,12 +6,10 @@ */ import { get, isNumber } from 'lodash'; -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { InfraFormatterType } from '../../../../common/inventory/types'; -import { - SnapshotMetricInput, - SnapshotCustomMetricInputRT, -} from '../../../../../common/http_api/snapshot_api'; +import type { SnapshotMetricInput } from '../../../../../common/http_api/snapshot_api'; +import { SnapshotCustomMetricInputRT } from '../../../../../common/http_api/snapshot_api'; import { createFormatterForMetric } from '../../metrics_explorer/components/helpers/create_formatter_for_metric'; import { createFormatter } from '../../../../../common/formatters'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts index 402ad907ee057..fd58c732b30cf 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/get_color_palette.ts @@ -13,7 +13,7 @@ import { euiPaletteGreen, euiPaletteWarm, } from '@elastic/eui'; -import { InventoryColorPalette } from '../../../../common/inventory/types'; +import type { InventoryColorPalette } from '../../../../common/inventory/types'; const createColorPalette = (name: InventoryColorPalette = 'cool', steps: number = 10) => { switch (name) { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts index 8fe9c06ce3a15..3762bc4f8e102 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/navigate_to_uptime.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { LocatorPublic } from '@kbn/share-plugin/common/url_service/locators'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { SerializableRecord } from '@kbn/utility-types'; -import { InfraWaffleMapNode } from '../../../../common/inventory/types'; +import type { LocatorPublic } from '@kbn/share-plugin/common/url_service/locators'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { SerializableRecord } from '@kbn/utility-types'; +import type { InfraWaffleMapNode } from '../../../../common/inventory/types'; export const navigateToUptime = ({ uptimeLocator, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/nodes_to_wafflemap.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/nodes_to_wafflemap.ts index 2f01025c2198e..ff7efee7af702 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/nodes_to_wafflemap.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/nodes_to_wafflemap.ts @@ -7,14 +7,14 @@ import { i18n } from '@kbn/i18n'; import { first, last } from 'lodash'; -import { +import type { InfraWaffleMapGroup, InfraWaffleMapGroupOfGroups, InfraWaffleMapGroupOfNodes, InfraWaffleMapNode, } from '../../../../common/inventory/types'; import { isWaffleMapGroupWithGroups, isWaffleMapGroupWithNodes } from './type_guards'; -import { SnapshotNodePath, SnapshotNode } from '../../../../../common/http_api/snapshot_api'; +import type { SnapshotNodePath, SnapshotNode } from '../../../../../common/http_api/snapshot_api'; export function createId(path: SnapshotNodePath[]) { return path.map((p) => p.value).join('/'); diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.test.ts index e22cdc1cc8c22..efd6a89624d47 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.test.ts @@ -6,7 +6,7 @@ */ import { sortNodes } from './sort_nodes'; -import { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; +import type { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; const nodes: SnapshotNode[] = [ { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.ts index 745703f2e4f54..b4d7714997a64 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/sort_nodes.ts @@ -6,8 +6,8 @@ */ import { sortBy, last, first } from 'lodash'; -import { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; -import { WaffleSortOption } from '../hooks/use_waffle_options'; +import type { SnapshotNode } from '../../../../../common/http_api/snapshot_api'; +import type { WaffleSortOption } from '../hooks/use_waffle_options'; const SORT_PATHS = { name: (node: SnapshotNode) => last(node.path), diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/type_guards.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/type_guards.ts index 4e94d56ed4d60..b36f36589bbac 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/type_guards.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/inventory_view/lib/type_guards.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { InfraWaffleMapGroupOfGroups, InfraWaffleMapGroupOfNodes, InfraWaffleMapGradientLegend, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx index fd8811f90adbc..5019a43250ef7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/chart_section_vis.tsx @@ -8,14 +8,13 @@ import React, { useCallback, useMemo } from 'react'; import moment from 'moment'; import { i18n } from '@kbn/i18n'; +import type { BrushEndListener, TooltipProps } from '@elastic/charts'; import { Axis, Chart, niceTimeFormatter, Position, Settings, - BrushEndListener, - TooltipProps, Tooltip, LegendValue, } from '@elastic/charts'; @@ -32,7 +31,7 @@ import { } from './helpers'; import { ErrorMessage } from './error_message'; import { useKibanaUiSetting } from '../../../../hooks/use_kibana_ui_setting'; -import { VisSectionProps } from '../types'; +import type { VisSectionProps } from '../types'; export const ChartSectionVis = ({ id, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/gauges_section_vis.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/gauges_section_vis.tsx index 673b57ab037ce..669eb88551529 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/gauges_section_vis.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/gauges_section_vis.tsx @@ -15,11 +15,12 @@ import { EuiTitle, } from '@elastic/eui'; import { get, last, max } from 'lodash'; -import React, { ReactText } from 'react'; +import type { ReactText } from 'react'; +import React from 'react'; import styled from '@emotion/styled'; -import { InventoryFormatterType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryFormatterType } from '@kbn/metrics-data-access-plugin/common'; import { createFormatter } from '../../../../../common/formatters'; -import { SeriesOverrides, VisSectionProps } from '../types'; +import type { SeriesOverrides, VisSectionProps } from '../types'; import { getChartName } from './helpers'; const getFormatter = diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/helpers.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/helpers.ts index 84bd07dee5c47..ac768a0081968 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/helpers.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/helpers.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { ReactText } from 'react'; +import type { ReactText } from 'react'; import Color from 'color'; import { get, first, last, min, max } from 'lodash'; -import { - InventoryVisTypeRT, +import type { InventoryFormatterType, InventoryVisType, } from '@kbn/metrics-data-access-plugin/common'; +import { InventoryVisTypeRT } from '@kbn/metrics-data-access-plugin/common'; import { createFormatter } from '../../../../../common/formatters'; -import { SeriesOverrides } from '../types'; -import { +import type { SeriesOverrides } from '../types'; +import type { NodeDetailsDataSeries, NodeDetailsMetricData, } from '../../../../../common/http_api/node_details_api'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/layout.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/layout.tsx index 041d8b81da756..a9c2d1ba7812a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/layout.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/layout.tsx @@ -6,8 +6,8 @@ */ import React from 'react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { LayoutProps } from '../types'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { LayoutProps } from '../types'; import { AwsEC2Layout } from './layouts/aws_ec2_layout'; import { AwsRDSLayout } from './layouts/aws_rds_layout'; import { AwsS3Layout } from './layouts/aws_s3_layout'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/metadata_details.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/metadata_details.tsx index 0309d2a47bff0..c0ef2ca28c457 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/metadata_details.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/metadata_details.tsx @@ -10,7 +10,7 @@ import { get } from 'lodash'; import { EuiButtonIcon, EuiFlexGrid, EuiFlexItem, EuiTitle, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import styled from '@emotion/styled'; -import { InfraMetadata } from '../../../../../common/http_api'; +import type { InfraMetadata } from '../../../../../common/http_api'; import { MetadataContext } from '../containers/metadata_context'; interface FieldDef { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/node_details_page.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/node_details_page.tsx index 0de2ae8f6fbe7..166c4243cd731 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/node_details_page.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/node_details_page.tsx @@ -9,7 +9,7 @@ import React from 'react'; import dateMath from '@kbn/datemath'; import moment from 'moment'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { InventoryMetric, InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryMetric, InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { OnboardingFlow } from '../../../../components/shared/templates/no_data_config'; import { InfraPageTemplate } from '../../../../components/shared/templates/infra_page_template'; @@ -18,10 +18,11 @@ import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useTemplateHeaderBreadcrumbs } from '../../../../components/asset_details/hooks/use_page_header'; import { MetricsSideNav } from './side_nav'; import { MetricsTimeControls } from './time_controls'; -import { SideNavContext, NavItem } from '../lib/side_nav_context'; +import type { NavItem } from '../lib/side_nav_context'; +import { SideNavContext } from '../lib/side_nav_context'; import { PageBody } from './page_body'; -import { MetricsTimeInput } from '../hooks/use_metrics_time'; -import { InfraMetadata } from '../../../../../common/http_api/metadata_api'; +import type { MetricsTimeInput } from '../hooks/use_metrics_time'; +import type { InfraMetadata } from '../../../../../common/http_api/metadata_api'; import { PageError } from './page_error'; import { MetadataContext } from '../containers/metadata_context'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_body.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_body.tsx index 51933e753bd68..992f6a2561ea6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_body.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_body.tsx @@ -7,11 +7,11 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { NodeDetailsMetricData } from '../../../../../common/http_api/node_details_api'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { NodeDetailsMetricData } from '../../../../../common/http_api/node_details_api'; import { NoData } from '../../../../components/empty_states'; import { InfraLoadingPanel } from '../../../../components/loading'; -import { MetricsTimeInput } from '../hooks/use_metrics_time'; +import type { MetricsTimeInput } from '../hooks/use_metrics_time'; import { Layout } from './layout'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.test.tsx index 25ae3b3717bd6..410781476f116 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.test.tsx @@ -10,7 +10,7 @@ import { render } from '@testing-library/react'; import { PageError } from './page_error'; import { errorTitle } from '../../../../translations'; -import { InfraHttpError } from '../../../../types'; +import type { InfraHttpError } from '../../../../types'; import { useDocumentTitle } from '../../../../hooks/use_document_title'; import { I18nProvider } from '@kbn/i18n-react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.tsx index b4cdb47399e98..a1949c448158c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/page_error.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { useDocumentTitle } from '../../../../hooks/use_document_title'; import { InvalidNodeError } from './invalid_node'; import { ErrorPageBody } from '../../../error'; -import { InfraHttpError } from '../../../../types'; +import type { InfraHttpError } from '../../../../types'; import { errorTitle } from '../../../../translations'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/section.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/section.tsx index 3ef9684b4cd56..3b1745ca201ce 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/section.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/section.tsx @@ -6,16 +6,12 @@ */ import { EuiTitle } from '@elastic/eui'; -import React, { - Children, - cloneElement, - FunctionComponent, - isValidElement, - useContext, -} from 'react'; +import type { FunctionComponent } from 'react'; +import React, { Children, cloneElement, isValidElement, useContext } from 'react'; -import { SideNavContext, SubNavItem } from '../lib/side_nav_context'; -import { LayoutProps } from '../types'; +import type { SubNavItem } from '../lib/side_nav_context'; +import { SideNavContext } from '../lib/side_nav_context'; +import type { LayoutProps } from '../types'; type SectionProps = LayoutProps & { navLabel: string; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/series_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/series_chart.tsx index 8d8d28e3abd52..e4cc447d6ede5 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/series_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/series_chart.tsx @@ -6,16 +6,10 @@ */ import React from 'react'; -import { - AreaSeries, - BarSeries, - ScaleType, - RecursivePartial, - BarSeriesStyle, - AreaSeriesStyle, -} from '@elastic/charts'; -import { InventoryVisType } from '@kbn/metrics-data-access-plugin/common'; -import { NodeDetailsDataSeries } from '../../../../../common/http_api/node_details_api'; +import type { RecursivePartial, BarSeriesStyle, AreaSeriesStyle } from '@elastic/charts'; +import { AreaSeries, BarSeries, ScaleType } from '@elastic/charts'; +import type { InventoryVisType } from '@kbn/metrics-data-access-plugin/common'; +import type { NodeDetailsDataSeries } from '../../../../../common/http_api/node_details_api'; import { useKibanaTimeZoneSetting } from '../../../../hooks/use_kibana_time_zone_setting'; interface Props { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/side_nav.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/side_nav.tsx index c4445984de9a3..b3c315d55ae49 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/side_nav.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/side_nav.tsx @@ -7,7 +7,7 @@ import { EuiHideFor, EuiPageSidebar, EuiShowFor, EuiSideNav } from '@elastic/eui'; import React, { useState, useCallback } from 'react'; -import { NavItem } from '../lib/side_nav_context'; +import type { NavItem } from '../lib/side_nav_context'; interface Props { loading: boolean; name: string; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx index eab6988904833..57d92fdf67a7b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { isValidElement, cloneElement, FunctionComponent, Children, useMemo } from 'react'; +import type { FunctionComponent } from 'react'; +import React, { isValidElement, cloneElement, Children, useMemo } from 'react'; import { EuiTitle } from '@elastic/eui'; -import { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; -import { LayoutProps } from '../types'; +import type { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; +import type { LayoutProps } from '../types'; type SubSectionProps = LayoutProps & { id: InventoryMetric; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx index 70dc780efe590..122e7deff2e69 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.test.tsx @@ -21,7 +21,7 @@ jest.mock('../../../../hooks/use_kibana_ui_setting', () => ({ import React from 'react'; import { MetricsTimeControls } from './time_controls'; import { mount } from 'enzyme'; -import { MetricsTimeInput } from '../hooks/use_metrics_time'; +import type { MetricsTimeInput } from '../hooks/use_metrics_time'; describe('MetricsTimeControls', () => { it('should set a valid from and to value for Today', () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx index 0b0df22840406..ca1a8c78493bb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/components/time_controls.tsx @@ -5,11 +5,12 @@ * 2.0. */ -import { EuiSuperDatePicker, OnRefreshChangeProps, OnTimeChangeProps } from '@elastic/eui'; +import type { OnRefreshChangeProps, OnTimeChangeProps } from '@elastic/eui'; +import { EuiSuperDatePicker } from '@elastic/eui'; import React, { useCallback } from 'react'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; import styled from '@emotion/styled'; -import { MetricsTimeInput } from '../hooks/use_metrics_time'; +import type { MetricsTimeInput } from '../hooks/use_metrics_time'; import { useKibanaUiSetting } from '../../../../hooks/use_kibana_ui_setting'; import { mapKibanaQuickRangesToDatePickerRanges } from '../../../../utils/map_timepicker_quickranges_to_datepicker_ranges'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/containers/metadata_context.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/containers/metadata_context.ts index e580efad43429..27b9cdb121e0f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/containers/metadata_context.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/containers/metadata_context.ts @@ -6,5 +6,5 @@ */ import React from 'react'; -import { InfraMetadata } from '../../../../../common/http_api'; +import type { InfraMetadata } from '../../../../../common/http_api'; export const MetadataContext = React.createContext(null); diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/hooks/metrics_time.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/hooks/metrics_time.test.tsx index 139d318618f73..3f75b48350f34 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/hooks/metrics_time.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/hooks/metrics_time.test.tsx @@ -6,7 +6,8 @@ */ import { createMemoryHistory } from 'history'; -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { Router } from '@kbn/shared-ux-router'; import { mountHook } from '@kbn/test-jest-helpers'; import { CoreScopedHistory } from '@kbn/core/public'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/lib/get_filtered_metrics.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/lib/get_filtered_metrics.ts index a6cfd30eaa26d..7b395e2831dfa 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/lib/get_filtered_metrics.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/lib/get_filtered_metrics.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; import { metrics } from '@kbn/metrics-data-access-plugin/common'; -import { InfraMetadataFeature } from '../../../../../common/http_api/metadata_api'; +import type { InfraMetadataFeature } from '../../../../../common/http_api/metadata_api'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; export const getFilteredMetrics = ( diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/types.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/types.ts index 62a8e01bf6dcf..aff8934714b9f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metric_detail/types.ts @@ -6,11 +6,11 @@ */ import rt from 'io-ts'; -import { PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; import type { WithEuiThemeProps } from '@elastic/eui'; import { InventoryFormatterTypeRT } from '@kbn/metrics-data-access-plugin/common'; -import { MetricsTimeInput } from './hooks/use_metrics_time'; -import { NodeDetailsMetricData } from '../../../../common/http_api/node_details_api'; +import type { MetricsTimeInput } from './hooks/use_metrics_time'; +import type { NodeDetailsMetricData } from '../../../../common/http_api/node_details_api'; export interface LayoutProps { metrics?: NodeDetailsMetricData[]; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/aggregation.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/aggregation.tsx index 3b37c2aa36938..1ec0b5a1c956f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/aggregation.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/aggregation.tsx @@ -10,9 +10,9 @@ import { i18n } from '@kbn/i18n'; import React, { useCallback } from 'react'; import { xor } from 'lodash'; -import { EuiSelectProps } from '@elastic/eui'; -import { MetricsExplorerAggregation } from '../../../../../common/http_api/metrics_explorer'; -import { MetricsExplorerOptions } from '../hooks/use_metrics_explorer_options'; +import type { EuiSelectProps } from '@elastic/eui'; +import type { MetricsExplorerAggregation } from '../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions } from '../hooks/use_metrics_explorer_options'; import { metricsExplorerAggregationRT, METRIC_EXPLORER_AGGREGATIONS, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx index 347283ca1f51a..26994e35c88c9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart.tsx @@ -5,16 +5,8 @@ * 2.0. */ -import { - Axis, - BrushEndListener, - Chart, - niceTimeFormatter, - Position, - Settings, - TooltipProps, - Tooltip, -} from '@elastic/charts'; +import type { BrushEndListener, TooltipProps } from '@elastic/charts'; +import { Axis, Chart, niceTimeFormatter, Position, Settings, Tooltip } from '@elastic/charts'; import { EuiFlexGroup, EuiFlexItem, EuiTitle, EuiToolTip } from '@elastic/eui'; import styled from '@emotion/styled'; import { first, last } from 'lodash'; @@ -23,14 +15,14 @@ import React, { useCallback, useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import { useTimelineChartTheme } from '../../../../hooks/use_timeline_chart_theme'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import { MetricsExplorerSeries } from '../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerSeries } from '../../../../../common/http_api/metrics_explorer'; import { useKibanaUiSetting } from '../../../../hooks/use_kibana_ui_setting'; -import { +import type { MetricsExplorerChartOptions, MetricsExplorerOptions, MetricsExplorerTimeOptions, - MetricsExplorerYAxisMode, } from '../hooks/use_metrics_explorer_options'; +import { MetricsExplorerYAxisMode } from '../hooks/use_metrics_explorer_options'; import { MetricsExplorerChartContextMenu } from './chart_context_menu'; import { ChartTitle } from './chart_title'; import { MetricsExplorerEmptyChart } from './empty_chart'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.test.tsx index 12f5df8eb38ef..0e54b6fe3f6ab 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.test.tsx @@ -6,16 +6,18 @@ */ import React from 'react'; -import { MetricsExplorerChartContextMenu, Props } from './chart_context_menu'; -import { ReactWrapper, mount } from 'enzyme'; +import type { Props } from './chart_context_menu'; +import { MetricsExplorerChartContextMenu } from './chart_context_menu'; +import type { ReactWrapper } from 'enzyme'; +import { mount } from 'enzyme'; import { options, timeRange, chartOptions } from '../../../../utils/fixtures/metrics_explorer'; -import { Capabilities } from '@kbn/core/public'; +import type { Capabilities } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { coreMock } from '@kbn/core/public/mocks'; import { MetricsDataViewProvider, SourceProvider } from '../../../../containers/metrics_source'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; -import { DataView } from '@kbn/data-views-plugin/common'; -import { ResolvedDataView } from '../../../../utils/data_view'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import type { ResolvedDataView } from '../../../../utils/data_view'; const coreStartMock = coreMock.createStart(); diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.tsx index dbf58dc21685e..2196308b2f7e7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_context_menu.tsx @@ -8,21 +8,17 @@ import React, { useCallback, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { - EuiButtonEmpty, - EuiContextMenu, - EuiContextMenuPanelDescriptor, - EuiPopover, -} from '@elastic/eui'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; +import { EuiButtonEmpty, EuiContextMenu, EuiPopover } from '@elastic/eui'; import DateMath from '@kbn/datemath'; -import { Capabilities } from '@kbn/core/public'; +import type { Capabilities } from '@kbn/core/public'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { useAssetDetailsRedirect } from '@kbn/metrics-data-access-plugin/public'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; import { AlertFlyout } from '../../../../alerting/metric_threshold/components/alert_flyout'; -import { MetricsExplorerSeries } from '../../../../../common/http_api/metrics_explorer'; -import { +import type { MetricsExplorerSeries } from '../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions, MetricsExplorerTimeOptions, MetricsExplorerChartOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx index 01471fab526ae..3951c8d442c89 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_options.tsx @@ -8,6 +8,7 @@ import React, { useState, useCallback } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; +import type { EuiSwitchProps } from '@elastic/eui'; import { EuiRadioGroup, EuiButtonEmpty, @@ -15,10 +16,9 @@ import { EuiForm, EuiFormRow, EuiSwitch, - EuiSwitchProps, } from '@elastic/eui'; +import type { MetricsExplorerChartOptions as ChartOptions } from '../hooks/use_metrics_explorer_options'; import { - MetricsExplorerChartOptions as ChartOptions, MetricsExplorerYAxisMode, MetricsExplorerChartType, } from '../hooks/use_metrics_explorer_options'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx index a7989cffeffba..04de2c401c1dd 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/chart_title.tsx @@ -8,7 +8,7 @@ import React, { Fragment } from 'react'; import { EuiText, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { MetricsExplorerSeries } from '../../../../../common/http_api'; +import type { MetricsExplorerSeries } from '../../../../../common/http_api'; interface Props { series: MetricsExplorerSeries; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx index 12ddb26164174..9d0894c0a7c1e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/charts.tsx @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { first, last, sumBy } from 'lodash'; -import { MetricsExplorerResponse } from '../../../../../common/http_api/metrics_explorer'; -import { +import type { MetricsExplorerResponse } from '../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions, MetricsExplorerTimeOptions, MetricsExplorerChartOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/group_by.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/group_by.tsx index 0dacb7653d159..bbac8cdbe3c20 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/group_by.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/group_by.tsx @@ -9,7 +9,7 @@ import { EuiComboBox } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback } from 'react'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; -import { MetricsExplorerOptions } from '../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerOptions } from '../hooks/use_metrics_explorer_options'; interface Props { options: MetricsExplorerOptions; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domain.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domain.ts index 8572af2e54aa9..c038871089030 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domain.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domain.ts @@ -6,8 +6,8 @@ */ import { min, max, sum, isNumber } from 'lodash'; -import { MetricsExplorerSeries } from '../../../../../../common/http_api/metrics_explorer'; -import { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerSeries } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; import { getMetricId } from './get_metric_id'; const getMin = (values: Array) => { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domian.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domian.test.ts index b94f5dac89ddd..51e194518ba6b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domian.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/calculate_domian.test.ts @@ -6,8 +6,8 @@ */ import { calculateDomain } from './calculate_domain'; -import { MetricsExplorerSeries } from '../../../../../../common/http_api/metrics_explorer'; -import { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerSeries } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; import { Color } from '../../../../../../common/color_palette'; describe('calculateDomain()', () => { const series: MetricsExplorerSeries = { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metric.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metric.ts index 22ae6b651eb45..21288233b4bb3 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metric.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metric.ts @@ -6,7 +6,7 @@ */ import numeral from '@elastic/numeral'; -import { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; import { createFormatter } from '../../../../../../common/formatters'; import { InfraFormatterType } from '../../../../../common/inventory/types'; import { metricToFormat } from './metric_to_format'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metrics.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metrics.test.ts index 954a1b184b4a9..027fca22089eb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metrics.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_formatter_for_metrics.test.ts @@ -6,7 +6,7 @@ */ import { createFormatterForMetric } from './create_formatter_for_metric'; -import { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; describe('createFormatterForMetric()', () => { it('should just work for count', () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.test.ts index 0beeb1083683e..23c47ee5a9e23 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.test.ts @@ -6,7 +6,7 @@ */ import { createMetricLabel } from './create_metric_label'; -import { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; describe('createMetricLabel()', () => { it('should work with metrics with fields', () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.ts index 4aced70f206a9..7df6eff87b349 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_metric_label.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; export const createMetricLabel = (metric: MetricsExplorerOptionsMetric) => { if (metric.label) { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.test.ts index 4c29f8921947d..da3305313e3cc 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.test.ts @@ -11,7 +11,7 @@ import { MetricsExplorerYAxisMode, MetricsExplorerChartType, } from '../../hooks/use_metrics_explorer_options'; -import { MetricsExplorerOptions } from '../../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerOptions } from '../../hooks/use_metrics_explorer_options'; jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('test-id'), diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts index e41d191549c5a..23c98d778a0fd 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/create_tsvb_link.ts @@ -8,15 +8,17 @@ import { encode } from '@kbn/rison'; import { v4 as uuidv4 } from 'uuid'; import { set } from '@kbn/safer-lodash-set'; -import { LinkDescriptor } from '@kbn/observability-shared-plugin/public'; +import type { LinkDescriptor } from '@kbn/observability-shared-plugin/public'; import { TIMESTAMP_FIELD } from '../../../../../../common/constants'; import { colorTransformer, Color } from '../../../../../../common/color_palette'; -import { MetricsExplorerSeries } from '../../../../../../common/http_api/metrics_explorer'; -import { +import type { MetricsExplorerSeries } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions, MetricsExplorerOptionsMetric, MetricsExplorerTimeOptions, MetricsExplorerChartOptions, +} from '../../hooks/use_metrics_explorer_options'; +import { MetricsExplorerYAxisMode, MetricsExplorerChartType, } from '../../hooks/use_metrics_explorer_options'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/get_metric_id.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/get_metric_id.ts index 8ec909600be05..f9cf14f2760be 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/get_metric_id.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/get_metric_id.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerOptionsMetric } from '../../hooks/use_metrics_explorer_options'; export const getMetricId = (metric: MetricsExplorerOptionsMetric, index: string | number) => { return `metric_${index}`; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.test.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.test.ts index 7f8f9b9dc18cb..b31f77ffb1ea7 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.test.ts @@ -6,7 +6,7 @@ */ import { metricToFormat } from './metric_to_format'; -import { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; import { InfraFormatterType } from '../../../../../common/inventory/types'; describe('metricToFormat()', () => { it('should just work for numeric metrics', () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.ts index cbb25fb96871d..9eff42490984f 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/helpers/metric_to_format.ts @@ -6,7 +6,7 @@ */ import { last } from 'lodash'; -import { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerMetric } from '../../../../../../common/http_api/metrics_explorer'; import { InfraFormatterType } from '../../../../../common/inventory/types'; export const metricToFormat = (metric?: MetricsExplorerMetric) => { if (metric && metric.field) { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx index a75940714dec6..fd29aa34ec34e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/kuery_bar.tsx @@ -8,7 +8,7 @@ import { i18n } from '@kbn/i18n'; import { fromKueryExpression } from '@kbn/es-query'; import React, { useEffect, useState } from 'react'; -import { QuerySuggestion } from '@kbn/unified-search-plugin/public'; +import type { QuerySuggestion } from '@kbn/unified-search-plugin/public'; import { AutocompleteField } from '@kbn/observability-plugin/public'; import { useEuiTheme } from '@elastic/eui'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/metrics.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/metrics.tsx index c493d2922359b..839abd9c43797 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/metrics.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/metrics.tsx @@ -5,21 +5,15 @@ * 2.0. */ -import { - EuiComboBox, - EuiFlexGroup, - EuiFlexItem, - EuiText, - EuiIcon, - EuiComboBoxOptionOption, -} from '@elastic/eui'; +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiComboBox, EuiFlexGroup, EuiFlexItem, EuiText, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useState, useMemo } from 'react'; import { METRICS_EXPLORER_API_MAX_METRICS } from '@kbn/metrics-data-access-plugin/common'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; import { colorTransformer, Color } from '../../../../../common/color_palette'; -import { MetricsExplorerMetric } from '../../../../../common/http_api/metrics_explorer'; -import { MetricsExplorerOptions } from '../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerMetric } from '../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerOptions } from '../hooks/use_metrics_explorer_options'; interface Props { autoFocus?: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/saved_views.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/saved_views.tsx index bf1d914463c96..69e2793a30172 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/saved_views.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/saved_views.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { useMetricsExplorerViews } from '../../../../hooks/use_metrics_explorer_views'; import { SavedViewsToolbarControls } from '../../../../components/saved_views/toolbar_control'; -import { MetricsExplorerViewState } from '../hooks/use_metric_explorer_state'; +import type { MetricsExplorerViewState } from '../hooks/use_metric_explorer_state'; interface Props { viewState: MetricsExplorerViewState; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/series_chart.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/series_chart.tsx index 12db775e243f8..25bb9d158d67b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/series_chart.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/series_chart.tsx @@ -6,21 +6,13 @@ */ import React from 'react'; -import { - ScaleType, - AreaSeries, - BarSeries, - RecursivePartial, - AreaSeriesStyle, - BarSeriesStyle, -} from '@elastic/charts'; -import { MetricsExplorerSeries } from '../../../../../common/http_api/metrics_explorer'; +import type { RecursivePartial, AreaSeriesStyle, BarSeriesStyle } from '@elastic/charts'; +import { ScaleType, AreaSeries, BarSeries } from '@elastic/charts'; +import type { MetricsExplorerSeries } from '../../../../../common/http_api/metrics_explorer'; import { colorTransformer, Color } from '../../../../../common/color_palette'; import { createMetricLabel } from './helpers/create_metric_label'; -import { - MetricsExplorerOptionsMetric, - MetricsExplorerChartType, -} from '../hooks/use_metrics_explorer_options'; +import type { MetricsExplorerOptionsMetric } from '../hooks/use_metrics_explorer_options'; +import { MetricsExplorerChartType } from '../hooks/use_metrics_explorer_options'; import { useKibanaTimeZoneSetting } from '../../../../hooks/use_kibana_time_zone_setting'; import { getMetricId } from './helpers/get_metric_id'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx index c6724397bd1d0..0f5efc8a6efbb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/components/toolbar.tsx @@ -9,11 +9,11 @@ import { EuiFlexGroup, EuiFlexItem, EuiSuperDatePicker, EuiText } from '@elastic import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; -import { +import type { MetricsExplorerMetric, MetricsExplorerAggregation, } from '../../../../../common/http_api/metrics_explorer'; -import { +import type { MetricsExplorerOptions, MetricsExplorerTimeOptions, MetricsExplorerChartOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts index 0bcb182879d1f..019936f66be85 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metric_explorer_state.ts @@ -14,7 +14,7 @@ import type { MetricsExplorerView, MetricsExplorerViewState, } from '../../../../../common/metrics_explorer_views'; -import { +import type { MetricsExplorerMetric, MetricsExplorerAggregation, } from '../../../../../common/http_api/metrics_explorer'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.test.tsx index 8cc6bff922d92..a6a2e70ebf610 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.test.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React, { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useMetricsExplorerData } from './use_metrics_explorer_data'; -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { waitFor, act, renderHook } from '@testing-library/react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; @@ -20,11 +21,14 @@ import { resp, createSeries, } from '../../../../utils/fixtures/metrics_explorer'; -import { MetricsExplorerOptions, MetricsExplorerTimestamp } from './use_metrics_explorer_options'; -import { DataViewBase } from '@kbn/es-query'; -import { MetricsSourceConfigurationProperties } from '../../../../../common/metrics_sources'; +import type { + MetricsExplorerOptions, + MetricsExplorerTimestamp, +} from './use_metrics_explorer_options'; +import type { DataViewBase } from '@kbn/es-query'; +import type { MetricsSourceConfigurationProperties } from '../../../../../common/metrics_sources'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; -import { ResolvedDataView } from '../../../../utils/data_view'; +import type { ResolvedDataView } from '../../../../utils/data_view'; const mockedFetch = jest.fn(); diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts index b3ec0dd1f0b1d..9acb7593d15bc 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_data.ts @@ -8,14 +8,15 @@ import { useInfiniteQuery } from '@tanstack/react-query'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { InfraHttpError } from '../../../../types'; +import type { InfraHttpError } from '../../../../types'; import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; -import { - MetricsExplorerResponse, - metricsExplorerResponseRT, -} from '../../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerResponse } from '../../../../../common/http_api/metrics_explorer'; +import { metricsExplorerResponseRT } from '../../../../../common/http_api/metrics_explorer'; import { convertKueryToElasticSearchQuery } from '../../../../utils/kuery'; -import { MetricsExplorerOptions, MetricsExplorerTimestamp } from './use_metrics_explorer_options'; +import type { + MetricsExplorerOptions, + MetricsExplorerTimestamp, +} from './use_metrics_explorer_options'; export function useMetricsExplorerData({ options, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.test.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.test.tsx index f5c257e1f86ac..7e6a565fcf623 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.test.tsx @@ -6,10 +6,12 @@ */ import { renderHook, act } from '@testing-library/react'; -import { - useMetricsExplorerOptions, +import type { MetricsExplorerOptions, MetricsExplorerTimeOptions, +} from './use_metrics_explorer_options'; +import { + useMetricsExplorerOptions, DEFAULT_OPTIONS, DEFAULT_TIMERANGE, } from './use_metrics_explorer_options'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts index 6eabfb407731c..96682d13517c8 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options.ts @@ -9,7 +9,8 @@ import DateMath from '@kbn/datemath'; import * as t from 'io-ts'; import createContainer from 'constate'; import type { TimeRange } from '@kbn/es-query'; -import { useState, useEffect, useMemo, Dispatch, SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; +import { useState, useEffect, useMemo } from 'react'; import { type MetricsExplorerChartOptions, type MetricsExplorerOptions, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/features_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/features_configuration_panel.tsx index df8b78b5ef64b..0f2c9f560bdce 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/features_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/features_configuration_panel.tsx @@ -14,10 +14,10 @@ import { enableInfrastructureProfilingIntegration, enableInfrastructureAssetCustomDashboards, } from '@kbn/observability-plugin/common'; -import { useEditableSettings } from '@kbn/observability-shared-plugin/public'; +import type { useEditableSettings } from '@kbn/observability-shared-plugin/public'; import { withSuspense } from '@kbn/shared-ux-utility'; import { FieldRowProvider } from '@kbn/management-settings-components-field-row'; -import { ValueValidation } from '@kbn/core-ui-settings-browser/src/types'; +import type { ValueValidation } from '@kbn/core-ui-settings-browser/src/types'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; import { usePluginConfig } from '../../../containers/plugin_config_context'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_form_state.ts b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_form_state.ts index 04f7b91118d90..511f0e1097675 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_form_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_form_state.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { ReactNode, useCallback, useMemo, useState } from 'react'; +import type { ReactNode } from 'react'; +import { useCallback, useMemo, useState } from 'react'; import { aggregateValidationErrors, diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_panel.tsx index bbef9e58f35d4..fac34034caf93 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/indices_configuration_panel.tsx @@ -19,13 +19,14 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { rulesLocatorID, RulesParams } from '@kbn/observability-plugin/public'; +import type { RulesParams } from '@kbn/observability-plugin/public'; +import { rulesLocatorID } from '@kbn/observability-plugin/public'; import { METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, METRIC_THRESHOLD_ALERT_TYPE_ID, } from '@kbn/rule-data-utils'; import { METRICS_INDEX_PATTERN } from '../../../../common/constants'; -import { InputFieldProps } from './input_fields'; +import type { InputFieldProps } from './input_fields'; import { useKibanaContextForPlugin } from '../../../hooks/use_kibana'; interface IndicesConfigurationPanelProps { diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/input_fields.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/input_fields.tsx index 72e71143e2c84..e0e2b033e97cb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/input_fields.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/input_fields.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import React, { ReactText } from 'react'; +import type { ReactText } from 'react'; +import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/ml_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/ml_configuration_panel.tsx index 18da5470acc41..2a8fd21fd7e8d 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/ml_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/ml_configuration_panel.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { InputRangeFieldProps } from './input_fields'; +import type { InputRangeFieldProps } from './input_fields'; interface MLConfigurationPanelProps { isLoading: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/name_configuration_panel.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/name_configuration_panel.tsx index b662e9298c0f2..de6efa5bf42cb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/name_configuration_panel.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/name_configuration_panel.tsx @@ -15,7 +15,7 @@ import { } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import React from 'react'; -import { InputFieldProps } from './input_fields'; +import type { InputFieldProps } from './input_fields'; interface NameConfigurationPanelProps { isLoading: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_form_state.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_form_state.tsx index d52e2c70d31f3..c945627bed96a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_form_state.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_form_state.tsx @@ -6,7 +6,7 @@ */ import { useCallback, useMemo } from 'react'; -import { MetricsSourceConfigurationProperties } from '../../../../common/metrics_sources'; +import type { MetricsSourceConfigurationProperties } from '../../../../common/metrics_sources'; import { useIndicesConfigurationFormState } from './indices_configuration_form_state'; export const useSourceConfigurationFormState = ( diff --git a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_settings.tsx b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_settings.tsx index 328ef4680680e..a4316b7440727 100644 --- a/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_settings.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/pages/metrics/settings/source_configuration_settings.tsx @@ -18,7 +18,7 @@ import { enableInfrastructureAssetCustomDashboards, } from '@kbn/observability-plugin/common'; import { loadRuleAggregations } from '@kbn/triggers-actions-ui-plugin/public'; -import { HttpSetup } from '@kbn/core-http-browser'; +import type { HttpSetup } from '@kbn/core-http-browser'; import { AlertConsumers, METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, diff --git a/x-pack/solutions/observability/plugins/infra/public/plugin.ts b/x-pack/solutions/observability/plugins/infra/public/plugin.ts index a9e5f2326fe73..31770f7f25873 100644 --- a/x-pack/solutions/observability/plugins/infra/public/plugin.ts +++ b/x-pack/solutions/observability/plugins/infra/public/plugin.ts @@ -5,21 +5,18 @@ * 2.0. */ +import type { PluginInitializerContext, AppDeepLinkLocations } from '@kbn/core/public'; import { type AppMountParameters, type AppUpdater, type CoreStart, type AppDeepLink, DEFAULT_APP_CATEGORIES, - PluginInitializerContext, - AppDeepLinkLocations, AppStatus, } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -import { - METRICS_EXPLORER_LOCATOR_ID, - MetricsExplorerLocatorParams, -} from '@kbn/observability-shared-plugin/common'; +import type { MetricsExplorerLocatorParams } from '@kbn/observability-shared-plugin/common'; +import { METRICS_EXPLORER_LOCATOR_ID } from '@kbn/observability-shared-plugin/common'; import { BehaviorSubject, combineLatest, @@ -36,7 +33,7 @@ import { type AssetDetailsLocatorParams, type InventoryLocatorParams, } from '@kbn/observability-shared-plugin/common'; -import { NavigationEntry } from '@kbn/observability-shared-plugin/public'; +import type { NavigationEntry } from '@kbn/observability-shared-plugin/public'; import { OBSERVABILITY_LOGS_EXPLORER_APP_ID } from '@kbn/deeplinks-observability/constants'; import type { InfraPublicConfig } from '../common/plugin_config_types'; import { createInventoryMetricRuleType } from './alerting/inventory'; @@ -64,7 +61,8 @@ import { metricsExplorerTitle, metricsTitle, } from './translations'; -import { LogsAppRoutes, LogsRoute, getLogsAppRoutes } from './pages/logs/routes'; +import type { LogsAppRoutes, LogsRoute } from './pages/logs/routes'; +import { getLogsAppRoutes } from './pages/logs/routes'; export class Plugin implements InfraClientPluginClass { public config: InfraPublicConfig; diff --git a/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.mock.ts b/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.mock.ts index 9f483c9834b02..7498182e40888 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.mock.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IInventoryViewsClient } from './types'; +import type { IInventoryViewsClient } from './types'; export const createInventoryViewsClientMock = (): jest.Mocked => ({ findInventoryViews: jest.fn(), diff --git a/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.ts b/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.ts index 89a54e2705847..72d1b33fb8385 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_client.ts @@ -5,26 +5,28 @@ * 2.0. */ -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { +import type { CreateInventoryViewAttributesRequestPayload, - createInventoryViewRequestPayloadRT, CreateInventoryViewResponsePayload, FindInventoryViewResponsePayload, - findInventoryViewResponsePayloadRT, GetInventoryViewResposePayload, - getInventoryViewUrl, - inventoryViewResponsePayloadRT, UpdateInventoryViewAttributesRequestPayload, UpdateInventoryViewResponsePayload, } from '../../../common/http_api/latest'; +import { + createInventoryViewRequestPayloadRT, + findInventoryViewResponsePayloadRT, + getInventoryViewUrl, + inventoryViewResponsePayloadRT, +} from '../../../common/http_api/latest'; import { DeleteInventoryViewError, FetchInventoryViewError, UpsertInventoryViewError, } from '../../../common/inventory_views'; -import { IInventoryViewsClient } from './types'; +import type { IInventoryViewsClient } from './types'; export class InventoryViewsClient implements IInventoryViewsClient { constructor(private readonly http: HttpStart) {} diff --git a/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_service.mock.ts b/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_service.mock.ts index 0ad75a866ca85..c8befa3c533f1 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_service.mock.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/inventory_views/inventory_views_service.mock.ts @@ -6,7 +6,7 @@ */ import { createInventoryViewsClientMock } from './inventory_views_client.mock'; -import { InventoryViewsServiceStart } from './types'; +import type { InventoryViewsServiceStart } from './types'; export const createInventoryViewsServiceStartMock = () => ({ getClient: () => Promise.resolve(createInventoryViewsClientMock()), diff --git a/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.mock.ts b/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.mock.ts index a612a22fe5758..be96d86e995fe 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.mock.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IMetricsExplorerViewsClient } from './types'; +import type { IMetricsExplorerViewsClient } from './types'; export const createMetricsExplorerViewsClientMock = (): jest.Mocked => ({ diff --git a/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.ts b/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.ts index 6e77b8184669c..e7456f1a5a2d9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_client.ts @@ -5,26 +5,28 @@ * 2.0. */ -import { HttpStart } from '@kbn/core/public'; +import type { HttpStart } from '@kbn/core/public'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { +import type { CreateMetricsExplorerViewResponsePayload, - createMetricsExplorerViewRequestPayloadRT, FindMetricsExplorerViewResponsePayload, - findMetricsExplorerViewResponsePayloadRT, GetMetricsExplorerViewResponsePayload, - getMetricsExplorerViewUrl, - metricsExplorerViewResponsePayloadRT, UpdateMetricsExplorerViewResponsePayload, CreateMetricsExplorerViewAttributesRequestPayload, UpdateMetricsExplorerViewAttributesRequestPayload, } from '../../../common/http_api/latest'; +import { + createMetricsExplorerViewRequestPayloadRT, + findMetricsExplorerViewResponsePayloadRT, + getMetricsExplorerViewUrl, + metricsExplorerViewResponsePayloadRT, +} from '../../../common/http_api/latest'; import { DeleteMetricsExplorerViewError, FetchMetricsExplorerViewError, UpsertMetricsExplorerViewError, } from '../../../common/metrics_explorer_views'; -import { IMetricsExplorerViewsClient } from './types'; +import type { IMetricsExplorerViewsClient } from './types'; export class MetricsExplorerViewsClient implements IMetricsExplorerViewsClient { constructor(private readonly http: HttpStart) {} diff --git a/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_service.mock.ts b/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_service.mock.ts index a012588c344c8..f2c80a474e4c9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_service.mock.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/metrics_explorer_views/metrics_explorer_views_service.mock.ts @@ -6,7 +6,7 @@ */ import { createMetricsExplorerViewsClientMock } from './metrics_explorer_views_client.mock'; -import { MetricsExplorerViewsServiceStart } from './types'; +import type { MetricsExplorerViewsServiceStart } from './types'; export const createMetricsExplorerViewsServiceStartMock = () => ({ getClient: () => Promise.resolve(createMetricsExplorerViewsClientMock()), diff --git a/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.mock.ts b/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.mock.ts index 2f68c4f5501c6..0f2df45d91e06 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.mock.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ITelemetryClient } from './types'; +import type { ITelemetryClient } from './types'; export const createTelemetryClientMock = (): jest.Mocked => ({ reportHostEntryClicked: jest.fn(), diff --git a/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.ts b/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.ts index 0adf6a04dea7f..af840d38844bf 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_client.ts @@ -7,7 +7,7 @@ import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; -import { +import type { AddMetricsCalloutEventParams, AnomalyDetectionDateFieldChangeParams, AnomalyDetectionFilterFieldChangeParams, @@ -20,10 +20,10 @@ import { HostFlyoutFilterActionParams, HostsViewQueryHostsCountRetrievedParams, HostsViewQuerySubmittedParams, - InfraTelemetryEventTypes, ITelemetryClient, PerformanceMetricInnerEvents, } from './types'; +import { InfraTelemetryEventTypes } from './types'; /** * Client which aggregate all the available telemetry tracking functions diff --git a/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_events.ts b/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_events.ts index 7f025c1051755..3be34cc79ee0b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_events.ts +++ b/x-pack/solutions/observability/plugins/infra/public/services/telemetry/telemetry_events.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { InfraTelemetryEventTypes, InfraTelemetryEvent } from './types'; +import type { InfraTelemetryEvent } from './types'; +import { InfraTelemetryEventTypes } from './types'; const hostsViewQuerySubmittedEvent: InfraTelemetryEvent = { eventType: InfraTelemetryEventTypes.HOSTS_VIEW_QUERY_SUBMITTED, diff --git a/x-pack/solutions/observability/plugins/infra/public/test_utils/entries.ts b/x-pack/solutions/observability/plugins/infra/public/test_utils/entries.ts index 7042a6538dceb..bbd6a15cdc221 100644 --- a/x-pack/solutions/observability/plugins/infra/public/test_utils/entries.ts +++ b/x-pack/solutions/observability/plugins/infra/public/test_utils/entries.ts @@ -6,7 +6,7 @@ */ import { faker } from '@faker-js/faker'; -import { LogEntry, LogViewColumnConfiguration } from '@kbn/logs-shared-plugin/common'; +import type { LogEntry, LogViewColumnConfiguration } from '@kbn/logs-shared-plugin/common'; export function generateFakeEntries( count: number, diff --git a/x-pack/solutions/observability/plugins/infra/public/test_utils/index.ts b/x-pack/solutions/observability/plugins/infra/public/test_utils/index.ts index 2c88bfecf0c5d..ed1c6b21904bd 100644 --- a/x-pack/solutions/observability/plugins/infra/public/test_utils/index.ts +++ b/x-pack/solutions/observability/plugins/infra/public/test_utils/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TopNodesResponse } from '../../common/http_api/overview_api'; +import type { TopNodesResponse } from '../../common/http_api/overview_api'; export const FAKE_SNAPSHOT_RESPONSE = { nodes: [ diff --git a/x-pack/solutions/observability/plugins/infra/public/test_utils/use_global_storybook_theme.tsx b/x-pack/solutions/observability/plugins/infra/public/test_utils/use_global_storybook_theme.tsx index 482602c87fd06..32d7b9df51223 100644 --- a/x-pack/solutions/observability/plugins/infra/public/test_utils/use_global_storybook_theme.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/test_utils/use_global_storybook_theme.tsx @@ -6,7 +6,8 @@ */ import type { DecoratorFn } from '@storybook/react'; -import React, { useEffect, useMemo, useState, FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; +import React, { useEffect, useMemo, useState } from 'react'; import { BehaviorSubject } from 'rxjs'; import type { CoreTheme } from '@kbn/core/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/infra/public/types.ts b/x-pack/solutions/observability/plugins/infra/public/types.ts index f5e1eb4354921..50c223668f405 100644 --- a/x-pack/solutions/observability/plugins/infra/public/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/types.ts @@ -22,7 +22,7 @@ import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; -import { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/public'; +import type { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/public'; import type { ObservabilityPublicSetup, ObservabilityPublicStart, @@ -33,27 +33,27 @@ import type { } from '@kbn/observability-shared-plugin/public'; import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; -import { LensPublicStart } from '@kbn/lens-plugin/public'; +import type { LensPublicStart } from '@kbn/lens-plugin/public'; import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; -import { CasesPublicStart } from '@kbn/cases-plugin/public'; -import { DiscoverStart } from '@kbn/discover-plugin/public'; -import { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public'; -import { +import type { CasesPublicStart } from '@kbn/cases-plugin/public'; +import type { DiscoverStart } from '@kbn/discover-plugin/public'; +import type { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import type { LogsSharedClientSetupExports, LogsSharedClientStartExports, } from '@kbn/logs-shared-plugin/public'; -import { FieldFormatsSetup, FieldFormatsStart } from '@kbn/field-formats-plugin/public'; -import { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/public'; -import { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; +import type { FieldFormatsSetup, FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import type { LicensingPluginSetup, LicensingPluginStart } from '@kbn/licensing-plugin/public'; +import type { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; import type { CloudSetup } from '@kbn/cloud-plugin/public'; import type { LicenseManagementUIPluginSetup } from '@kbn/license-management-plugin/public'; import type { ServerlessPluginStart } from '@kbn/serverless/public'; import type { DashboardStart } from '@kbn/dashboard-plugin/public'; -import { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public'; +import type { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/public'; import type { UnwrapPromise } from '../common/utility_types'; -import { InventoryViewsServiceStart } from './services/inventory_views'; -import { MetricsExplorerViewsServiceStart } from './services/metrics_explorer_views'; -import { TelemetryServiceStart } from './services/telemetry'; +import type { InventoryViewsServiceStart } from './services/inventory_views'; +import type { MetricsExplorerViewsServiceStart } from './services/metrics_explorer_views'; +import type { TelemetryServiceStart } from './services/telemetry'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface InfraClientSetupExports {} diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/flatten_data_search_response.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/flatten_data_search_response.ts index 5d59183b8634e..082808e1c0b33 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/flatten_data_search_response.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/flatten_data_search_response.ts @@ -7,7 +7,7 @@ import { map } from 'rxjs'; import type { IKibanaSearchRequest } from '@kbn/search-types'; -import { ParsedDataSearchRequestDescriptor } from './types'; +import type { ParsedDataSearchRequestDescriptor } from './types'; export const flattenDataSearchResponseDescriptor = < Request extends IKibanaSearchRequest, diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/normalize_data_search_responses.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/normalize_data_search_responses.ts index c7c894f211e06..e5907cc7bcef9 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/normalize_data_search_responses.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/normalize_data_search_responses.ts @@ -5,12 +5,13 @@ * 2.0. */ -import { Observable, of } from 'rxjs'; +import type { Observable } from 'rxjs'; +import { of } from 'rxjs'; import { catchError, map, startWith } from 'rxjs'; import type { IKibanaSearchResponse } from '@kbn/search-types'; import { AbortError } from '@kbn/kibana-utils-plugin/public'; -import { SearchStrategyError } from '../../../common/search_strategies/common/errors'; -import { ParsedKibanaSearchResponse } from './types'; +import type { SearchStrategyError } from '../../../common/search_strategies/common/errors'; +import type { ParsedKibanaSearchResponse } from './types'; export type RawResponseParser = (rawResponse: RawResponse) => { data: Response; diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/types.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/types.ts index e2cfa8cca94f3..81efb2a333287 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/types.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/types.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; import type { IKibanaSearchResponse, IKibanaSearchRequest, ISearchOptions, } from '@kbn/search-types'; -import { SearchStrategyError } from '../../../common/search_strategies/common/errors'; +import type { SearchStrategyError } from '../../../common/search_strategies/common/errors'; export interface DataSearchRequestDescriptor { request: Request; diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.test.tsx b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.test.tsx index 08907b1627086..9b6e668cff285 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.test.tsx @@ -9,10 +9,10 @@ import { renderHook, act } from '@testing-library/react'; import React from 'react'; import { firstValueFrom, Observable, of, Subject } from 'rxjs'; import type { ISearchGeneric, IKibanaSearchResponse } from '@kbn/search-types'; -import { DataPublicPluginStart, ISearchStart } from '@kbn/data-plugin/public'; +import type { DataPublicPluginStart, ISearchStart } from '@kbn/data-plugin/public'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; -import { PluginKibanaContextValue } from '../../hooks/use_kibana'; +import type { PluginKibanaContextValue } from '../../hooks/use_kibana'; import { normalizeDataSearchResponses } from './normalize_data_search_responses'; import { useDataSearch } from './use_data_search_request'; diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.ts index 4675a932c86c0..e7627dbeddd8b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_request.ts @@ -6,7 +6,8 @@ */ import { useCallback } from 'react'; -import { OperatorFunction, ReplaySubject } from 'rxjs'; +import type { OperatorFunction } from 'rxjs'; +import { ReplaySubject } from 'rxjs'; import { share, tap } from 'rxjs'; import type { IKibanaSearchResponse, @@ -15,7 +16,7 @@ import type { } from '@kbn/search-types'; import { useKibanaContextForPlugin } from '../../hooks/use_kibana'; import { tapUnsubscribe, useObservable } from '../../hooks/use_observable'; -import { ParsedDataSearchRequestDescriptor, ParsedKibanaSearchResponse } from './types'; +import type { ParsedDataSearchRequestDescriptor, ParsedKibanaSearchResponse } from './types'; export type DataSearchRequestFactory = ( ...args: Args diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_response_state.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_response_state.ts index e26121e492072..b413a9e4ca57c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_response_state.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_data_search_response_state.ts @@ -6,10 +6,10 @@ */ import { useCallback } from 'react'; -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; import type { IKibanaSearchRequest } from '@kbn/search-types'; import { useObservableState } from '../../hooks/use_observable'; -import { ParsedDataSearchResponseDescriptor } from './types'; +import type { ParsedDataSearchResponseDescriptor } from './types'; export const useDataSearchResponseState = < Request extends IKibanaSearchRequest, diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.test.tsx b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.test.tsx index 24433f23bc677..0c6a1d03ecc41 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.test.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.test.tsx @@ -7,8 +7,8 @@ import { renderHook, act } from '@testing-library/react'; import { BehaviorSubject, Observable, of, Subject } from 'rxjs'; -import { IKibanaSearchRequest } from '@kbn/search-types'; -import { ParsedDataSearchRequestDescriptor, ParsedKibanaSearchResponse } from './types'; +import type { IKibanaSearchRequest } from '@kbn/search-types'; +import type { ParsedDataSearchRequestDescriptor, ParsedKibanaSearchResponse } from './types'; import { useLatestPartialDataSearchResponse } from './use_latest_partial_data_search_response'; describe('useLatestPartialDataSearchResponse hook', () => { diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.ts index c01d2db829b54..b9da9f5edd6e6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_search/use_latest_partial_data_search_response.ts @@ -5,12 +5,15 @@ * 2.0. */ -import { Observable } from 'rxjs'; +import type { Observable } from 'rxjs'; import { switchMap } from 'rxjs'; -import { IKibanaSearchRequest } from '@kbn/search-types'; +import type { IKibanaSearchRequest } from '@kbn/search-types'; import { useOperator } from '../../hooks/use_observable'; import { flattenDataSearchResponseDescriptor } from './flatten_data_search_response'; -import { ParsedDataSearchRequestDescriptor, ParsedDataSearchResponseDescriptor } from './types'; +import type { + ParsedDataSearchRequestDescriptor, + ParsedDataSearchResponseDescriptor, +} from './types'; import { useDataSearchResponseState } from './use_data_search_response_state'; export const useLatestPartialDataSearchResponse = ( diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/data_view.ts b/x-pack/solutions/observability/plugins/infra/public/utils/data_view.ts index 73d3e8c930ecb..d99633d0ef7e6 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/data_view.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/data_view.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { DataView, DataViewsContract, type FieldSpec } from '@kbn/data-views-plugin/common'; +import type { DataView, DataViewsContract } from '@kbn/data-views-plugin/common'; +import { type FieldSpec } from '@kbn/data-views-plugin/common'; import { TIMESTAMP_FIELD } from '../../common/constants'; export interface ResolvedDataView { diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/datemath.ts b/x-pack/solutions/observability/plugins/infra/public/utils/datemath.ts index 7845fea4afaaa..92cbc68149b4a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/datemath.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/datemath.ts @@ -5,8 +5,9 @@ * 2.0. */ -import dateMath, { Unit } from '@kbn/datemath'; -import { TimeRange } from '@kbn/es-query'; +import type { Unit } from '@kbn/datemath'; +import dateMath from '@kbn/datemath'; +import type { TimeRange } from '@kbn/es-query'; import { chain } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; import * as rt from 'io-ts'; diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/filters/create_alerts_es_query.ts b/x-pack/solutions/observability/plugins/infra/public/utils/filters/create_alerts_es_query.ts index 5184151619e67..a13b01bf65b35 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/filters/create_alerts_es_query.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/filters/create_alerts_es_query.ts @@ -6,7 +6,8 @@ */ import { getTime } from '@kbn/data-plugin/common'; import { ALERT_TIME_RANGE } from '@kbn/rule-data-utils'; -import { BoolQuery, buildEsQuery, Filter, type TimeRange } from '@kbn/es-query'; +import type { BoolQuery, Filter } from '@kbn/es-query'; +import { buildEsQuery, type TimeRange } from '@kbn/es-query'; import type { AlertStatus } from '@kbn/observability-plugin/common/typings'; import { findInventoryFields, diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/fixtures/metrics_explorer.ts b/x-pack/solutions/observability/plugins/infra/public/utils/fixtures/metrics_explorer.ts index 92fed7ce8fd20..06894970eb382 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/fixtures/metrics_explorer.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/fixtures/metrics_explorer.ts @@ -5,18 +5,20 @@ * 2.0. */ -import { +import type { MetricsExplorerResponse, MetricsExplorerSeries, } from '../../../common/http_api/metrics_explorer'; -import { +import type { MetricsExplorerOptions, MetricsExplorerTimeOptions, - MetricsExplorerChartType, - MetricsExplorerYAxisMode, MetricsExplorerChartOptions, MetricsExplorerTimestamp, } from '../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; +import { + MetricsExplorerChartType, + MetricsExplorerYAxisMode, +} from '../../pages/metrics/metrics_explorer/hooks/use_metrics_explorer_options'; export const options: MetricsExplorerOptions = { limit: 3, diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/kuery.ts b/x-pack/solutions/observability/plugins/infra/public/utils/kuery.ts index b74549359a9c7..cf91372dfbfdb 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/kuery.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/kuery.ts @@ -6,7 +6,7 @@ */ import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; -import { DataViewBase } from '@kbn/es-query'; +import type { DataViewBase } from '@kbn/es-query'; export const convertKueryToElasticSearchQuery = ( kueryExpression: string, diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/log_column_render_configuration.tsx b/x-pack/solutions/observability/plugins/infra/public/utils/log_column_render_configuration.tsx index ff4a24f1498a6..7fd06a660e41c 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/log_column_render_configuration.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/utils/log_column_render_configuration.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import { ReactNode } from 'react'; -import { JsonValue } from '@kbn/utility-types'; +import type { ReactNode } from 'react'; +import type { JsonValue } from '@kbn/utility-types'; /** * Interface for common configuration properties, regardless of the column type. diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetchers.ts b/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetchers.ts index 90a533e5285ba..e30fd7d48a98e 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetchers.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetchers.ts @@ -6,14 +6,14 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { +import type { FetchData, FetchDataParams, LogsFetchDataResponse, } from '@kbn/observability-plugin/public'; import { DEFAULT_LOG_VIEW, getLogsLocatorsFromUrlService } from '@kbn/logs-shared-plugin/common'; import { TIMESTAMP_FIELD } from '../../common/constants'; -import { InfraClientStartDeps, InfraClientStartServicesAccessor } from '../types'; +import type { InfraClientStartDeps, InfraClientStartServicesAccessor } from '../types'; interface StatsAggregation { buckets: Array<{ diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetches.test.ts b/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetches.test.ts index 08f8863cb2a2c..8b421192129d2 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetches.test.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/logs_overview_fetches.test.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { coreMock } from '@kbn/core/public/mocks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { createResolvedLogViewMock } from '@kbn/logs-shared-plugin/common/mocks'; import { createLogsSharedPluginStartMock } from '@kbn/logs-shared-plugin/public/mocks'; import { of } from 'rxjs'; import { createInfraPluginStartMock } from '../mocks'; -import { InfraClientStartDeps, InfraClientStartExports } from '../types'; +import type { InfraClientStartDeps, InfraClientStartExports } from '../types'; import { getLogsHasDataFetcher, getLogsOverviewDataFetcher } from './logs_overview_fetchers'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/map_timepicker_quickranges_to_datepicker_ranges.ts b/x-pack/solutions/observability/plugins/infra/public/utils/map_timepicker_quickranges_to_datepicker_ranges.ts index 7c16bcf4a5a85..cc2228774f761 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/map_timepicker_quickranges_to_datepicker_ranges.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/map_timepicker_quickranges_to_datepicker_ranges.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { EuiSuperDatePickerCommonRange } from '@elastic/eui'; -import { TimePickerQuickRange } from '../hooks/use_kibana_ui_setting'; +import type { EuiSuperDatePickerCommonRange } from '@elastic/eui'; +import type { TimePickerQuickRange } from '../hooks/use_kibana_ui_setting'; export const mapKibanaQuickRangesToDatePickerRanges = ( timepickerQuickRanges: TimePickerQuickRange[] | undefined diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/redirect_with_query_params.tsx b/x-pack/solutions/observability/plugins/infra/public/utils/redirect_with_query_params.tsx index 2fa6873aa61f4..a834505b1e120 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/redirect_with_query_params.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/utils/redirect_with_query_params.tsx @@ -6,7 +6,8 @@ */ import React from 'react'; -import { Redirect, RouteProps, RedirectProps } from 'react-router-dom'; +import type { RouteProps, RedirectProps } from 'react-router-dom'; +import { Redirect } from 'react-router-dom'; import { Route } from '@kbn/shared-ux-router'; interface RedirectWithQueryParamsProps extends Omit { diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/source_configuration.ts b/x-pack/solutions/observability/plugins/infra/public/utils/source_configuration.ts index ac8a331e86952..a46ed6dd23d9b 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/source_configuration.ts +++ b/x-pack/solutions/observability/plugins/infra/public/utils/source_configuration.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { InfraSourceConfigurationColumn, InfraSourceConfigurationFieldColumn, InfraSourceConfigurationMessageColumn, diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/theme_utils/with_attrs.tsx b/x-pack/solutions/observability/plugins/infra/public/utils/theme_utils/with_attrs.tsx index cccc4de593482..b56f4e52dc91a 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/theme_utils/with_attrs.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/utils/theme_utils/with_attrs.tsx @@ -7,7 +7,7 @@ import { type Theme, useTheme } from '@emotion/react'; import React from 'react'; -import { ComponentType } from 'react'; +import type { ComponentType } from 'react'; export const withAttrs = (Component: ComponentType, fn: (args: { theme: Theme; props: any }) => any) => diff --git a/x-pack/solutions/observability/plugins/infra/public/utils/url_state.tsx b/x-pack/solutions/observability/plugins/infra/public/utils/url_state.tsx index a07b8afbc68f8..45ce666db0740 100644 --- a/x-pack/solutions/observability/plugins/infra/public/utils/url_state.tsx +++ b/x-pack/solutions/observability/plugins/infra/public/utils/url_state.tsx @@ -6,10 +6,11 @@ */ import { parse } from 'query-string'; -import { History, Location } from 'history'; +import type { History, Location } from 'history'; import React from 'react'; import { Route } from '@kbn/shared-ux-router'; -import { decode, RisonValue } from '@kbn/rison'; +import type { RisonValue } from '@kbn/rison'; +import { decode } from '@kbn/rison'; import { throttle } from 'lodash'; import { replaceStateKeyInQueryString } from '../../common/url_state_storage_service'; diff --git a/x-pack/solutions/observability/plugins/infra/server/config.ts b/x-pack/solutions/observability/plugins/infra/server/config.ts index 3e3d51f42a5d1..ac4123246e465 100644 --- a/x-pack/solutions/observability/plugins/infra/server/config.ts +++ b/x-pack/solutions/observability/plugins/infra/server/config.ts @@ -7,9 +7,9 @@ import { i18n } from '@kbn/i18n'; import { offeringBasedSchema, schema } from '@kbn/config-schema'; -import { PluginConfigDescriptor } from '@kbn/core-plugins-server'; -import { ConfigDeprecation } from '@kbn/config'; -import { InfraConfig } from './types'; +import type { PluginConfigDescriptor } from '@kbn/core-plugins-server'; +import type { ConfigDeprecation } from '@kbn/config'; +import type { InfraConfig } from './types'; import { publicConfigKeys } from '../common/plugin_config_types'; export type { InfraConfig }; diff --git a/x-pack/solutions/observability/plugins/infra/server/index.ts b/x-pack/solutions/observability/plugins/infra/server/index.ts index c381514900a72..4ee5c85aae8d5 100644 --- a/x-pack/solutions/observability/plugins/infra/server/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PluginInitializerContext } from '@kbn/core/server'; +import type { PluginInitializerContext } from '@kbn/core/server'; export { config, type InfraConfig } from './config'; export type { InfraPluginSetup, InfraPluginStart, InfraRequestHandlerContext } from './types'; diff --git a/x-pack/solutions/observability/plugins/infra/server/infra_server.ts b/x-pack/solutions/observability/plugins/infra/server/infra_server.ts index 627c1346bee79..319e18bc11c29 100644 --- a/x-pack/solutions/observability/plugins/infra/server/infra_server.ts +++ b/x-pack/solutions/observability/plugins/infra/server/infra_server.ts @@ -33,7 +33,7 @@ import { initMetricsExplorerViewRoutes } from './routes/metrics_explorer_views'; import { initProfilingRoutes } from './routes/profiling'; import { initServicesRoute } from './routes/services'; import { initCustomDashboardsRoutes } from './routes/custom_dashboards/custom_dashboards'; -import { InfraBackendLibs } from './lib/infra_types'; +import type { InfraBackendLibs } from './lib/infra_types'; import { initEntitiesConfigurationRoutes } from './routes/entities'; export const registerRoutes = (libs: InfraBackendLibs) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/adapter_types.ts b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/adapter_types.ts index 3ee4f9632b359..1d102a36209db 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/adapter_types.ts @@ -6,40 +6,40 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Lifecycle } from '@hapi/hapi'; -import { SharePluginSetup } from '@kbn/share-plugin/server'; -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { JsonArray, JsonValue } from '@kbn/utility-types'; -import { RouteConfig, RouteMethod } from '@kbn/core/server'; -import { +import type { Lifecycle } from '@hapi/hapi'; +import type { SharePluginSetup } from '@kbn/share-plugin/server'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import type { JsonArray, JsonValue } from '@kbn/utility-types'; +import type { RouteConfig, RouteMethod } from '@kbn/core/server'; +import type { PluginSetup as DataPluginSetup, PluginStart as DataPluginStart, } from '@kbn/data-plugin/server'; -import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; -import { HomeServerPluginSetup } from '@kbn/home-plugin/server'; -import { VisTypeTimeseriesSetup } from '@kbn/vis-type-timeseries-plugin/server'; -import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; -import { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; +import type { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; +import type { HomeServerPluginSetup } from '@kbn/home-plugin/server'; +import type { VisTypeTimeseriesSetup } from '@kbn/vis-type-timeseries-plugin/server'; +import type { FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import type { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; -import { +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { RuleRegistryPluginSetupContract, RuleRegistryPluginStartContract, } from '@kbn/rule-registry-plugin/server'; -import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; -import { LogsSharedPluginSetup, LogsSharedPluginStart } from '@kbn/logs-shared-plugin/server'; -import { VersionedRouteConfig } from '@kbn/core-http-server'; -import { MetricsDataPluginSetup } from '@kbn/metrics-data-access-plugin/server'; -import { +import type { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; +import type { LogsSharedPluginSetup, LogsSharedPluginStart } from '@kbn/logs-shared-plugin/server'; +import type { VersionedRouteConfig } from '@kbn/core-http-server'; +import type { MetricsDataPluginSetup } from '@kbn/metrics-data-access-plugin/server'; +import type { ProfilingDataAccessPluginSetup, ProfilingDataAccessPluginStart, } from '@kbn/profiling-data-access-plugin/server'; -import { +import type { ApmDataAccessPluginSetup, ApmDataAccessPluginStart, } from '@kbn/apm-data-access-plugin/server'; -import { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/server'; -import { ServerlessPluginStart } from '@kbn/serverless/server'; +import type { LogsDataAccessPluginStart } from '@kbn/logs-data-access-plugin/server'; +import type { ServerlessPluginStart } from '@kbn/serverless/server'; import type { EntityManagerServerPluginStart, EntityManagerServerPluginSetup, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index ad6a6bbcbcc27..e8256e7a775a5 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -6,15 +6,25 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { TransportRequestParams } from '@elastic/elasticsearch'; -import { ElasticsearchClient, RouteConfig, SavedObjectsClientContract } from '@kbn/core/server'; -import { CoreSetup, IRouter, KibanaRequest, RequestHandler, RouteMethod } from '@kbn/core/server'; +import type { TransportRequestParams } from '@elastic/elasticsearch'; +import type { + ElasticsearchClient, + RouteConfig, + SavedObjectsClientContract, +} from '@kbn/core/server'; +import type { + CoreSetup, + IRouter, + KibanaRequest, + RequestHandler, + RouteMethod, +} from '@kbn/core/server'; import { UI_SETTINGS } from '@kbn/data-plugin/server'; -import { TimeseriesVisData } from '@kbn/vis-type-timeseries-plugin/server'; +import type { TimeseriesVisData } from '@kbn/vis-type-timeseries-plugin/server'; import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; -import { TSVBMetricModel } from '@kbn/metrics-data-access-plugin/common'; +import type { TSVBMetricModel } from '@kbn/metrics-data-access-plugin/common'; import type { InfraConfig, InfraPluginRequestHandlerContext } from '../../../types'; -import { +import type { CallWithRequestParams, InfraDatabaseGetIndicesAliasResponse, InfraDatabaseGetIndicesResponse, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/adapter_types.ts b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/adapter_types.ts index 28d24bd40153d..534748875bc4a 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/adapter_types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/adapter_types.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; -import { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; +import type { KibanaRequest } from '@kbn/core/server'; +import type { InventoryMetric } from '@kbn/metrics-data-access-plugin/common'; import type { InfraPluginRequestHandlerContext } from '../../../types'; -import { +import type { NodeDetailsRequest, NodeDetailsMetricData, } from '../../../../common/http_api/node_details_api'; -import { InfraSourceConfiguration } from '../../sources'; +import type { InfraSourceConfiguration } from '../../sources'; export interface InfraMetricsRequestOptions extends Omit { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts index e0f542b63e918..2f0a96bb53dd0 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts @@ -6,22 +6,22 @@ */ import { i18n } from '@kbn/i18n'; -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { flatten, get } from 'lodash'; import { isVisSeriesData } from '@kbn/vis-type-timeseries-plugin/server'; import { metrics, findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; -import { +import type { TSVBMetricModelCreator, InventoryMetric, - InventoryMetricRT, } from '@kbn/metrics-data-access-plugin/common'; +import { InventoryMetricRT } from '@kbn/metrics-data-access-plugin/common'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { NodeDetailsMetricData } from '../../../../common/http_api/node_details_api'; -import { KibanaFramework } from '../framework/kibana_framework_adapter'; -import { InfraMetricsAdapter, InfraMetricsRequestOptions } from './adapter_types'; +import type { NodeDetailsMetricData } from '../../../../common/http_api/node_details_api'; +import type { KibanaFramework } from '../framework/kibana_framework_adapter'; +import type { InfraMetricsAdapter, InfraMetricsRequestOptions } from './adapter_types'; import { checkValidNode } from './lib/check_valid_node'; import { calculateMetricInterval } from '../../../utils/calculate_metric_interval'; -import { CallWithRequestParams, InfraDatabaseSearchResponse } from '../framework'; +import type { CallWithRequestParams, InfraDatabaseSearchResponse } from '../framework'; import type { InfraPluginRequestHandlerContext } from '../../../types'; export class KibanaMetricsAdapter implements InfraMetricsAdapter { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts index a1bff361a8067..6478dbe431a1b 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraDatabaseSearchResponse } from '../../framework'; +import type { InfraDatabaseSearchResponse } from '../../framework'; export const checkValidNode = async ( search: (options: object) => Promise>, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/messages.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/messages.ts index 5060e6e0a6587..5e815ed598225 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/messages.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/messages.ts @@ -6,10 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { - formatDurationFromTimeUnitChar, - TimeUnitChar, -} from '@kbn/observability-plugin/common/utils/formatters/duration'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; +import { formatDurationFromTimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { AlertStates } from '../../../../common/alerting/metrics'; import { UNGROUPED_FACTORY_KEY } from './utils'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/utils.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/utils.ts index 696bed5054576..f87c5197373d7 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/utils.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/common/utils.ts @@ -7,19 +7,17 @@ import { isEmpty, isError } from 'lodash'; import { schema } from '@kbn/config-schema'; -import { Logger, LogMeta } from '@kbn/logging'; +import type { Logger, LogMeta } from '@kbn/logging'; import type { ElasticsearchClient } from '@kbn/core/server'; -import { ObservabilityConfig } from '@kbn/observability-plugin/server'; +import type { ObservabilityConfig } from '@kbn/observability-plugin/server'; import { ALERT_RULE_PARAMETERS, TIMESTAMP } from '@kbn/rule-data-utils'; -import { - ParsedTechnicalFields, - parseTechnicalFields, -} from '@kbn/rule-registry-plugin/common/parse_technical_fields'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common/parse_technical_fields'; +import { parseTechnicalFields } from '@kbn/rule-registry-plugin/common/parse_technical_fields'; import { ES_FIELD_TYPES } from '@kbn/field-types'; import { set } from '@kbn/safer-lodash-set'; -import { Alert } from '@kbn/alerts-as-data-utils'; +import type { Alert } from '@kbn/alerts-as-data-utils'; import { type Group } from '@kbn/observability-alerting-rule-utils'; -import { ParsedExperimentalFields } from '@kbn/rule-registry-plugin/common/parse_experimental_fields'; +import type { ParsedExperimentalFields } from '@kbn/rule-registry-plugin/common/parse_experimental_fields'; import type { LocatorPublic } from '@kbn/share-plugin/common'; import type { AssetDetailsLocatorParams, @@ -31,7 +29,7 @@ import { getInventoryViewInAppUrl, getMetricsViewInAppUrl, } from '../../../../common/alerting/metrics/alert_link'; -import { +import type { AlertExecutionDetails, InventoryMetricConditions, } from '../../../../common/alerting/metrics/types'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts index 2568c8828dec9..016250160e1a0 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts @@ -5,17 +5,17 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { mapValues } from 'lodash'; import type { Logger } from '@kbn/logging'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryMetricConditions } from '../../../../common/alerting/metrics'; -import { InfraTimerangeInput } from '../../../../common/http_api'; -import { LogQueryFields } from '../../metrics/types'; -import { InfraSource } from '../../sources'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import type { InfraTimerangeInput } from '../../../../common/http_api'; +import type { LogQueryFields } from '../../metrics/types'; +import type { InfraSource } from '../../sources'; import { calculateFromBasedOnMetric } from './lib/calculate_from_based_on_metric'; import { getData } from './lib/get_data'; -import { AdditionalContext } from '../common/utils'; +import type { AdditionalContext } from '../common/utils'; export type ConditionResult = InventoryMetricConditions & { shouldFire: boolean; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts index a29308774440c..9afacc9616546 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts @@ -6,19 +6,21 @@ */ import rison from '@kbn/rison'; -import { RuleExecutorServicesMock, alertsMock } from '@kbn/alerting-plugin/server/mocks'; +import type { RuleExecutorServicesMock } from '@kbn/alerting-plugin/server/mocks'; +import { alertsMock } from '@kbn/alerting-plugin/server/mocks'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { Aggregators, InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import type { InventoryMetricConditions } from '../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../common/alerting/metrics'; import type { LogMeta, Logger } from '@kbn/logging'; import { DEFAULT_FLAPPING_SETTINGS } from '@kbn/alerting-plugin/common'; import { createInventoryMetricThresholdExecutor } from './inventory_metric_threshold_executor'; -import { ConditionResult } from './evaluate_condition'; -import { InfraBackendLibs, InfraLocators } from '../../infra_types'; +import type { ConditionResult } from './evaluate_condition'; +import type { InfraBackendLibs, InfraLocators } from '../../infra_types'; import { infraPluginMock } from '../../../mocks'; import { logsSharedPluginMock } from '@kbn/logs-shared-plugin/server/mocks'; import { createLogSourcesServiceMock } from '@kbn/logs-data-access-plugin/common/services/log_sources_service/log_sources_service.mocks'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; -import { +import type { AssetDetailsLocator, AssetDetailsLocatorParams, InventoryLocator, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts index 38bbe40e69855..d6afcd02ddfb7 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts @@ -6,36 +6,37 @@ */ import { i18n } from '@kbn/i18n'; -import { Group } from '@kbn/observability-alerting-rule-utils'; +import type { Group } from '@kbn/observability-alerting-rule-utils'; +import type { ALERT_GROUP } from '@kbn/rule-data-utils'; import { ALERT_REASON, ALERT_EVALUATION_VALUES, ALERT_EVALUATION_THRESHOLD, - ALERT_GROUP, } from '@kbn/rule-data-utils'; import { first, get } from 'lodash'; -import { +import type { ActionGroup, ActionGroupIdsOf, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, } from '@kbn/alerting-plugin/common'; -import { AlertsClientError, RuleExecutorOptions, RuleTypeState } from '@kbn/alerting-plugin/server'; +import type { RuleExecutorOptions, RuleTypeState } from '@kbn/alerting-plugin/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; import { convertToBuiltInComparators, getAlertDetailsUrl } from '@kbn/observability-plugin/common'; import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; -import { ObservabilityMetricsAlert } from '@kbn/alerts-as-data-utils'; +import type { ObservabilityMetricsAlert } from '@kbn/alerts-as-data-utils'; import { getOriginalActionGroup } from '../../../utils/get_original_action_group'; -import { - AlertStates, +import type { InventoryMetricConditions, InventoryMetricThresholdParams, } from '../../../../common/alerting/metrics'; +import { AlertStates } from '../../../../common/alerting/metrics'; import { createFormatter } from '../../../../common/formatters'; import { getCustomMetricLabel } from '../../../../common/formatters/get_custom_metric_label'; import { METRIC_FORMATTERS } from '../../../../common/formatters/snapshot_metric_formats'; import { toMetricOpt } from '../../../../common/snapshot_metric_i18n'; -import { InfraBackendLibs, InfraLocators } from '../../infra_types'; -import { LogQueryFields } from '../../metrics/types'; +import type { InfraBackendLibs, InfraLocators } from '../../infra_types'; +import type { LogQueryFields } from '../../metrics/types'; import { buildErrorAlertReason, buildFiredAlertReason, @@ -51,7 +52,8 @@ import { UNGROUPED_FACTORY_KEY, } from '../common/utils'; import { getEvaluationValues, getThresholds } from '../common/get_values'; -import { evaluateCondition, ConditionResult } from './evaluate_condition'; +import type { ConditionResult } from './evaluate_condition'; +import { evaluateCondition } from './evaluate_condition'; type InventoryMetricThresholdAllowedActionGroups = ActionGroupIdsOf< typeof FIRED_ACTIONS | typeof WARNING_ACTIONS diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/calculate_from_based_on_metric.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/calculate_from_based_on_metric.ts index 0053be15ea7eb..37c56951692f6 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/calculate_from_based_on_metric.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/calculate_from_based_on_metric.ts @@ -7,9 +7,9 @@ import moment from 'moment'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; -import { SnapshotCustomMetricInput } from '../../../../../common/http_api'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; +import type { SnapshotCustomMetricInput } from '../../../../../common/http_api'; import { isRate } from './is_rate'; export const calculateFromBasedOnMetric = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/convert_metric_value.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/convert_metric_value.ts index 73ec49ad3f9ad..cf93ac372dfcb 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/convert_metric_value.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/convert_metric_value.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; // Some metrics in the UI are in a different unit that what we store in ES. export const convertMetricValue = (metric: SnapshotMetricType, value: number) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.test.ts index a7ddc75eb30d6..33bc05ced3648 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { COMPARATORS } from '@kbn/alerting-comparators'; -import { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; +import type { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; import { createBucketSelector } from './create_bucket_selector'; describe('createBucketSelector', () => { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.ts index 440e39ed14723..1eff6b4ba1ea8 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_bucket_selector.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; -import { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; -import { SnapshotCustomMetricInput } from '../../../../../common/http_api'; +import type { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; +import type { SnapshotCustomMetricInput } from '../../../../../common/http_api'; import { createConditionScript } from './create_condition_script'; const EMPTY_SHOULD_WARN = { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_condition_script.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_condition_script.ts index 21f84eb612475..de880efbc6001 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_condition_script.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_condition_script.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { convertMetricValue } from './convert_metric_value'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_log_rate_aggs.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_log_rate_aggs.ts index 4e7e85efb68f7..61e778a1074d4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_log_rate_aggs.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_log_rate_aggs.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraTimerangeInput } from '../../../../../common/http_api'; +import type { InfraTimerangeInput } from '../../../../../common/http_api'; export const createLogRateAggs = (timerange: InfraTimerangeInput, id: string) => { const intervalInSeconds = (timerange.to - timerange.from) / 1000; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_metric_aggregations.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_metric_aggregations.ts index 1b619b63c0e6a..c7e9fb16d2e9e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_metric_aggregations.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_metric_aggregations.ts @@ -6,9 +6,12 @@ */ import { get } from 'lodash'; -import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; -import { InfraTimerangeInput, SnapshotCustomMetricInput } from '../../../../../common/http_api'; +import type { + InfraTimerangeInput, + SnapshotCustomMetricInput, +} from '../../../../../common/http_api'; import { isMetricRate, isCustomMetricRate, isInterfaceRateAgg } from './is_rate'; import { createRateAggs } from './create_rate_aggs'; import { createLogRateAggs } from './create_log_rate_aggs'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_agg_with_interface.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_agg_with_interface.ts index ee58dfac70f52..a52fa2a02de83 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_agg_with_interface.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_agg_with_interface.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraTimerangeInput } from '../../../../../common/http_api'; +import type { InfraTimerangeInput } from '../../../../../common/http_api'; import { calculateRateTimeranges } from './calculate_rate_timeranges'; export const createRateAggsWithInterface = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_aggs.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_aggs.ts index af786d41fd11d..9b518191bc105 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_aggs.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_rate_aggs.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraTimerangeInput } from '../../../../../common/http_api'; +import type { InfraTimerangeInput } from '../../../../../common/http_api'; import { calculateRateTimeranges } from './calculate_rate_timeranges'; export const createRateAggs = (timerange: InfraTimerangeInput, id: string, field: string) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_request.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_request.ts index 54cb8a1cb785d..4b93dbf3a6c04 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_request.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/create_request.ts @@ -6,11 +6,14 @@ */ import type { ESSearchRequest } from '@kbn/es-types'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; -import { InfraTimerangeInput, SnapshotCustomMetricInput } from '../../../../../common/http_api'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import type { + InfraTimerangeInput, + SnapshotCustomMetricInput, +} from '../../../../../common/http_api'; import { parseFilterQuery } from '../../../../utils/serialized_query'; import { createMetricAggregations } from './create_metric_aggregations'; -import { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; +import type { InventoryMetricConditions } from '../../../../../common/alerting/metrics'; import { createBucketSelector } from './create_bucket_selector'; import { KUBERNETES_POD_UID, NUMBER_OF_DOCUMENTS, termsAggField } from '../../common/utils'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/get_data.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/get_data.ts index e911440ce5aa2..83fc1af42b099 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/get_data.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/get_data.ts @@ -18,12 +18,8 @@ import type { import type { LogQueryFields } from '../../../metrics/types'; import type { InfraSource } from '../../../sources'; import { createRequest } from './create_request'; -import { - AdditionalContext, - doFieldsExist, - KUBERNETES_POD_UID, - termsAggField, -} from '../../common/utils'; +import type { AdditionalContext } from '../../common/utils'; +import { doFieldsExist, KUBERNETES_POD_UID, termsAggField } from '../../common/utils'; interface BucketKey { node: string; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.test.ts index 2baee0b24bc60..e1bf5afdb37dd 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { MetricsUIAggregation } from '@kbn/metrics-data-access-plugin/common'; +import type { MetricsUIAggregation } from '@kbn/metrics-data-access-plugin/common'; import { isCustomMetricRate, isInterfaceRateAgg, isMetricRate, isRate } from './is_rate'; -import { SnapshotCustomMetricInput } from '../../../../../common/http_api'; +import type { SnapshotCustomMetricInput } from '../../../../../common/http_api'; const customMaxMetricMock: SnapshotCustomMetricInput = { type: 'custom', diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.ts index d50f056f60196..9b73c264496bb 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/lib/is_rate.ts @@ -6,14 +6,14 @@ */ import { has } from 'lodash'; +import type { MetricsUIAggregation } from '@kbn/metrics-data-access-plugin/common'; import { - MetricsUIAggregation, isBasicMetricAgg, isDerivativeAgg, isSumBucketAgg, isTermsWithAggregation, } from '@kbn/metrics-data-access-plugin/common'; -import { SnapshotCustomMetricInput } from '../../../../../common/http_api'; +import type { SnapshotCustomMetricInput } from '../../../../../common/http_api'; export const isMetricRate = (metric: MetricsUIAggregation | undefined): boolean => { if (!metric) { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts index f85738248a9c0..2a84ef327b9cd 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/inventory_metric_threshold/register_inventory_metric_threshold_rule_type.ts @@ -5,26 +5,25 @@ * 2.0. */ -import { schema, Type } from '@kbn/config-schema'; +import type { Type } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { i18n } from '@kbn/i18n'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; -import { GetViewInAppRelativeUrlFnOpts, AlertingServerSetup } from '@kbn/alerting-plugin/server'; +import type { + GetViewInAppRelativeUrlFnOpts, + AlertingServerSetup, +} from '@kbn/alerting-plugin/server'; import { observabilityPaths } from '@kbn/observability-plugin/common'; -import { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; -import { - InventoryItemType, - SnapshotMetricType, - SnapshotMetricTypeKeys, -} from '@kbn/metrics-data-access-plugin/common'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common/utils/formatters/duration'; +import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; +import { SnapshotMetricTypeKeys } from '@kbn/metrics-data-access-plugin/common'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { LEGACY_COMPARATORS } from '@kbn/observability-plugin/common/utils/convert_legacy_outside_comparator'; -import { - SnapshotCustomAggregation, - SNAPSHOT_CUSTOM_AGGREGATIONS, -} from '../../../../common/http_api'; +import type { SnapshotCustomAggregation } from '../../../../common/http_api'; +import { SNAPSHOT_CUSTOM_AGGREGATIONS } from '../../../../common/http_api'; import type { InfraConfig } from '../../../../common/plugin_config_types'; import { METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID } from '../../../../common/alerting/metrics'; -import { InfraBackendLibs, InfraLocators } from '../../infra_types'; +import type { InfraBackendLibs, InfraLocators } from '../../infra_types'; import { alertDetailUrlActionVariableDescription, alertStateActionVariableDescription, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts index f9094ea921fb9..a89db5059044d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_chart_preview.ts @@ -6,23 +6,25 @@ */ import { i18n } from '@kbn/i18n'; -import { ResolvedLogView } from '@kbn/logs-shared-plugin/common'; +import type { ResolvedLogView } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { +import type { ExecutionTimeRange, GroupedSearchQueryResponse, + UngroupedSearchQueryResponse, +} from '../../../../common/alerting/logs/log_threshold/types'; +import { GroupedSearchQueryResponseRT, isOptimizedGroupedSearchQueryResponse, - UngroupedSearchQueryResponse, UngroupedSearchQueryResponseRT, } from '../../../../common/alerting/logs/log_threshold/types'; -import { +import type { GetLogAlertsChartPreviewDataAlertParamsSubset, Point, Series, } from '../../../../common/http_api'; import type { InfraPluginRequestHandlerContext } from '../../../types'; -import { KibanaFramework } from '../../adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../../adapters/framework/kibana_framework_adapter'; import { buildFiltersFromCriteria } from '../../../../common/alerting/logs/log_threshold/query_helpers'; import { getGroupedESQuery, getUngroupedESQuery } from './log_threshold_executor'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts index da21c8aadaaaf..98e86ea390d87 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.test.ts @@ -5,20 +5,20 @@ * 2.0. */ +import type { LogThresholdAlertReporter } from './log_threshold_executor'; import { getGroupedESQuery, processUngroupedResults, processGroupByResults, - LogThresholdAlertReporter, getUngroupedESQuery, } from './log_threshold_executor'; -import { - Comparator, +import type { RuleParams, Criterion, UngroupedSearchQueryResponse, GroupedSearchQueryResponse, } from '../../../../common/alerting/logs/log_threshold'; +import { Comparator } from '../../../../common/alerting/logs/log_threshold'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { positiveComparators, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts index 0ac06618a3ba2..309443d3d474d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_executor.ts @@ -15,19 +15,19 @@ import { ALERT_GROUP, ALERT_REASON, } from '@kbn/rule-data-utils'; -import { ElasticsearchClient, IBasePath } from '@kbn/core/server'; -import { +import type { ElasticsearchClient, IBasePath } from '@kbn/core/server'; +import type { ActionGroup, ActionGroupIdsOf, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, RuleTypeState, RuleExecutorOptions, - AlertsClientError, } from '@kbn/alerting-plugin/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/common'; -import { ObservabilityLogsAlert } from '@kbn/alerts-as-data-utils'; -import { +import type { ObservabilityLogsAlert } from '@kbn/alerts-as-data-utils'; +import type { PublicAlertsClient, RecoveredAlertData, } from '@kbn/alerting-plugin/server/alerts_client/types'; @@ -36,31 +36,33 @@ import { getEcsGroups, type Group } from '@kbn/observability-alerting-rule-utils import { ecsFieldMap } from '@kbn/rule-registry-plugin/common/assets/field_maps/ecs_field_map'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { getChartGroupNames } from '../../../../common/utils/get_chart_group_names'; -import { +import type { RuleParams, + CountRuleParams, + CountCriteria, + GroupedSearchQueryResponse, + RatioRuleParams, + UngroupedSearchQueryResponse, + ExecutionTimeRange, + Criterion, +} from '../../../../common/alerting/logs/log_threshold'; +import { ruleParamsRT, AlertStates, Comparator, - CountRuleParams, - CountCriteria, getDenominator, getNumerator, - GroupedSearchQueryResponse, GroupedSearchQueryResponseRT, hasGroupBy, isOptimizableGroupedThreshold, isOptimizedGroupedSearchQueryResponse, isRatioRuleParams, - RatioRuleParams, - UngroupedSearchQueryResponse, UngroupedSearchQueryResponseRT, - ExecutionTimeRange, - Criterion, } from '../../../../common/alerting/logs/log_threshold'; import { getLogsAppAlertUrl } from '../../../../common/formatters/alert_link'; -import { InfraBackendLibs } from '../../infra_types'; +import type { InfraBackendLibs } from '../../infra_types'; +import type { AdditionalContext } from '../common/utils'; import { - AdditionalContext, flattenAdditionalContext, getContextForRecoveredAlerts, getGroupByObject, @@ -73,9 +75,9 @@ import { getReasonMessageForUngroupedCountAlert, getReasonMessageForUngroupedRatioAlert, } from './reason_formatters'; +import type { LogThresholdRuleTypeParams } from '../../../../common/alerting/logs/log_threshold/query_helpers'; import { buildFiltersFromCriteria, - LogThresholdRuleTypeParams, positiveComparators, } from '../../../../common/alerting/logs/log_threshold/query_helpers'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts index a6232b02a958f..56d54f55c982e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.test.ts @@ -6,7 +6,8 @@ */ import type { SavedObjectReference } from '@kbn/core/server'; -import { Comparator, RuleParams } from '../../../../common/alerting/logs/log_threshold'; +import type { RuleParams } from '../../../../common/alerting/logs/log_threshold'; +import { Comparator } from '../../../../common/alerting/logs/log_threshold'; import { extractReferences, injectReferences } from './log_threshold_references_manager'; const params: RuleParams = { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts index cb36080362ef2..9a467511ccbe1 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/log_threshold_references_manager.ts @@ -9,7 +9,8 @@ import type { SavedObjectReference } from '@kbn/core/server'; import { logViewReferenceRT } from '@kbn/logs-shared-plugin/common'; import { logViewSavedObjectName } from '@kbn/logs-shared-plugin/server'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { RuleParams, ruleParamsRT } from '../../../../common/alerting/logs/log_threshold'; +import type { RuleParams } from '../../../../common/alerting/logs/log_threshold'; +import { ruleParamsRT } from '../../../../common/alerting/logs/log_threshold'; export const LOG_VIEW_REFERENCE_NAME = 'log-view-reference-0'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/mocks/index.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/mocks/index.ts index f02dac2139097..fcda21711eea8 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/mocks/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/mocks/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraBackendLibs } from '../../../infra_types'; +import type { InfraBackendLibs } from '../../../infra_types'; export const libsMock = { sources: { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/reason_formatters.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/reason_formatters.ts index 38dc96fe4ce69..887b6b8904dea 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/reason_formatters.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/reason_formatters.ts @@ -6,12 +6,10 @@ */ import { i18n } from '@kbn/i18n'; -import { formatDurationFromTimeUnitChar, TimeUnitChar } from '@kbn/observability-plugin/common'; -import { - Comparator, - ComparatorToi18nSymbolsMap, - TimeUnit, -} from '../../../../common/alerting/logs/log_threshold/types'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; +import { formatDurationFromTimeUnitChar } from '@kbn/observability-plugin/common'; +import type { Comparator, TimeUnit } from '../../../../common/alerting/logs/log_threshold/types'; +import { ComparatorToi18nSymbolsMap } from '../../../../common/alerting/logs/log_threshold/types'; export const getReasonMessageForUngroupedCountAlert = ( actualCount: number, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts index d4eb9050499cf..bb379da719c83 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/log_threshold/register_log_threshold_rule_type.ts @@ -21,7 +21,7 @@ import { LOG_DOCUMENT_COUNT_RULE_TYPE_ID, ruleParamsRT, } from '../../../../common/alerting/logs/log_threshold'; -import { InfraBackendLibs } from '../../infra_types'; +import type { InfraBackendLibs } from '../../infra_types'; import { alertDetailUrlActionVariableDescription, groupByKeysActionVariableDescription, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/check_missing_group.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/check_missing_group.ts index d50c11710db76..deac5f1c00a34 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/check_missing_group.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/check_missing_group.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import type { Logger } from '@kbn/logging'; import { isString, get, identity } from 'lodash'; import type { BucketKey } from './get_data'; import { calculateCurrentTimeframe, createBaseFilters } from './metric_query'; -import { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; export interface MissingGroupsRecord { key: string; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/convert_strings_to_missing_groups_record.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/convert_strings_to_missing_groups_record.ts index efd5c1ff91534..4e01e091b3701 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/convert_strings_to_missing_groups_record.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/convert_strings_to_missing_groups_record.ts @@ -6,7 +6,7 @@ */ import { isString } from 'lodash'; -import { MissingGroupsRecord } from './check_missing_group'; +import type { MissingGroupsRecord } from './check_missing_group'; export const convertStringsToMissingGroupsRecord = ( missingGroups: Array diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/create_bucket_selector.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/create_bucket_selector.ts index 2aa2ef6b5c838..3df82d687c91a 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/create_bucket_selector.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/create_bucket_selector.ts @@ -5,7 +5,8 @@ * 2.0. */ import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; -import { Aggregators, MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; import { createConditionScript } from './create_condition_script'; import { createLastPeriod } from './wrap_in_period'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_rule.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_rule.ts index 03fc6eec0f792..782bb2a47a839 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_rule.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/evaluate_rule.ts @@ -5,18 +5,19 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import moment from 'moment'; import type { Logger } from '@kbn/logging'; import { isCustom } from './metric_expression_params'; -import { MetricExpressionParams } from '../../../../../common/alerting/metrics'; -import { InfraSource } from '../../../../../common/source_configuration/source_configuration'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { InfraSource } from '../../../../../common/source_configuration/source_configuration'; import { getIntervalInSeconds } from '../../../../../common/utils/get_interval_in_seconds'; import { CUSTOM_EQUATION_I18N, DOCUMENT_COUNT_I18N } from '../../common/messages'; import { createTimerange } from './create_timerange'; import { getData } from './get_data'; -import { checkMissingGroups, MissingGroupsRecord } from './check_missing_group'; -import { AdditionalContext } from '../../common/utils'; +import type { MissingGroupsRecord } from './check_missing_group'; +import { checkMissingGroups } from './check_missing_group'; +import type { AdditionalContext } from '../../common/utils'; export interface EvaluatedRuleParams { criteria: MetricExpressionParams[]; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/get_data.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/get_data.ts index e30edbeac9360..aebb064067bf6 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/get_data.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/get_data.ts @@ -5,15 +5,16 @@ * 2.0. */ -import { SearchResponse, AggregationsAggregate } from '@elastic/elasticsearch/lib/api/types'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { SearchResponse, AggregationsAggregate } from '@elastic/elasticsearch/lib/api/types'; +import type { ElasticsearchClient } from '@kbn/core/server'; import type { Logger } from '@kbn/logging'; import type { EcsFieldsResponse } from '@kbn/rule-registry-plugin/common'; import { COMPARATORS } from '@kbn/alerting-comparators'; import { convertToBuiltInComparators } from '@kbn/observability-plugin/common'; -import { Aggregators, MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; +import type { AdditionalContext } from '../../common/utils'; import { - AdditionalContext, doFieldsExist, KUBERNETES_POD_UID, termsAggField, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_expression_params.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_expression_params.ts index fad72bd7ea973..84a14845711ad 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_expression_params.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_expression_params.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { +import type { CustomMetricExpressionParams, MetricExpressionParams, NonCountMetricExpressionParams, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts index 8f1fa804e8d58..453a6412eec94 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts @@ -7,7 +7,8 @@ import moment from 'moment'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { Aggregators, MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; import { getElasticsearchMetricQuery } from './metric_query'; describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts index df52fe3f0e068..858a46be8c184 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/metric_query.ts @@ -7,7 +7,8 @@ import moment from 'moment'; import { isCustom, isNotCountOrCustom } from './metric_expression_params'; -import { Aggregators, MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../../common/alerting/metrics'; import { createCustomMetricsAggregations } from '../../../create_custom_metrics_aggregations'; import { hasAdditionalContext, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/wrap_in_period.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/wrap_in_period.ts index 8077fa3a9e50d..2dfec22b20507 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/wrap_in_period.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/lib/wrap_in_period.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { MetricExpressionParams } from '../../../../../common/alerting/metrics'; +import type { MetricExpressionParams } from '../../../../../common/alerting/metrics'; import { TIMESTAMP_FIELD } from '../../../../../common/constants'; export const createLastPeriod = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts index 4227ff10ad902..9ee718fe94659 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.test.ts @@ -10,21 +10,21 @@ import rison from '@kbn/rison'; import { getThresholds } from '../common/get_values'; import { set } from '@kbn/safer-lodash-set'; import { COMPARATORS } from '@kbn/alerting-comparators'; -import { - Aggregators, +import type { CountMetricExpressionParams, NonCountMetricExpressionParams, } from '../../../../common/alerting/metrics'; +import { Aggregators } from '../../../../common/alerting/metrics'; import { createMetricThresholdExecutor, FIRED_ACTIONS, NO_DATA_ACTIONS, WARNING_ACTIONS, } from './metric_threshold_executor'; -import { Evaluation } from './lib/evaluate_rule'; +import type { Evaluation } from './lib/evaluate_rule'; import type { LogMeta, Logger } from '@kbn/logging'; import { DEFAULT_FLAPPING_SETTINGS } from '@kbn/alerting-plugin/common'; -import { InfraConfig } from '../../../../common/plugin_config_types'; +import type { InfraConfig } from '../../../../common/plugin_config_types'; import { ALERT_EVALUATION_THRESHOLD, ALERT_EVALUATION_VALUES, @@ -33,11 +33,11 @@ import { } from '@kbn/rule-data-utils'; import { type Group } from '@kbn/observability-alerting-rule-utils'; import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; -import { +import type { AssetDetailsLocatorParams, MetricsExplorerLocatorParams, } from '@kbn/observability-shared-plugin/common'; -import { InfraLocators } from '../../infra_types'; +import type { InfraLocators } from '../../infra_types'; jest.mock('./lib/evaluate_rule', () => ({ evaluateRule: jest.fn() })); diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts index ff75a4b84c466..372aa9fd1f5f6 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/metric_threshold_executor.ts @@ -13,22 +13,24 @@ import { ALERT_REASON, } from '@kbn/rule-data-utils'; import { castArray, isEqual } from 'lodash'; -import { +import type { ActionGroupIdsOf, AlertInstanceContext as AlertContext, AlertInstanceState as AlertState, - RecoveredActionGroup, } from '@kbn/alerting-plugin/common'; -import { AlertsClientError, RuleExecutorOptions, RuleTypeState } from '@kbn/alerting-plugin/server'; -import { TimeUnitChar, getAlertDetailsUrl } from '@kbn/observability-plugin/common'; -import { ObservabilityMetricsAlert } from '@kbn/alerts-as-data-utils'; -import { COMPARATORS } from '@kbn/alerting-comparators'; +import { RecoveredActionGroup } from '@kbn/alerting-plugin/common'; +import type { RuleExecutorOptions, RuleTypeState } from '@kbn/alerting-plugin/server'; +import { AlertsClientError } from '@kbn/alerting-plugin/server'; +import type { TimeUnitChar } from '@kbn/observability-plugin/common'; +import { getAlertDetailsUrl } from '@kbn/observability-plugin/common'; +import type { ObservabilityMetricsAlert } from '@kbn/alerts-as-data-utils'; +import type { COMPARATORS } from '@kbn/alerting-comparators'; import { getEcsGroups, type Group } from '@kbn/observability-alerting-rule-utils'; import { convertToBuiltInComparators } from '@kbn/observability-plugin/common/utils/convert_legacy_outside_comparator'; import { getOriginalActionGroup } from '../../../utils/get_original_action_group'; import { AlertStates } from '../../../../common/alerting/metrics'; import { createFormatter } from '../../../../common/formatters'; -import { InfraBackendLibs, InfraLocators } from '../../infra_types'; +import type { InfraBackendLibs, InfraLocators } from '../../infra_types'; import { buildFiredAlertReason, buildInvalidQueryAlertReason, @@ -36,9 +38,9 @@ import { // buildRecoveredAlertReason, stateToAlertMessage, } from '../common/messages'; +import type { AdditionalContext } from '../common/utils'; import { createScopedLogger, - AdditionalContext, getContextForRecoveredAlerts, getMetricsViewInAppUrlWithSpaceId, UNGROUPED_FACTORY_KEY, @@ -50,8 +52,9 @@ import { } from '../common/utils'; import { getEvaluationValues, getThresholds } from '../common/get_values'; -import { EvaluatedRuleParams, evaluateRule, Evaluation } from './lib/evaluate_rule'; -import { MissingGroupsRecord } from './lib/check_missing_group'; +import type { EvaluatedRuleParams, Evaluation } from './lib/evaluate_rule'; +import { evaluateRule } from './lib/evaluate_rule'; +import type { MissingGroupsRecord } from './lib/check_missing_group'; import { convertStringsToMissingGroupsRecord } from './lib/convert_strings_to_missing_groups_record'; export type MetricThresholdAlert = Omit< diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts index 3cc272a02c7fe..1eed9f7ef3e5c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/metric_threshold/register_metric_threshold_rule_type.ts @@ -18,7 +18,7 @@ import { LEGACY_COMPARATORS } from '@kbn/observability-plugin/common/utils/conve import type { InfraConfig } from '../../../../common/plugin_config_types'; import { METRIC_THRESHOLD_ALERT_TYPE_ID } from '../../../../common/alerting/metrics'; import { METRIC_EXPLORER_AGGREGATIONS } from '../../../../common/http_api'; -import { InfraBackendLibs, InfraLocators } from '../../infra_types'; +import type { InfraBackendLibs, InfraLocators } from '../../infra_types'; import { alertDetailUrlActionVariableDescription, alertStateActionVariableDescription, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/register_rule_types.ts b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/register_rule_types.ts index 6d06c2c98607e..5896641c76d3d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/alerting/register_rule_types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/alerting/register_rule_types.ts @@ -6,14 +6,15 @@ */ import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; -import { type IRuleTypeAlerts, AlertingServerSetup } from '@kbn/alerting-plugin/server'; +import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; +import { type IRuleTypeAlerts } from '@kbn/alerting-plugin/server'; import { registerMetricThresholdRuleType } from './metric_threshold/register_metric_threshold_rule_type'; import { registerInventoryThresholdRuleType } from './inventory_metric_threshold/register_inventory_metric_threshold_rule_type'; import { registerLogThresholdRuleType } from './log_threshold/register_log_threshold_rule_type'; -import { InfraBackendLibs, InfraLocators } from '../infra_types'; +import type { InfraBackendLibs, InfraLocators } from '../infra_types'; import type { InfraConfig } from '../../types'; -import { MetricThresholdAlert } from './metric_threshold/metric_threshold_executor'; -import { LogThresholdAlert } from './log_threshold/log_threshold_executor'; +import type { MetricThresholdAlert } from './metric_threshold/metric_threshold_executor'; +import type { LogThresholdAlert } from './log_threshold/log_threshold_executor'; export const LOGS_RULES_ALERT_CONTEXT = 'observability.logs'; // Defines which alerts-as-data index logs rules will use diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/cancel_request_on_abort.ts b/x-pack/solutions/observability/plugins/infra/server/lib/cancel_request_on_abort.ts index 631af6991bd09..299d0d8812099 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/cancel_request_on_abort.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/cancel_request_on_abort.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; export function subscribeToAborted$>( promise: T, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/create_custom_metrics_aggregations.ts b/x-pack/solutions/observability/plugins/infra/server/lib/create_custom_metrics_aggregations.ts index 13017cc6666b6..43e1f9ed9233b 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/create_custom_metrics_aggregations.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/create_custom_metrics_aggregations.ts @@ -7,8 +7,8 @@ import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; import { isEmpty } from 'lodash'; -import { MetricExpressionCustomMetric } from '../../common/alerting/metrics'; -import { MetricsExplorerCustomMetric } from '../../common/http_api'; +import type { MetricExpressionCustomMetric } from '../../common/alerting/metrics'; +import type { MetricsExplorerCustomMetric } from '../../common/http_api'; const isMetricExpressionCustomMetric = ( subject: MetricsExplorerCustomMetric | MetricExpressionCustomMetric diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/create_search_client.ts b/x-pack/solutions/observability/plugins/infra/server/lib/create_search_client.ts index 00f89fb3c8e8b..e2e5cd93a6154 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/create_search_client.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/create_search_client.ts @@ -7,8 +7,8 @@ import type { KibanaRequest } from '@kbn/core/server'; import type { InfraPluginRequestHandlerContext } from '../types'; -import { CallWithRequestParams, InfraDatabaseSearchResponse } from './adapters/framework'; -import { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; +import type { CallWithRequestParams, InfraDatabaseSearchResponse } from './adapters/framework'; +import type { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; export const createSearchClient = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/domains/metrics_domain.ts b/x-pack/solutions/observability/plugins/infra/server/lib/domains/metrics_domain.ts index 44c1d850c5724..9b706b09d9a26 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/domains/metrics_domain.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/domains/metrics_domain.ts @@ -5,10 +5,13 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import type { InfraPluginRequestHandlerContext } from '../../types'; -import { InfraMetricsAdapter, InfraMetricsRequestOptions } from '../adapters/metrics/adapter_types'; -import { NodeDetailsMetricData } from '../../../common/http_api/node_details_api'; +import type { + InfraMetricsAdapter, + InfraMetricsRequestOptions, +} from '../adapters/metrics/adapter_types'; +import type { NodeDetailsMetricData } from '../../../common/http_api/node_details_api'; export class InfraMetricsDomain { private adapter: InfraMetricsAdapter; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_alerts_client.ts b/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_alerts_client.ts index 99464efd02567..9597bfe49326f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_alerts_client.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_alerts_client.ts @@ -6,7 +6,7 @@ */ import { isEmpty } from 'lodash'; import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; -import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; import type { KibanaRequest } from '@kbn/core/server'; import { OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; import type { InfraBackendLibs } from '../infra_types'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_metrics_client.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_metrics_client.test.ts index 3eb8c47c274d9..144cd7f274aa0 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_metrics_client.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/helpers/get_infra_metrics_client.test.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core-http-server'; -import { DataTier } from '@kbn/observability-shared-plugin/common'; -import { InfraBackendLibs } from '../infra_types'; +import type { KibanaRequest } from '@kbn/core-http-server'; +import type { DataTier } from '@kbn/observability-shared-plugin/common'; +import type { InfraBackendLibs } from '../infra_types'; import { getInfraMetricsClient } from './get_infra_metrics_client'; -import { InfraPluginRequestHandlerContext } from '../../types'; -import { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types'; +import type { InfraPluginRequestHandlerContext } from '../../types'; +import type { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types'; const withExcludedDataTiers = (tiers: DataTier[]) => ({ uiSettings: { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list.ts b/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list.ts index 1ffe0e15f0677..aa911a074edcd 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list.ts @@ -6,8 +6,11 @@ */ import { TIMESTAMP_FIELD, SYSTEM_PROCESS_CMDLINE_FIELD } from '../../../common/constants'; -import { ProcessListAPIRequest, ProcessListAPIQueryAggregation } from '../../../common/http_api'; -import { ESSearchClient } from '../metrics/types'; +import type { + ProcessListAPIRequest, + ProcessListAPIQueryAggregation, +} from '../../../common/http_api'; +import type { ESSearchClient } from '../metrics/types'; import type { InfraSourceConfiguration } from '../sources'; const TOP_N = 10; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list_chart.ts b/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list_chart.ts index 45e43d3f9f2a0..e0cc6d2e80cdd 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list_chart.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/host_details/process_list_chart.ts @@ -7,13 +7,13 @@ import { first } from 'lodash'; import { TIMESTAMP_FIELD, SYSTEM_PROCESS_CMDLINE_FIELD } from '../../../common/constants'; -import { +import type { ProcessListAPIChartRequest, ProcessListAPIChartQueryAggregation, ProcessListAPIRow, ProcessListAPIChartResponse, } from '../../../common/http_api'; -import { ESSearchClient } from '../metrics/types'; +import type { ESSearchClient } from '../metrics/types'; export const getProcessListChart = async ( search: ESSearchClient, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/common.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/common.ts index db1d5bc67da37..a9cbede8d2312 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/common.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/common.ts @@ -9,13 +9,13 @@ import { decodeOrThrow } from '@kbn/io-ts-utils'; import type { MlAnomalyDetectors, MlSystem } from '../../types'; import { NoLogAnalysisMlJobError } from './errors'; +import type { CompositeDatasetKey, LogEntryDatasetBucket } from './queries/log_entry_data_sets'; import { - CompositeDatasetKey, createLogEntryDatasetsQuery, - LogEntryDatasetBucket, logEntryDatasetsResponseRT, } from './queries/log_entry_data_sets'; -import { startTracingSpan, TracingSpan } from '../../../common/performance_tracing'; +import type { TracingSpan } from '../../../common/performance_tracing'; +import { startTracingSpan } from '../../../common/performance_tracing'; export interface MappedAnomalyHit { id: string; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_hosts_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_hosts_anomalies.ts index 442eb60d30bea..8e0e57fda600f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_hosts_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_hosts_anomalies.ts @@ -5,13 +5,15 @@ * 2.0. */ -import { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; +import type { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { InfraRequestHandlerContext } from '../../types'; -import { TracingSpan, startTracingSpan } from '../../../common/performance_tracing'; -import { fetchMlJob, MappedAnomalyHit, InfluencerFilter } from './common'; +import type { InfraRequestHandlerContext } from '../../types'; +import type { TracingSpan } from '../../../common/performance_tracing'; +import { startTracingSpan } from '../../../common/performance_tracing'; +import type { MappedAnomalyHit, InfluencerFilter } from './common'; +import { fetchMlJob } from './common'; import { getJobId, metricsHostsJobTypes } from '../../../common/infra_ml'; -import { Sort, Pagination } from '../../../common/http_api/infra_ml'; +import type { Sort, Pagination } from '../../../common/http_api/infra_ml'; import type { MlSystem, MlAnomalyDetectors } from '../../types'; import { isMlPrivilegesError } from './errors'; import { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_k8s_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_k8s_anomalies.ts index 18d62d414844d..03bb34bfeae46 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_k8s_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/metrics_k8s_anomalies.ts @@ -5,13 +5,15 @@ * 2.0. */ -import { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; +import type { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { InfraRequestHandlerContext } from '../../types'; -import { TracingSpan, startTracingSpan } from '../../../common/performance_tracing'; -import { fetchMlJob, MappedAnomalyHit, InfluencerFilter } from './common'; +import type { InfraRequestHandlerContext } from '../../types'; +import type { TracingSpan } from '../../../common/performance_tracing'; +import { startTracingSpan } from '../../../common/performance_tracing'; +import type { MappedAnomalyHit, InfluencerFilter } from './common'; +import { fetchMlJob } from './common'; import { getJobId, metricsK8SJobTypes } from '../../../common/infra_ml'; -import { Sort, Pagination } from '../../../common/http_api/infra_ml'; +import type { Sort, Pagination } from '../../../common/http_api/infra_ml'; import type { MlSystem, MlAnomalyDetectors } from '../../types'; import { isMlPrivilegesError } from './errors'; import { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts index 984fc523b9035..de087d026de6f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts @@ -6,7 +6,7 @@ */ import { createMetricsHostsAnomaliesQuery } from './metrics_hosts_anomalies'; -import { Sort, Pagination } from '../../../../common/http_api/infra_ml'; +import type { Sort, Pagination } from '../../../../common/http_api/infra_ml'; describe('createMetricsHostAnomaliesQuery', () => { const jobIds = ['kibana-metrics-ui-default-default-hosts_memory_usage']; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_hosts_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_hosts_anomalies.ts index 2d1efebc51666..52c4e17d0550f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_hosts_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_hosts_anomalies.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; +import type { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; import { TIEBREAKER_FIELD } from '../../../../common/constants'; import { commonSearchSuccessResponseFieldsRT } from '../../../utils/elasticsearch_runtime_types'; import { @@ -18,8 +18,8 @@ import { createInfluencerFilter, createJobIdsQuery, } from './common'; -import { InfluencerFilter } from '../common'; -import { Sort, Pagination } from '../../../../common/http_api/infra_ml'; +import type { InfluencerFilter } from '../common'; +import type { Sort, Pagination } from '../../../../common/http_api/infra_ml'; const sortToMlFieldMap = { dataset: 'partition_field_value', diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts index ef214eba4f2d7..143fb58bb6625 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts @@ -6,7 +6,7 @@ */ import { createMetricsK8sAnomaliesQuery } from './metrics_k8s_anomalies'; -import { Sort, Pagination } from '../../../../common/http_api/infra_ml'; +import type { Sort, Pagination } from '../../../../common/http_api/infra_ml'; describe('createMetricsK8sAnomaliesQuery', () => { const jobIds = ['kibana-metrics-ui-default-default-k8s_memory_usage']; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.ts index 83375ae1e8d2b..d3a215453bce1 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; +import type { ML_ANOMALY_THRESHOLD } from '@kbn/ml-anomaly-utils/anomaly_threshold'; import { TIEBREAKER_FIELD } from '../../../../common/constants'; import { commonSearchSuccessResponseFieldsRT } from '../../../utils/elasticsearch_runtime_types'; import { @@ -18,8 +18,8 @@ import { createInfluencerFilter, createJobIdsQuery, } from './common'; -import { InfluencerFilter } from '../common'; -import { Sort, Pagination } from '../../../../common/http_api/infra_ml'; +import type { InfluencerFilter } from '../common'; +import type { Sort, Pagination } from '../../../../common/http_api/infra_ml'; const sortToMlFieldMap = { dataset: 'partition_field_value', diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/infra_types.ts b/x-pack/solutions/observability/plugins/infra/server/lib/infra_types.ts index 10f80fbe86c76..5f346b19851b1 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/infra_types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/infra_types.ts @@ -8,7 +8,7 @@ import type { Logger } from '@kbn/logging'; import type { IBasePath } from '@kbn/core/server'; import type { handleEsError } from '@kbn/es-ui-shared-plugin/server'; -import { ObservabilityConfig } from '@kbn/observability-plugin/server'; +import type { ObservabilityConfig } from '@kbn/observability-plugin/server'; import type { ILogsSharedLogEntriesDomain } from '@kbn/logs-shared-plugin/server'; import type { AssetDetailsLocator, @@ -16,12 +16,12 @@ import type { MetricsExplorerLocator, } from '@kbn/observability-shared-plugin/common'; import type { AlertsLocator } from '@kbn/observability-plugin/common'; -import { RulesServiceSetup } from '../services/rules'; -import { InfraConfig, InfraPluginStartServicesAccessor } from '../types'; -import { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; -import { InfraMetricsDomain } from './domains/metrics_domain'; -import { InfraSources } from './sources'; -import { InfraSourceStatus } from './source_status'; +import type { RulesServiceSetup } from '../services/rules'; +import type { InfraConfig, InfraPluginStartServicesAccessor } from '../types'; +import type { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; +import type { InfraMetricsDomain } from './domains/metrics_domain'; +import type { InfraSources } from './sources'; +import type { InfraSourceStatus } from './source_status'; import type { InfraServerPluginSetupDeps, InfraServerPluginStartDeps } from './adapters/framework'; export interface InfraDomainLibs { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/common.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/common.ts index 8950ea2a94eee..cf46e2c39ecc4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/common.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/common.ts @@ -9,13 +9,13 @@ import { decodeOrThrow } from '@kbn/io-ts-utils'; import type { MlAnomalyDetectors, MlSystem } from '../../types'; import { NoLogAnalysisMlJobError } from './errors'; +import type { CompositeDatasetKey, LogEntryDatasetBucket } from './queries/log_entry_data_sets'; import { - CompositeDatasetKey, createLogEntryDatasetsQuery, - LogEntryDatasetBucket, logEntryDatasetsResponseRT, } from './queries/log_entry_data_sets'; -import { startTracingSpan, TracingSpan } from '../../../common/performance_tracing'; +import type { TracingSpan } from '../../../common/performance_tracing'; +import { startTracingSpan } from '../../../common/performance_tracing'; export async function fetchMlJob(mlAnomalyDetectors: MlAnomalyDetectors, jobId: string) { const finalizeMlGetJobSpan = startTracingSpan('Fetch ml job from ES'); diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts index 7d01c969a18ed..c61bcf78b4995 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_anomalies.ts @@ -6,29 +6,32 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { PersistedLogViewReference, ResolvedLogView } from '@kbn/logs-shared-plugin/common'; +import type { PersistedLogViewReference, ResolvedLogView } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat, IdFormatByJobType } from '../../../common/http_api/latest'; -import { +import type { IdFormat, IdFormatByJobType } from '../../../common/http_api/latest'; +import type { AnomaliesSort, + LogEntryAnomalyDatasets, + Pagination, +} from '../../../common/log_analysis'; +import { getJobId, isCategoryAnomaly, jobCustomSettingsRT, - LogEntryAnomalyDatasets, logEntryCategoriesJobType, logEntryCategoriesJobTypes, logEntryRateJobType, logEntryRateJobTypes, - Pagination, } from '../../../common/log_analysis'; -import { startTracingSpan, TracingSpan } from '../../../common/performance_tracing'; +import type { TracingSpan } from '../../../common/performance_tracing'; +import { startTracingSpan } from '../../../common/performance_tracing'; import type { InfraPluginRequestHandlerContext, InfraRequestHandlerContext, MlAnomalyDetectors, MlSystem, } from '../../types'; -import { KibanaFramework } from '../adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../adapters/framework/kibana_framework_adapter'; import { fetchMlJob, getLogEntryDatasets } from './common'; import { InsufficientAnomalyMlJobsConfigured, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts index 51bf582260d1e..77bdf25693946 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_analysis.ts @@ -7,15 +7,15 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ElasticsearchClient } from '@kbn/core/server'; -import { +import type { LogEntryContext, PersistedLogViewReference, ResolvedLogView, } from '@kbn/logs-shared-plugin/common'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat } from '../../../common/http_api/latest'; +import type { IdFormat } from '../../../common/http_api/latest'; +import type { CategoriesSort } from '../../../common/log_analysis'; import { - CategoriesSort, compareDatasetsByMaximumAnomalyScore, getJobId, jobCustomSettingsRT, @@ -25,14 +25,14 @@ import { startTracingSpan } from '../../../common/performance_tracing'; import type { MlAnomalyDetectors, MlSystem } from '../../types'; import { fetchMlJob, getLogEntryDatasets } from './common'; import { InsufficientLogAnalysisMlJobConfigurationError, UnknownCategoryError } from './errors'; +import type { LogEntryCategoryHit } from './queries/log_entry_categories'; import { createLogEntryCategoriesQuery, logEntryCategoriesResponseRT, - LogEntryCategoryHit, } from './queries/log_entry_categories'; +import type { LogEntryCategoryExampleHit } from './queries/log_entry_category_examples'; import { createLogEntryCategoryExamplesQuery, - LogEntryCategoryExampleHit, logEntryCategoryExamplesResponseRT, } from './queries/log_entry_category_examples'; import { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_datasets_stats.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_datasets_stats.ts index a434bb7cfdd71..91ff66095fb4c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_datasets_stats.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_categories_datasets_stats.ts @@ -9,11 +9,13 @@ import { decodeOrThrow } from '@kbn/io-ts-utils'; import { startTracingSpan } from '../../../common/performance_tracing'; import type { MlAnomalyDetectors, MlSystem } from '../../types'; import { COMPOSITE_AGGREGATION_BATCH_SIZE } from './common'; -import { +import type { CompositeDatasetKey, + LogEntryCategoryDatasetStatsBucket, +} from './queries/latest_log_entry_categories_datasets_stats'; +import { createLatestLogEntryCategoriesDatasetsStatsQuery, latestLogEntryCategoriesDatasetsStatsResponseRT, - LogEntryCategoryDatasetStatsBucket, } from './queries/latest_log_entry_categories_datasets_stats'; export async function getLatestLogEntriesCategoriesDatasetsStats( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_rate_analysis.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_rate_analysis.ts index 4cdf603675f64..21e7a5dc0a05e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_rate_analysis.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/log_entry_rate_analysis.ts @@ -6,13 +6,9 @@ */ import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { IdFormat } from '../../../common/http_api/latest'; -import { - logRateModelPlotResponseRT, - createLogEntryRateQuery, - LogRateModelPlotBucket, - CompositeTimestampPartitionKey, -} from './queries'; +import type { IdFormat } from '../../../common/http_api/latest'; +import type { LogRateModelPlotBucket, CompositeTimestampPartitionKey } from './queries'; +import { logRateModelPlotResponseRT, createLogEntryRateQuery } from './queries'; import { getJobId, logEntryRateJobType } from '../../../common/log_analysis'; import type { MlSystem } from '../../types'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/log_entry_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/log_entry_anomalies.ts index 94871c0d216e2..47edab2c9c039 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/log_entry_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/log_entry_anomalies.ts @@ -14,7 +14,7 @@ import { defaultRequestParameters, createDatasetsFilters, } from './common'; -import { +import type { AnomaliesSort, LogEntryAnomalyDatasets, Pagination, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/top_log_entry_categories.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/top_log_entry_categories.ts index ce8b4fc4d46d1..689c771b17fa4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/top_log_entry_categories.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/queries/top_log_entry_categories.ts @@ -15,7 +15,7 @@ import { createDatasetsFilters, } from './common'; -import { CategoriesSort } from '../../../../common/log_analysis'; +import type { CategoriesSort } from '../../../../common/log_analysis'; type CategoryAggregationOrder = | 'filter_record>maximum_record_score' diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/resolve_id_formats.ts b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/resolve_id_formats.ts index 48f3b3e2fdc55..4974680dcd415 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/resolve_id_formats.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/log_analysis/resolve_id_formats.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { MlAnomalyDetectors } from '@kbn/ml-plugin/server'; -import { IdFormat, IdFormatByJobType, JobType } from '../../../common/http_api/latest'; +import type { MlAnomalyDetectors } from '@kbn/ml-plugin/server'; +import type { IdFormat, IdFormatByJobType, JobType } from '../../../common/http_api/latest'; import { getJobId, logEntryCategoriesJobType, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/index.ts b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/index.ts index deab5911dd19d..7683cee0d6b46 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/index.ts @@ -8,15 +8,13 @@ import { decodeOrThrow } from '@kbn/io-ts-utils'; import type { MetricsAPIResponse, MetricsAPIRequest } from '@kbn/metrics-data-access-plugin/common'; import { TIMESTAMP_FIELD } from '../../../common/constants'; -import { +import type { ESSearchClient, - CompositeResponseRT, MetricsESResponse, - AggregationResponseRT, AggregationResponse, CompositeResponse, - HistogramBucketRT, } from './types'; +import { CompositeResponseRT, AggregationResponseRT, HistogramBucketRT } from './types'; import { EMPTY_RESPONSE } from './constants'; import { createAggregations, createCompositeAggregations } from './lib/create_aggregations'; import { convertBucketsToMetricsApiSeries } from './lib/convert_buckets_to_metrics_series'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts index 99447271ce5f1..600d43ca3b40c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts @@ -5,7 +5,8 @@ * 2.0. */ -import moment, { isDuration, Duration } from 'moment'; +import type { Duration } from 'moment'; +import moment, { isDuration } from 'moment'; const d = moment.duration; const roundingRules = [ diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts index 78a9bffa430ce..129129cd048e6 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts @@ -13,8 +13,8 @@ import type { MetricsAPIColumn, MetricsAPIRow, } from '@kbn/metrics-data-access-plugin/common'; +import type { Bucket } from '../types'; import { - Bucket, BasicMetricValueRT, NormalizedMetricValueRT, PercentilesTypeRT, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/create_aggregations.ts b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/create_aggregations.ts index 13987761d72d6..1e096cfb1d1b5 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/create_aggregations.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/lib/create_aggregations.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AggregationOptionsByType } from '@kbn/es-types'; +import type { AggregationOptionsByType } from '@kbn/es-types'; import Boom from '@hapi/boom'; import { type MetricsAPIRequest } from '@kbn/metrics-data-access-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/types.ts b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/types.ts index 0c87e8eca47d9..df19f5aed0729 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/metrics/types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/metrics/types.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { InfraDatabaseSearchResponse, CallWithRequestParams } from '../adapters/framework'; +import type { InfraDatabaseSearchResponse, CallWithRequestParams } from '../adapters/framework'; export type ESSearchClient = ( options: CallWithRequestParams diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/source_status.ts b/x-pack/solutions/observability/plugins/infra/server/lib/source_status.ts index 9e492e448ab92..b68723df05e28 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/source_status.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/source_status.ts @@ -6,7 +6,7 @@ */ import type { InfraPluginRequestHandlerContext } from '../types'; -import { InfraSources } from './sources'; +import type { InfraSources } from './sources'; export class InfraSourceStatus { constructor( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/has_data.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/has_data.ts index d56512918f11a..56214d3a15359 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/has_data.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/has_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ESSearchClient } from '../metrics/types'; +import type { ESSearchClient } from '../metrics/types'; export const hasData = async (index: string, client: ESSearchClient) => { const params = { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_13_0_convert_log_alias_to_log_indices.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_13_0_convert_log_alias_to_log_indices.ts index a996c9a2a51a7..0a2cb8bb8a403 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_13_0_convert_log_alias_to_log_indices.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_13_0_convert_log_alias_to_log_indices.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectMigrationFn } from '@kbn/core/server'; -import { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; +import type { SavedObjectMigrationFn } from '@kbn/core/server'; +import type { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; import { LOGS_INDEX_PATTERN } from '../../../../common/constants'; type SevenTwelveZeroSourceConfig = Omit & { diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.test.ts index 7efb0b5370c47..6a8ec4e215f34 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.test.ts @@ -6,7 +6,7 @@ */ import { migrationMocks } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { inventoryDefaultViewReferenceName, logIndexPatternReferenceName, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.ts index bc2f7b11b574e..1eaae0bcf261e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_inventory_default_view_reference.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectMigrationFn } from '@kbn/core/server'; -import { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; +import type { SavedObjectMigrationFn } from '@kbn/core/server'; +import type { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; import { extractInventorySavedViewReferences } from '../saved_object_references'; export const extractInventoryDefaultViewReference: SavedObjectMigrationFn< diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.test.ts index 9c007607c0954..fb1c8e2156215 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.test.ts @@ -6,7 +6,7 @@ */ import { migrationMocks } from '@kbn/core/server/mocks'; -import { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectReference } from '@kbn/core/server'; import { logIndexPatternReferenceName, metricsExplorerDefaultViewReferenceName, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.ts index 81b1d4bde03ec..879f4dc01ca8d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_16_2_extract_metrics_explorer_default_view_reference.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectMigrationFn } from '@kbn/core/server'; -import { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; +import type { SavedObjectMigrationFn } from '@kbn/core/server'; +import type { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; import { extractMetricsExplorerSavedViewReferences } from '../saved_object_references'; export const extractMetricsExplorerDefaultViewReference: SavedObjectMigrationFn< diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_9_0_add_new_indexing_strategy_index_names.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_9_0_add_new_indexing_strategy_index_names.ts index fd8be33877248..fc7d00144a917 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_9_0_add_new_indexing_strategy_index_names.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/7_9_0_add_new_indexing_strategy_index_names.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectMigrationFn } from '@kbn/core/server'; -import { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; +import type { SavedObjectMigrationFn } from '@kbn/core/server'; +import type { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; type SevenNineZeroSourceConfig = Omit & { logAlias: string; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.test.ts index 5cec2e3c94452..4c9c427875ba2 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import type { SavedObjectUnsanitizedDoc } from '@kbn/core/server'; import { migrationMocks } from '@kbn/core/server/mocks'; import { composeMigrations } from './compose_migrations'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.ts index e1d9e338d4630..98cd667823563 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/compose_migrations.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectMigrationFn } from '@kbn/core/server'; +import type { SavedObjectMigrationFn } from '@kbn/core/server'; type InputAttributesOf = MigrationFn extends SavedObjectMigrationFn< infer InputAttributes, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts index 307287dfc4c62..a6eacdb340394 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/migrations/create_test_source_configuration.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectReference, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; -import { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; +import type { SavedObjectReference, SavedObjectUnsanitizedDoc } from '@kbn/core/server'; +import type { InfraSourceConfiguration } from '../../../../common/source_configuration/source_configuration'; import { infraSourceConfigurationSavedObjectName } from '../saved_object_type'; export const createTestSourceConfiguration = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.test.ts index 4ca2f51cf9385..61baf5bedac2e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraSourceConfiguration } from '../../../common/source_configuration/source_configuration'; +import type { InfraSourceConfiguration } from '../../../common/source_configuration/source_configuration'; import { extractSavedObjectReferences, resolveSavedObjectReferences, diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.ts index 594a2408ecf62..b5e6cf08518d2 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_references.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { SavedObjectReference } from '@kbn/core/server'; -import { +import type { SavedObjectReference } from '@kbn/core/server'; +import type { InfraSavedSourceConfiguration, InfraSourceConfiguration, } from '../../../common/source_configuration/source_configuration'; +import type { SavedObjectAttributesWithReferences } from '../../saved_objects/references'; import { - SavedObjectAttributesWithReferences, extractSavedObjectReferences as genericExtractSavedObjectReferences, resolveSavedObjectReferences as genericResolveSavedObjectReferences, } from '../../saved_objects/references'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_type.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_type.ts index ed9f5b9f1da5f..29b7b8665e237 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_type.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/saved_object_type.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsType } from '@kbn/core/server'; import { addNewIndexingStrategyIndexNames } from './migrations/7_9_0_add_new_indexing_strategy_index_names'; import { convertLogAliasToLogIndices } from './migrations/7_13_0_convert_log_alias_to_log_indices'; import { composeMigrations } from './migrations/compose_migrations'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.test.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.test.ts index 2e108be0c515b..deef40eaef681 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SavedObject } from '@kbn/core/server'; +import type { SavedObject } from '@kbn/core/server'; import type { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; import { infraSourceConfigurationSavedObjectName } from './saved_object_type'; import { InfraSources } from './sources'; diff --git a/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.ts b/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.ts index 13f6a82fd5fb6..706d4e77a5e2e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.ts +++ b/x-pack/solutions/observability/plugins/infra/server/lib/sources/sources.ts @@ -10,13 +10,10 @@ import { identity } from 'fp-ts/lib/function'; import { pipe } from 'fp-ts/lib/pipeable'; import { failure } from 'io-ts/lib/PathReporter'; import { inRange } from 'lodash'; -import { - SavedObject, - SavedObjectsClientContract, - SavedObjectsErrorHelpers, -} from '@kbn/core/server'; +import type { SavedObject, SavedObjectsClientContract } from '@kbn/core/server'; +import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import type { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; -import { +import type { InfraSavedSourceConfiguration, InfraSource, InfraSourceConfiguration, diff --git a/x-pack/solutions/observability/plugins/infra/server/mocks.ts b/x-pack/solutions/observability/plugins/infra/server/mocks.ts index 4749ba6e1a3b6..9f30943632e05 100644 --- a/x-pack/solutions/observability/plugins/infra/server/mocks.ts +++ b/x-pack/solutions/observability/plugins/infra/server/mocks.ts @@ -13,7 +13,7 @@ import { createMetricsExplorerViewsServiceSetupMock, createMetricsExplorerViewsServiceStartMock, } from './services/metrics_explorer_views/metrics_explorer_views_service.mock'; -import { InfraPluginSetup, InfraPluginStart } from './types'; +import type { InfraPluginSetup, InfraPluginStart } from './types'; const createInfraSetupMock = () => { const infraSetupMock: jest.Mocked = { diff --git a/x-pack/solutions/observability/plugins/infra/server/plugin.ts b/x-pack/solutions/observability/plugins/infra/server/plugin.ts index 6eac138e9fc91..9dce77dcd1879 100644 --- a/x-pack/solutions/observability/plugins/infra/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/infra/server/plugin.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { Server } from '@hapi/hapi'; -import { CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server'; +import type { Server } from '@hapi/hapi'; +import type { CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/server'; import { handleEsError } from '@kbn/es-ui-shared-plugin/server'; import { i18n } from '@kbn/i18n'; -import { Logger } from '@kbn/logging'; +import type { Logger } from '@kbn/logging'; import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; -import { GetMetricIndicesOptions } from '@kbn/metrics-data-access-plugin/server'; +import type { GetMetricIndicesOptions } from '@kbn/metrics-data-access-plugin/server'; import { AssetDetailsLocatorDefinition, InventoryLocatorDefinition, @@ -22,7 +22,10 @@ import { mapValues } from 'lodash'; import { LOGS_FEATURE_ID, METRICS_FEATURE_ID } from '../common/constants'; import { LOGS_FEATURE, METRICS_FEATURE } from './features'; import { registerRoutes } from './infra_server'; -import { InfraServerPluginSetupDeps, InfraServerPluginStartDeps } from './lib/adapters/framework'; +import type { + InfraServerPluginSetupDeps, + InfraServerPluginStartDeps, +} from './lib/adapters/framework'; import { KibanaFramework } from './lib/adapters/framework/kibana_framework_adapter'; import { KibanaMetricsAdapter } from './lib/adapters/metrics/kibana_metrics_adapter'; import { InfraElasticsearchSourceStatusAdapter } from './lib/adapters/source_status'; @@ -32,7 +35,7 @@ import { METRICS_RULES_ALERT_CONTEXT, } from './lib/alerting/register_rule_types'; import { InfraMetricsDomain } from './lib/domains/metrics_domain'; -import { InfraBackendLibs, InfraDomainLibs } from './lib/infra_types'; +import type { InfraBackendLibs, InfraDomainLibs } from './lib/infra_types'; import { infraSourceConfigurationSavedObjectType, InfraSources } from './lib/sources'; import { InfraSourceStatus } from './lib/source_status'; import { @@ -43,7 +46,7 @@ import { import { InventoryViewsService } from './services/inventory_views'; import { MetricsExplorerViewsService } from './services/metrics_explorer_views'; import { RulesService } from './services/rules'; -import { +import type { InfraConfig, InfraPluginCoreSetup, InfraPluginRequestHandlerContext, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/delete_custom_dashboard.ts b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/delete_custom_dashboard.ts index 0742fd043a091..6eb23da51b8d9 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/delete_custom_dashboard.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/delete_custom_dashboard.ts @@ -7,7 +7,7 @@ import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import { InfraDeleteCustomDashboardsRequestParamsRT } from '../../../common/http_api/custom_dashboards_api'; -import { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; import { handleRouteErrors } from '../../utils/handle_route_errors'; import { checkCustomDashboardsEnabled } from './lib/check_custom_dashboards_enabled'; import { deleteCustomDashboard } from './lib/delete_custom_dashboard'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/get_custom_dashboard.ts b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/get_custom_dashboard.ts index 561c1995dba13..f3423e8f99a2f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/get_custom_dashboard.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/get_custom_dashboard.ts @@ -10,7 +10,7 @@ import { InfraGetCustomDashboardsRequestPathParamsRT, InfraGetCustomDashboardsResponseBodyRT, } from '../../../common/http_api/custom_dashboards_api'; -import { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; import { handleRouteErrors } from '../../utils/handle_route_errors'; import { checkCustomDashboardsEnabled } from './lib/check_custom_dashboards_enabled'; import { findCustomDashboard } from './lib/find_custom_dashboard'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/lib/check_custom_dashboards_enabled.ts b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/lib/check_custom_dashboards_enabled.ts index 086e920726449..7bd2d3959eb5c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/lib/check_custom_dashboards_enabled.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/lib/check_custom_dashboards_enabled.ts @@ -7,7 +7,7 @@ import Boom from '@hapi/boom'; import { i18n } from '@kbn/i18n'; -import { IUiSettingsClient } from '@kbn/core/server'; +import type { IUiSettingsClient } from '@kbn/core/server'; import { enableInfrastructureAssetCustomDashboards } from '@kbn/observability-plugin/common'; export async function checkCustomDashboardsEnabled(uiSettingsClient: IUiSettingsClient) { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/save_custom_dashboard.ts b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/save_custom_dashboard.ts index cab4d2de835d5..dc041eb9d161a 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/save_custom_dashboard.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/save_custom_dashboard.ts @@ -6,13 +6,13 @@ */ import { createRouteValidationFunction } from '@kbn/io-ts-utils'; -import { InfraCustomDashboard } from '../../../common/custom_dashboards'; +import type { InfraCustomDashboard } from '../../../common/custom_dashboards'; import { InfraSaveCustomDashboardsRequestPayloadRT, InfraSaveCustomDashboardsResponseBodyRT, InfraGetCustomDashboardsRequestPathParamsRT, } from '../../../common/http_api/custom_dashboards_api'; -import { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; import { INFRA_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../saved_objects'; import { checkCustomDashboardsEnabled } from './lib/check_custom_dashboards_enabled'; import { handleRouteErrors } from '../../utils/handle_route_errors'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/update_custom_dashboard.ts b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/update_custom_dashboard.ts index 2634604b9a76a..267734b0905e4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/update_custom_dashboard.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/custom_dashboards/update_custom_dashboard.ts @@ -6,13 +6,13 @@ */ import { createRouteValidationFunction } from '@kbn/io-ts-utils'; -import { InfraCustomDashboard } from '../../../common/custom_dashboards'; +import type { InfraCustomDashboard } from '../../../common/custom_dashboards'; import { InfraSaveCustomDashboardsRequestPayloadRT, InfraSaveCustomDashboardsResponseBodyRT, InfraUpdateCustomDashboardsRequestPathParamsRT, } from '../../../common/http_api/custom_dashboards_api'; -import { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; import { INFRA_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE } from '../../saved_objects'; import { checkCustomDashboardsEnabled } from './lib/check_custom_dashboards_enabled'; import { handleRouteErrors } from '../../utils/handle_route_errors'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_data_stream_types.ts b/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_data_stream_types.ts index d1cd99be31f9f..81126f4c85fc9 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_data_stream_types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_data_stream_types.ts @@ -10,7 +10,7 @@ import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; import { EntityDataStreamType } from '@kbn/observability-shared-plugin/common'; import type { ObservabilityElasticsearchClient } from '@kbn/observability-utils-server/es/client/create_observability_es_client'; import { castArray } from 'lodash'; -import { Logger } from '@kbn/logging'; +import type { Logger } from '@kbn/logging'; import { type InfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; import { getHasMetricsData } from './get_has_metrics_data'; import { getLatestEntity } from './get_latest_entity'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_has_metrics_data.ts b/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_has_metrics_data.ts index 58389fde22f08..41f76f5d1aa22 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_has_metrics_data.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/entities/get_has_metrics_data.ts @@ -6,7 +6,7 @@ */ import { termQuery } from '@kbn/observability-plugin/server'; -import { InfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; +import type { InfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; export async function getHasMetricsData({ infraMetricsClient, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/entities/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/entities/index.ts index 9c5c5c4527fee..0332946380cd7 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/entities/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/entities/index.ts @@ -11,7 +11,7 @@ import { entityCentricExperience } from '@kbn/observability-plugin/common'; import { createObservabilityEsClient } from '@kbn/observability-utils-server/es/client/create_observability_es_client'; import { BUILT_IN_ENTITY_TYPES } from '@kbn/observability-shared-plugin/common'; import { getInfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { getDataStreamTypes } from './get_data_stream_types'; export const initEntitiesConfigurationRoutes = (libs: InfraBackendLibs) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/helpers/query.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/helpers/query.ts index 570c1499f3b74..c63f1f6b4a28f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/helpers/query.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/helpers/query.ts @@ -8,13 +8,10 @@ import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { termQuery } from '@kbn/observability-plugin/server'; import { ApmDocumentType, type TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import type { ApmDataAccessServicesWrapper } from '../../../../lib/helpers/get_apm_data_access_client'; -import { - EVENT_MODULE, - METRICSET_MODULE, - SYSTEM_INTEGRATION, -} from '../../../../../common/constants'; +import type { SYSTEM_INTEGRATION } from '../../../../../common/constants'; +import { EVENT_MODULE, METRICSET_MODULE } from '../../../../../common/constants'; import type { InfraAssetMetricType } from '../../../../../common/http_api/infra'; export const getFilterByIntegration = (integration: typeof SYSTEM_INTEGRATION) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_apm_hosts.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_apm_hosts.ts index bb571e6393398..2a09f45f71952 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_apm_hosts.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_apm_hosts.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import type { TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; -import { GetHostParameters } from '../types'; +import type { GetHostParameters } from '../types'; export const getApmHostNames = async ({ apmDataAccessServices, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_filtered_hosts.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_filtered_hosts.ts index ef6e6a2c2a040..bbb10a0c70ea4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_filtered_hosts.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_filtered_hosts.ts @@ -6,10 +6,10 @@ */ import { rangeQuery } from '@kbn/observability-plugin/server'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { castArray } from 'lodash'; import { HOST_NAME_FIELD, SYSTEM_INTEGRATION } from '../../../../../common/constants'; -import { GetHostParameters } from '../types'; +import type { GetHostParameters } from '../types'; import { getFilterByIntegration } from '../helpers/query'; export const getFilteredHostNames = async ({ diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts index dbb1a3c2ceb69..48e1328de56bb 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts @@ -13,7 +13,7 @@ import { ALERT_UUID, } from '@kbn/rule-data-utils'; import { HOST_NAME_FIELD, INFRA_ALERT_CONSUMERS } from '../../../../../common/constants'; -import { GetHostParameters } from '../types'; +import type { GetHostParameters } from '../types'; export async function getHostsAlertsCount({ alertsClient, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_count.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_count.ts index 154fd8796520d..8b08021187faa 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_count.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/host/get_hosts_count.ts @@ -7,8 +7,8 @@ import { rangeQuery } from '@kbn/observability-plugin/server'; import type { ApmDataAccessServicesWrapper } from '../../../../lib/helpers/get_apm_data_access_client'; -import { GetInfraAssetCountRequestBodyPayload } from '../../../../../common/http_api'; -import { InfraMetricsClient } from '../../../../lib/helpers/get_infra_metrics_client'; +import type { GetInfraAssetCountRequestBodyPayload } from '../../../../../common/http_api'; +import type { InfraMetricsClient } from '../../../../lib/helpers/get_infra_metrics_client'; import { HOST_NAME_FIELD } from '../../../../../common/constants'; import { assertQueryStructure } from '../utils'; import { getDocumentsFilter } from '../helpers/query'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/types.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/types.ts index 87679f24271d6..aeda606a9e64a 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { ApmDataAccessServicesWrapper } from '../../../lib/helpers/get_apm_data_access_client'; -import { GetInfraMetricsRequestBodyPayload } from '../../../../common/http_api/infra'; -import { InfraAlertsClient } from '../../../lib/helpers/get_infra_alerts_client'; -import { InfraMetricsClient } from '../../../lib/helpers/get_infra_metrics_client'; +import type { ApmDataAccessServicesWrapper } from '../../../lib/helpers/get_apm_data_access_client'; +import type { GetInfraMetricsRequestBodyPayload } from '../../../../common/http_api/infra'; +import type { InfraAlertsClient } from '../../../lib/helpers/get_infra_alerts_client'; +import type { InfraMetricsClient } from '../../../lib/helpers/get_infra_metrics_client'; export interface GetHostParameters extends GetInfraMetricsRequestBodyPayload { infraMetricsClient: InfraMetricsClient; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/utils.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/utils.ts index 96938f9fc4e47..10e9c0a29e52e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/utils.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra/lib/utils.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import Boom from '@hapi/boom'; interface BoolQuery { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_hosts_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_hosts_anomalies.ts index 7fc99f513144c..8af322e27b5ad 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_hosts_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_hosts_anomalies.ts @@ -7,14 +7,16 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../../lib/infra_types'; +import type { InfraBackendLibs } from '../../../lib/infra_types'; +import type { + GetMetricsHostsAnomaliesRequestPayload, + Sort, + Pagination, +} from '../../../../common/http_api/infra_ml'; import { INFA_ML_GET_METRICS_HOSTS_ANOMALIES_PATH, getMetricsHostsAnomaliesSuccessReponsePayloadRT, getMetricsHostsAnomaliesRequestPayloadRT, - GetMetricsHostsAnomaliesRequestPayload, - Sort, - Pagination, } from '../../../../common/http_api/infra_ml'; import { assertHasInfraMlPlugins } from '../../../utils/request_context'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_k8s_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_k8s_anomalies.ts index 89c1f07edb64f..047ad752faf7d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_k8s_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/infra_ml/results/metrics_k8s_anomalies.ts @@ -7,14 +7,16 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../../lib/infra_types'; +import type { InfraBackendLibs } from '../../../lib/infra_types'; +import type { + GetMetricsK8sAnomaliesRequestPayload, + Sort, + Pagination, +} from '../../../../common/http_api/infra_ml'; import { INFA_ML_GET_METRICS_K8S_ANOMALIES_PATH, getMetricsK8sAnomaliesSuccessReponsePayloadRT, getMetricsK8sAnomaliesRequestPayloadRT, - GetMetricsK8sAnomaliesRequestPayload, - Sort, - Pagination, } from '../../../../common/http_api/infra_ml'; import { assertHasInfraMlPlugins } from '../../../utils/request_context'; import { getMetricK8sAnomalies } from '../../../lib/infra_ml'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/index.ts index cdda7250a30e5..c5546ea12b952 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/index.ts @@ -11,7 +11,7 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { throwErrors } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { InventoryMetaRequestRT, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts b/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts index c820aa21a6009..25c36a5a08f02 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { InventoryCloudAccount } from '../../../../common/http_api/inventory_meta_api'; -import { +import type { InventoryCloudAccount } from '../../../../common/http_api/inventory_meta_api'; +import type { InfraMetadataAggregationResponse, InfraMetadataAggregationBucket, } from '../../../lib/adapters/framework'; -import { InfraSourceConfiguration } from '../../../lib/sources'; -import { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; +import type { InfraSourceConfiguration } from '../../../lib/sources'; +import type { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; import type { InfraPluginRequestHandlerContext } from '../../../types'; export interface CloudMetaData { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/inventory_views/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/inventory_views/index.ts index 55cee58a8a464..4d3e154de85f1 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/inventory_views/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/inventory_views/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { initCreateInventoryViewRoute } from './create_inventory_view'; import { initDeleteInventoryViewRoute } from './delete_inventory_view'; import { initFindInventoryViewRoute } from './find_inventory_view'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/ip_to_hostname.ts b/x-pack/solutions/observability/plugins/infra/server/routes/ip_to_hostname.ts index 0f8c00c51b0db..9b4fc44cd2448 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/ip_to_hostname.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/ip_to_hostname.ts @@ -7,7 +7,7 @@ import { first } from 'lodash'; import { schema } from '@kbn/config-schema'; -import { InfraBackendLibs } from '../lib/infra_types'; +import type { InfraBackendLibs } from '../lib/infra_types'; interface HostDoc { _source: { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/log_alerts/chart_preview_data.ts b/x-pack/solutions/observability/plugins/infra/server/routes/log_alerts/chart_preview_data.ts index 389ce37f21d3c..6ddcdd67d7439 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/log_alerts/chart_preview_data.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/log_alerts/chart_preview_data.ts @@ -8,7 +8,7 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import { logAlertsV1 } from '../../../common/http_api'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { getChartPreviewData } from '../../lib/alerting/log_threshold/log_threshold_chart_preview'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/id_formats.ts b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/id_formats.ts index 800d43df448d5..e5611ff5b20fc 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/id_formats.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/id_formats.ts @@ -12,7 +12,7 @@ import { getLogAnalysisIdFormatsRequestPayloadRT, getLogAnalysisIdFormatsSuccessResponsePayloadRT, } from '../../../common/http_api/latest'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { isMlPrivilegesError } from '../../lib/log_analysis'; import { resolveIdFormats } from '../../lib/log_analysis/resolve_id_formats'; import { assertHasInfraMlPlugins } from '../../utils/request_context'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_anomalies.ts b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_anomalies.ts index 32b530f5da51c..3e1fc66388d29 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_anomalies.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_anomalies.ts @@ -8,9 +8,9 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import { logAnalysisResultsV1 } from '../../../../common/http_api'; -import { InfraBackendLibs } from '../../../lib/infra_types'; +import type { InfraBackendLibs } from '../../../lib/infra_types'; -import { AnomaliesSort, Pagination } from '../../../../common/log_analysis'; +import type { AnomaliesSort, Pagination } from '../../../../common/log_analysis'; import { assertHasInfraMlPlugins } from '../../../utils/request_context'; import { getLogEntryAnomalies } from '../../../lib/log_analysis'; import { isMlPrivilegesError } from '../../../lib/log_analysis/errors'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_examples.ts b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_examples.ts index b40463c0538af..3c596fa985576 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_examples.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/results/log_entry_examples.ts @@ -9,7 +9,7 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import { logAnalysisResultsV1 } from '../../../../common/http_api'; -import { InfraBackendLibs } from '../../../lib/infra_types'; +import type { InfraBackendLibs } from '../../../lib/infra_types'; import { getLogEntryExamples } from '../../../lib/log_analysis'; import { isMlPrivilegesError } from '../../../lib/log_analysis/errors'; import { assertHasInfraMlPlugins } from '../../../utils/request_context'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/datasets.ts b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/datasets.ts index b4db339efc7b2..54ea70d46909e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/datasets.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/datasets.ts @@ -9,7 +9,7 @@ import Boom from '@hapi/boom'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../../lib/infra_types'; +import type { InfraBackendLibs } from '../../../lib/infra_types'; import { logAnalysisValidationV1 } from '../../../../common/http_api'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/indices.ts b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/indices.ts index d541d0b67d59e..39fcc918811f5 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/indices.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/log_analysis/validation/indices.ts @@ -12,7 +12,7 @@ import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { schema } from '@kbn/config-schema'; import { throwErrors } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../../lib/infra_types'; +import type { InfraBackendLibs } from '../../../lib/infra_types'; import { logAnalysisValidationV1 } from '../../../../common/http_api'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/index.ts index 10b0fe8932a30..f1b98fb0efc53 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/index.ts @@ -12,12 +12,9 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { throwErrors } from '@kbn/io-ts-utils'; -import { - InfraMetadataFeature, - InfraMetadataRequestRT, - InfraMetadataRT, -} from '../../../common/http_api/metadata_api'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraMetadataFeature } from '../../../common/http_api/metadata_api'; +import { InfraMetadataRequestRT, InfraMetadataRT } from '../../../common/http_api/metadata_api'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { getMetricMetadata } from './lib/get_metric_metadata'; import { pickFeatureName } from './lib/pick_feature_name'; import { getCloudMetricsMetadata } from './lib/get_cloud_metric_metadata'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts index 126d1485cb702..eecfcd301fbd8 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts @@ -6,12 +6,12 @@ */ import type { InfraPluginRequestHandlerContext } from '../../../types'; -import { +import type { InfraMetadataAggregationBucket, InfraMetadataAggregationResponse, } from '../../../lib/adapters/framework'; -import { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; -import { InfraSourceConfiguration } from '../../../lib/sources'; +import type { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; +import type { InfraSourceConfiguration } from '../../../lib/sources'; import { CLOUD_METRICS_MODULES } from '../../../lib/constants'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts index ef5afc9f5b20a..5e5580c4b8c2c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts @@ -6,15 +6,15 @@ */ import { get } from 'lodash'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import type { InfraMetricsClient } from '../../../lib/helpers/get_infra_metrics_client'; import type { InfraPluginRequestHandlerContext } from '../../../types'; -import { +import type { InfraMetadataAggregationBucket, InfraMetadataAggregationResponse, } from '../../../lib/adapters/framework'; -import { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; -import { InfraSourceConfiguration } from '../../../lib/sources'; +import type { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; +import type { InfraSourceConfiguration } from '../../../lib/sources'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; import { getHasDataFromSystemIntegration } from '../../infra/lib/host/get_filtered_hosts'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_node_info.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_node_info.ts index e1de012cc2679..7aa5f82dae793 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_node_info.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_node_info.ts @@ -8,11 +8,11 @@ import { set } from '@kbn/safer-lodash-set'; import { first, startsWith } from 'lodash'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import type { InfraPluginRequestHandlerContext } from '../../../types'; -import { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; -import { InfraSourceConfiguration } from '../../../lib/sources'; -import { InfraMetadataInfo } from '../../../../common/http_api/metadata_api'; +import type { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; +import type { InfraSourceConfiguration } from '../../../lib/sources'; +import type { InfraMetadataInfo } from '../../../../common/http_api/metadata_api'; import { getPodNodeName } from './get_pod_node_name'; import { CLOUD_METRICS_MODULES } from '../../../lib/constants'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts index 32b5bf3d3ac07..70e7454fb5ac0 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts @@ -7,8 +7,8 @@ import { first, get } from 'lodash'; import { findInventoryFields } from '@kbn/metrics-data-access-plugin/common'; -import { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; -import { InfraSourceConfiguration } from '../../../lib/sources'; +import type { KibanaFramework } from '../../../lib/adapters/framework/kibana_framework_adapter'; +import type { InfraSourceConfiguration } from '../../../lib/sources'; import type { InfraPluginRequestHandlerContext } from '../../../types'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/pick_feature_name.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/pick_feature_name.ts index aead124a27435..7d8e4e36e2ef7 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/pick_feature_name.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metadata/lib/pick_feature_name.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraMetadataAggregationBucket } from '../../../lib/adapters/framework'; +import type { InfraMetadataAggregationBucket } from '../../../lib/adapters/framework'; export const pickFeatureName = (buckets: InfraMetadataAggregationBucket[]): string[] => { if (buckets) { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metrics_explorer_views/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metrics_explorer_views/index.ts index ae95dc9c43c26..0452f67cfef74 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metrics_explorer_views/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metrics_explorer_views/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { initCreateMetricsExplorerViewRoute } from './create_metrics_explorer_view'; import { initDeleteMetricsExplorerViewRoute } from './delete_metrics_explorer_view'; import { initFindMetricsExplorerViewRoute } from './find_metrics_explorer_view'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/metrics_sources/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/metrics_sources/index.ts index 77bdee365e3bf..4290db429aead 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/metrics_sources/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/metrics_sources/index.ts @@ -15,17 +15,17 @@ import { getHasDataQueryParamsRT, getHasDataResponseRT, } from '../../../common/metrics_sources/get_has_data'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { hasData } from '../../lib/sources/has_data'; import { createSearchClient } from '../../lib/create_search_client'; import { AnomalyThresholdRangeError, NoSuchRemoteClusterError } from '../../lib/sources/errors'; +import type { MetricsSourceStatus } from '../../../common/metrics_sources'; import { metricsSourceConfigurationResponseRT, - MetricsSourceStatus, partialMetricsSourceConfigurationReqPayloadRT, } from '../../../common/metrics_sources'; -import { InfraSource } from '../../lib/sources'; -import { InfraPluginRequestHandlerContext } from '../../types'; +import type { InfraSource } from '../../lib/sources'; +import type { InfraPluginRequestHandlerContext } from '../../types'; import { getInfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; const defaultStatus = { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/node_details/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/node_details/index.ts index 4032104589426..0e82e8fc33b47 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/node_details/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/node_details/index.ts @@ -11,9 +11,9 @@ import { pipe } from 'fp-ts/lib/pipeable'; import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { throwErrors } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { UsageCollector } from '../../usage/usage_collector'; -import { InfraMetricsRequestOptions } from '../../lib/adapters/metrics'; +import type { InfraMetricsRequestOptions } from '../../lib/adapters/metrics'; import { NodeDetailsRequestRT, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/overview/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/overview/index.ts index e750275d1c446..0e33c8733b59c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/overview/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/overview/index.ts @@ -6,7 +6,7 @@ */ import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import { TopNodesRequestRT } from '../../../common/http_api/overview_api'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { createSearchClient } from '../../lib/create_search_client'; import { queryTopNodes } from './lib/get_top_nodes'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/convert_es_response_to_top_nodes_response.ts b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/convert_es_response_to_top_nodes_response.ts index 3511a3807a466..36192a9c17b8c 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/convert_es_response_to_top_nodes_response.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/convert_es_response_to_top_nodes_response.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { TopNodesResponse } from '../../../../common/http_api/overview_api'; -import { InfraDatabaseSearchResponse } from '../../../lib/adapters/framework'; +import type { TopNodesResponse } from '../../../../common/http_api/overview_api'; +import type { InfraDatabaseSearchResponse } from '../../../lib/adapters/framework'; import { getMetadataFromNodeBucket } from './get_matadata_from_node_bucket'; -import { ESResponseForTopNodes } from './types'; +import type { ESResponseForTopNodes } from './types'; export const convertESResponseToTopNodesResponse = ( response: InfraDatabaseSearchResponse<{}, ESResponseForTopNodes> diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/create_top_nodes_query.ts b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/create_top_nodes_query.ts index 74164dd975093..f0ad0a8a711f0 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/create_top_nodes_query.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/create_top_nodes_query.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { MetricsSourceConfiguration } from '../../../../common/metrics_sources'; -import { TopNodesRequest } from '../../../../common/http_api/overview_api'; +import type { MetricsSourceConfiguration } from '../../../../common/metrics_sources'; +import type { TopNodesRequest } from '../../../../common/http_api/overview_api'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; export const createTopNodesQuery = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_matadata_from_node_bucket.ts b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_matadata_from_node_bucket.ts index 2f1a2a4cded8d..e58ccac42d3ca 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_matadata_from_node_bucket.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_matadata_from_node_bucket.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { NodeBucket } from './types'; +import type { NodeBucket } from './types'; interface Metadata { name: string | null; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_top_nodes.ts b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_top_nodes.ts index 4d46479ac7a54..cc323b7c14455 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_top_nodes.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/overview/lib/get_top_nodes.ts @@ -4,12 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { TopNodesRequest } from '../../../../common/http_api/overview_api'; -import { MetricsSourceConfiguration } from '../../../../common/metrics_sources'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { TopNodesRequest } from '../../../../common/http_api/overview_api'; +import type { MetricsSourceConfiguration } from '../../../../common/metrics_sources'; +import type { ESSearchClient } from '../../../lib/metrics/types'; import { convertESResponseToTopNodesResponse } from './convert_es_response_to_top_nodes_response'; import { createTopNodesQuery } from './create_top_nodes_query'; -import { ESResponseForTopNodes } from './types'; +import type { ESResponseForTopNodes } from './types'; export const queryTopNodes = async ( options: TopNodesRequest, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/process_list/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/process_list/index.ts index 666ade8a4b7b6..076044ebb5489 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/process_list/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/process_list/index.ts @@ -11,7 +11,7 @@ import { fold } from 'fp-ts/lib/Either'; import { identity } from 'fp-ts/lib/function'; import { schema } from '@kbn/config-schema'; import { throwErrors } from '@kbn/io-ts-utils'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { createSearchClient } from '../../lib/create_search_client'; import { getProcessList } from '../../lib/host_details/process_list'; import { getProcessListChart } from '../../lib/host_details/process_list_chart'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/services/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/services/index.ts index 9673b31788487..0b171e6bdc00e 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/services/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/services/index.ts @@ -5,12 +5,12 @@ * 2.0. */ +import type { GetServicesRequestQuery } from '../../../common/http_api/host_details'; import { - GetServicesRequestQuery, GetServicesRequestQueryRT, ServicesAPIResponseRT, } from '../../../common/http_api/host_details'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { validateStringAssetFilters } from './lib/utils'; import { buildRouteValidationWithExcess } from '../../utils/route_validation'; import { getApmDataAccessClient } from '../../lib/helpers/get_apm_data_access_client'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/services/lib/utils.ts b/x-pack/solutions/observability/plugins/infra/server/routes/services/lib/utils.ts index c3ef240a53a7d..72281a80f8e16 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/services/lib/utils.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/services/lib/utils.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { RouteValidationError, RouteValidationResultFactory } from '@kbn/core/server'; +import type { RouteValidationError, RouteValidationResultFactory } from '@kbn/core/server'; type ValidateStringAssetFiltersReturn = [{ error: RouteValidationError }] | [null, any]; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/index.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/index.ts index 4398e7f47f281..a6f7f998572b4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/index.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/index.ts @@ -8,12 +8,12 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import { SNAPSHOT_API_MAX_METRICS } from '../../../common/constants'; -import { InfraBackendLibs } from '../../lib/infra_types'; +import type { InfraBackendLibs } from '../../lib/infra_types'; import { UsageCollector } from '../../usage/usage_collector'; import { SnapshotRequestRT, SnapshotNodeResponseRT } from '../../../common/http_api/snapshot_api'; import { createSearchClient } from '../../lib/create_search_client'; import { getNodes } from './lib/get_nodes'; -import { LogQueryFields } from '../../lib/metrics/types'; +import type { LogQueryFields } from '../../lib/metrics/types'; export const initSnapshotRoute = (libs: InfraBackendLibs) => { const validateBody = createRouteValidationFunction(SnapshotRequestRT); diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts index 3b3e852a3101a..e21ca4a7677ff 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/apply_metadata_to_last_path.ts @@ -11,7 +11,7 @@ import { type MetricsAPISeries, findInventoryFields, } from '@kbn/metrics-data-access-plugin/common'; -import { SnapshotRequest, SnapshotNodePath, SnapshotNode } from '../../../../common/http_api'; +import type { SnapshotRequest, SnapshotNodePath, SnapshotNode } from '../../../../common/http_api'; import { META_KEY } from './constants'; export const isIPv4 = (subject: string) => /^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/.test(subject); diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/copy_missing_metrics.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/copy_missing_metrics.ts index 60b290c983ecb..2e3ff062ab803 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/copy_missing_metrics.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/copy_missing_metrics.ts @@ -6,7 +6,7 @@ */ import { memoize, last, first } from 'lodash'; -import { SnapshotNode, SnapshotNodeResponse } from '../../../../common/http_api'; +import type { SnapshotNode, SnapshotNodeResponse } from '../../../../common/http_api'; const createMissingMetricFinder = (nodes: SnapshotNode[]) => memoize((id: string) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/create_timerange_with_interval.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/create_timerange_with_interval.ts index cff44454d6e96..65f648d5f1d46 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/create_timerange_with_interval.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/create_timerange_with_interval.ts @@ -11,9 +11,10 @@ import { type MetricsAPITimerange, isBasicMetricAgg, } from '@kbn/metrics-data-access-plugin/common'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { ESSearchClient } from '../../../lib/metrics/types'; import { calculateMetricInterval } from '../../../utils/calculate_metric_interval'; -import { getMetricsAggregations, InfraSnapshotRequestOptions } from './get_metrics_aggregations'; +import type { InfraSnapshotRequestOptions } from './get_metrics_aggregations'; +import { getMetricsAggregations } from './get_metrics_aggregations'; import { getDatasetForField } from './get_dataset_for_field'; const DEFAULT_LOOKBACK_SIZE = 5; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_dataset_for_field.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_dataset_for_field.ts index 97154a7361c96..42a059b447863 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_dataset_for_field.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_dataset_for_field.ts @@ -6,7 +6,7 @@ */ import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { ESSearchClient } from '../../../lib/metrics/types'; interface EventDatasetHit { _source: { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_metrics_aggregations.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_metrics_aggregations.ts index 65c5c35dea620..dce1d794496d2 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_metrics_aggregations.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_metrics_aggregations.ts @@ -6,19 +6,16 @@ */ import { i18n } from '@kbn/i18n'; -import { JsonObject } from '@kbn/utility-types'; +import type { JsonObject } from '@kbn/utility-types'; import type { InventoryItemType, MetricsUIAggregation, } from '@kbn/metrics-data-access-plugin/common'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { networkTraffic } from '@kbn/metrics-data-access-plugin/common'; -import { - SnapshotMetricInput, - SnapshotCustomMetricInputRT, - SnapshotRequest, -} from '../../../../common/http_api'; -import { InfraSourceConfiguration } from '../../../lib/sources'; +import type { SnapshotMetricInput, SnapshotRequest } from '../../../../common/http_api'; +import { SnapshotCustomMetricInputRT } from '../../../../common/http_api'; +import type { InfraSourceConfiguration } from '../../../lib/sources'; export interface InfraSnapshotRequestOptions extends Omit { diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_nodes.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_nodes.ts index 171639c115a79..1db86fca582c5 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_nodes.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/get_nodes.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { SnapshotRequest } from '../../../../common/http_api'; -import { ESSearchClient, LogQueryFields } from '../../../lib/metrics/types'; -import { InfraSource } from '../../../lib/sources'; +import type { SnapshotRequest } from '../../../../common/http_api'; +import type { ESSearchClient, LogQueryFields } from '../../../lib/metrics/types'; +import type { InfraSource } from '../../../lib/sources'; import { transformRequestToMetricsAPIRequest } from './transform_request_to_metrics_api_request'; import { queryAllData } from './query_all_data'; import { transformMetricsApiResponseToSnapshotResponse } from './transform_metrics_ui_response'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/query_all_data.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/query_all_data.ts index 91482563da483..5bf2c84cfb3ee 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/query_all_data.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/query_all_data.ts @@ -6,7 +6,7 @@ */ import type { MetricsAPIResponse, MetricsAPIRequest } from '@kbn/metrics-data-access-plugin/common'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { ESSearchClient } from '../../../lib/metrics/types'; import { query } from '../../../lib/metrics'; const handleResponse = diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts index dc9161b06fde3..3e042e80b41c8 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_metrics_ui_response.ts @@ -13,7 +13,7 @@ import type { MetricsAPISeries, SnapshotMetricType, } from '@kbn/metrics-data-access-plugin/common'; -import { +import type { SnapshotNodeResponse, SnapshotRequest, SnapshotNode, diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts index 5a43c94c09bdb..315bb9dfacd27 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.test.ts @@ -6,8 +6,8 @@ */ import { transformRequestToMetricsAPIRequest } from './transform_request_to_metrics_api_request'; -import { ESSearchClient } from '../../../lib/metrics/types'; -import { InfraSource } from '../../../lib/sources'; +import type { ESSearchClient } from '../../../lib/metrics/types'; +import type { InfraSource } from '../../../lib/sources'; import type { SnapshotRequest } from '../../../../common/http_api'; import type { MetricsAPIRequest } from '@kbn/metrics-data-access-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts index 517b97ee809a3..41e7c31abab81 100644 --- a/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts +++ b/x-pack/solutions/observability/plugins/infra/server/routes/snapshot/lib/transform_request_to_metrics_api_request.ts @@ -12,14 +12,14 @@ import { findInventoryModel, } from '@kbn/metrics-data-access-plugin/common'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { SnapshotRequest } from '../../../../common/http_api'; -import { ESSearchClient } from '../../../lib/metrics/types'; -import { InfraSource } from '../../../lib/sources'; +import type { SnapshotRequest } from '../../../../common/http_api'; +import type { ESSearchClient } from '../../../lib/metrics/types'; +import type { InfraSource } from '../../../lib/sources'; import { createTimeRangeWithInterval } from './create_timerange_with_interval'; import { parseFilterQuery } from '../../../utils/serialized_query'; import { transformSnapshotMetricsToMetricsAPIMetrics } from './transform_snapshot_metrics_to_metrics_api_metrics'; import { META_KEY } from './constants'; -import { SourceOverrides } from './get_nodes'; +import type { SourceOverrides } from './get_nodes'; export const transformRequestToMetricsAPIRequest = async ({ client, diff --git a/x-pack/solutions/observability/plugins/infra/server/saved_objects/custom_dashboards/custom_dashboards_saved_object.ts b/x-pack/solutions/observability/plugins/infra/server/saved_objects/custom_dashboards/custom_dashboards_saved_object.ts index 76220a9463121..e5df79b741d93 100644 --- a/x-pack/solutions/observability/plugins/infra/server/saved_objects/custom_dashboards/custom_dashboards_saved_object.ts +++ b/x-pack/solutions/observability/plugins/infra/server/saved_objects/custom_dashboards/custom_dashboards_saved_object.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SavedObjectsFieldMapping, SavedObjectsType } from '@kbn/core/server'; +import type { SavedObjectsFieldMapping, SavedObjectsType } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { schema } from '@kbn/config-schema'; -import { InfraCustomDashboard } from '../../../common/custom_dashboards'; +import type { InfraCustomDashboard } from '../../../common/custom_dashboards'; export const INFRA_CUSTOM_DASHBOARDS_SAVED_OBJECT_TYPE = 'infra-custom-dashboards'; diff --git a/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.test.ts b/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.test.ts index 674aabbd9d058..eeb2c17cb8bbc 100644 --- a/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.test.ts @@ -5,12 +5,9 @@ * 2.0. */ -import { SavedObjectReference } from '@kbn/core/server'; -import { - extractSavedObjectReferences, - resolveSavedObjectReferences, - SavedObjectAttributesWithReferences, -} from './references'; +import type { SavedObjectReference } from '@kbn/core/server'; +import type { SavedObjectAttributesWithReferences } from './references'; +import { extractSavedObjectReferences, resolveSavedObjectReferences } from './references'; it('extractSavedObjectReferences extracts references using the given extractors', () => { const { attributes, references } = extractSavedObjectReferences([ diff --git a/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.ts b/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.ts index 13b64ab6e6e73..75c155b4a21ae 100644 --- a/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.ts +++ b/x-pack/solutions/observability/plugins/infra/server/saved_objects/references.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { SavedObject, SavedObjectReference } from '@kbn/core/server'; +import type { SavedObject, SavedObjectReference } from '@kbn/core/server'; export type SavedObjectAttributesWithReferences = Pick< SavedObject, diff --git a/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts b/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts index 89c5b17d3c402..abfad2d4b740f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.test.ts @@ -6,16 +6,16 @@ */ import { loggerMock } from '@kbn/logging-mocks'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { InventoryViewAttributes } from '../../../common/inventory_views'; +import type { InventoryViewAttributes } from '../../../common/inventory_views'; -import { InfraSource } from '../../lib/sources'; +import type { InfraSource } from '../../lib/sources'; import { createInfraSourcesMock } from '../../lib/sources/mocks'; import { inventoryViewSavedObjectName } from '../../saved_objects/inventory_view'; import { InventoryViewsClient } from './inventory_views_client'; import { createInventoryViewMock } from '../../../common/inventory_views/inventory_view.mock'; -import { UpdateInventoryViewAttributesRequestPayload } from '../../../common/http_api/latest'; +import type { UpdateInventoryViewAttributesRequestPayload } from '../../../common/http_api/latest'; describe('InventoryViewsClient class', () => { const mockFindInventoryList = (savedObjectsClient: jest.Mocked) => { diff --git a/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.ts b/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.ts index 34df2d68d7787..b1369262d26e3 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/inventory_views/inventory_views_client.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { Logger, SavedObject, SavedObjectsClientContract, SavedObjectsUpdateResponse, - SavedObjectsUtils, } from '@kbn/core/server'; +import { SavedObjectsUtils } from '@kbn/core/server'; import Boom from '@hapi/boom'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { diff --git a/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts b/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts index 6b8de7a724f16..fc2749ee4472f 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.test.ts @@ -6,16 +6,16 @@ */ import { loggerMock } from '@kbn/logging-mocks'; -import { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; import { savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { MetricsExplorerViewAttributes } from '../../../common/metrics_explorer_views'; +import type { MetricsExplorerViewAttributes } from '../../../common/metrics_explorer_views'; -import { InfraSource } from '../../lib/sources'; +import type { InfraSource } from '../../lib/sources'; import { createInfraSourcesMock } from '../../lib/sources/mocks'; import { metricsExplorerViewSavedObjectName } from '../../saved_objects/metrics_explorer_view'; import { MetricsExplorerViewsClient } from './metrics_explorer_views_client'; import { createMetricsExplorerViewMock } from '../../../common/metrics_explorer_views/metrics_explorer_view.mock'; -import { UpdateMetricsExplorerViewAttributesRequestPayload } from '../../../common/http_api/latest'; +import type { UpdateMetricsExplorerViewAttributesRequestPayload } from '../../../common/http_api/latest'; describe('MetricsExplorerViewsClient class', () => { const mockFindMetricsExplorerList = ( diff --git a/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.ts b/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.ts index f2919ff7cd0a4..a64f928c1deb0 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/metrics_explorer_views/metrics_explorer_views_client.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { Logger, SavedObject, SavedObjectsClientContract, SavedObjectsUpdateResponse, - SavedObjectsUtils, } from '@kbn/core/server'; +import { SavedObjectsUtils } from '@kbn/core/server'; import Boom from '@hapi/boom'; import { decodeOrThrow } from '@kbn/io-ts-utils'; import { diff --git a/x-pack/solutions/observability/plugins/infra/server/services/rules/rule_data_client.ts b/x-pack/solutions/observability/plugins/infra/server/services/rules/rule_data_client.ts index ebbe3139167c3..302d0b0adfa21 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/rules/rule_data_client.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/rules/rule_data_client.ts @@ -5,14 +5,15 @@ * 2.0. */ -import { CoreSetup, Logger } from '@kbn/core/server'; +import type { CoreSetup, Logger } from '@kbn/core/server'; import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; -import { Dataset, RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; +import type { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; +import { Dataset } from '@kbn/rule-registry-plugin/server'; import { mappingFromFieldMap } from '@kbn/alerting-plugin/common'; import { ECS_COMPONENT_TEMPLATE_NAME } from '@kbn/alerting-plugin/server'; import type { InfraFeatureId } from '../../../common/constants'; -import { RuleRegistrationContext, RulesServiceStartDeps } from './types'; +import type { RuleRegistrationContext, RulesServiceStartDeps } from './types'; export const createRuleDataClient = ({ ownerFeatureId, diff --git a/x-pack/solutions/observability/plugins/infra/server/services/rules/rules_service.ts b/x-pack/solutions/observability/plugins/infra/server/services/rules/rules_service.ts index 99e7c57d857b5..83a61af330a51 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/rules/rules_service.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/rules/rules_service.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { CoreSetup, Logger } from '@kbn/core/server'; -import { InfraFeatureId } from '../../../common/constants'; +import type { CoreSetup, Logger } from '@kbn/core/server'; +import type { InfraFeatureId } from '../../../common/constants'; import { createRuleDataClient } from './rule_data_client'; -import { +import type { RuleRegistrationContext, RulesServiceSetup, RulesServiceSetupDeps, diff --git a/x-pack/solutions/observability/plugins/infra/server/services/rules/types.ts b/x-pack/solutions/observability/plugins/infra/server/services/rules/types.ts index ee2d5967b081b..6356e92994633 100644 --- a/x-pack/solutions/observability/plugins/infra/server/services/rules/types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/services/rules/types.ts @@ -6,7 +6,10 @@ */ import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; -import { IRuleDataClient, RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; +import type { + IRuleDataClient, + RuleRegistryPluginSetupContract, +} from '@kbn/rule-registry-plugin/server'; export interface RulesServiceSetupDeps { alerting: AlertingServerSetup; ruleRegistry: RuleRegistryPluginSetupContract; diff --git a/x-pack/solutions/observability/plugins/infra/server/types.ts b/x-pack/solutions/observability/plugins/infra/server/types.ts index 3f5f14c807d40..5e643af3974d4 100644 --- a/x-pack/solutions/observability/plugins/infra/server/types.ts +++ b/x-pack/solutions/observability/plugins/infra/server/types.ts @@ -14,9 +14,12 @@ import type { import type { SearchRequestHandlerContext } from '@kbn/data-plugin/server'; import type { MlPluginSetup } from '@kbn/ml-plugin/server'; import type { EntityManagerServerPluginStart } from '@kbn/entityManager-plugin/server'; -import { InfraServerPluginStartDeps } from './lib/adapters/framework'; -import { InventoryViewsServiceSetup, InventoryViewsServiceStart } from './services/inventory_views'; -import { +import type { InfraServerPluginStartDeps } from './lib/adapters/framework'; +import type { + InventoryViewsServiceSetup, + InventoryViewsServiceStart, +} from './services/inventory_views'; +import type { MetricsExplorerViewsServiceSetup, MetricsExplorerViewsServiceStart, } from './services/metrics_explorer_views'; diff --git a/x-pack/solutions/observability/plugins/infra/server/usage/usage_collector.ts b/x-pack/solutions/observability/plugins/infra/server/usage/usage_collector.ts index aada031576717..97b39ef365570 100644 --- a/x-pack/solutions/observability/plugins/infra/server/usage/usage_collector.ts +++ b/x-pack/solutions/observability/plugins/infra/server/usage/usage_collector.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; interface InfraopsSum { infraopsHosts: number; diff --git a/x-pack/solutions/observability/plugins/infra/server/utils/calculate_metric_interval.ts b/x-pack/solutions/observability/plugins/infra/server/utils/calculate_metric_interval.ts index 24819b859f959..fbce4ecc117b2 100644 --- a/x-pack/solutions/observability/plugins/infra/server/utils/calculate_metric_interval.ts +++ b/x-pack/solutions/observability/plugins/infra/server/utils/calculate_metric_interval.ts @@ -7,9 +7,9 @@ import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; // import { KibanaFramework } from '../lib/adapters/framework/kibana_framework_adapter'; -import { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; +import type { InventoryItemType } from '@kbn/metrics-data-access-plugin/common'; import { TIMESTAMP_FIELD } from '../../common/constants'; -import { ESSearchClient } from '../lib/metrics/types'; +import type { ESSearchClient } from '../lib/metrics/types'; interface Options { indexPattern: string; diff --git a/x-pack/solutions/observability/plugins/infra/server/utils/get_original_action_group.ts b/x-pack/solutions/observability/plugins/infra/server/utils/get_original_action_group.ts index 8b70ad23b8e1e..0bee2f8994f37 100644 --- a/x-pack/solutions/observability/plugins/infra/server/utils/get_original_action_group.ts +++ b/x-pack/solutions/observability/plugins/infra/server/utils/get_original_action_group.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { Alert } from '@kbn/alerts-as-data-utils'; +import type { Alert } from '@kbn/alerts-as-data-utils'; import { ALERT_ACTION_GROUP } from '@kbn/rule-data-utils'; -import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; -import { ParsedExperimentalFields } from '@kbn/rule-registry-plugin/common/parse_experimental_fields'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import type { ParsedExperimentalFields } from '@kbn/rule-registry-plugin/common/parse_experimental_fields'; export const getOriginalActionGroup = < T extends Alert | (ParsedTechnicalFields & ParsedExperimentalFields) diff --git a/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.test.ts b/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.test.ts index 168a208f15e60..bc057d71a53e9 100644 --- a/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.test.ts +++ b/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InfraSource } from '../lib/sources'; +import type { InfraSource } from '../lib/sources'; import { getAttributesFromSourceConfiguration } from './map_source_to_log_view'; describe('getAttributesFromSourceConfiguration function', () => { diff --git a/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.ts b/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.ts index 5dd5d021ccd6a..367f919713c4d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.ts +++ b/x-pack/solutions/observability/plugins/infra/server/utils/map_source_to_log_view.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { LogIndexReference, LogView, LogViewAttributes } from '@kbn/logs-shared-plugin/common'; -import { LogIndexReference as SourceConfigurationLogIndexReference } from '../../common/source_configuration/source_configuration'; -import { InfraSource } from '../lib/sources'; +import type { LogIndexReference, LogView, LogViewAttributes } from '@kbn/logs-shared-plugin/common'; +import type { LogIndexReference as SourceConfigurationLogIndexReference } from '../../common/source_configuration/source_configuration'; +import type { InfraSource } from '../lib/sources'; export const mapSourceToLogView = (sourceConfiguration: InfraSource): LogView => { return { diff --git a/x-pack/solutions/observability/plugins/infra/server/utils/request_context.ts b/x-pack/solutions/observability/plugins/infra/server/utils/request_context.ts index f0546c8843990..1076f9297813d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/utils/request_context.ts +++ b/x-pack/solutions/observability/plugins/infra/server/utils/request_context.ts @@ -7,7 +7,7 @@ /* eslint-disable max-classes-per-file */ -import { InfraRequestHandlerContext } from '../types'; +import type { InfraRequestHandlerContext } from '../types'; export class MissingContextValuesError extends Error { constructor(message?: string) { diff --git a/x-pack/solutions/observability/plugins/infra/server/utils/serialized_query.ts b/x-pack/solutions/observability/plugins/infra/server/utils/serialized_query.ts index b3b2569528aea..1efa1d0fd315d 100644 --- a/x-pack/solutions/observability/plugins/infra/server/utils/serialized_query.ts +++ b/x-pack/solutions/observability/plugins/infra/server/utils/serialized_query.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { JsonObject } from '@kbn/utility-types'; +import type { JsonObject } from '@kbn/utility-types'; export const parseFilterQuery = ( filterQuery: string | null | undefined diff --git a/x-pack/solutions/observability/plugins/inventory/.storybook/get_mock_inventory_context.tsx b/x-pack/solutions/observability/plugins/inventory/.storybook/get_mock_inventory_context.tsx index 0188ed3143034..c9d95fc346d74 100644 --- a/x-pack/solutions/observability/plugins/inventory/.storybook/get_mock_inventory_context.tsx +++ b/x-pack/solutions/observability/plugins/inventory/.storybook/get_mock_inventory_context.tsx @@ -17,7 +17,7 @@ import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; import type { HttpStart } from '@kbn/core-http-browser'; import { action } from '@storybook/addon-actions'; import type { InventoryKibanaContext } from '../public/hooks/use_kibana'; -import { ITelemetryClient } from '../public/services/telemetry/types'; +import type { ITelemetryClient } from '../public/services/telemetry/types'; export function getMockInventoryContext(): InventoryKibanaContext { const coreStart = coreMock.createStart(); diff --git a/x-pack/solutions/observability/plugins/inventory/.storybook/storybook_decorator.tsx b/x-pack/solutions/observability/plugins/inventory/.storybook/storybook_decorator.tsx index 8c98289608d92..41ffc85e05c1b 100644 --- a/x-pack/solutions/observability/plugins/inventory/.storybook/storybook_decorator.tsx +++ b/x-pack/solutions/observability/plugins/inventory/.storybook/storybook_decorator.tsx @@ -5,7 +5,7 @@ * 2.0. */ import React, { useMemo } from 'react'; -import { DecoratorFn } from '@storybook/react'; +import type { DecoratorFn } from '@storybook/react'; import { InventoryContextProvider } from '../public/context/inventory_context_provider'; import { getMockInventoryContext } from './get_mock_inventory_context'; diff --git a/x-pack/solutions/observability/plugins/inventory/e2e/cypress_test_runner.ts b/x-pack/solutions/observability/plugins/inventory/e2e/cypress_test_runner.ts index 59db9d3704eef..f7a013e38f5f4 100644 --- a/x-pack/solutions/observability/plugins/inventory/e2e/cypress_test_runner.ts +++ b/x-pack/solutions/observability/plugins/inventory/e2e/cypress_test_runner.ts @@ -14,7 +14,7 @@ import { import cypress from 'cypress'; import path from 'path'; import Url from 'url'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; export async function cypressTestRunner({ getService }: FtrProviderContext) { const config = getService('config'); diff --git a/x-pack/solutions/observability/plugins/inventory/e2e/ftr_config.ts b/x-pack/solutions/observability/plugins/inventory/e2e/ftr_config.ts index 3b5cf000e5772..8dacc2305c52b 100644 --- a/x-pack/solutions/observability/plugins/inventory/e2e/ftr_config.ts +++ b/x-pack/solutions/observability/plugins/inventory/e2e/ftr_config.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { FtrConfigProviderContext } from '@kbn/test'; +import type { FtrConfigProviderContext } from '@kbn/test'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { commonFunctionalServices } from '@kbn/ftr-common-functional-services'; import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services'; import { cypressTestRunner } from './cypress_test_runner'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; async function ftrConfig({ readConfigFile }: FtrConfigProviderContext) { const kibanaCommonTestsConfig = await readConfigFile( diff --git a/x-pack/solutions/observability/plugins/inventory/e2e/ftr_provider_context.d.ts b/x-pack/solutions/observability/plugins/inventory/e2e/ftr_provider_context.d.ts index b87f35adcccf2..30a5f1fe518da 100644 --- a/x-pack/solutions/observability/plugins/inventory/e2e/ftr_provider_context.d.ts +++ b/x-pack/solutions/observability/plugins/inventory/e2e/ftr_provider_context.d.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { GenericFtrProviderContext } from '@kbn/test'; +import type { GenericFtrProviderContext } from '@kbn/test'; export type FtrProviderContext = GenericFtrProviderContext<{}, {}>; diff --git a/x-pack/solutions/observability/plugins/inventory/public/application.tsx b/x-pack/solutions/observability/plugins/inventory/public/application.tsx index 53616a27de9e7..b459432872553 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/application.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/application.tsx @@ -9,9 +9,9 @@ import ReactDOM from 'react-dom'; import { type AppMountParameters, type CoreStart } from '@kbn/core/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import type { InventoryStartDependencies } from './types'; -import { InventoryServices } from './services/types'; +import type { InventoryServices } from './services/types'; import { AppRoot } from './components/app_root'; -import { KibanaEnvironment } from './hooks/use_kibana'; +import type { KibanaEnvironment } from './hooks/use_kibana'; export const renderApp = (props: { coreStart: CoreStart; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx index cec6188a1553f..9388e1556a2fe 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/app_root/header_action_menu/add_data_action_menu.tsx @@ -6,19 +6,17 @@ */ import React, { useState } from 'react'; +import type { EuiContextMenuPanelDescriptor } from '@elastic/eui'; import { EuiContextMenu, - EuiContextMenuPanelDescriptor, EuiFlexGroup, EuiFlexItem, EuiHeaderLink, EuiIcon, EuiPopover, } from '@elastic/eui'; -import { - OBSERVABILITY_ONBOARDING_LOCATOR, - ObservabilityOnboardingLocatorParams, -} from '@kbn/deeplinks-observability'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; import { useKibana } from '../../../hooks/use_kibana'; import type { InventoryAddDataParams } from '../../../services/telemetry/types'; import { diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/app_root/index.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/app_root/index.tsx index 52f46268da2ef..b7b04e4ad9e40 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/app_root/index.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/app_root/index.tsx @@ -12,11 +12,11 @@ import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import { RouteRenderer, RouterProvider } from '@kbn/typed-react-router-config'; import React from 'react'; import { InventoryContextProvider } from '../../context/inventory_context_provider'; -import { KibanaEnvironment } from '../../hooks/use_kibana'; +import type { KibanaEnvironment } from '../../hooks/use_kibana'; import { UnifiedSearchProvider } from '../../hooks/use_unified_search_context'; import { inventoryRouter } from '../../routes/config'; -import { InventoryServices } from '../../services/types'; -import { InventoryStartDependencies } from '../../types'; +import type { InventoryServices } from '../../services/types'; +import type { InventoryStartDependencies } from '../../types'; import { HeaderActionMenuItems } from './header_action_menu'; export function AppRoot({ diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/empty_states/empty_state.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/empty_states/empty_state.tsx index 587812aa6c86e..ecfd23f0c6725 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/empty_states/empty_state.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/empty_states/empty_state.tsx @@ -24,7 +24,7 @@ import { dashboardsLight, dashboardsDark } from '@kbn/shared-svg'; import useLocalStorage from 'react-use/lib/useLocalStorage'; import { AddData, AssociateServiceLogs } from '../shared/add_data_buttons/buttons'; import { useKibana } from '../../hooks/use_kibana'; -import { InventoryAddDataParams } from '../../services/telemetry/types'; +import type { InventoryAddDataParams } from '../../services/telemetry/types'; export function EmptyState() { const { services } = useKibana(); diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/entities_grid.stories.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/entities_grid.stories.tsx index b5e9287a836dd..a20d6e93027fc 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/entities_grid.stories.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/entities_grid.stories.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import { EuiButton, EuiDataGridSorting, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { Meta, Story } from '@storybook/react'; +import type { EuiDataGridSorting } from '@elastic/eui'; +import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import type { Meta, Story } from '@storybook/react'; import { orderBy } from 'lodash'; import React, { useMemo, useState } from 'react'; import { ENTITY_LAST_SEEN } from '@kbn/observability-shared-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/grid_columns.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/grid_columns.tsx index 867425b9e0aed..da9da2f1cf89c 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/grid_columns.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/grid_columns.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { EuiButtonIcon, EuiDataGridColumn, EuiToolTip } from '@elastic/eui'; +import type { EuiDataGridColumn } from '@elastic/eui'; +import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/index.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/index.tsx index b26676494833e..bf97d5b4f1c38 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/index.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/entities_grid/index.tsx @@ -4,19 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - EuiDataGrid, - EuiDataGridCellValueElementProps, - EuiDataGridSorting, - EuiLoadingSpinner, - EuiText, -} from '@elastic/eui'; +import type { EuiDataGridCellValueElementProps, EuiDataGridSorting } from '@elastic/eui'; +import { EuiDataGrid, EuiLoadingSpinner, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedDate, FormattedMessage, FormattedTime } from '@kbn/i18n-react'; import { last } from 'lodash'; import React, { useCallback, useMemo, useState } from 'react'; import { ENTITY_TYPE } from '@kbn/observability-shared-plugin/common'; -import { EntityColumnIds, InventoryEntity } from '../../../common/entities'; +import type { EntityColumnIds, InventoryEntity } from '../../../common/entities'; import { BadgeFilterWithPopover } from '../badge_filter_with_popover'; import { getColumns } from './grid_columns'; import { AlertsBadge } from '../alerts_badge/alerts_badge'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/grouped_entities_grid.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/grouped_entities_grid.tsx index 5dde32cbb4aac..c2f280cb05912 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/grouped_entities_grid.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/grouped_entities_grid.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiDataGridSorting } from '@elastic/eui'; +import type { EuiDataGridSorting } from '@elastic/eui'; import React from 'react'; import useEffectOnce from 'react-use/lib/useEffectOnce'; import { type EntityColumnIds } from '../../../common/entities'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/mock/inventory_component_wrapper_mock.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/mock/inventory_component_wrapper_mock.tsx index 08c8e93aadda8..c3f00bc9c4beb 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/mock/inventory_component_wrapper_mock.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/entity_group_accordion/mock/inventory_component_wrapper_mock.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { createMemoryHistory } from 'history'; import { RouterProvider } from '@kbn/typed-react-router-config'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/search_bar/entity_types_multi_select.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/search_bar/entity_types_multi_select.tsx index 0b4853e82a474..1245e25c3d35b 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/search_bar/entity_types_multi_select.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/search_bar/entity_types_multi_select.tsx @@ -4,13 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { EuiSelectableOption } from '@elastic/eui'; import { EuiFilterButton, EuiFilterGroup, EuiPopover, EuiPopoverTitle, EuiSelectable, - EuiSelectableOption, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useMemo, useState } from 'react'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/components/shared/add_data_buttons/buttons.tsx b/x-pack/solutions/observability/plugins/inventory/public/components/shared/add_data_buttons/buttons.tsx index 90f8cdbba0946..dc20cd1968e7b 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/components/shared/add_data_buttons/buttons.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/components/shared/add_data_buttons/buttons.tsx @@ -9,10 +9,8 @@ /* eslint-disable @elastic/eui/href-or-on-click */ import React from 'react'; -import { - OBSERVABILITY_ONBOARDING_LOCATOR, - ObservabilityOnboardingLocatorParams, -} from '@kbn/deeplinks-observability'; +import type { ObservabilityOnboardingLocatorParams } from '@kbn/deeplinks-observability'; +import { OBSERVABILITY_ONBOARDING_LOCATOR } from '@kbn/deeplinks-observability'; import { EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useKibana } from '../../../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/context/inventory_search_bar_context_provider/index.tsx b/x-pack/solutions/observability/plugins/inventory/public/context/inventory_search_bar_context_provider/index.tsx index d43cba80dd177..1f6ab96d6cb40 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/context/inventory_search_bar_context_provider/index.tsx +++ b/x-pack/solutions/observability/plugins/inventory/public/context/inventory_search_bar_context_provider/index.tsx @@ -6,7 +6,7 @@ */ import React, { createContext, useContext, type ReactChild } from 'react'; import { Subject } from 'rxjs'; -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { ENTITIES_LATEST_ALIAS } from '../../../common/entities'; import { useAdHocDataView } from '../../hooks/use_adhoc_data_view'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_adhoc_data_view.ts b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_adhoc_data_view.ts index d648449f6d0ab..dda2921490805 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_adhoc_data_view.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_adhoc_data_view.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { DataView } from '@kbn/data-views-plugin/common'; +import type { DataView } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import { useEffect, useState } from 'react'; import { useKibana } from './use_kibana'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_abortable_async.ts b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_abortable_async.ts index 1db3b512bbdd6..75bd490188e13 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_abortable_async.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_abortable_async.ts @@ -6,7 +6,7 @@ */ import { useAbortableAsync } from '@kbn/observability-utils-browser/hooks/use_abortable_async'; import { i18n } from '@kbn/i18n'; -import { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser'; +import type { IHttpFetchError, ResponseErrorBody } from '@kbn/core-http-browser'; import { useKibana } from './use_kibana'; const getDetailsFromErrorResponse = (error: IHttpFetchError) => diff --git a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_route_path.ts b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_route_path.ts index 9edb2a7da75de..795f0ea53b665 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_route_path.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_route_path.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { PathsOf, useRoutePath } from '@kbn/typed-react-router-config'; +import type { PathsOf } from '@kbn/typed-react-router-config'; +import { useRoutePath } from '@kbn/typed-react-router-config'; import type { InventoryRoutes } from '../routes/config'; export function useInventoryRoutePath() { diff --git a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_router.ts b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_router.ts index 34aaf0b319d95..5fbb54ab80740 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_router.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/hooks/use_inventory_router.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PathsOf, TypeAsArgs, TypeOf } from '@kbn/typed-react-router-config'; +import type { PathsOf, TypeAsArgs, TypeOf } from '@kbn/typed-react-router-config'; import { useMemo } from 'react'; import type { InventoryRouter, InventoryRoutes } from '../routes/config'; import { inventoryRouter } from '../routes/config'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/plugin.ts b/x-pack/solutions/observability/plugins/inventory/public/plugin.ts index 0d9309d3694fb..23d4bb4d672e5 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/plugin.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/plugin.ts @@ -5,22 +5,21 @@ * 2.0. */ -import { +import type { AppMountParameters, - AppStatus, CoreSetup, CoreStart, - DEFAULT_APP_CATEGORIES, Plugin, PluginInitializerContext, } from '@kbn/core/public'; +import { AppStatus, DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { INVENTORY_APP_ID } from '@kbn/deeplinks-observability/constants'; import { i18n } from '@kbn/i18n'; import type { Logger } from '@kbn/logging'; import { from, map, mergeMap, of } from 'rxjs'; import { createCallInventoryAPI } from './api'; import { TelemetryService } from './services/telemetry/telemetry_service'; -import { InventoryServices } from './services/types'; +import type { InventoryServices } from './services/types'; import type { ConfigSchema, InventoryPublicSetup, diff --git a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_client.ts b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_client.ts index d7806c2f6cb2e..8a3ca72783f01 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_client.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; +import type { AnalyticsServiceSetup } from '@kbn/core-analytics-browser'; import { type ITelemetryClient, diff --git a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_events.ts b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_events.ts index 707852f9f3cd6..9803d2238deff 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_events.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_events.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { TelemetryEventTypes, TelemetryEvent } from './types'; +import type { TelemetryEvent } from './types'; +import { TelemetryEventTypes } from './types'; const inventoryAddDataEventType: TelemetryEvent = { eventType: TelemetryEventTypes.INVENTORY_ADD_DATA_CLICKED, diff --git a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_service.test.ts b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_service.test.ts index 6a4854f754831..e96fd5305b438 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_service.test.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/telemetry_service.test.ts @@ -8,12 +8,12 @@ import { coreMock } from '@kbn/core/server/mocks'; import { inventoryTelemetryEventBasedTypes } from './telemetry_events'; import { TelemetryService } from './telemetry_service'; +import type { EntityInventoryEntityTypeFilteredParams } from './types'; import { type EntityInventoryViewedParams, type EntityViewClickedParams, type EntityInventorySearchQuerySubmittedParams, TelemetryEventTypes, - EntityInventoryEntityTypeFilteredParams, } from './types'; describe('TelemetryService', () => { diff --git a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/types.ts b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/types.ts index e8ce3eb94e9ba..d460945eadaab 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/types.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/services/telemetry/types.ts @@ -6,7 +6,7 @@ */ import type { AnalyticsServiceSetup, RootSchema } from '@kbn/core/public'; -import { EntityManagerPublicPluginSetup } from '@kbn/entityManager-plugin/public'; +import type { EntityManagerPublicPluginSetup } from '@kbn/entityManager-plugin/public'; export interface TelemetryServiceSetupParams { analytics: AnalyticsServiceSetup; diff --git a/x-pack/solutions/observability/plugins/inventory/public/services/types.ts b/x-pack/solutions/observability/plugins/inventory/public/services/types.ts index b498a1fd49079..d0cc176e7b53f 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/services/types.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/services/types.ts @@ -6,7 +6,7 @@ */ import type { InventoryAPIClient } from '../api'; -import { ITelemetryClient } from './telemetry/types'; +import type { ITelemetryClient } from './telemetry/types'; export interface InventoryServices { inventoryAPIClient: InventoryAPIClient; diff --git a/x-pack/solutions/observability/plugins/inventory/public/types.ts b/x-pack/solutions/observability/plugins/inventory/public/types.ts index cb4d7719e3199..50c62bd964445 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/types.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/types.ts @@ -8,7 +8,7 @@ import type { ObservabilitySharedPluginStart, ObservabilitySharedPluginSetup, } from '@kbn/observability-shared-plugin/public'; -import { +import type { EntityManagerPublicPluginSetup, EntityManagerPublicPluginStart, } from '@kbn/entityManager-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/inventory/public/utils/group_entity_types_by_status.ts b/x-pack/solutions/observability/plugins/inventory/public/utils/group_entity_types_by_status.ts index f842663dd56e9..91b084c8282c1 100644 --- a/x-pack/solutions/observability/plugins/inventory/public/utils/group_entity_types_by_status.ts +++ b/x-pack/solutions/observability/plugins/inventory/public/utils/group_entity_types_by_status.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { EntityType } from '../../common/rt_types'; +import type { EntityType } from '../../common/rt_types'; export function groupEntityTypesByStatus(entityTypes: EntityType) { const entityTypesKeys = Object.keys(entityTypes); diff --git a/x-pack/solutions/observability/plugins/inventory/server/lib/create_alerts_client/create_alerts_client.ts b/x-pack/solutions/observability/plugins/inventory/server/lib/create_alerts_client/create_alerts_client.ts index 878abd516e5bd..0b33606e22798 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/lib/create_alerts_client/create_alerts_client.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/lib/create_alerts_client/create_alerts_client.ts @@ -6,10 +6,10 @@ */ import { isEmpty } from 'lodash'; -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; -import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; import { OBSERVABILITY_RULE_TYPE_IDS } from '@kbn/rule-data-utils'; -import { InventoryRouteHandlerResources } from '../../routes/types'; +import type { InventoryRouteHandlerResources } from '../../routes/types'; export type AlertsClient = Awaited>; diff --git a/x-pack/solutions/observability/plugins/inventory/server/lib/create_es_client/create_entities_es_client.ts b/x-pack/solutions/observability/plugins/inventory/server/lib/create_es_client/create_entities_es_client.ts index 983a4df3e96af..bfd231abd253e 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/lib/create_es_client/create_entities_es_client.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/lib/create_es_client/create_entities_es_client.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { KibanaRequest } from '@kbn/core/server'; -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { entitiesAliasPattern, ENTITY_LATEST } from '@kbn/entities-schema'; import { unwrapEsResponse } from '@kbn/observability-shared-plugin/common/utils/unwrap_es_response'; // import { withApmSpan } from '../../utils/with_apm_span'; diff --git a/x-pack/solutions/observability/plugins/inventory/server/plugin.ts b/x-pack/solutions/observability/plugins/inventory/server/plugin.ts index 642dd12769fb4..079614b9b230d 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/plugin.ts @@ -9,7 +9,7 @@ import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kb import type { Logger } from '@kbn/logging'; import { mapValues } from 'lodash'; import { registerServerRoutes } from './routes/register_routes'; -import { InventoryRouteHandlerResources } from './routes/types'; +import type { InventoryRouteHandlerResources } from './routes/types'; import type { ConfigSchema, InventoryServerSetup, diff --git a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts index 03027430116e6..33bdc5e8a00a5 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.test.ts @@ -6,7 +6,7 @@ */ import { getGroupByTermsAgg } from './get_group_by_terms_agg'; -import { IdentityFieldsPerEntityType } from './get_identity_fields_per_entity_type'; +import type { IdentityFieldsPerEntityType } from './get_identity_fields_per_entity_type'; describe('getGroupByTermsAgg', () => { it('should return an empty object when fields is empty', () => { diff --git a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.ts b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.ts index 96ab3eb24444a..71c6e8901c1b7 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_group_by_terms_agg.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { IdentityFieldsPerEntityType } from './get_identity_fields_per_entity_type'; +import type { IdentityFieldsPerEntityType } from './get_identity_fields_per_entity_type'; export const getGroupByTermsAgg = (fields: IdentityFieldsPerEntityType, maxSize = 500) => { return Array.from(fields).reduce((acc, [entityType, identityFields]) => { diff --git a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_latest_entities_alerts.ts b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_latest_entities_alerts.ts index d4c69505a4637..c7291e772470b 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_latest_entities_alerts.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/get_latest_entities_alerts.ts @@ -7,9 +7,9 @@ import { termQuery } from '@kbn/observability-plugin/server'; import { ALERT_STATUS, ALERT_STATUS_ACTIVE } from '@kbn/rule-data-utils'; -import { AlertsClient } from '../../lib/create_alerts_client/create_alerts_client'; +import type { AlertsClient } from '../../lib/create_alerts_client/create_alerts_client'; import { getGroupByTermsAgg } from './get_group_by_terms_agg'; -import { IdentityFieldsPerEntityType } from './get_identity_fields_per_entity_type'; +import type { IdentityFieldsPerEntityType } from './get_identity_fields_per_entity_type'; interface Bucket { key: Record; diff --git a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/route.ts b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/route.ts index 6e4c10bc01035..78d79105da6de 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/routes/entities/route.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/routes/entities/route.ts @@ -11,7 +11,8 @@ import { joinByKey } from '@kbn/observability-utils-common/array/join_by_key'; import { createObservabilityEsClient } from '@kbn/observability-utils-server/es/client/create_observability_es_client'; import * as t from 'io-ts'; import { orderBy } from 'lodash'; -import { InventoryEntity, entityColumnIdsRt } from '../../../common/entities'; +import type { InventoryEntity } from '../../../common/entities'; +import { entityColumnIdsRt } from '../../../common/entities'; import { createAlertsClient } from '../../lib/create_alerts_client/create_alerts_client'; import { createInventoryServerRoute } from '../create_inventory_server_route'; import { getEntityGroupsBy } from './get_entity_groups'; diff --git a/x-pack/solutions/observability/plugins/inventory/server/types.ts b/x-pack/solutions/observability/plugins/inventory/server/types.ts index d3d5ef0fb7f60..15e4fa2e80f94 100644 --- a/x-pack/solutions/observability/plugins/inventory/server/types.ts +++ b/x-pack/solutions/observability/plugins/inventory/server/types.ts @@ -13,8 +13,8 @@ import type { DataViewsServerPluginSetup, DataViewsServerPluginStart, } from '@kbn/data-views-plugin/server'; -import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; -import { +import type { FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import type { RuleRegistryPluginStartContract, RuleRegistryPluginSetupContract, } from '@kbn/rule-registry-plugin/server'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/http_api/metrics_api.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/http_api/metrics_api.ts index 71ac5f5d217ed..92ad579bc9eb8 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/http_api/metrics_api.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/http_api/metrics_api.ts @@ -8,7 +8,7 @@ import * as rt from 'io-ts'; import { createLiteralValueFromUndefinedRT } from '@kbn/io-ts-utils'; import { afterKeyObjectRT, timeRangeRT } from './metrics_explorer'; -import { MetricsUIAggregation } from '../inventory_models/types'; +import type { MetricsUIAggregation } from '../inventory_models/types'; export interface MetricsAPIMetric { id: string; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/index.ts index 251d14132bdf7..76babe0b9ceae 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../types'; +import type { InventoryModel } from '../types'; export { awsEC2SnapshotMetricTypes } from './metrics'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/index.ts index d9344714bc156..1f87e738e986d 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/index.ts @@ -15,7 +15,7 @@ import { awsEC2CpuUtilization } from './tsvb/aws_ec2_cpu_utilization'; import { awsEC2NetworkTraffic } from './tsvb/aws_ec2_network_traffic'; import { awsEC2DiskIOBytes } from './tsvb/aws_ec2_diskio_bytes'; -import { InventoryMetrics } from '../../types'; +import type { InventoryMetrics } from '../../types'; const awsEC2SnapshotMetrics = { cpu, rx, tx, diskIOReadBytes, diskIOWriteBytes }; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/cpu.ts index 1323021d28be3..82e199788e879 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/cpu.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const cpu: MetricsUIAggregation = { cpu_avg: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_read_bytes.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_read_bytes.ts index 162df9026bc8b..7829531f8b90f 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_read_bytes.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_read_bytes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const diskIOReadBytes: MetricsUIAggregation = { diskIOReadBytes: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_write_bytes.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_write_bytes.ts index 129c624c251d7..90f5e86c69a1e 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_write_bytes.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/disk_io_write_bytes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const diskIOWriteBytes: MetricsUIAggregation = { diskIOWriteBytes: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/rx.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/rx.ts index dcb7edcebb861..6591660a19b59 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/rx.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/rx.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rx: MetricsUIAggregation = { rx: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/tx.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/tx.ts index 71a0894ed0f6c..b47745e2f72fb 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/tx.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_ec2/metrics/snapshot/tx.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const tx: MetricsUIAggregation = { tx: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/index.ts index 28c5099ca3bdc..dbeba1570d755 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../types'; +import type { InventoryModel } from '../types'; export { awsRDSSnapshotMetricTypes } from './metrics'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/index.ts index 0acc5caa9d85a..67f6b440a2038 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryMetrics } from '../../types'; +import type { InventoryMetrics } from '../../types'; import { cpu } from './snapshot/cpu'; import { rdsLatency } from './snapshot/rds_latency'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/cpu.ts index 609251e49304a..5526e852d42dd 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/cpu.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const cpu: MetricsUIAggregation = { cpu_avg: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_active_transactions.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_active_transactions.ts index be230aed90f7b..c3c0cdc7302af 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_active_transactions.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_active_transactions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rdsActiveTransactions: MetricsUIAggregation = { rdsActiveTransactions: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_connections.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_connections.ts index 89800cdfb1299..69e8902d56320 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_connections.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_connections.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rdsConnections: MetricsUIAggregation = { rdsConnections: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_latency.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_latency.ts index d63e6a04ee055..f1c85299f7ea4 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_latency.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_latency.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rdsLatency: MetricsUIAggregation = { rdsLatency: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_queries_executed.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_queries_executed.ts index 89c4fec3a7594..3f52981a9581b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_queries_executed.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_rds/metrics/snapshot/rds_queries_executed.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rdsQueriesExecuted: MetricsUIAggregation = { rdsQueriesExecuted: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/index.ts index d24aa4b59d1eb..0349714c1b79a 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../types'; +import type { InventoryModel } from '../types'; export { awsS3SnapshotMetricTypes } from './metrics'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/index.ts index d590822879bd7..910bfe5ccf688 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryMetrics } from '../../types'; +import type { InventoryMetrics } from '../../types'; import { awsS3BucketSize } from './tsvb/aws_s3_bucket_size'; import { awsS3TotalRequests } from './tsvb/aws_s3_total_requests'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_bucket_size.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_bucket_size.ts index 532fa675b21a5..8c285689994af 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_bucket_size.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_bucket_size.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const s3BucketSize: MetricsUIAggregation = { s3BucketSize: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_download_bytes.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_download_bytes.ts index 7e9043ee76ff7..db406914960b6 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_download_bytes.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_download_bytes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const s3DownloadBytes: MetricsUIAggregation = { s3DownloadBytes: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_number_of_objects.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_number_of_objects.ts index 2b547c0f94130..dd5504142c3b3 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_number_of_objects.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_number_of_objects.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const s3NumberOfObjects: MetricsUIAggregation = { s3NumberOfObjects: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_total_requests.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_total_requests.ts index caa05434a6d26..217fd8d9e247a 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_total_requests.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_total_requests.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const s3TotalRequests: MetricsUIAggregation = { s3TotalRequests: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_upload_bytes.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_upload_bytes.ts index 4cbd08397a171..da4075eb39de4 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_upload_bytes.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_s3/metrics/snapshot/s3_upload_bytes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const s3UploadBytes: MetricsUIAggregation = { s3UploadBytes: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/index.ts index 739b7e41403dc..5386b9620370a 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../types'; +import type { InventoryModel } from '../types'; export { awsSQSSnapshotMetricTypes } from './metrics'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/index.ts index 1e59f29eb3c06..7ef92432e3257 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryMetrics } from '../../types'; +import type { InventoryMetrics } from '../../types'; import { sqsMessagesVisible } from './snapshot/sqs_messages_visible'; import { sqsMessagesDelayed } from './snapshot/sqs_messages_delayed'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_delayed.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_delayed.ts index 654091ee30a22..1265583b38744 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_delayed.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_delayed.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const sqsMessagesDelayed: MetricsUIAggregation = { sqsMessagesDelayed: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_empty.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_empty.ts index b8dec6a995a97..bd913d11086fa 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_empty.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_empty.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const sqsMessagesEmpty: MetricsUIAggregation = { sqsMessagesEmpty: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_sent.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_sent.ts index 9ff494216c660..7850e78c537ce 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_sent.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_sent.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const sqsMessagesSent: MetricsUIAggregation = { sqsMessagesSent: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_visible.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_visible.ts index 4b32bc3786e71..d7620243c5ca9 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_visible.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_messages_visible.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const sqsMessagesVisible: MetricsUIAggregation = { sqsMessagesVisible: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_oldest_message.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_oldest_message.ts index 36fef098d1521..fe79582a34d38 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_oldest_message.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/aws_sqs/metrics/snapshot/sqs_oldest_message.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const sqsOldestMessage: MetricsUIAggregation = { sqsOldestMessage: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/index.ts index a113c6fd1802c..fc9b3fa6320de 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../types'; +import type { InventoryModel } from '../types'; export { containerSnapshotMetricTypes } from './metrics'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/cpu.ts index 36c5ddaf91acd..06417363218ee 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/cpu.ts @@ -12,7 +12,7 @@ import { DEFAULT_XY_HIDDEN_LEGEND, DEFAULT_XY_YBOUNDS, } from '../../../shared/charts/constants'; -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; const dockerContainerCpuUsageXY: LensConfigWithId = { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/disk.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/disk.ts index b3dcc2860ccae..9df6d2d0b9447 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/disk.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/disk.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; import { DEFAULT_XY_FITTING_FUNCTION, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/memory.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/memory.ts index 45ce080d7f448..5df378f68ac79 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/memory.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/memory.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { DEFAULT_XY_FITTING_FUNCTION, DEFAULT_XY_HIDDEN_AXIS_TITLE, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/network.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/network.ts index 29cc757d77279..ba56ba62ccf2e 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/network.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/charts/network.ts @@ -13,7 +13,7 @@ import { RX_LABEL, TX_LABEL, } from '../../../shared/charts/constants'; -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; const dockerContainerRxTx: LensConfigWithId = { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/index.ts index 44fe7d0cb1a8c..87c9dec51e98e 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/index.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { InventoryMetricsWithCharts } from '../../types'; +import type { InventoryMetricsWithCharts } from '../../types'; import { cpu } from './snapshot/cpu'; import { memory } from './snapshot/memory'; import { rx } from './snapshot/rx'; import { tx } from './snapshot/tx'; import type { ContainerFormulas } from './formulas'; -import { ContainerCharts } from './charts'; +import type { ContainerCharts } from './charts'; const containerSnapshotMetrics = { cpu, memory, rx, tx }; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/cpu.ts index 411b24a0478f3..e1e98984c9eb5 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/cpu.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const cpu: MetricsUIAggregation = { cpu: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/memory.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/memory.ts index d56eae0f69cfe..eee0f2e1cc95b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/memory.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/container/metrics/snapshot/memory.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const memory: MetricsUIAggregation = { memory: { avg: { field: 'docker.memory.usage.pct' } }, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/create_tsvb_model.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/create_tsvb_model.ts index 5c9b3beb31c7c..52e68ae2624b9 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/create_tsvb_model.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/create_tsvb_model.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel, TSVBSeries, InventoryMetric } from './types'; +import type { TSVBMetricModelCreator, TSVBMetricModel, TSVBSeries, InventoryMetric } from './types'; export const createTSVBModel = ( diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/index.ts index 731a84f1e83ab..1c27b2b57a873 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../types'; +import type { InventoryModel } from '../types'; import { aws as awsRequiredMetrics, nginx as nginxRequireMetrics, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/cpu.ts index bfa9c1f9dec60..424f419836995 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/cpu.ts @@ -14,7 +14,7 @@ import { DEFAULT_XY_LEGEND, DEFAULT_XY_YBOUNDS, } from '../../../shared/charts/constants'; -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; const cpuUsageBreakdown: LensConfigWithId = { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/disk.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/disk.ts index 112de73066518..2be2a7af81074 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/disk.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/disk.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; import { DEFAULT_XY_FITTING_FUNCTION, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/logs.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/logs.ts index cf53c68a4dbda..cfb69dbfe3bd1 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/logs.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/logs.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; import { DEFAULT_XY_FITTING_FUNCTION, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/memory.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/memory.ts index 8113848810fe8..c93c0aad06b13 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/memory.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/memory.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; import { DEFAULT_XY_FITTING_FUNCTION, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/network.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/network.ts index d166870f5bb4b..d52ba12ae3109 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/network.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/charts/network.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { LensConfigWithId } from '../../../types'; +import type { LensConfigWithId } from '../../../types'; import { formulas } from '../formulas'; import { DEFAULT_XY_FITTING_FUNCTION, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/index.ts index 82408084e9472..c6c9fae21615b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/index.ts @@ -5,7 +5,7 @@ * 2.0. */ import { snapshot } from './snapshot'; -import { InventoryMetricsWithCharts } from '../../types'; +import type { InventoryMetricsWithCharts } from '../../types'; import type { HostFormulas } from './formulas'; import type { HostCharts } from './charts'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu.ts index dd55a760d1e76..d15c6fbeff97a 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const cpu: MetricsUIAggregation = { cpu_user: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu_v2.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu_v2.ts index ebb3368c2c358..72159741dd56c 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu_v2.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/cpu_v2.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const cpuV2: MetricsUIAggregation = { cpuV2: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_latency.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_latency.ts index 99b7ca7f56742..d42fd766f5ebd 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_latency.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_latency.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const diskLatency: MetricsUIAggregation = { diskio_read_time: { avg: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_space_usage.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_space_usage.ts index c5693d6480389..130762e1380fe 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_space_usage.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/disk_space_usage.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const diskSpaceUsage: MetricsUIAggregation = { diskSpaceUsage: { max: { field: 'system.filesystem.used.pct' } }, }; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/load.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/load.ts index e52b8f3d0e123..3d24d2c666cea 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/load.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/load.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const load: MetricsUIAggregation = { load: { avg: { field: 'system.load.5' } } }; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/log_rate.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/log_rate.ts index 33409ea663658..73f3cef3eff3d 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/log_rate.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/log_rate.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const logRate: MetricsUIAggregation = { count: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory.ts index 40d596a7f84c5..e506f0c4145fa 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const memory: MetricsUIAggregation = { memory: { avg: { field: 'system.memory.actual.used.pct' } }, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_free.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_free.ts index 6e1d0889f9f75..b6b0ebad285cb 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_free.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_free.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const memoryFree: MetricsUIAggregation = { memory_total: { max: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_total.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_total.ts index e1990555ad550..af1ad10d0a26b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_total.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/memory_total.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const memoryTotal: MetricsUIAggregation = { memory_total: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/normalized_load_1m.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/normalized_load_1m.ts index d1659acd05cbc..51b996e4a9ddb 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/normalized_load_1m.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/normalized_load_1m.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const normalizedLoad1m: MetricsUIAggregation = { load_1m: { avg: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx.ts index d00d3aaa942cd..6282717f31845 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rx: MetricsUIAggregation = { rx_avg: { avg: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts index 3f8466010a518..737c6f6743c7d 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/rx_v2.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rxV2: MetricsUIAggregation = { rx_sum: { sum: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx.ts index 1d0ad172749b7..800607fc95d56 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const tx: MetricsUIAggregation = { tx_avg: { avg: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts index 100bd3d0bf306..0c5c4b2847518 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/host/metrics/snapshot/tx_v2.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const txV2: MetricsUIAggregation = { tx_sum: { sum: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/index.ts index 033832aaa553b..c2d0594320bea 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/index.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; import { POD_FIELD, HOST_FIELD, CONTAINER_FIELD } from '../constants'; import { host } from './host'; import { pod } from './kubernetes/pod'; @@ -15,7 +15,7 @@ import { awsS3 } from './aws_s3'; import { awsRDS } from './aws_rds'; import { awsSQS } from './aws_sqs'; import { container } from './container'; -import { InventoryItemType } from './types'; +import type { InventoryItemType } from './types'; export { metrics } from './metrics'; const catalog = { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/node/metrics/charts/node.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/node/metrics/charts/node.ts index bd285fed0bf03..2bab80a399969 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/node/metrics/charts/node.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/node/metrics/charts/node.ts @@ -5,7 +5,7 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import { LensConfigWithId } from '../../../../types'; +import type { LensConfigWithId } from '../../../../types'; import { formulas } from '../formulas'; import { DEFAULT_XY_FITTING_FUNCTION, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/index.ts index a61abbfeb01e3..bf4170dbcbf2e 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/index.ts @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { metrics } from './metrics'; -import { InventoryModel } from '../../types'; +import type { InventoryModel } from '../../types'; import { nginx as nginxRequiredMetrics } from '../../shared/metrics/required_metrics'; export { podSnapshotMetricTypes } from './metrics'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/index.ts index eeae2c2ec586b..0b84017c68e09 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/index.ts @@ -15,7 +15,7 @@ import { podCpuUsage } from './tsvb/pod_cpu_usage'; import { podLogUsage } from './tsvb/pod_log_usage'; import { podMemoryUsage } from './tsvb/pod_memory_usage'; import { podNetworkTraffic } from './tsvb/pod_network_traffic'; -import { InventoryMetrics } from '../../../types'; +import type { InventoryMetrics } from '../../../types'; const podSnapshotMetrics = { cpu, memory, rx, tx }; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/cpu.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/cpu.ts index 5a190a1530b5b..caee48a4e634b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/cpu.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/cpu.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../../types'; +import type { MetricsUIAggregation } from '../../../../types'; export const cpu: MetricsUIAggregation = { cpu_with_limit: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/memory.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/memory.ts index 70640bdc2ac6c..c40e59f57352c 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/memory.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/snapshot/memory.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../../types'; +import type { MetricsUIAggregation } from '../../../../types'; export const memory: MetricsUIAggregation = { memory_with_limit: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_cpu_usage.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_cpu_usage.ts index c1d4234725ae6..e33c72bae6999 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_cpu_usage.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_cpu_usage.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; export const podCpuUsage: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_log_usage.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_log_usage.ts index e57b839c4d0c2..1db12c019438b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_log_usage.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_log_usage.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; export const podLogUsage: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_memory_usage.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_memory_usage.ts index 408d7d21386b5..64f5a548aaacc 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_memory_usage.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_memory_usage.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; export const podMemoryUsage: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_network_traffic.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_network_traffic.ts index b95fd8e2f463b..38b060c71983d 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_network_traffic.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_network_traffic.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; export const podNetworkTraffic: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_overview.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_overview.ts index f9789dff288c5..5058756c657f5 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_overview.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/kubernetes/pod/metrics/tsvb/pod_overview.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../../types'; export const podOverview: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/index.ts index 775dff525b7f5..249f7da36e3f3 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/index.ts @@ -16,7 +16,7 @@ import { awsDiskioOps } from './tsvb/aws_diskio_ops'; import { awsNetworkBytes } from './tsvb/aws_network_bytes'; import { awsNetworkPackets } from './tsvb/aws_network_packets'; import { awsOverview } from './tsvb/aws_overview'; -import { InventoryMetrics } from '../../types'; +import type { InventoryMetrics } from '../../types'; import { count } from './snapshot/count'; export const metrics: InventoryMetrics = { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/required_metrics.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/required_metrics.ts index 5b29fc93e0d0c..17d338ec043e5 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/required_metrics.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/required_metrics.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryMetric } from '../../types'; +import type { InventoryMetric } from '../../types'; export const nginx: InventoryMetric[] = [ 'nginxHits', diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/count.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/count.ts index 6ac46673b8e65..b255b990cc2a3 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/count.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/count.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const count: MetricsUIAggregation = { count: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic.ts index a1637f7b75e93..2458c385fe68a 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const networkTraffic = (id: string, field: string): MetricsUIAggregation => { return { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic_with_interfaces.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic_with_interfaces.ts index 640534099b41d..2a94fd13db698 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic_with_interfaces.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/network_traffic_with_interfaces.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const networkTrafficWithInterfaces = ( id: string, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/rate.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/rate.ts index 9ac5657d70339..0c3f0e7f3335f 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/rate.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/snapshot/rate.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../types'; +import type { MetricsUIAggregation } from '../../../types'; export const rate = (id: string, field: string): MetricsUIAggregation => { return { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_cpu_utilization.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_cpu_utilization.ts index 51b9a4cfc7b3f..d52c9b6c6fc78 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_cpu_utilization.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_cpu_utilization.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const awsCpuUtilization: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_bytes.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_bytes.ts index 5224545c006b7..4b23360ae7a6f 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_bytes.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_bytes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const awsDiskioBytes: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_ops.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_ops.ts index c362a6d88c27a..649d201caefe4 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_ops.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_diskio_ops.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const awsDiskioOps: TSVBMetricModelCreator = (timeField, indexPattern): TSVBMetricModel => ({ id: 'awsDiskioOps', diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_bytes.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_bytes.ts index b142feb95450c..ee7c91787ba98 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_bytes.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_bytes.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; // see discussion in: https://github.com/elastic/kibana/issues/42687 diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_packets.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_packets.ts index 9d39582b66864..d291068d7d4c6 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_packets.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_network_packets.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const awsNetworkPackets: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_overview.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_overview.ts index 3fe12d62d3352..b9d4b43bbd67f 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_overview.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/aws_overview.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const awsOverview: TSVBMetricModelCreator = (timeField, indexPattern): TSVBMetricModel => ({ id: 'awsOverview', diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_active_connections.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_active_connections.ts index 23b9c274b4335..05de362936587 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_active_connections.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_active_connections.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const nginxActiveConnections: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_hits.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_hits.ts index 3b467bbe52fcd..4af5fe4d91a76 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_hits.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_hits.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const nginxHits: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_request_rate.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_request_rate.ts index 9fbf0c38ba3b8..1cac9100e3fc5 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_request_rate.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_request_rate.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const nginxRequestRate: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_requests_per_connection.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_requests_per_connection.ts index f825dbe7b7543..b69b1cb64c4f4 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_requests_per_connection.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/shared/metrics/tsvb/nginx_requests_per_connection.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; +import type { TSVBMetricModelCreator, TSVBMetricModel } from '../../../types'; export const nginxRequestsPerConnection: TSVBMetricModelCreator = ( timeField, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/types.ts index 8ad0ff886ebe6..7bdbf3344b688 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/common/inventory_models/types.ts @@ -11,7 +11,7 @@ import type { LensConfig, } from '@kbn/lens-embeddable-utils/config_builder'; import * as rt from 'io-ts'; -import { estypes } from '@elastic/elasticsearch'; +import type { estypes } from '@elastic/elasticsearch'; export const ItemTypeRT = rt.keyof({ host: null, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/apps/common_providers.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/apps/common_providers.tsx index 1734b49c694f5..c62ebc8ca33a5 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/apps/common_providers.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/apps/common_providers.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import React from 'react'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { useKibanaContextForPluginProvider } from '../hooks/use_kibana'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/empty_states/no_indices.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/empty_states/no_indices.tsx index 1ee82a9ad7cff..c13fa05750788 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/empty_states/no_indices.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/empty_states/no_indices.tsx @@ -7,7 +7,7 @@ import React from 'react'; import styled from '@emotion/styled'; -import { EuiEmptyPromptProps } from '@elastic/eui'; +import type { EuiEmptyPromptProps } from '@elastic/eui'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; interface NoIndicesProps extends Omit { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx index 2064be4f19612..cd83f9ccdd215 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.stories.tsx @@ -13,7 +13,7 @@ import React from 'react'; import { decorateWithGlobalStorybookThemeProviders } from '../../../test_utils/use_global_storybook_theme'; import type { ContainerMetricsTableProps } from './container_metrics_table'; import { ContainerMetricsTable } from './container_metrics_table'; -import { ContainerNodeMetricsRow } from './use_container_metrics_table'; +import type { ContainerNodeMetricsRow } from './use_container_metrics_table'; const mockServices = { application: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx index ca045c8736576..80ff9c87678e5 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsExplorerSeries } from '../../../../common/http_api'; +import type { MetricsExplorerSeries } from '../../../../common/http_api'; import { CoreProviders } from '../../../apps/common_providers'; import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx index 9448c106b39ed..89b96ae4cf8b8 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/container_metrics_table.tsx @@ -13,14 +13,13 @@ import type { import { EuiBasicTable, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useMemo } from 'react'; -import type { SortState } from '../shared'; +import type { SortState, NodeMetricsTableData } from '../shared'; import { MetricsNodeDetailsLink, MetricsTableEmptyIndicesContent, MetricsTableErrorContent, MetricsTableLoadingContent, MetricsTableNoIndicesContent, - NodeMetricsTableData, NumberCell, StepwisePagination, } from '../shared'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/create_lazy_container_metrics_table.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/create_lazy_container_metrics_table.tsx index 4faa4320aa6a0..8055bd11aeb5d 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/create_lazy_container_metrics_table.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/container/create_lazy_container_metrics_table.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import React, { lazy, Suspense } from 'react'; -import { MetricsDataClient } from '../../../lib/metrics_client'; +import type { MetricsDataClient } from '../../../lib/metrics_client'; import type { NodeMetricsTableProps } from '../shared'; const LazyIntegratedContainerMetricsTable = lazy( diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/create_lazy_host_metrics_table.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/create_lazy_host_metrics_table.tsx index 216878562dbf7..7bf6a9d27fe55 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/create_lazy_host_metrics_table.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/create_lazy_host_metrics_table.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import React, { lazy, Suspense } from 'react'; -import { MetricsDataClient } from '../../../lib/metrics_client'; +import type { MetricsDataClient } from '../../../lib/metrics_client'; import type { NodeMetricsTableProps } from '../shared'; const LazyIntegratedHostMetricsTable = lazy(() => import('./integrated_host_metrics_table')); diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.stories.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.stories.tsx index 657ed19f0c0cb..f7683c202ef50 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.stories.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.stories.tsx @@ -13,7 +13,7 @@ import React from 'react'; import { decorateWithGlobalStorybookThemeProviders } from '../../../test_utils/use_global_storybook_theme'; import type { HostMetricsTableProps } from './host_metrics_table'; import { HostMetricsTable } from './host_metrics_table'; -import { HostNodeMetricsRow } from './use_host_metrics_table'; +import type { HostNodeMetricsRow } from './use_host_metrics_table'; const mockServices = { application: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.tsx index 17f142af87e79..072a291957ebc 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/host/host_metrics_table.tsx @@ -13,14 +13,13 @@ import type { import { EuiBasicTable, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useCallback, useMemo } from 'react'; -import type { SortState } from '../shared'; +import type { SortState, NodeMetricsTableData } from '../shared'; import { MetricsNodeDetailsLink, MetricsTableEmptyIndicesContent, MetricsTableErrorContent, MetricsTableLoadingContent, MetricsTableNoIndicesContent, - NodeMetricsTableData, NumberCell, StepwisePagination, } from '../shared'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/create_lazy_pod_metrics_table.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/create_lazy_pod_metrics_table.tsx index 650b4b56d02be..aaa023747f063 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/create_lazy_pod_metrics_table.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/create_lazy_pod_metrics_table.tsx @@ -5,9 +5,9 @@ * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import React, { lazy, Suspense } from 'react'; -import { MetricsDataClient } from '../../../lib/metrics_client'; +import type { MetricsDataClient } from '../../../lib/metrics_client'; import type { NodeMetricsTableProps } from '../shared'; const LazyIntegratedPodMetricsTable = lazy(() => import('./integrated_pod_metrics_table')); diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx index fa9a2ef12628d..5a4b18c868d61 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.stories.tsx @@ -13,7 +13,7 @@ import React from 'react'; import { decorateWithGlobalStorybookThemeProviders } from '../../../test_utils/use_global_storybook_theme'; import type { PodMetricsTableProps } from './pod_metrics_table'; import { PodMetricsTable } from './pod_metrics_table'; -import { PodNodeMetricsRow } from './use_pod_metrics_table'; +import type { PodNodeMetricsRow } from './use_pod_metrics_table'; const mockServices = { application: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx index ee3745e05f720..152652c91bc96 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/pod/pod_metrics_table.tsx @@ -13,14 +13,13 @@ import type { import { EuiBasicTable, EuiFlexGroup, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo } from 'react'; -import type { SortState } from '../shared'; +import type { SortState, NodeMetricsTableData } from '../shared'; import { MetricsNodeDetailsLink, MetricsTableEmptyIndicesContent, MetricsTableErrorContent, MetricsTableLoadingContent, MetricsTableNoIndicesContent, - NodeMetricsTableData, NumberCell, StepwisePagination, } from '../shared'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.test.ts index 88c4701bd4bf8..13f88cecca8f9 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.test.ts @@ -6,11 +6,8 @@ */ import type { MetricsExplorerOptions } from '../../../../../common/metrics_explorer_views/types'; -import { - createMetricByFieldLookup, - MetricsQueryOptions, - metricsToApiOptions, -} from './metrics_to_api_options'; +import type { MetricsQueryOptions } from './metrics_to_api_options'; +import { createMetricByFieldLookup, metricsToApiOptions } from './metrics_to_api_options'; describe('metricsToApiOptions', () => { type TestNodeTypeMetricsField = 'test.node.type.field1' | 'test.node.type.field2'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts index 45f37069b7bb7..61c842a4fecf4 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/metrics_to_api_options.ts @@ -6,7 +6,7 @@ */ import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ObjectValues } from '../../../../../common/utility_types'; +import type { ObjectValues } from '../../../../../common/utility_types'; import type { MetricsExplorerOptions, MetricsExplorerOptionsMetric, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/use_infrastructure_node_metrics.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/use_infrastructure_node_metrics.ts index 9360e4feb7c97..602616b422206 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/use_infrastructure_node_metrics.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/shared/hooks/use_infrastructure_node_metrics.ts @@ -17,8 +17,8 @@ import type { MetricsExplorerTimeOptions, } from '../../../../../common/metrics_explorer_views/types'; import { useTrackedPromise } from '../../../../utils/use_tracked_promise'; -import { NodeMetricsTableData } from '../types'; -import { MetricsDataClient } from '../../../../lib/metrics_client'; +import type { NodeMetricsTableData } from '../types'; +import type { MetricsDataClient } from '../../../../lib/metrics_client'; export interface SortState { field: keyof T; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/test_helpers.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/test_helpers.ts index d109adb14a3b5..b8ccf5013e2ac 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/test_helpers.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/components/infrastructure_node_metrics_tables/test_helpers.ts @@ -8,10 +8,10 @@ import type { HttpFetchOptions } from '@kbn/core/public'; import { coreMock } from '@kbn/core/public/mocks'; import { I18nProvider } from '@kbn/i18n-react'; -import { DeepPartial } from 'utility-types'; +import type { DeepPartial } from 'utility-types'; import type { MetricsExplorerResponse } from '../../../common/http_api/metrics_explorer'; import type { CoreProvidersProps } from '../../apps/common_providers'; -import { MetricsDataClient } from '../../lib/metrics_client'; +import type { MetricsDataClient } from '../../lib/metrics_client'; export type DataResponseMock = DeepPartial; export type NodeMetricsTableFetchMock = ( diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/hooks/use_kibana.tsx b/x-pack/solutions/observability/plugins/metrics_data_access/public/hooks/use_kibana.tsx index 423460b383549..8d062f21130af 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/hooks/use_kibana.tsx +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/hooks/use_kibana.tsx @@ -6,12 +6,9 @@ */ import { useMemo } from 'react'; -import { CoreStart } from '@kbn/core/public'; -import { - createKibanaReactContext, - KibanaReactContextValue, - useKibana, -} from '@kbn/kibana-react-plugin/public'; +import type { CoreStart } from '@kbn/core/public'; +import type { KibanaReactContextValue } from '@kbn/kibana-react-plugin/public'; +import { createKibanaReactContext, useKibana } from '@kbn/kibana-react-plugin/public'; import type { SharePluginStart } from '@kbn/share-plugin/public'; export type PluginKibanaContextValue = CoreStart & { share?: SharePluginStart }; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/index.ts index 6701bf24539c0..16c7e0f2be80c 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/index.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; +import type { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; import { Plugin } from './plugin'; -import { MetricsDataPluginSetup, MetricsDataPluginStart, RouteState } from './types'; +import type { MetricsDataPluginSetup, MetricsDataPluginStart, RouteState } from './types'; import { useAssetDetailsRedirect } from './pages/link_to'; export const plugin: PluginInitializer = ( diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/lib/metrics_client.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/lib/metrics_client.ts index a2688dcea4d86..7a1604d920fb9 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/lib/metrics_client.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/lib/metrics_client.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { HttpStart } from '@kbn/core/public'; -import { +import type { HttpStart } from '@kbn/core/public'; +import type { MetricsExplorerRequestBody, MetricsExplorerResponse, } from '../../common/http_api/metrics_explorer'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/pages/link_to/use_asset_details_redirect.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/pages/link_to/use_asset_details_redirect.ts index 0b3639dffd0d0..de8da6a288150 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/pages/link_to/use_asset_details_redirect.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/pages/link_to/use_asset_details_redirect.ts @@ -8,7 +8,8 @@ import { useCallback } from 'react'; import { useLocation } from 'react-router-dom'; import useObservable from 'react-use/lib/useObservable'; -import { RouterLinkProps, getRouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; +import type { RouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; +import { getRouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; import { type AssetDetailsLocatorParams, ASSET_DETAILS_LOCATOR_ID, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/plugin.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/plugin.ts index e85dd77f9f3a9..0cc9dcbdf61b6 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/plugin.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/plugin.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/core/public'; -import { Logger } from '@kbn/logging'; -import { MetricsDataPluginClass } from './types'; +import type { CoreSetup, CoreStart, PluginInitializerContext } from '@kbn/core/public'; +import type { Logger } from '@kbn/logging'; +import type { MetricsDataPluginClass } from './types'; import { MetricsDataClient } from './lib/metrics_client'; import { createLazyContainerMetricsTable } from './components/infrastructure_node_metrics_tables/container/create_lazy_container_metrics_table'; import { createLazyHostMetricsTable } from './components/infrastructure_node_metrics_tables/host/create_lazy_host_metrics_table'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/types.ts index afe3fadba4ad2..dad9df317c4c0 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/types.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Search } from 'history'; +import type { Search } from 'history'; import type { Plugin as PluginClass } from '@kbn/core/public'; import type { MetricsDataClient } from './lib/metrics_client'; import type { NodeMetricsTableProps } from './components/infrastructure_node_metrics_tables/shared'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/public/utils/use_tracked_promise.ts b/x-pack/solutions/observability/plugins/metrics_data_access/public/utils/use_tracked_promise.ts index d12749ea69fdc..2ecde4be6be2b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/public/utils/use_tracked_promise.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/public/utils/use_tracked_promise.ts @@ -7,7 +7,8 @@ /* eslint-disable max-classes-per-file */ -import { DependencyList, useEffect, useMemo, useRef, useState, useCallback } from 'react'; +import type { DependencyList } from 'react'; +import { useEffect, useMemo, useRef, useState, useCallback } from 'react'; import useMountedState from 'react-use/lib/useMountedState'; interface UseTrackedPromiseArgs { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.test.ts index d96d8efecf52f..a02756e5813c8 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.test.ts @@ -6,7 +6,7 @@ */ import { SavedObjectsErrorHelpers } from '@kbn/core/server'; -import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { MetricsDataClient, DEFAULT_METRIC_INDICES } from './client'; import { metricsDataSourceSavedObjectName } from '../saved_objects/metrics_data_source'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.ts index 26359cae578a7..e3aa285516f8a 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/client/client.ts @@ -6,15 +6,13 @@ */ import { SavedObjectsErrorHelpers } from '@kbn/core/server'; -import { +import type { DefaultMetricIndicesHandler, GetMetricIndicesOptions, UpdateMetricIndicesOptions, } from '../types'; -import { - MetricsDataSavedObject, - metricsDataSourceSavedObjectName, -} from '../saved_objects/metrics_data_source'; +import type { MetricsDataSavedObject } from '../saved_objects/metrics_data_source'; +import { metricsDataSourceSavedObjectName } from '../saved_objects/metrics_data_source'; export const DEFAULT_METRIC_INDICES = 'metrics-*,metricbeat-*'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/client_mock.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/client_mock.ts index 327c2890dd264..5abb069c871dc 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/client_mock.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/client_mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsDataClient } from './client/client'; +import type { MetricsDataClient } from './client/client'; export const MetricsDataClientMock = { create: () => diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/index.ts index 1c79d5c5d423c..19da50b030938 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/index.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PluginInitializerContext } from '@kbn/core/server'; +import type { PluginInitializerContext } from '@kbn/core/server'; export type { MetricsDataPluginSetup, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/adapter_types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/adapter_types.ts index 6449fcc30b2dc..e5631a5d83e39 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/adapter_types.ts @@ -6,25 +6,25 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { Lifecycle } from '@hapi/hapi'; -import { SharePluginSetup } from '@kbn/share-plugin/server'; -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { JsonArray, JsonValue } from '@kbn/utility-types'; -import { RouteConfig, RouteMethod } from '@kbn/core/server'; -import { +import type { Lifecycle } from '@hapi/hapi'; +import type { SharePluginSetup } from '@kbn/share-plugin/server'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import type { JsonArray, JsonValue } from '@kbn/utility-types'; +import type { RouteConfig, RouteMethod } from '@kbn/core/server'; +import type { PluginSetup as DataPluginSetup, PluginStart as DataPluginStart, } from '@kbn/data-plugin/server'; -import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; -import { HomeServerPluginSetup } from '@kbn/home-plugin/server'; -import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; -import { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; +import type { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; +import type { HomeServerPluginSetup } from '@kbn/home-plugin/server'; +import type { FeaturesPluginSetup } from '@kbn/features-plugin/server'; +import type { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; import type { AlertingServerSetup } from '@kbn/alerting-plugin/server'; -import { MlPluginSetup } from '@kbn/ml-plugin/server'; -import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; -import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; -import { VersionedRouteConfig } from '@kbn/core-http-server'; -import { MetricsDataPluginSetup } from '../../../types'; +import type { MlPluginSetup } from '@kbn/ml-plugin/server'; +import type { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; +import type { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; +import type { VersionedRouteConfig } from '@kbn/core-http-server'; +import type { MetricsDataPluginSetup } from '../../../types'; export interface InfraServerPluginSetupDeps { alerting: AlertingServerSetup; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/kibana_framework_adapter.ts index b2d1e5f91ea81..4c574db8ac399 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -6,9 +6,9 @@ */ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { TransportRequestParams } from '@elastic/elasticsearch'; -import { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; -import { +import type { TransportRequestParams } from '@elastic/elasticsearch'; +import type { ElasticsearchClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { CoreSetup, IRouter, RequestHandler, @@ -17,7 +17,7 @@ import { } from '@kbn/core/server'; import { UI_SETTINGS } from '@kbn/data-plugin/server'; import type { MetricsDataPluginStartDeps } from '../../../types'; -import { +import type { CallWithRequestParams, InfraDatabaseGetIndicesAliasResponse, InfraDatabaseGetIndicesResponse, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/metrics/adapter_types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/metrics/adapter_types.ts index 778cc38586c2c..a9efcdf93a144 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/metrics/adapter_types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/adapters/metrics/adapter_types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { InventoryMetric } from '../../../../common/inventory_models/types'; +import type { InventoryMetric } from '../../../../common/inventory_models/types'; export enum InfraMetricModelQueryType { lucene = 'lucene', diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_custom_metrics_aggregations.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_custom_metrics_aggregations.ts index 13017cc6666b6..43e1f9ed9233b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_custom_metrics_aggregations.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_custom_metrics_aggregations.ts @@ -7,8 +7,8 @@ import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; import { isEmpty } from 'lodash'; -import { MetricExpressionCustomMetric } from '../../common/alerting/metrics'; -import { MetricsExplorerCustomMetric } from '../../common/http_api'; +import type { MetricExpressionCustomMetric } from '../../common/alerting/metrics'; +import type { MetricsExplorerCustomMetric } from '../../common/http_api'; const isMetricExpressionCustomMetric = ( subject: MetricsExplorerCustomMetric | MetricExpressionCustomMetric diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_search_client.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_search_client.ts index 6936da480be11..2fa4f887e9983 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_search_client.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/create_search_client.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { RequestHandlerContext } from '@kbn/core/server'; -import { CallWithRequestParams, InfraDatabaseSearchResponse } from './adapters/framework'; -import { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; +import type { RequestHandlerContext } from '@kbn/core/server'; +import type { CallWithRequestParams, InfraDatabaseSearchResponse } from './adapters/framework'; +import type { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; export const createSearchClient = (requestContext: RequestHandlerContext, framework: KibanaFramework) => diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/index.ts index f4eca9af6748e..d8bbd4193d178 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/index.ts @@ -7,16 +7,14 @@ import { decodeOrThrow } from '@kbn/io-ts-utils'; const TIMESTAMP_FIELD = '@timestamp'; -import { MetricsAPIRequest, MetricsAPIResponse } from '../../../common/http_api/metrics_api'; -import { +import type { MetricsAPIRequest, MetricsAPIResponse } from '../../../common/http_api/metrics_api'; +import type { ESSearchClient, - CompositeResponseRT, MetricsESResponse, - AggregationResponseRT, AggregationResponse, CompositeResponse, - HistogramBucketRT, } from './types'; +import { CompositeResponseRT, AggregationResponseRT, HistogramBucketRT } from './types'; import { EMPTY_RESPONSE } from './constants'; import { createAggregations, createCompositeAggregations } from './lib/create_aggregations'; import { convertBucketsToMetricsApiSeries } from './lib/convert_buckets_to_metrics_series'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts index 99447271ce5f1..600d43ca3b40c 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/calculate_auto.ts @@ -5,7 +5,8 @@ * 2.0. */ -import moment, { isDuration, Duration } from 'moment'; +import type { Duration } from 'moment'; +import moment, { isDuration } from 'moment'; const d = moment.duration; const roundingRules = [ diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/index.ts index 81a399a997bc2..c3f72180a5d13 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_bucket_size/index.ts @@ -6,7 +6,7 @@ */ import moment from 'moment'; -import { MetricsAPITimerange } from '../../../../../common/http_api'; +import type { MetricsAPITimerange } from '../../../../../common/http_api'; import { calculateAuto } from './calculate_auto'; import { getUnitValue, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_date_histogram_offset.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_date_histogram_offset.ts index 6f35a624a11da..71964e05164d1 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_date_histogram_offset.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_date_histogram_offset.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsAPITimerange } from '../../../../common/http_api'; +import type { MetricsAPITimerange } from '../../../../common/http_api'; import { calculateBucketSize } from './calculate_bucket_size'; export const calculateDateHistogramOffset = (timerange: MetricsAPITimerange): string => { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_interval.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_interval.ts index ee309ad449b2d..f1057f9e722da 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_interval.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/calculate_interval.ts @@ -6,8 +6,8 @@ */ import { isArray, isNumber } from 'lodash'; -import { MetricsAPIRequest } from '../../../../common/http_api'; -import { ESSearchClient } from '../types'; +import type { MetricsAPIRequest } from '../../../../common/http_api'; +import type { ESSearchClient } from '../types'; import { calculateMetricInterval } from '../../../utils/calculate_metric_interval'; export const calculatedInterval = async (search: ESSearchClient, options: MetricsAPIRequest) => { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts index bba4e338fc106..f86d53cb6ae42 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsAPIRequest } from '../../../../common/http_api'; +import type { MetricsAPIRequest } from '../../../../common/http_api'; import moment from 'moment'; import { convertBucketsToMetricsApiSeries } from './convert_buckets_to_metrics_series'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts index 56ee719c931ec..97b88bf861066 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/convert_buckets_to_metrics_series.ts @@ -7,14 +7,14 @@ import { get, values, first } from 'lodash'; import * as rt from 'io-ts'; -import { +import type { MetricsAPIRequest, MetricsAPISeries, MetricsAPIColumn, MetricsAPIRow, } from '../../../../common/http_api/metrics_api'; +import type { Bucket } from '../types'; import { - Bucket, BasicMetricValueRT, NormalizedMetricValueRT, PercentilesTypeRT, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.test.ts index 120faa40ccd00..1e5a48a3fc7bc 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.test.ts @@ -7,7 +7,7 @@ import { createAggregations, createCompositeAggregations } from './create_aggregations'; import moment from 'moment'; -import { MetricsAPIRequest } from '../../../../common/http_api'; +import type { MetricsAPIRequest } from '../../../../common/http_api'; const options: MetricsAPIRequest = { timerange: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.ts index cddb9f9b915a1..8ea6097725ed9 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_aggregations.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { AggregationOptionsByType } from '@kbn/es-types'; +import type { AggregationOptionsByType } from '@kbn/es-types'; import Boom from '@hapi/boom'; import { afterKeyObjectRT } from '../../../../common/http_api'; import { TIMESTAMP_FIELD } from '../../../../common/constants'; -import { MetricsAPIRequest } from '../../../../common/http_api/metrics_api'; +import type { MetricsAPIRequest } from '../../../../common/http_api/metrics_api'; import { calculateDateHistogramOffset } from './calculate_date_histogram_offset'; import { createMetricsAggregations } from './create_metrics_aggregations'; import { calculateBucketSize } from './calculate_bucket_size'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.test.ts index ef57aa05085a3..94f77f5ac8f1b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsAPIRequest } from '../../../../common/http_api'; +import type { MetricsAPIRequest } from '../../../../common/http_api'; import moment from 'moment'; import { createMetricsAggregations } from './create_metrics_aggregations'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.ts index 7ab96a870cd1e..fce93ca396045 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/lib/create_metrics_aggregations.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { MetricsUIAggregation } from '../../../../common/inventory_models/types'; -import { MetricsAPIRequest } from '../../../../common/http_api/metrics_api'; +import type { MetricsUIAggregation } from '../../../../common/inventory_models/types'; +import type { MetricsAPIRequest } from '../../../../common/http_api/metrics_api'; export const createMetricsAggregations = (options: MetricsAPIRequest): MetricsUIAggregation => { const { metrics } = options; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/types.ts index 0c87e8eca47d9..df19f5aed0729 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/lib/metrics/types.ts @@ -6,7 +6,7 @@ */ import * as rt from 'io-ts'; -import { InfraDatabaseSearchResponse, CallWithRequestParams } from '../adapters/framework'; +import type { InfraDatabaseSearchResponse, CallWithRequestParams } from '../adapters/framework'; export type ESSearchClient = ( options: CallWithRequestParams diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/plugin.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/plugin.ts index 597c63c2d8ebb..95f4b016fef7b 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/plugin.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { +import type { CoreSetup, PluginInitializerContext, Plugin, RequestHandlerContext, } from '@kbn/core/server'; -import { MetricsDataPluginSetup, MetricsDataPluginStartDeps } from './types'; +import type { MetricsDataPluginSetup, MetricsDataPluginStartDeps } from './types'; import { MetricsDataClient } from './client'; import { metricsDataSourceSavedObjectType } from './saved_objects/metrics_data_source'; import { KibanaFramework } from './lib/adapters/framework/kibana_framework_adapter'; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metric_indices/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metric_indices/index.ts index 465a7fdf69f22..e5be6f29dc6df 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metric_indices/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metric_indices/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; -import { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; -import { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; -import { SetupRouteOptions } from '../types'; -import { MetricIndicesAPIResponse } from '../../../common/http_api/metric_indices'; +import type { ElasticsearchClient } from '@kbn/core/server'; +import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; +import type { SetupRouteOptions } from '../types'; +import type { MetricIndicesAPIResponse } from '../../../common/http_api/metric_indices'; function getIndexStatus(client: ElasticsearchClient, index: string) { return client diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/index.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/index.ts index 412b4089e773d..44392684d6566 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/index.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/index.ts @@ -8,10 +8,10 @@ import { createRouteValidationFunction } from '@kbn/io-ts-utils'; import Boom from '@hapi/boom'; import { METRICS_EXPLORER_API_MAX_METRICS } from '../../../common/constants'; +import type { MetricsExplorerPageInfo } from '../../../common/http_api/metrics_explorer'; import { metricsExplorerRequestBodyRT, metricsExplorerResponseRT, - MetricsExplorerPageInfo, } from '../../../common/http_api/metrics_explorer'; import { convertRequestToMetricsAPIOptions } from './lib/convert_request_to_metrics_api_options'; import { createSearchClient } from '../../lib/create_search_client'; @@ -19,7 +19,7 @@ import { findIntervalForMetrics } from './lib/find_interval_for_metrics'; import { query } from '../../lib/metrics'; import { queryTotalGroupings } from './lib/query_total_groupings'; import { transformSeries } from './lib/transform_series'; -import { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; +import type { KibanaFramework } from '../../lib/adapters/framework/kibana_framework_adapter'; export const initMetricExplorerRoute = (framework: KibanaFramework) => { const validateBody = createRouteValidationFunction(metricsExplorerRequestBodyRT); diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.test.ts index 6e391aeb45246..533d34b392900 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.test.ts @@ -6,7 +6,7 @@ */ import { convertMetricToMetricsAPIMetric } from './convert_metric_to_metrics_api_metric'; -import { +import type { MetricsExplorerMetric, MetricsAPIMetric, MetricsExplorerAggregation, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.ts index 299bc75f03114..9cc9981b08703 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_metric_to_metrics_api_metric.ts @@ -7,7 +7,7 @@ import { isEmpty } from 'lodash'; import { networkTraffic } from '../../../../common/inventory_models/shared/metrics/snapshot/network_traffic'; -import { MetricsAPIMetric, MetricsExplorerMetric } from '../../../../common/http_api'; +import type { MetricsAPIMetric, MetricsExplorerMetric } from '../../../../common/http_api'; import { createCustomMetricsAggregations } from '../../../lib/create_custom_metrics_aggregations'; export const convertMetricToMetricsAPIMetric = ( diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts index 71a925f7ab1d9..3499e04f0668e 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsExplorerRequestBody, MetricsAPIRequest } from '../../../../common/http_api'; +import type { MetricsExplorerRequestBody, MetricsAPIRequest } from '../../../../common/http_api'; import { convertRequestToMetricsAPIOptions } from './convert_request_to_metrics_api_options'; const BASE_REQUEST: MetricsExplorerRequestBody = { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts index f705feb0a0652..641f9f253d9fd 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts @@ -6,11 +6,8 @@ */ import { isObject, isArray } from 'lodash'; -import { - MetricsAPIRequest, - MetricsExplorerRequestBody, - afterKeyObjectRT, -} from '../../../../common/http_api'; +import type { MetricsAPIRequest, MetricsExplorerRequestBody } from '../../../../common/http_api'; +import { afterKeyObjectRT } from '../../../../common/http_api'; import { convertMetricToMetricsAPIMetric } from './convert_metric_to_metrics_api_metric'; export const convertRequestToMetricsAPIOptions = ( diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts index da00bcc3783d5..c83c3d41bc517 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/find_interval_for_metrics.ts @@ -7,10 +7,10 @@ import { uniq } from 'lodash'; import LRU from 'lru-cache'; -import { MetricsExplorerRequestBody } from '../../../../common/http_api/metrics_explorer'; +import type { MetricsExplorerRequestBody } from '../../../../common/http_api/metrics_explorer'; import { getDatasetForField } from './get_dataset_for_field'; import { calculateMetricInterval } from '../../../utils/calculate_metric_interval'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { ESSearchClient } from '../../../lib/metrics/types'; const cache = new LRU({ max: 100, diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/get_dataset_for_field.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/get_dataset_for_field.ts index a249f7123b766..692cfecfe65be 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/get_dataset_for_field.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/get_dataset_for_field.ts @@ -6,7 +6,7 @@ */ const TIMESTAMP_FIELD = '@timestamp'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { ESSearchClient } from '../../../lib/metrics/types'; interface EventDatasetHit { _source: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_grouping.test.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_grouping.test.ts index 1844a994a9375..2ae4f8d686dd6 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_grouping.test.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_grouping.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsAPIRequest } from '../../../../common/http_api'; +import type { MetricsAPIRequest } from '../../../../common/http_api'; import { queryTotalGroupings } from './query_total_groupings'; describe('queryTotalGroupings', () => { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_groupings.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_groupings.ts index f7d91f7e24dda..31e025610bca4 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_groupings.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/query_total_groupings.ts @@ -7,8 +7,8 @@ const TIMESTAMP_FIELD = '@timestamp'; import { isArray } from 'lodash'; -import { MetricsAPIRequest } from '../../../../common/http_api'; -import { ESSearchClient } from '../../../lib/metrics/types'; +import type { MetricsAPIRequest } from '../../../../common/http_api'; +import type { ESSearchClient } from '../../../lib/metrics/types'; interface GroupingResponse { count: { diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/transform_series.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/transform_series.ts index 6b876887bd568..0d2e18685df54 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/transform_series.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/metrics_explorer/lib/transform_series.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { MetricsAPISeries, MetricsExplorerSeries } from '../../../../common/http_api'; +import type { MetricsAPISeries, MetricsExplorerSeries } from '../../../../common/http_api'; export const transformSeries = (hasGroupBy: boolean) => diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/types.ts index cce4dcb5cc1e2..7e518f9600ddb 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/routes/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { IRouter, RequestHandlerContextBase } from '@kbn/core-http-server'; -import { MetricsDataClient } from '../client'; +import type { IRouter, RequestHandlerContextBase } from '@kbn/core-http-server'; +import type { MetricsDataClient } from '../client'; export interface SetupRouteOptions { router: IRouter; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/types.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/types.ts index fe82768acb4ff..f850f6f3afa29 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/types.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { PluginStart as DataPluginStart } from '@kbn/data-plugin/server'; -import { MetricsDataClient } from './client'; +import type { MetricsDataClient } from './client'; export interface MetricsDataPluginSetup { client: MetricsDataClient; diff --git a/x-pack/solutions/observability/plugins/metrics_data_access/server/utils/calculate_metric_interval.ts b/x-pack/solutions/observability/plugins/metrics_data_access/server/utils/calculate_metric_interval.ts index beac55521bcef..21e5e47d5faef 100644 --- a/x-pack/solutions/observability/plugins/metrics_data_access/server/utils/calculate_metric_interval.ts +++ b/x-pack/solutions/observability/plugins/metrics_data_access/server/utils/calculate_metric_interval.ts @@ -7,8 +7,8 @@ const TIMESTAMP_FIELD = '@timestamp'; import { findInventoryModel } from '../../common/inventory_models'; -import { InventoryItemType } from '../../common/inventory_models/types'; -import { ESSearchClient } from '../lib/metrics/types'; +import type { InventoryItemType } from '../../common/inventory_models/types'; +import type { ESSearchClient } from '../lib/metrics/types'; interface Options { indexPattern: string; diff --git a/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts b/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts index f89080654c1b6..5cb42de5f4347 100644 --- a/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts +++ b/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { BaseFlameGraph } from '@kbn/profiling-utils'; +import type { BaseFlameGraph } from '@kbn/profiling-utils'; export const baseFlamegraph: BaseFlameGraph = { Edges: [ diff --git a/x-pack/solutions/observability/plugins/profiling/common/columnar_view_model.ts b/x-pack/solutions/observability/plugins/profiling/common/columnar_view_model.ts index f553d61361b8a..5508539e896c0 100644 --- a/x-pack/solutions/observability/plugins/profiling/common/columnar_view_model.ts +++ b/x-pack/solutions/observability/plugins/profiling/common/columnar_view_model.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ColumnarViewModel } from '@elastic/charts'; +import type { ColumnarViewModel } from '@elastic/charts'; import type { ElasticFlameGraph } from '@kbn/profiling-utils'; import { frameTypeToRGB, rgbToRGBA } from './frame_type_colors'; diff --git a/x-pack/solutions/observability/plugins/profiling/common/topn.ts b/x-pack/solutions/observability/plugins/profiling/common/topn.ts index acd7c87ad7b5f..79f8195fc4bd3 100644 --- a/x-pack/solutions/observability/plugins/profiling/common/topn.ts +++ b/x-pack/solutions/observability/plugins/profiling/common/topn.ts @@ -6,7 +6,7 @@ */ import { euiPaletteColorBlind } from '@elastic/eui'; -import { InferSearchResponseOf } from '@kbn/es-types'; +import type { InferSearchResponseOf } from '@kbn/es-types'; import { i18n } from '@kbn/i18n'; import { orderBy } from 'lodash'; import { ProfilingESField } from '@kbn/profiling-utils'; diff --git a/x-pack/solutions/observability/plugins/profiling/e2e/cypress_test_runner.ts b/x-pack/solutions/observability/plugins/profiling/e2e/cypress_test_runner.ts index 1ba633c2d0543..d458f65df494f 100644 --- a/x-pack/solutions/observability/plugins/profiling/e2e/cypress_test_runner.ts +++ b/x-pack/solutions/observability/plugins/profiling/e2e/cypress_test_runner.ts @@ -6,10 +6,10 @@ */ import axios from 'axios'; -import cypress from 'cypress'; +import type cypress from 'cypress'; import path from 'path'; import Url from 'url'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; import { loadProfilingData } from './load_profiling_data'; import { setupProfilingResources } from './setup_profiling_resources'; diff --git a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config.ts b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config.ts index 56cb76e2b2ac7..93af91f4792cb 100644 --- a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config.ts +++ b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { FtrConfigProviderContext } from '@kbn/test'; +import type { FtrConfigProviderContext } from '@kbn/test'; import { CA_CERT_PATH } from '@kbn/dev-utils'; import { commonFunctionalServices } from '@kbn/ftr-common-functional-services'; import { commonFunctionalUIServices } from '@kbn/ftr-common-functional-ui-services'; diff --git a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_open.ts b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_open.ts index 6e8a7282cf664..b3c061c031ca4 100644 --- a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_open.ts +++ b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_open.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { FtrConfigProviderContext } from '@kbn/test'; +import type { FtrConfigProviderContext } from '@kbn/test'; import cypress from 'cypress'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; import { cypressTestRunner } from './cypress_test_runner'; async function ftrConfigOpen({ readConfigFile }: FtrConfigProviderContext) { diff --git a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_runner.ts b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_runner.ts index a6af6d0ce1a82..38c69667213cf 100644 --- a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_runner.ts +++ b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_config_runner.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { FtrConfigProviderContext } from '@kbn/test'; +import type { FtrConfigProviderContext } from '@kbn/test'; import cypress from 'cypress'; import { cypressTestRunner } from './cypress_test_runner'; -import { FtrProviderContext } from './ftr_provider_context'; +import type { FtrProviderContext } from './ftr_provider_context'; async function ftrConfigRun({ readConfigFile }: FtrConfigProviderContext) { const kibanaConfig = await readConfigFile(require.resolve('./ftr_config.ts')); diff --git a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_provider_context.d.ts b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_provider_context.d.ts index b87f35adcccf2..30a5f1fe518da 100644 --- a/x-pack/solutions/observability/plugins/profiling/e2e/ftr_provider_context.d.ts +++ b/x-pack/solutions/observability/plugins/profiling/e2e/ftr_provider_context.d.ts @@ -5,6 +5,6 @@ * 2.0. */ -import { GenericFtrProviderContext } from '@kbn/test'; +import type { GenericFtrProviderContext } from '@kbn/test'; export type FtrProviderContext = GenericFtrProviderContext<{}, {}>; diff --git a/x-pack/solutions/observability/plugins/profiling/public/app.tsx b/x-pack/solutions/observability/plugins/profiling/public/app.tsx index 0b4cfbaaaa44c..8572a2486a821 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/app.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/app.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { AppMountParameters, CoreSetup, CoreStart } from '@kbn/core/public'; +import type { AppMountParameters, CoreSetup, CoreStart } from '@kbn/core/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { Storage } from '@kbn/kibana-utils-plugin/public'; @@ -21,8 +21,8 @@ import { RouteBreadcrumbsContextProvider } from './components/contexts/route_bre import { TimeRangeContextProvider } from './components/contexts/time_range_context'; import { RedirectWithDefaultDateRange } from './components/redirect_with_default_date_range'; import { profilingRouter } from './routing'; -import { Services } from './services'; -import { ProfilingPluginPublicSetupDeps, ProfilingPluginPublicStartDeps } from './types'; +import type { Services } from './services'; +import type { ProfilingPluginPublicSetupDeps, ProfilingPluginPublicStartDeps } from './types'; import { ProfilingHeaderActionMenu } from './components/profiling_header_action_menu'; import { RouterErrorBoundary } from './routing/router_error_boundary'; import { LicenseProvider } from './components/contexts/license/license_context'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/async_component.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/async_component.tsx index 5d86340fe79f3..57b578c8004e1 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/async_component.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/async_component.tsx @@ -4,17 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { - EuiFlexGroup, - EuiFlexGroupProps, - EuiFlexItem, - EuiLoadingChart, - EuiText, - EuiIcon, -} from '@elastic/eui'; +import type { EuiFlexGroupProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingChart, EuiText, EuiIcon } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { AsyncState, AsyncStatus } from '../hooks/use_async'; +import type { AsyncState } from '../hooks/use_async'; +import { AsyncStatus } from '../hooks/use_async'; export function AsyncComponent({ children, diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/chart_grid.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/chart_grid.tsx index 717fc178028ec..a0c10f9bbba4a 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/chart_grid.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/chart_grid.tsx @@ -8,7 +8,7 @@ import { EuiFlexGrid, EuiFlexItem, EuiPanel, EuiSpacer } from '@elastic/eui'; import { take } from 'lodash'; import React, { useMemo } from 'react'; -import { TopNSubchart } from '../../common/topn'; +import type { TopNSubchart } from '../../common/topn'; import { SubChart } from './subchart'; export interface ChartGridProps { diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/license/license_context.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/license/license_context.tsx index f0274ab739b9a..d265f6645ea38 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/license/license_context.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/license/license_context.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { ILicense } from '@kbn/licensing-plugin/public'; +import type { ILicense } from '@kbn/licensing-plugin/public'; import React from 'react'; import useObservable from 'react-use/lib/useObservable'; import { ProfilingAppPageTemplate } from '../../profiling_app_page_template'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/mock_profiling_dependencies_storybook.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/mock_profiling_dependencies_storybook.tsx index 3508f3f090c6a..98eb7ad6a48c0 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/mock_profiling_dependencies_storybook.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/mock_profiling_dependencies_storybook.tsx @@ -4,20 +4,19 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart } from '@kbn/core/public'; +import type { CoreStart } from '@kbn/core/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; import { MlLocatorDefinition } from '@kbn/ml-plugin/public'; import { UrlService } from '@kbn/share-plugin/common/url_service'; import { createMemoryHistory } from 'history'; import { merge } from 'lodash'; -import React, { ReactNode } from 'react'; +import type { ReactNode } from 'react'; +import React from 'react'; import { Observable } from 'rxjs'; import { RouterProvider } from '@kbn/typed-react-router-config'; -import { - ProfilingDependencies, - ProfilingDependenciesContextProvider, -} from './profiling_dependencies_context'; +import type { ProfilingDependencies } from './profiling_dependencies_context'; +import { ProfilingDependenciesContextProvider } from './profiling_dependencies_context'; import { profilingRouter } from '../../../routing'; import { TimeRangeContextProvider } from '../time_range_context'; import { getServices } from '../../../services'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/profiling_dependencies_context.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/profiling_dependencies_context.tsx index 240d34b8e18c7..333e96ec1ae2c 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/profiling_dependencies_context.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_dependencies/profiling_dependencies_context.tsx @@ -4,10 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CoreStart, CoreSetup } from '@kbn/core/public'; +import type { CoreStart, CoreSetup } from '@kbn/core/public'; import { createContext } from 'react'; -import { Services } from '../../../services'; -import { ProfilingPluginPublicSetupDeps, ProfilingPluginPublicStartDeps } from '../../../types'; +import type { Services } from '../../../services'; +import type { + ProfilingPluginPublicSetupDeps, + ProfilingPluginPublicStartDeps, +} from '../../../types'; export interface ProfilingDependencies { start: { diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_setup_status/profiling_setup_status_context.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_setup_status/profiling_setup_status_context.tsx index 5f02a0886f7c2..5979e631e787d 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_setup_status/profiling_setup_status_context.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/profiling_setup_status/profiling_setup_status_context.tsx @@ -6,7 +6,7 @@ */ import React, { useState } from 'react'; -import { ProfilingSetupStatus } from '../../../services'; +import type { ProfilingSetupStatus } from '../../../services'; export const ProfilingSetupStatusContext = React.createContext< | { diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/index.tsx index 62881c17fddb1..383fef909db84 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/index.tsx @@ -4,8 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { Route, RouteMatch, useMatchRoutes } from '@kbn/typed-react-router-config'; -import { ChromeBreadcrumb } from '@kbn/core/public'; +import type { Route, RouteMatch } from '@kbn/typed-react-router-config'; +import { useMatchRoutes } from '@kbn/typed-react-router-config'; +import type { ChromeBreadcrumb } from '@kbn/core/public'; import { compact, isEqual } from 'lodash'; import React, { createContext, useMemo, useState } from 'react'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/use_route_breadcrumb.ts b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/use_route_breadcrumb.ts index 79a34e3ff79a9..0b8ff1c2e1cc5 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/use_route_breadcrumb.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/components/contexts/route_breadcrumbs_context/use_route_breadcrumb.ts @@ -8,7 +8,8 @@ import { useCurrentRoute } from '@kbn/typed-react-router-config'; import { useContext, useEffect, useRef } from 'react'; import { castArray } from 'lodash'; -import { RouteBreadcrumbsContext, Breadcrumb } from '.'; +import type { Breadcrumb } from '.'; +import { RouteBreadcrumbsContext } from '.'; export function useRouteBreadcrumb(breadcrumb: Breadcrumb | Breadcrumb[]) { const api = useContext(RouteBreadcrumbsContext); diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/cpu_label_with_hint/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/cpu_label_with_hint/index.tsx index f0a339b65974f..fa5989a81bc97 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/cpu_label_with_hint/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/cpu_label_with_hint/index.tsx @@ -5,15 +5,8 @@ * 2.0. */ import React from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiIconProps, - EuiText, - EuiTextProps, - EuiToolTip, -} from '@elastic/eui'; +import type { EuiIconProps, EuiTextProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; type CPUType = 'self' | 'total'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_columns.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_columns.tsx index 71ead9cd75a85..4fd22e71527e7 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_columns.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_columns.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiDataGridColumn, EuiDataGridColumnCellAction } from '@elastic/eui'; +import type { EuiDataGridColumn, EuiDataGridColumnCellAction } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TopNComparisonFunctionSortField, TopNFunctionSortField } from '@kbn/profiling-utils'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_compare_frame_action.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_compare_frame_action.tsx index 32f6bc826d986..bd6734eda2207 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_compare_frame_action.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/get_compare_frame_action.tsx @@ -5,21 +5,15 @@ * 2.0. */ -import { - EuiBasicTable, - EuiDataGridColumnCellAction, - EuiDataGridColumnCellActionProps, - EuiPopover, - EuiPopoverTitle, - EuiText, - EuiTitle, -} from '@elastic/eui'; +import type { EuiDataGridColumnCellAction, EuiDataGridColumnCellActionProps } from '@elastic/eui'; +import { EuiBasicTable, EuiPopover, EuiPopoverTitle, EuiText, EuiTitle } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; import { getCalleeFunction } from '@kbn/profiling-utils'; -import { getFrameIdentification, isComparisonColumn, SelectedFrame } from '.'; -import { IFunctionRow } from '../topn_functions/utils'; +import type { SelectedFrame } from '.'; +import { getFrameIdentification, isComparisonColumn } from '.'; +import type { IFunctionRow } from '../topn_functions/utils'; interface Props { baseRows: IFunctionRow[]; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/index.tsx index 4255bc9dd3ee5..91c1099371827 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/differential_topn_functions_grid/index.tsx @@ -5,22 +5,18 @@ * 2.0. */ -import { - EuiButtonIcon, - EuiDataGrid, +import type { EuiDataGridCellValueElementProps, EuiDataGridColumn, EuiDataGridSorting, - EuiScreenReaderOnly, - useEuiTheme, } from '@elastic/eui'; +import { EuiButtonIcon, EuiDataGrid, EuiScreenReaderOnly, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; import { i18n } from '@kbn/i18n'; +import type { StackFrameMetadata, TopNFunctions } from '@kbn/profiling-utils'; import { getCalleeFunction, - StackFrameMetadata, TopNComparisonFunctionSortField, - TopNFunctions, TopNFunctionSortField, } from '@kbn/profiling-utils'; import { orderBy } from 'lodash'; @@ -28,12 +24,8 @@ import React, { useEffect, useMemo, useState } from 'react'; import { useCalculateImpactEstimate } from '../../hooks/use_calculate_impact_estimates'; import { FrameInformationTooltip } from '../frame_information_window/frame_information_tooltip'; import { FunctionRow } from '../topn_functions/function_row'; -import { - convertRowToFrame, - getFunctionsRows, - getTotalCount, - IFunctionRow, -} from '../topn_functions/utils'; +import type { IFunctionRow } from '../topn_functions/utils'; +import { convertRowToFrame, getFunctionsRows, getTotalCount } from '../topn_functions/utils'; import { getColumns } from './get_columns'; import { getCompareFrameAction } from './get_compare_frame_action'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/flame_graph_legend.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/flame_graph_legend.tsx index 60d36ea833d92..82fefbac79944 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/flame_graph_legend.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/flame_graph_legend.tsx @@ -8,7 +8,8 @@ import { EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { asPercentage } from '../../utils/formatters/as_percentage'; -import { Legend, LegendItem } from '../legend'; +import type { LegendItem } from '../legend'; +import { Legend } from '../legend'; export function FlameGraphLegend({ legendItems, diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/index.tsx index c1d50ba9142a6..ecb3dd2086a76 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/flamegraph/index.tsx @@ -5,27 +5,18 @@ * 2.0. */ -import { - Chart, - Datum, - Flame, - FlameLayerValue, - FlameSpec, - PartialTheme, - Settings, - Tooltip, - LEGACY_LIGHT_THEME, -} from '@elastic/charts'; +import type { Datum, FlameLayerValue, FlameSpec, PartialTheme } from '@elastic/charts'; +import { Chart, Flame, Settings, Tooltip, LEGACY_LIGHT_THEME } from '@elastic/charts'; import { EuiFlexGroup, EuiFlexItem, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { Maybe } from '@kbn/observability-plugin/common/typings'; +import type { Maybe } from '@kbn/observability-plugin/common/typings'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; import type { ElasticFlameGraph } from '@kbn/profiling-utils'; import React, { useEffect, useMemo, useState } from 'react'; import { getFlamegraphModel } from '../../utils/get_flamegraph_model'; -import { Frame } from '../frame_information_window'; +import type { Frame } from '../frame_information_window'; import { FrameInformationTooltip } from '../frame_information_window/frame_information_tooltip'; -import { ComparisonMode } from '../normalization_menu'; +import type { ComparisonMode } from '../normalization_menu'; import { FlameGraphTooltip } from './flamegraph_tooltip'; import { FlameGraphLegend } from './flame_graph_legend'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/apm_transactions.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/apm_transactions.tsx index 54ce9ebc9eddb..8ae3523c9e561 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/apm_transactions.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/apm_transactions.tsx @@ -4,11 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { Criteria, EuiBasicTableColumn } from '@elastic/eui'; import { Comparators, - Criteria, EuiBasicTable, - EuiBasicTableColumn, EuiFieldSearch, EuiFlexGroup, EuiFlexItem, diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_ai_assistant.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_ai_assistant.tsx index 4464a4de4fe7b..9a3b020958614 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_ai_assistant.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_ai_assistant.tsx @@ -9,7 +9,7 @@ import React, { useMemo } from 'react'; import { i18n } from '@kbn/i18n'; import type { Message } from '@kbn/observability-ai-assistant-plugin/public'; import { EuiFlexItem } from '@elastic/eui'; -import { Frame } from '.'; +import type { Frame } from '.'; import { useProfilingDependencies } from '../contexts/profiling_dependencies/use_profiling_dependencies'; interface Props { diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_tooltip.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_tooltip.tsx index 2ff6a36636d61..e26096fb69834 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_tooltip.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/frame_information_tooltip.tsx @@ -6,7 +6,8 @@ */ import { EuiFlyout, EuiFlyoutBody } from '@elastic/eui'; import React from 'react'; -import { FrameInformationWindow, Props as FrameInformationWindowProps } from '.'; +import type { Props as FrameInformationWindowProps } from '.'; +import { FrameInformationWindow } from '.'; interface Props extends FrameInformationWindowProps { onClose: () => void; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/get_impact_rows.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/get_impact_rows.tsx index 1df0d55ae22e2..8893af0d2fdc2 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/get_impact_rows.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/get_impact_rows.tsx @@ -7,10 +7,8 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; -import { - ANNUAL_SECONDS, - CalculateImpactEstimates, -} from '../../hooks/use_calculate_impact_estimates'; +import type { CalculateImpactEstimates } from '../../hooks/use_calculate_impact_estimates'; +import { ANNUAL_SECONDS } from '../../hooks/use_calculate_impact_estimates'; import { asCost } from '../../utils/formatters/as_cost'; import { asDuration } from '../../utils/formatters/as_duration'; import { asNumber } from '../../utils/formatters/as_number'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/index.tsx index b392be8717ffc..8714441fd89fc 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/index.tsx @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { EuiAccordionProps } from '@elastic/eui'; import { EuiAccordion, - EuiAccordionProps, EuiFlexGroup, EuiFlexItem, EuiIcon, diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.stories.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.stories.tsx index 3a6a29d2f2ed5..72eba97b12f49 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.stories.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.stories.tsx @@ -6,7 +6,7 @@ */ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { Meta } from '@storybook/react'; +import type { Meta } from '@storybook/react'; import React from 'react'; import { FrameType } from '@kbn/profiling-utils'; import { MockProfilingDependenciesStorybook } from '../contexts/profiling_dependencies/mock_profiling_dependencies_storybook'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.tsx index 922fd070f3130..b4b4f2edfcbc5 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frame_information_window/missing_symbols_callout.tsx @@ -9,7 +9,8 @@ import { EuiButton, EuiCallOut, EuiLink } from '@elastic/eui'; import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { FrameType, getLanguageType } from '@kbn/profiling-utils'; +import type { FrameType } from '@kbn/profiling-utils'; +import { getLanguageType } from '@kbn/profiling-utils'; import { PROFILING_FEEDBACK_LINK } from '../profiling_app_page_template'; import { useProfilingDependencies } from '../contexts/profiling_dependencies/use_profiling_dependencies'; import { useProfilingRouter } from '../../hooks/use_profiling_router'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/frames_summary/summary_item.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/frames_summary/summary_item.tsx index 19650ca431038..7372b836f401a 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/frames_summary/summary_item.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/frames_summary/summary_item.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiTextProps } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, @@ -14,7 +15,6 @@ import { EuiStat, EuiText, EuiTextColor, - EuiTextProps, EuiToolTip, } from '@elastic/eui'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/label_with_hint/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/label_with_hint/index.tsx index 4e4c21b1c8850..f694e241c4446 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/label_with_hint/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/label_with_hint/index.tsx @@ -5,15 +5,8 @@ * 2.0. */ import React from 'react'; -import { - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiIconProps, - EuiText, - EuiTextProps, - EuiToolTip, -} from '@elastic/eui'; +import type { EuiIconProps, EuiTextProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiToolTip } from '@elastic/eui'; interface Props { label: string; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/primary_and_comparison_search_bar.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/primary_and_comparison_search_bar.tsx index e5a60a7d95149..b02344ae6614d 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/primary_and_comparison_search_bar.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/primary_and_comparison_search_bar.tsx @@ -13,13 +13,13 @@ import { EuiToolTip, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import React from 'react'; import { useAnyOfProfilingParams } from '../hooks/use_profiling_params'; import { useProfilingRouter } from '../hooks/use_profiling_router'; import { useProfilingRoutePath } from '../hooks/use_profiling_route_path'; import { useTimeRangeContext } from '../hooks/use_time_range_context'; -import { ProfilingRoutes } from '../routing'; +import type { ProfilingRoutes } from '../routing'; import { PrimaryProfilingSearchBar } from './profiling_app_page_template/primary_profiling_search_bar'; import { ProfilingSearchBar } from './profiling_app_page_template/profiling_search_bar'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/index.tsx index e094038e2f190..f3f8e794bad83 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { EuiPageHeaderContentProps } from '@elastic/eui'; import { EuiBetaBadge, EuiButton, @@ -12,13 +13,12 @@ import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule, - EuiPageHeaderContentProps, EuiPanel, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect } from 'react'; import { useHistory } from 'react-router-dom'; -import { NoDataPageProps } from '@kbn/shared-ux-page-no-data-types'; +import type { NoDataPageProps } from '@kbn/shared-ux-page-no-data-types'; import { useProfilingDependencies } from '../contexts/profiling_dependencies/use_profiling_dependencies'; import { PrimaryProfilingSearchBar } from './primary_profiling_search_bar'; import { useLocalStorage } from '../../hooks/use_local_storage'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/profiling_search_bar.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/profiling_search_bar.tsx index c41468f5dbff8..f83081ac8b8e4 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/profiling_search_bar.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/profiling_app_page_template/profiling_search_bar.tsx @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { DataView } from '@kbn/data-views-plugin/common'; -import { Query, TimeRange } from '@kbn/es-query'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import type { Query, TimeRange } from '@kbn/es-query'; import { SearchBar } from '@kbn/unified-search-plugin/public'; import { compact } from 'lodash'; import React, { useEffect, useState } from 'react'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/redirect_with_default_date_range.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/redirect_with_default_date_range.tsx index 4ff4810a7195f..88a4d9496b982 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/redirect_with_default_date_range.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/redirect_with_default_date_range.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import type React from 'react'; import { useDateRangeRedirect } from '../hooks/use_default_date_range_redirect'; export function RedirectWithDefaultDateRange({ children }: { children: React.ReactElement }) { diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/stack_traces/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/stack_traces/index.tsx index ec2e5f28ccc24..fd19f7158bdac 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/stack_traces/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/stack_traces/index.tsx @@ -17,10 +17,11 @@ import { import { i18n } from '@kbn/i18n'; import React, { useState } from 'react'; import { StackTracesDisplayOption, TopNType } from '@kbn/profiling-utils'; -import { StackedBarChart, StackedBarChartProps } from '../stacked_bar_chart'; -import { TopNSubchart } from '../../../common/topn'; +import type { StackedBarChartProps } from '../stacked_bar_chart'; +import { StackedBarChart } from '../stacked_bar_chart'; +import type { TopNSubchart } from '../../../common/topn'; import { ChartGrid } from '../chart_grid'; -import { AsyncState } from '../../hooks/use_async'; +import type { AsyncState } from '../../hooks/use_async'; import { AsyncComponent } from '../async_component'; import { SubChart } from '../subchart'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/stacked_bar_chart/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/stacked_bar_chart/index.tsx index 7be81869a49a5..3a2261fbe325e 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/stacked_bar_chart/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/stacked_bar_chart/index.tsx @@ -5,6 +5,7 @@ * 2.0. */ +import type { XYChartElementEvent } from '@elastic/charts'; import { Axis, BrushAxis, @@ -15,14 +16,13 @@ import { StackMode, timeFormatter, Tooltip, - XYChartElementEvent, TooltipContainer, } from '@elastic/charts'; import { EuiPanel } from '@elastic/eui'; import { keyBy } from 'lodash'; import React, { useMemo, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { TopNSample, TopNSubchart } from '../../../common/topn'; +import type { TopNSample, TopNSubchart } from '../../../common/topn'; import { useKibanaTimeZoneSetting } from '../../hooks/use_kibana_timezone_setting'; import { useProfilingChartsTheme } from '../../hooks/use_profiling_charts_theme'; import { asPercentage } from '../../utils/formatters/as_percentage'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/subchart.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/subchart.tsx index 3ada21f11c0ef..c46805dab23dc 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/subchart.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/subchart.tsx @@ -18,13 +18,12 @@ import { timeFormatter, Tooltip, } from '@elastic/charts'; +import type { EuiAccordionProps, EuiFlexGroupProps } from '@elastic/eui'; import { EuiAccordion, - EuiAccordionProps, EuiBadge, EuiButton, EuiFlexGroup, - EuiFlexGroupProps, EuiFlexItem, EuiHorizontalRule, EuiIcon, @@ -39,7 +38,8 @@ import { i18n } from '@kbn/i18n'; import type { StackFrameMetadata } from '@kbn/profiling-utils'; import { groupBy } from 'lodash'; import React, { Fragment, useMemo, useState } from 'react'; -import { CountPerTime, OTHER_BUCKET_LABEL, TopNSample } from '../../common/topn'; +import type { CountPerTime, TopNSample } from '../../common/topn'; +import { OTHER_BUCKET_LABEL } from '../../common/topn'; import { useKibanaTimeZoneSetting } from '../hooks/use_kibana_timezone_setting'; import { useProfilingChartsTheme } from '../hooks/use_profiling_charts_theme'; import { asNumber } from '../utils/formatters/as_number'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/function_row.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/function_row.tsx index 436b6942c1305..437847dfa32ce 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/function_row.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/function_row.tsx @@ -5,14 +5,8 @@ * 2.0. */ -import { - EuiDataGridCellValueElementProps, - EuiFlexGroup, - EuiFlexItem, - EuiIcon, - EuiText, - useEuiTheme, -} from '@elastic/eui'; +import type { EuiDataGridCellValueElementProps } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, useEuiTheme } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { TopNFunctionSortField } from '@kbn/profiling-utils'; import React, { useEffect } from 'react'; @@ -21,7 +15,7 @@ import { asWeight } from '../../utils/formatters/as_weight'; import { StackFrameSummary } from '../stack_frame_summary'; import { CPUStat } from './cpu_stat'; import { SampleStat } from './sample_stat'; -import { IFunctionRow } from './utils'; +import type { IFunctionRow } from './utils'; interface Props { functionRow: IFunctionRow; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/index.tsx index cad716654a843..490d2027ec799 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/index.tsx @@ -5,27 +5,27 @@ * 2.0. */ -import { - EuiButtonIcon, - EuiDataGrid, +import type { EuiDataGridCellValueElementProps, EuiDataGridColumn, EuiDataGridControlColumn, EuiDataGridSorting, - EuiScreenReaderOnly, } from '@elastic/eui'; +import { EuiButtonIcon, EuiDataGrid, EuiScreenReaderOnly } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { useUiTracker } from '@kbn/observability-shared-plugin/public'; -import { getCalleeFunction, TopNFunctions, TopNFunctionSortField } from '@kbn/profiling-utils'; +import type { TopNFunctions } from '@kbn/profiling-utils'; +import { getCalleeFunction, TopNFunctionSortField } from '@kbn/profiling-utils'; import { last, orderBy } from 'lodash'; import React, { useMemo, useState } from 'react'; -import { GridOnScrollProps } from 'react-window'; +import type { GridOnScrollProps } from 'react-window'; import { useCalculateImpactEstimate } from '../../hooks/use_calculate_impact_estimates'; import { CPULabelWithHint } from '../cpu_label_with_hint'; import { FrameInformationTooltip } from '../frame_information_window/frame_information_tooltip'; import { LabelWithHint } from '../label_with_hint'; import { FunctionRow } from './function_row'; -import { convertRowToFrame, getFunctionsRows, getTotalCount, IFunctionRow } from './utils'; +import type { IFunctionRow } from './utils'; +import { convertRowToFrame, getFunctionsRows, getTotalCount } from './utils'; interface Props { topNFunctions?: TopNFunctions; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/topn_functions.stories.tsx b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/topn_functions.stories.tsx index 2ece778600a63..a46f756181417 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/topn_functions.stories.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/topn_functions.stories.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Meta } from '@storybook/react'; +import type { Meta } from '@storybook/react'; import React from 'react'; import { TopNFunctionsView } from '../../views/functions/topn'; import { MockProfilingDependenciesStorybook } from '../contexts/profiling_dependencies/mock_profiling_dependencies_storybook'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.test.ts b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.test.ts index 9142427790450..8c202d6bac344 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.test.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { TopNFunctions } from '@kbn/profiling-utils'; +import type { TopNFunctions } from '@kbn/profiling-utils'; import { getColorLabel, getTotalCount } from './utils'; describe('Top N functions: Utils', () => { diff --git a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.ts b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.ts index 6cb68bd54f153..94ca6867c4f14 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/components/topn_functions/utils.ts @@ -6,7 +6,7 @@ */ import { keyBy } from 'lodash'; import type { StackFrameMetadata, TopNFunctions } from '@kbn/profiling-utils'; -import { +import type { CalculateImpactEstimates, ImpactEstimates, } from '../../hooks/use_calculate_impact_estimates'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/embeddable_flamegraph.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/embeddable_flamegraph.tsx index 5eaed16b89953..3a353c94cac51 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/embeddable_flamegraph.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/embeddable_flamegraph.tsx @@ -4,15 +4,14 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BaseFlameGraph, createFlameGraph } from '@kbn/profiling-utils'; +import type { BaseFlameGraph } from '@kbn/profiling-utils'; +import { createFlameGraph } from '@kbn/profiling-utils'; import React from 'react'; import { profilingShowErrorFrames } from '@kbn/observability-plugin/common'; import { FlameGraph } from '../../components/flamegraph'; import { AsyncEmbeddableComponent } from '../async_embeddable_component'; -import { - ProfilingEmbeddableProvider, - ProfilingEmbeddablesDependencies, -} from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import { ProfilingEmbeddableProvider } from '../profiling_embeddable_provider'; import { useProfilingDependencies } from '../../components/contexts/profiling_dependencies/use_profiling_dependencies'; export type EmbeddableFlamegraphProps = FlamegraphProps & ProfilingEmbeddablesDependencies; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/index.tsx index 67efb183fd459..0b44b18baeac3 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/flamegraph/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { dynamic } from '@kbn/shared-ux-utility'; import type { EmbeddableFlamegraphSharedComponent, FlamegraphProps } from './embeddable_flamegraph'; -import { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; const LazyEmbeddableFlamegraph = dynamic(async () => { const Component = await import('./embeddable_flamegraph'); diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions.tsx index 851eeeb8fe103..cf4c53f9da8fd 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions.tsx @@ -6,12 +6,10 @@ */ import React, { useMemo } from 'react'; -import { TopNFunctions } from '@kbn/profiling-utils'; +import type { TopNFunctions } from '@kbn/profiling-utils'; import { AsyncEmbeddableComponent } from '../async_embeddable_component'; -import { - ProfilingEmbeddableProvider, - ProfilingEmbeddablesDependencies, -} from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import { ProfilingEmbeddableProvider } from '../profiling_embeddable_provider'; import { EmbeddableFunctionsGrid } from './embeddable_functions_grid'; export type EmbeddableFunctionsProps = FunctionsProps & ProfilingEmbeddablesDependencies; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions_grid.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions_grid.tsx index 8b4dfd5d62c27..7f1ac1b4f8040 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions_grid.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/embeddable_functions_grid.tsx @@ -5,9 +5,10 @@ * 2.0. */ -import { TopNFunctionSortField, TopNFunctions } from '@kbn/profiling-utils'; +import type { TopNFunctions } from '@kbn/profiling-utils'; +import { TopNFunctionSortField } from '@kbn/profiling-utils'; import React, { useState } from 'react'; -import { EuiDataGridSorting } from '@elastic/eui'; +import type { EuiDataGridSorting } from '@elastic/eui'; import { TopNFunctionsGrid } from '../../components/topn_functions'; interface Props { diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/index.tsx index 849907c57dab1..9b4ad86b02ba1 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/functions/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { dynamic } from '@kbn/shared-ux-utility'; import type { EmbeddableFunctionsSharedComponent, FunctionsProps } from './embeddable_functions'; -import { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; const LazyEmbeddableFunctions = dynamic(async () => { const Component = await import('./embeddable_functions'); diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/profiling_embeddable_provider.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/profiling_embeddable_provider.tsx index 3a26ede4faac1..39f32d7791049 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/profiling_embeddable_provider.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/profiling_embeddable_provider.tsx @@ -6,12 +6,13 @@ */ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; -import React, { ReactChild, useMemo } from 'react'; -import { CoreSetup, CoreStart } from '@kbn/core/public'; +import type { ReactChild } from 'react'; +import React, { useMemo } from 'react'; +import type { CoreSetup, CoreStart } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { ProfilingDependenciesContextProvider } from '../components/contexts/profiling_dependencies/profiling_dependencies_context'; -import { ProfilingPluginPublicSetupDeps, ProfilingPluginPublicStartDeps } from '../types'; -import { Services } from '../services'; +import type { ProfilingPluginPublicSetupDeps, ProfilingPluginPublicStartDeps } from '../types'; +import type { Services } from '../services'; export interface ProfilingEmbeddablesDependencies { coreStart: CoreStart; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/register_embeddables.ts b/x-pack/solutions/observability/plugins/profiling/public/embeddables/register_embeddables.ts index f4a775f007739..abbca58651b86 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/register_embeddables.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/register_embeddables.ts @@ -13,7 +13,7 @@ import { } from '@kbn/observability-shared-plugin/public'; import { getEmbeddableFlamegraphComponent } from './flamegraph'; import { getEmbeddableFunctionsComponent } from './functions'; -import { ProfilingEmbeddablesDependencies } from './profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from './profiling_embeddable_provider'; import { getEmbeddableStackTracesComponent } from './stack_traces'; import { getEmbeddableSearchBarComponent } from './search_bar'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/embeddable_search_bar.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/embeddable_search_bar.tsx index 1c370e96501d0..16a331ed4c218 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/embeddable_search_bar.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/embeddable_search_bar.tsx @@ -5,13 +5,11 @@ * 2.0. */ import { css } from '@emotion/react'; -import { EmbeddableProfilingSearchBarProps } from '@kbn/observability-shared-plugin/public'; +import type { EmbeddableProfilingSearchBarProps } from '@kbn/observability-shared-plugin/public'; import React from 'react'; import { ProfilingSearchBar } from '../../components/profiling_app_page_template/profiling_search_bar'; -import { - ProfilingEmbeddableProvider, - ProfilingEmbeddablesDependencies, -} from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import { ProfilingEmbeddableProvider } from '../profiling_embeddable_provider'; export type EmbeddableSearchBarProps = EmbeddableProfilingSearchBarProps & ProfilingEmbeddablesDependencies; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/index.tsx index f010ade0f2480..13bad17c4ce61 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/search_bar/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { dynamic } from '@kbn/shared-ux-utility'; import type { EmbeddableSearchBarSharedComponent } from './embeddable_search_bar'; -import { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; const LazyEmbeddableSearchBar = dynamic(async () => { const Component = await import('./embeddable_search_bar'); diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/embeddable_stack_traces.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/embeddable_stack_traces.tsx index efc9aeda9c6bd..ca4b5ebe78629 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/embeddable_stack_traces.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/embeddable_stack_traces.tsx @@ -6,11 +6,10 @@ */ import React from 'react'; -import { - ProfilingEmbeddableProvider, - ProfilingEmbeddablesDependencies, -} from '../profiling_embeddable_provider'; -import { StackTraces, StackTracesProps } from './stack_traces'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import { ProfilingEmbeddableProvider } from '../profiling_embeddable_provider'; +import type { StackTracesProps } from './stack_traces'; +import { StackTraces } from './stack_traces'; export type EmbeddableStackTracesProps = StackTracesProps & ProfilingEmbeddablesDependencies; diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/index.tsx index 29631941cd30e..8fd057a10a79e 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/index.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { dynamic } from '@kbn/shared-ux-utility'; import type { EmbeddableStackTracesSharedComponent } from './embeddable_stack_traces'; -import { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from '../profiling_embeddable_provider'; import type { StackTracesProps } from './stack_traces'; const LazyEmbeddableStackTraces = dynamic(async () => { diff --git a/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/stack_traces.tsx b/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/stack_traces.tsx index 9aae8b0ecc309..26b626af15ea3 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/stack_traces.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/embeddables/stack_traces/stack_traces.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { StackTracesDisplayOption, TopNType } from '@kbn/profiling-utils'; +import type { TopNType } from '@kbn/profiling-utils'; +import { StackTracesDisplayOption } from '@kbn/profiling-utils'; import React, { useState } from 'react'; import { groupSamplesByCategory } from '../../../common/topn'; import { useProfilingDependencies } from '../../components/contexts/profiling_dependencies/use_profiling_dependencies'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_async.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_async.ts index 856842f891900..7220b33255586 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_async.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_async.ts @@ -8,7 +8,8 @@ import { AbortError } from '@kbn/kibana-utils-plugin/common'; import { useCallback, useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { useProfilingDependencies } from '../components/contexts/profiling_dependencies/use_profiling_dependencies'; -import { AutoAbortedHttpService, useAutoAbortedHttpClient } from './use_auto_aborted_http_client'; +import type { AutoAbortedHttpService } from './use_auto_aborted_http_client'; +import { useAutoAbortedHttpClient } from './use_auto_aborted_http_client'; export enum AsyncStatus { Loading = 'loading', diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_auto_aborted_http_client.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_auto_aborted_http_client.ts index f88ca2f0f0b8b..276fd2c988430 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_auto_aborted_http_client.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_auto_aborted_http_client.ts @@ -6,8 +6,8 @@ */ import { useEffect, useMemo, useRef } from 'react'; -import { Overwrite, ValuesType } from 'utility-types'; -import { HttpFetchOptions, HttpHandler, HttpStart } from '@kbn/core/public'; +import type { Overwrite, ValuesType } from 'utility-types'; +import type { HttpFetchOptions, HttpHandler, HttpStart } from '@kbn/core/public'; import { useProfilingDependencies } from '../components/contexts/profiling_dependencies/use_profiling_dependencies'; const HTTP_METHODS = ['fetch', 'get', 'post', 'put', 'delete', 'patch'] as const; diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_charts_theme.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_charts_theme.ts index 40d3d68379094..a2be1b90f4f5c 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_charts_theme.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_charts_theme.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { PartialTheme } from '@elastic/charts'; +import type { PartialTheme } from '@elastic/charts'; import { useProfilingDependencies } from '../components/contexts/profiling_dependencies/use_profiling_dependencies'; const profilingThemeOverrides: PartialTheme = { diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_params.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_params.ts index 7c4c1f8beaecd..af6f1904097dc 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_params.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_params.ts @@ -4,9 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { PathsOf, TypeOf, useParams } from '@kbn/typed-react-router-config'; -import { ValuesType } from 'utility-types'; -import { ProfilingRoutes } from '../routing'; +import type { PathsOf, TypeOf } from '@kbn/typed-react-router-config'; +import { useParams } from '@kbn/typed-react-router-config'; +import type { ValuesType } from 'utility-types'; +import type { ProfilingRoutes } from '../routing'; export function useProfilingParams>( path: T, diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_route_path.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_route_path.ts index 91859984be453..5d70896448a0d 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_route_path.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_route_path.ts @@ -5,8 +5,9 @@ * 2.0. */ -import { PathsOf, useRoutePath } from '@kbn/typed-react-router-config'; -import { ProfilingRoutes } from '../routing'; +import type { PathsOf } from '@kbn/typed-react-router-config'; +import { useRoutePath } from '@kbn/typed-react-router-config'; +import type { ProfilingRoutes } from '../routing'; export function useProfilingRoutePath(): PathsOf { return useRoutePath() as PathsOf; diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_router.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_router.ts index 0aa31af63dfa5..8457fb8ef05fb 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_router.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_profiling_router.ts @@ -5,10 +5,11 @@ * 2.0. */ -import { PathsOf, TypeOf, TypeAsArgs } from '@kbn/typed-react-router-config'; +import type { PathsOf, TypeOf, TypeAsArgs } from '@kbn/typed-react-router-config'; import { useHistory } from 'react-router-dom'; import { useProfilingDependencies } from '../components/contexts/profiling_dependencies/use_profiling_dependencies'; -import { ProfilingRouter, profilingRouter, ProfilingRoutes } from '../routing'; +import type { ProfilingRouter, ProfilingRoutes } from '../routing'; +import { profilingRouter } from '../routing'; export interface StatefulProfilingRouter extends ProfilingRouter { push>( diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range.ts index 3fc0552c582c8..e0a9f260197b1 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range.ts @@ -6,7 +6,7 @@ */ import { useMemo } from 'react'; -import { TimeRange } from '../../common/types'; +import type { TimeRange } from '../../common/types'; import { getNextTimeRange } from '../utils/get_next_time_range'; import { useTimeRangeContext } from './use_time_range_context'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range_async.ts b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range_async.ts index 37debb0dc486f..49dd7b48eade2 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range_async.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/hooks/use_time_range_async.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { UseAsync, useAsync } from './use_async'; +import type { UseAsync } from './use_async'; +import { useAsync } from './use_async'; import { useTimeRangeContext } from './use_time_range_context'; export const useTimeRangeAsync: UseAsync = (fn, dependencies) => { diff --git a/x-pack/solutions/observability/plugins/profiling/public/plugin.ts b/x-pack/solutions/observability/plugins/profiling/public/plugin.ts index 752b9c92a2195..bdb69f2a11b5b 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/plugin.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/plugin.ts @@ -5,23 +5,23 @@ * 2.0. */ -import { +import type { AppMountParameters, AppUpdater, CoreSetup, CoreStart, - DEFAULT_APP_CATEGORIES, Plugin, } from '@kbn/core/public'; +import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -import { NavigationSection } from '@kbn/observability-shared-plugin/public'; +import type { NavigationSection } from '@kbn/observability-shared-plugin/public'; import type { Location } from 'history'; import { BehaviorSubject, combineLatest, from, map, take } from 'rxjs'; import { OBLT_PROFILING_APP_ID } from '@kbn/deeplinks-observability'; import { registerEmbeddables } from './embeddables/register_embeddables'; import { getServices } from './services'; import type { ProfilingPluginPublicSetupDeps, ProfilingPluginPublicStartDeps } from './types'; -import { ProfilingEmbeddablesDependencies } from './embeddables/profiling_embeddable_provider'; +import type { ProfilingEmbeddablesDependencies } from './embeddables/profiling_embeddable_provider'; export type ProfilingPluginSetup = void; export type ProfilingPluginStart = void; diff --git a/x-pack/solutions/observability/plugins/profiling/public/routing/route_breadcrumb.tsx b/x-pack/solutions/observability/plugins/profiling/public/routing/route_breadcrumb.tsx index f49c5a2fc2aca..18166f583483e 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/routing/route_breadcrumb.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/routing/route_breadcrumb.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import type React from 'react'; import { useProfilingDependencies } from '../components/contexts/profiling_dependencies/use_profiling_dependencies'; import { useRouteBreadcrumb } from '../components/contexts/route_breadcrumbs_context/use_route_breadcrumb'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/routing/router_error_boundary.tsx b/x-pack/solutions/observability/plugins/profiling/public/routing/router_error_boundary.tsx index 0134f70ab1ec0..3e72c3b265873 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/routing/router_error_boundary.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/routing/router_error_boundary.tsx @@ -11,7 +11,7 @@ import React from 'react'; import { NotFoundPrompt } from '@kbn/shared-ux-prompt-not-found'; import { useLocation } from 'react-router-dom'; import { i18n } from '@kbn/i18n'; -import { ProfilingPluginPublicStartDeps } from '../types'; +import type { ProfilingPluginPublicStartDeps } from '../types'; export function RouterErrorBoundary({ children }: { children?: React.ReactNode }) { const location = useLocation(); diff --git a/x-pack/solutions/observability/plugins/profiling/public/services.ts b/x-pack/solutions/observability/plugins/profiling/public/services.ts index 67fde58c615d6..e4c03ba796992 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/services.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/services.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { HttpFetchQuery } from '@kbn/core/public'; +import type { HttpFetchQuery } from '@kbn/core/public'; +import type { TopNFunctions } from '@kbn/profiling-utils'; import { createFlameGraph, - TopNFunctions, type BaseFlameGraph, type ElasticFlameGraph, } from '@kbn/profiling-utils'; @@ -19,9 +19,9 @@ import type { StorageExplorerSummaryAPIResponse, StorageHostDetailsAPIResponse, } from '../common/storage_explorer'; -import { TopNResponse } from '../common/topn'; +import type { TopNResponse } from '../common/topn'; import type { SetupDataCollectionInstructions } from '../server/routes/setup/get_cloud_setup_instructions'; -import { AutoAbortedHttpService } from './hooks/use_auto_aborted_http_client'; +import type { AutoAbortedHttpService } from './hooks/use_auto_aborted_http_client'; export interface APMTransactionsPerService { [serviceName: string]: { diff --git a/x-pack/solutions/observability/plugins/profiling/public/types.ts b/x-pack/solutions/observability/plugins/profiling/public/types.ts index 31532150cc1fd..9ad6036a44439 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/types.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/types.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { +import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { DataViewsPublicPluginSetup, DataViewsPublicPluginStart, } from '@kbn/data-views-plugin/public'; @@ -13,14 +13,14 @@ import type { ObservabilityPublicSetup, ObservabilityPublicStart, } from '@kbn/observability-plugin/public'; -import { +import type { ObservabilitySharedPluginSetup, ObservabilitySharedPluginStart, } from '@kbn/observability-shared-plugin/public/plugin'; -import { ChartsPluginSetup, ChartsPluginStart } from '@kbn/charts-plugin/public'; +import type { ChartsPluginSetup, ChartsPluginStart } from '@kbn/charts-plugin/public'; import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; -import { +import type { ObservabilityAIAssistantPublicSetup, ObservabilityAIAssistantPublicStart, } from '@kbn/observability-ai-assistant-plugin/public'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/utils/get_flamegraph_model/index.ts b/x-pack/solutions/observability/plugins/profiling/public/utils/get_flamegraph_model/index.ts index 614c17810a626..80f05ec04b2b8 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/utils/get_flamegraph_model/index.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/utils/get_flamegraph_model/index.ts @@ -4,12 +4,12 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ColumnarViewModel } from '@elastic/charts'; +import type { ColumnarViewModel } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import d3 from 'd3'; import { compact, range, sum, uniqueId } from 'lodash'; -import { describeFrameType, FrameType } from '@kbn/profiling-utils'; -import type { ElasticFlameGraph } from '@kbn/profiling-utils'; +import { describeFrameType } from '@kbn/profiling-utils'; +import type { ElasticFlameGraph, FrameType } from '@kbn/profiling-utils'; import { createColumnarViewModel } from '../../../common/columnar_view_model'; import { FRAME_TYPE_COLOR_MAP, rgbToRGBA } from '../../../common/frame_type_colors'; import { ComparisonMode } from '../../components/normalization_menu'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/differential_flame_graph_search_panel.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/differential_flame_graph_search_panel.tsx index 3b737eb4498af..91a7c3f37ae2c 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/differential_flame_graph_search_panel.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/differential_flame_graph_search_panel.tsx @@ -10,10 +10,10 @@ import { useProfilingParams } from '../../../hooks/use_profiling_params'; import { useProfilingRouter } from '../../../hooks/use_profiling_router'; import { useProfilingRoutePath } from '../../../hooks/use_profiling_route_path'; import { PrimaryAndComparisonSearchBar } from '../../../components/primary_and_comparison_search_bar'; +import type { NormalizationOptions } from '../../../components/normalization_menu'; import { ComparisonMode, NormalizationMode, - NormalizationOptions, NormalizationMenu, } from '../../../components/normalization_menu'; import { DifferentialComparisonMode } from '../../../components/differential_comparison_mode'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/index.tsx index 4c87cfdab5f28..c60b4eb514fcd 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/differential_flamegraphs/index.tsx @@ -10,7 +10,8 @@ import { profilingShowErrorFrames } from '@kbn/observability-plugin/common'; import { AsyncComponent } from '../../../components/async_component'; import { useProfilingDependencies } from '../../../components/contexts/profiling_dependencies/use_profiling_dependencies'; import { FlameGraph } from '../../../components/flamegraph'; -import { NormalizationMode, NormalizationOptions } from '../../../components/normalization_menu'; +import type { NormalizationOptions } from '../../../components/normalization_menu'; +import { NormalizationMode } from '../../../components/normalization_menu'; import { useProfilingParams } from '../../../hooks/use_profiling_params'; import { useProfilingRoutePath } from '../../../hooks/use_profiling_route_path'; import { useProfilingRouter } from '../../../hooks/use_profiling_router'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/index.tsx index 09ff4806e628c..715ecead2b26b 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/flamegraphs/index.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiPageHeaderContentProps } from '@elastic/eui'; +import type { EuiPageHeaderContentProps } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { ProfilingAppPageTemplate } from '../../components/profiling_app_page_template'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/functions/differential_topn/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/functions/differential_topn/index.tsx index 33acae723b821..bdb153517d0fd 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/functions/differential_topn/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/functions/differential_topn/index.tsx @@ -9,15 +9,10 @@ import React from 'react'; import { AsyncComponent } from '../../../components/async_component'; import { useProfilingDependencies } from '../../../components/contexts/profiling_dependencies/use_profiling_dependencies'; import { FramesSummary } from '../../../components/frames_summary'; -import { - DifferentialTopNFunctionsGrid, - OnChangeSortParams, -} from '../../../components/differential_topn_functions_grid'; -import { - NormalizationMenu, - NormalizationMode, - NormalizationOptions, -} from '../../../components/normalization_menu'; +import type { OnChangeSortParams } from '../../../components/differential_topn_functions_grid'; +import { DifferentialTopNFunctionsGrid } from '../../../components/differential_topn_functions_grid'; +import type { NormalizationOptions } from '../../../components/normalization_menu'; +import { NormalizationMenu, NormalizationMode } from '../../../components/normalization_menu'; import { PrimaryAndComparisonSearchBar } from '../../../components/primary_and_comparison_search_bar'; import { AsyncStatus } from '../../../hooks/use_async'; import { useProfilingParams } from '../../../hooks/use_profiling_params'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/functions/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/functions/index.tsx index 2e4ddb32bc030..9ce7810820509 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/functions/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/functions/index.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiPageHeaderContentProps } from '@elastic/eui'; +import type { EuiPageHeaderContentProps } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { TopNComparisonFunctionSortField } from '@kbn/profiling-utils'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/functions/topn/index.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/functions/topn/index.tsx index b5c6d0b3a3a8b..af6191157be15 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/functions/topn/index.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/functions/topn/index.tsx @@ -4,9 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiDataGridSorting, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import type { EuiDataGridSorting } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import React from 'react'; -import { TopNFunctionSortField } from '@kbn/profiling-utils'; +import type { TopNFunctionSortField } from '@kbn/profiling-utils'; import { AsyncComponent } from '../../../components/async_component'; import { useProfilingDependencies } from '../../../components/contexts/profiling_dependencies/use_profiling_dependencies'; import { TopNFunctionsGrid } from '../../../components/topn_functions'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts b/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts index 5e2119a1243f9..9d31e1791ab20 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/get_stack_traces_tabs.ts @@ -6,10 +6,10 @@ */ import { i18n } from '@kbn/i18n'; -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { TopNType } from '@kbn/profiling-utils'; -import { StatefulProfilingRouter } from '../../hooks/use_profiling_router'; -import { ProfilingRoutes } from '../../routing'; +import type { StatefulProfilingRouter } from '../../hooks/use_profiling_router'; +import type { ProfilingRoutes } from '../../routing'; export function getStackTracesTabs({ path, diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/utils.ts b/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/utils.ts index 7aa4829d28164..4322819972be3 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/utils.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/views/stack_traces_view/utils.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { TypeOf } from '@kbn/typed-react-router-config'; +import type { TypeOf } from '@kbn/typed-react-router-config'; import { getFieldNameForTopNType, TopNType } from '@kbn/profiling-utils'; -import { ProfilingRoutes } from '../../routing'; +import type { ProfilingRoutes } from '../../routing'; export function getTracesViewRouteParams({ query, diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/grouped_index_details_chart.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/grouped_index_details_chart.tsx index 2feb7230d358a..a0b131296a7e7 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/grouped_index_details_chart.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/grouped_index_details_chart.tsx @@ -5,7 +5,8 @@ * 2.0. */ -import { Chart, Datum, Partition, Position, Settings } from '@elastic/charts'; +import type { Datum } from '@elastic/charts'; +import { Chart, Partition, Position, Settings } from '@elastic/charts'; import { euiPaletteColorBlind, EuiText, useEuiTheme } from '@elastic/eui'; import { asDynamicBytes } from '@kbn/observability-plugin/common'; import React from 'react'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/storage_details_table.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/storage_details_table.tsx index 16627d7c9fbaa..d08cbeca34af6 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/storage_details_table.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/storage_details_table.tsx @@ -5,17 +5,12 @@ * 2.0. */ -import { - CriteriaWithPagination, - EuiBasicTableColumn, - EuiInMemoryTable, - EuiText, - EuiTitle, -} from '@elastic/eui'; +import type { CriteriaWithPagination, EuiBasicTableColumn } from '@elastic/eui'; +import { EuiInMemoryTable, EuiText, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useMemo, useState } from 'react'; import { asDynamicBytes, asInteger } from '@kbn/observability-plugin/common'; -import { StorageDetailsPerIndex } from '../../../../common/storage_explorer'; +import type { StorageDetailsPerIndex } from '../../../../common/storage_explorer'; import { NOT_AVAILABLE_LABEL } from '../../../../common'; interface Props { diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/utils.ts b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/utils.ts index 1c7311471a770..88864d91829fe 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/utils.ts +++ b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/data_breakdown/utils.ts @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import { StorageGroupedIndexNames } from '../../../../common/storage_explorer'; +import type { StorageGroupedIndexNames } from '../../../../common/storage_explorer'; export function getGroupedIndexLabel(label: StorageGroupedIndexNames) { switch (label) { diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/host_breakdown/hosts_table.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/host_breakdown/hosts_table.tsx index 993636e72317c..0a5c6e2435c3d 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/host_breakdown/hosts_table.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/host_breakdown/hosts_table.tsx @@ -5,10 +5,9 @@ * 2.0. */ +import type { CriteriaWithPagination, EuiBasicTableColumn } from '@elastic/eui'; import { - CriteriaWithPagination, EuiBadge, - EuiBasicTableColumn, EuiFlexGroup, EuiFlexItem, EuiIcon, @@ -19,7 +18,7 @@ import { import { i18n } from '@kbn/i18n'; import { asDynamicBytes, asAbsoluteDateTime } from '@kbn/observability-plugin/common'; import React, { useMemo, useState } from 'react'; -import { StorageExplorerHostDetails } from '../../../../common/storage_explorer'; +import type { StorageExplorerHostDetails } from '../../../../common/storage_explorer'; import { LabelWithHint } from '../../../components/label_with_hint'; import { useProfilingParams } from '../../../hooks/use_profiling_params'; import { useProfilingRouter } from '../../../hooks/use_profiling_router'; diff --git a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/summary.tsx b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/summary.tsx index 7403c3e86fb9b..ac77c3f36c081 100644 --- a/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/summary.tsx +++ b/x-pack/solutions/observability/plugins/profiling/public/views/storage_explorer/summary.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { asDynamicBytes } from '@kbn/observability-plugin/common'; import React from 'react'; import { StackTracesDisplayOption, TopNType } from '@kbn/profiling-utils'; -import { StorageExplorerSummaryAPIResponse } from '../../../common/storage_explorer'; +import type { StorageExplorerSummaryAPIResponse } from '../../../common/storage_explorer'; import { useProfilingDependencies } from '../../components/contexts/profiling_dependencies/use_profiling_dependencies'; import { LabelWithHint } from '../../components/label_with_hint'; import { useProfilingParams } from '../../hooks/use_profiling_params'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/index.ts b/x-pack/solutions/observability/plugins/profiling/server/index.ts index cbd429315cbb5..44df88d9cc6ca 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/index.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import type { PluginConfigDescriptor, PluginInitializerContext } from '@kbn/core/server'; /** diff --git a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/cluster_settings.ts b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/cluster_settings.ts index b1b2fb8a24724..5699fd0b79147 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/cluster_settings.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/cluster_settings.ts @@ -6,7 +6,7 @@ */ import { MAX_BUCKETS } from '@kbn/profiling-data-access-plugin/common'; -import { ProfilingSetupOptions } from '@kbn/profiling-data-access-plugin/common/setup'; +import type { ProfilingSetupOptions } from '@kbn/profiling-data-access-plugin/common/setup'; export async function setMaximumBuckets({ client }: ProfilingSetupOptions) { await client.getEsClient().cluster.putSettings({ diff --git a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.test.ts b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.test.ts index 95b20eab2bec1..d182117b4dd79 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.test.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PackageInputType } from '../..'; +import type { PackageInputType } from '../..'; import { getVarsFor } from './fleet_policies'; const secretTokenRegex = /^[a-zA-Z0-9]+$/; diff --git a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.ts b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.ts index 263062366eb45..2ad0e6825231f 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/fleet_policies.ts @@ -13,8 +13,8 @@ import { SYMBOLIZER_PACKAGE_POLICY_NAME, } from '@kbn/profiling-data-access-plugin/common'; import { omit } from 'lodash'; -import { PackageInputType } from '../..'; -import { ProfilingCloudSetupOptions } from './types'; +import type { PackageInputType } from '../..'; +import type { ProfilingCloudSetupOptions } from './types'; const CLOUD_AGENT_POLICY_ID = 'policy-elastic-agent-on-cloud'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/get_has_setup_privileges.ts b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/get_has_setup_privileges.ts index 8696c97dabd31..ad4a0879d9c88 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/get_has_setup_privileges.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/get_has_setup_privileges.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { KibanaRequest } from '@kbn/core/server'; +import type { KibanaRequest } from '@kbn/core/server'; import { INTEGRATIONS_PLUGIN_ID, PLUGIN_ID as FLEET_PLUGIN_ID } from '@kbn/fleet-plugin/common'; import { ApiOperation } from '@kbn/security-plugin-types-server'; -import { ProfilingPluginStartDeps } from '../../types'; +import type { ProfilingPluginStartDeps } from '../../types'; export async function getHasSetupPrivileges({ securityPluginStart, diff --git a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/types.ts b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/types.ts index 0ef5a5a4dd826..ca470785f2135 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/lib/setup/types.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/lib/setup/types.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { ProfilingCloudSetupOptions as BaseProfilingCloudSetupOptions } from '@kbn/profiling-data-access-plugin/common'; -import { ProfilingConfig } from '../..'; +import type { ProfilingCloudSetupOptions as BaseProfilingCloudSetupOptions } from '@kbn/profiling-data-access-plugin/common'; +import type { ProfilingConfig } from '../..'; export interface ProfilingCloudSetupOptions extends BaseProfilingCloudSetupOptions { config: ProfilingConfig; diff --git a/x-pack/solutions/observability/plugins/profiling/server/plugin.ts b/x-pack/solutions/observability/plugins/profiling/server/plugin.ts index 27fbc4f958da1..4bf8e32c754ea 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/plugin.ts @@ -5,11 +5,17 @@ * 2.0. */ -import { CoreSetup, CoreStart, Logger, Plugin, PluginInitializerContext } from '@kbn/core/server'; -import { ProfilingConfig } from '.'; +import type { + CoreSetup, + CoreStart, + Logger, + Plugin, + PluginInitializerContext, +} from '@kbn/core/server'; +import type { ProfilingConfig } from '.'; import { PROFILING_FEATURE, PROFILING_SERVER_FEATURE_ID } from './feature'; import { registerRoutes } from './routes'; -import { +import type { ProfilingPluginSetup, ProfilingPluginSetupDeps, ProfilingPluginStart, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts index 7ad001831c0e4..9dc85ac8969b8 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/apm.ts @@ -5,10 +5,12 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { termQuery } from '@kbn/observability-plugin/server'; import { keyBy } from 'lodash'; -import { IDLE_SOCKET_TIMEOUT, RouteRegisterParameters } from '.'; +import type { RouteRegisterParameters } from '.'; +import { IDLE_SOCKET_TIMEOUT } from '.'; import { getRoutePaths } from '../../common'; import { handleRouteHandlerError } from '../utils/handle_route_error_handler'; import { getClient } from './compat'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/compat.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/compat.ts index 6969e84bff6e7..dd75512252e1e 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/compat.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/compat.ts @@ -11,7 +11,7 @@ // to address the incompatibilities between those two versions. import type { ElasticsearchClient } from '@kbn/core/server'; -import { ProfilingRequestHandlerContext } from '../types'; +import type { ProfilingRequestHandlerContext } from '../types'; export async function getClient( context: ProfilingRequestHandlerContext diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.test.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.test.ts index e4e527082aade..6d19f1ae9308e 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.test.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { DownsampledEventsIndex, getSampledTraceEventsIndex } from './downsampling'; +import type { DownsampledEventsIndex } from './downsampling'; +import { getSampledTraceEventsIndex } from './downsampling'; describe('Using down-sampled indexes', () => { test('getSampledTraceEventsIndex', () => { diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.ts index 2c0fe5dc6aee0..12399298fe8d2 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/downsampling.ts @@ -6,8 +6,8 @@ */ import type { Logger } from '@kbn/core/server'; -import { ProfilingESClient } from '../utils/create_profiling_es_client'; -import { ProjectTimeQuery } from './query'; +import type { ProfilingESClient } from '../utils/create_profiling_es_client'; +import type { ProjectTimeQuery } from './query'; export interface DownsampledEventsIndex { name: string; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/flamechart.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/flamechart.ts index 2b318e57eb364..d25e1de41aa94 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/flamechart.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/flamechart.ts @@ -7,7 +7,8 @@ import { schema } from '@kbn/config-schema'; import { kqlQuery } from '@kbn/observability-plugin/server'; -import { IDLE_SOCKET_TIMEOUT, RouteRegisterParameters } from '.'; +import type { RouteRegisterParameters } from '.'; +import { IDLE_SOCKET_TIMEOUT } from '.'; import { getRoutePaths } from '../../common'; import { handleRouteHandlerError } from '../utils/handle_route_error_handler'; import { getClient } from './compat'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/functions.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/functions.ts index 1689e707a9d80..9acd9026b0893 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/functions.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/functions.ts @@ -5,10 +5,12 @@ * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import { kqlQuery } from '@kbn/observability-plugin/server'; import { profilingFetchTopNFunctionsFromStacktraces } from '@kbn/observability-plugin/common'; -import { IDLE_SOCKET_TIMEOUT, RouteRegisterParameters } from '.'; +import type { RouteRegisterParameters } from '.'; +import { IDLE_SOCKET_TIMEOUT } from '.'; import { getRoutePaths } from '../../common'; import { handleRouteHandlerError } from '../utils/handle_route_error_handler'; import { getClient } from './compat'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/index.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/index.ts index 74e6e3b71be90..da9d1eb22affa 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/index.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/index.ts @@ -8,14 +8,14 @@ import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { KibanaRequest } from '@kbn/core-http-server'; import type { IRouter, Logger } from '@kbn/core/server'; -import { ProfilingConfig } from '..'; -import { +import type { ProfilingConfig } from '..'; +import type { ProfilingPluginSetupDeps, ProfilingPluginStartDeps, ProfilingRequestHandlerContext, TelemetryUsageCounter, } from '../types'; -import { ProfilingESClient } from '../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../utils/create_profiling_es_client'; import { registerTopNFunctionsAPMTransactionsRoute } from './apm'; import { registerFlameChartSearchRoute } from './flamechart'; import { registerTopNFunctionsSearchRoute } from './functions'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/query.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/query.ts index 79520b0520ffb..a160a7be82387 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/query.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/query.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslBoolQuery } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslBoolQuery } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { kqlQuery } from '@kbn/observability-plugin/server'; import { ProfilingESField } from '@kbn/profiling-utils'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/search_stacktraces.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/search_stacktraces.ts index a8f994842bc4f..4df550ce9dd3d 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/search_stacktraces.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/search_stacktraces.ts @@ -5,8 +5,8 @@ * 2.0. */ import { decodeStackTraceResponse } from '@kbn/profiling-utils'; -import { ProfilingESClient } from '../utils/create_profiling_es_client'; -import { ProjectTimeQuery } from './query'; +import type { ProfilingESClient } from '../utils/create_profiling_es_client'; +import type { ProjectTimeQuery } from './query'; export async function searchStackTraces({ client, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_cloud_setup_instructions.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_cloud_setup_instructions.ts index 5fd6513e15dff..4acd25472c18f 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_cloud_setup_instructions.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_cloud_setup_instructions.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { SavedObjectsClientContract } from '@kbn/core/server'; -import { PackagePolicyClient } from '@kbn/fleet-plugin/server'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { PackagePolicyClient } from '@kbn/fleet-plugin/server'; import { fetchFindLatestPackageOrThrow } from '@kbn/fleet-plugin/server/services/epm/registry'; import { getCollectorPolicy, getSymbolizerPolicy } from '@kbn/profiling-data-access-plugin/common'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_self_managed_instructions.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_self_managed_instructions.ts index edd62bbc85aef..6b0948917665e 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_self_managed_instructions.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/get_self_managed_instructions.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SetupDataCollectionInstructions } from './get_cloud_setup_instructions'; +import type { SetupDataCollectionInstructions } from './get_cloud_setup_instructions'; export function getSelfManagedInstructions({ stackVersion, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/route.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/route.ts index a5bc8d3187bda..968be5d3703f2 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/route.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/route.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { ProfilingSetupOptions } from '@kbn/profiling-data-access-plugin/common/setup'; +import type { ProfilingSetupOptions } from '@kbn/profiling-data-access-plugin/common/setup'; import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; -import { RouteRegisterParameters } from '..'; +import type { RouteRegisterParameters } from '..'; import { getRoutePaths } from '../../../common'; import { getHasSetupPrivileges } from '../../lib/setup/get_has_setup_privileges'; import { handleRouteHandlerError } from '../../utils/handle_route_error_handler'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_cloud.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_cloud.ts index 5e282e21e4c76..c119fa85c8d28 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_cloud.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_cloud.ts @@ -5,14 +5,14 @@ * 2.0. */ -import { CloudSetupState } from '@kbn/profiling-data-access-plugin/common/cloud_setup'; +import type { CloudSetupState } from '@kbn/profiling-data-access-plugin/common/cloud_setup'; import { enableResourceManagement, setMaximumBuckets } from '../../lib/setup/cluster_settings'; import { createCollectorPackagePolicy, createSymbolizerPackagePolicy, removeProfilingFromApmPackagePolicy, } from '../../lib/setup/fleet_policies'; -import { ProfilingCloudSetupOptions } from '../../lib/setup/types'; +import type { ProfilingCloudSetupOptions } from '../../lib/setup/types'; export async function setupCloud({ setupState, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_self_managed.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_self_managed.ts index 4f15624f4c6af..4a31bafdd952d 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_self_managed.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/setup/setup_self_managed.ts @@ -5,7 +5,10 @@ * 2.0. */ -import { ProfilingSetupOptions, SetupState } from '@kbn/profiling-data-access-plugin/common/setup'; +import type { + ProfilingSetupOptions, + SetupState, +} from '@kbn/profiling-data-access-plugin/common/setup'; import { enableResourceManagement, setMaximumBuckets } from '../../lib/setup/cluster_settings'; export async function setupSelfManaged({ diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_daily_data_generation.size.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_daily_data_generation.size.ts index afab5be7329c9..19ce433b7aed6 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_daily_data_generation.size.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_daily_data_generation.size.ts @@ -4,9 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; +import type { IndicesStatsIndicesStats } from '@elastic/elasticsearch/lib/api/types'; import { kqlQuery } from '@kbn/observability-plugin/server'; -import { ProfilingESClient } from '../../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../../utils/create_profiling_es_client'; export function getEstimatedSizeForDocumentsInIndex({ allIndicesStats, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_breakdown_size_timeseries.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_breakdown_size_timeseries.ts index 88e6a365c80da..724654ff92a09 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_breakdown_size_timeseries.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_breakdown_size_timeseries.ts @@ -8,12 +8,12 @@ import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProfilingESField } from '@kbn/profiling-utils'; import { computeBucketWidthFromTimeRangeAndBucketCount } from '../../../common/histogram'; +import type { StorageExplorerHostDetailsTimeseries } from '../../../common/storage_explorer'; import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, - StorageExplorerHostDetailsTimeseries, } from '../../../common/storage_explorer'; -import { ProfilingESClient } from '../../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../../utils/create_profiling_es_client'; import { getEstimatedSizeForDocumentsInIndex } from './get_daily_data_generation.size'; import { allIndices, getIndicesStats } from './get_indices_stats'; import { getProfilingHostsDetailsById } from './get_profiling_hosts_details_by_id'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_details.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_details.ts index 565fc76210516..46df7974c2161 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_details.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_details.ts @@ -7,12 +7,12 @@ import { kqlQuery, termQuery } from '@kbn/observability-plugin/server'; import { ProfilingESField } from '@kbn/profiling-utils'; +import type { StorageExplorerHostDetails } from '../../../common/storage_explorer'; import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, - StorageExplorerHostDetails, } from '../../../common/storage_explorer'; -import { ProfilingESClient } from '../../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../../utils/create_profiling_es_client'; import { getEstimatedSizeForDocumentsInIndex } from './get_daily_data_generation.size'; import { allIndices, getIndicesStats } from './get_indices_stats'; import { getProfilingHostsDetailsById } from './get_profiling_hosts_details_by_id'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_distinct_probabilistic_count.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_distinct_probabilistic_count.ts index ba8931491d678..b52107c976120 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_distinct_probabilistic_count.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_host_distinct_probabilistic_count.ts @@ -10,7 +10,7 @@ import { IndexLifecyclePhaseSelectOption, indexLifeCyclePhaseToDataTier, } from '../../../common/storage_explorer'; -import { ProfilingESClient } from '../../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../../utils/create_profiling_es_client'; export async function getHostAndDistinctProbabilisticCount({ client, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_indices_stats.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_indices_stats.ts index eb10cd30ec40a..014e2e85183f5 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_indices_stats.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_indices_stats.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; export const symbolsIndices = [ 'profiling-symbols-global', diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_profiling_hosts_details_by_id.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_profiling_hosts_details_by_id.ts index a2d2c7b2abcd1..335ad08f4149d 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_profiling_hosts_details_by_id.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_profiling_hosts_details_by_id.ts @@ -7,7 +7,7 @@ import { kqlQuery } from '@kbn/observability-plugin/server'; import { keyBy } from 'lodash'; import { ProfilingESField } from '@kbn/profiling-utils'; -import { ProfilingESClient } from '../../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../../utils/create_profiling_es_client'; interface HostDetails { hostId: string; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_grouped_by_index.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_grouped_by_index.ts index 2a4c741a9eaa4..4cf4e250bf6db 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_grouped_by_index.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_grouped_by_index.ts @@ -4,12 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import { groupBy, sumBy } from 'lodash'; -import { - IndexLifecyclePhaseSelectOption, - StorageGroupedIndexNames, -} from '../../../common/storage_explorer'; +import type { StorageGroupedIndexNames } from '../../../common/storage_explorer'; +import { IndexLifecyclePhaseSelectOption } from '../../../common/storage_explorer'; import { getIndicesLifecycleStatus, getIndicesStats, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_per_index.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_per_index.ts index ca26ec0afc81e..1709c3da6c57a 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_per_index.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/get_storage_details_per_index.ts @@ -5,11 +5,9 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; -import { - IndexLifecyclePhaseSelectOption, - StorageDetailsPerIndex, -} from '../../../common/storage_explorer'; +import type { ElasticsearchClient } from '@kbn/core/server'; +import type { StorageDetailsPerIndex } from '../../../common/storage_explorer'; +import { IndexLifecyclePhaseSelectOption } from '../../../common/storage_explorer'; import { getIndicesLifecycleStatus, getIndicesStats, diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/route.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/route.ts index d3148fd9ff03a..04cb9e0d2981d 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/route.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/storage_explorer/route.ts @@ -6,12 +6,10 @@ */ import { schema } from '@kbn/config-schema'; import { sumBy, values } from 'lodash'; -import { RouteRegisterParameters } from '..'; +import type { RouteRegisterParameters } from '..'; import { getRoutePaths } from '../../../common'; -import { - IndexLifecyclePhaseSelectOption, - StorageExplorerSummaryAPIResponse, -} from '../../../common/storage_explorer'; +import type { StorageExplorerSummaryAPIResponse } from '../../../common/storage_explorer'; +import { IndexLifecyclePhaseSelectOption } from '../../../common/storage_explorer'; import { getClient } from '../compat'; import { getDailyDataGenerationSize } from './get_daily_data_generation.size'; import { getHostBreakdownSizeTimeseries } from './get_host_breakdown_size_timeseries'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/topn.test.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/topn.test.ts index b576c3b54d144..607a1d3dd79e8 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/topn.test.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/topn.test.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { AggregationsAggregationContainer } from '@elastic/elasticsearch/lib/api/types'; +import type { AggregationsAggregationContainer } from '@elastic/elasticsearch/lib/api/types'; import { coreMock } from '@kbn/core/server/mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { ProfilingESField } from '@kbn/profiling-utils'; -import { ProfilingESClient } from '../utils/create_profiling_es_client'; +import type { ProfilingESClient } from '../utils/create_profiling_es_client'; import { topNElasticSearchQuery } from './topn'; const anyQuery = 'any::query'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/routes/topn.ts b/x-pack/solutions/observability/plugins/profiling/server/routes/topn.ts index a675cc8e4b31a..ca3385cf487ed 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/routes/topn.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/routes/topn.ts @@ -14,11 +14,13 @@ import { TopNType, } from '@kbn/profiling-utils'; import { profilingShowErrorFrames } from '@kbn/observability-plugin/common'; -import { IDLE_SOCKET_TIMEOUT, RouteRegisterParameters } from '.'; +import type { RouteRegisterParameters } from '.'; +import { IDLE_SOCKET_TIMEOUT } from '.'; import { getRoutePaths, INDEX_EVENTS } from '../../common'; import { computeBucketWidthFromTimeRangeAndBucketCount } from '../../common/histogram'; -import { createTopNSamples, getTopNAggregationRequest, TopNResponse } from '../../common/topn'; -import { ProfilingESClient } from '../utils/create_profiling_es_client'; +import type { TopNResponse } from '../../common/topn'; +import { createTopNSamples, getTopNAggregationRequest } from '../../common/topn'; +import type { ProfilingESClient } from '../utils/create_profiling_es_client'; import { handleRouteHandlerError } from '../utils/handle_route_error_handler'; import { withProfilingSpan } from '../utils/with_profiling_span'; import { getClient } from './compat'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/types.ts b/x-pack/solutions/observability/plugins/profiling/server/types.ts index 78d92b18fdf06..3b0133db2b3e1 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/types.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/types.ts @@ -5,19 +5,19 @@ * 2.0. */ -import { CustomRequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; +import type { CustomRequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; import type { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import type { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; -import { SpacesPluginStart, SpacesPluginSetup } from '@kbn/spaces-plugin/server'; -import { CloudSetup, CloudStart } from '@kbn/cloud-plugin/server'; -import { FleetSetupContract, FleetStartContract } from '@kbn/fleet-plugin/server'; -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { +import type { SpacesPluginStart, SpacesPluginSetup } from '@kbn/spaces-plugin/server'; +import type { CloudSetup, CloudStart } from '@kbn/cloud-plugin/server'; +import type { FleetSetupContract, FleetStartContract } from '@kbn/fleet-plugin/server'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import type { ProfilingDataAccessPluginSetup, ProfilingDataAccessPluginStart, } from '@kbn/profiling-data-access-plugin/server'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; -import { +import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; +import type { ApmDataAccessPluginSetup, ApmDataAccessPluginStart, } from '@kbn/apm-data-access-plugin/server'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/utils/create_profiling_es_client.ts b/x-pack/solutions/observability/plugins/profiling/server/utils/create_profiling_es_client.ts index 402314ba891e4..aca25abfd56f2 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/utils/create_profiling_es_client.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/utils/create_profiling_es_client.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { KibanaRequest } from '@kbn/core/server'; import { unwrapEsResponse } from '@kbn/observability-plugin/server'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { AggregationField, BaseFlameGraph, diff --git a/x-pack/solutions/observability/plugins/profiling/server/utils/handle_route_error_handler.ts b/x-pack/solutions/observability/plugins/profiling/server/utils/handle_route_error_handler.ts index 6e50953877550..3697705f2b2e4 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/utils/handle_route_error_handler.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/utils/handle_route_error_handler.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { KibanaResponseFactory } from '@kbn/core-http-server'; -import { Logger } from '@kbn/logging'; +import type { KibanaResponseFactory } from '@kbn/core-http-server'; +import type { Logger } from '@kbn/logging'; import { WrappedElasticsearchClientError } from '@kbn/observability-plugin/server'; import { errors } from '@elastic/elasticsearch'; diff --git a/x-pack/solutions/observability/plugins/profiling/server/utils/with_profiling_span.ts b/x-pack/solutions/observability/plugins/profiling/server/utils/with_profiling_span.ts index 6d366799780e7..201b9643cb49d 100644 --- a/x-pack/solutions/observability/plugins/profiling/server/utils/with_profiling_span.ts +++ b/x-pack/solutions/observability/plugins/profiling/server/utils/with_profiling_span.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { withSpan, SpanOptions, parseSpanOptions } from '@kbn/apm-utils'; +import type { SpanOptions } from '@kbn/apm-utils'; +import { withSpan, parseSpanOptions } from '@kbn/apm-utils'; export function withProfilingSpan( optionsOrName: SpanOptions | string, diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.test.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.test.ts index 3071177cab26e..4d80a7d47c3e6 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.test.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.test.ts @@ -5,11 +5,8 @@ * 2.0. */ -import { - areCloudResourcesSetup, - createDefaultCloudSetupState, - PartialCloudSetupState, -} from './cloud_setup'; +import type { PartialCloudSetupState } from './cloud_setup'; +import { areCloudResourcesSetup, createDefaultCloudSetupState } from './cloud_setup'; import { mergePartialSetupStates } from './setup'; const createCloudState = (available: boolean): PartialCloudSetupState => ({ cloud: { available } }); diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.ts index 1c03451cbd2b2..095f40c2c5e5e 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/cloud_setup.ts @@ -6,12 +6,8 @@ */ import type { RecursivePartial } from '@elastic/eui'; import type { PackagePolicyClient } from '@kbn/fleet-plugin/server'; -import { - areResourcesSetup, - createDefaultSetupState, - ProfilingSetupOptions, - SetupState, -} from './setup'; +import type { ProfilingSetupOptions, SetupState } from './setup'; +import { areResourcesSetup, createDefaultSetupState } from './setup'; export interface ProfilingCloudSetupOptions extends ProfilingSetupOptions { packagePolicyClient: PackagePolicyClient; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/cluster_settings.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/cluster_settings.ts index e1e65330f47d4..beff3dbeee34d 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/cluster_settings.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/cluster_settings.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PartialSetupState, ProfilingSetupOptions } from './setup'; +import type { PartialSetupState, ProfilingSetupOptions } from './setup'; export const MAX_BUCKETS = 150000; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/fleet_policies.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/fleet_policies.ts index ecdd2fc1cc684..5315ba450b7b5 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/fleet_policies.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/fleet_policies.ts @@ -7,9 +7,10 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import type { PackagePolicyClient } from '@kbn/fleet-plugin/server'; -import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, PackagePolicy } from '@kbn/fleet-plugin/common'; +import type { PackagePolicy } from '@kbn/fleet-plugin/common'; +import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { getApmPolicy } from './get_apm_policy'; -import { PartialCloudSetupState, ProfilingCloudSetupOptions } from './cloud_setup'; +import type { PartialCloudSetupState, ProfilingCloudSetupOptions } from './cloud_setup'; export const COLLECTOR_PACKAGE_POLICY_NAME = 'elastic-universal-profiling-collector'; export const SYMBOLIZER_PACKAGE_POLICY_NAME = 'elastic-universal-profiling-symbolizer'; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/has_profiling_data.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/has_profiling_data.ts index 1f62b6e1510a9..d51d1e67d641c 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/has_profiling_data.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/has_profiling_data.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PartialSetupState, ProfilingSetupOptions } from './setup'; +import type { PartialSetupState, ProfilingSetupOptions } from './setup'; export async function hasProfilingData({ clientWithProfilingAuth, diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/profiling_es_client.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/profiling_es_client.ts index 788cb0106861c..639b5ac5174cd 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/profiling_es_client.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/profiling_es_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ElasticsearchClient } from '@kbn/core/server'; import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.test.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.test.ts index 5b63b64732da8..175dbe62fce83 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.test.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.test.ts @@ -5,12 +5,8 @@ * 2.0. */ -import { - mergePartialSetupStates, - PartialSetupState, - areResourcesSetup, - createDefaultSetupState, -} from './setup'; +import type { PartialSetupState } from './setup'; +import { mergePartialSetupStates, areResourcesSetup, createDefaultSetupState } from './setup'; const createDataState = (available: boolean): PartialSetupState => ({ data: { available } }); diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.ts b/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.ts index de80da6c7532e..d2b23bea4a03f 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/common/setup.ts @@ -4,10 +4,10 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { RecursivePartial } from '@elastic/eui'; +import type { RecursivePartial } from '@elastic/eui'; import type { Logger, SavedObjectsClientContract } from '@kbn/core/server'; import { merge } from 'lodash'; -import { ProfilingESClient } from './profiling_es_client'; +import type { ProfilingESClient } from './profiling_es_client'; export interface ProfilingSetupOptions { client: ProfilingESClient; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/index.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/index.ts index c245297c86bd8..03b4656e2b68f 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/index.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/index.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { schema, TypeOf } from '@kbn/config-schema'; +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; import type { PluginInitializerContext } from '@kbn/core/server'; import type { ProfilingDataAccessPluginSetup, ProfilingDataAccessPluginStart } from './plugin'; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/plugin.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/plugin.ts index 12705b9508c30..f7e5b5a436104 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/plugin.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/plugin.ts @@ -12,10 +12,10 @@ import type { Plugin, PluginInitializerContext, } from '@kbn/core/server'; -import { ProfilingConfig } from '.'; +import type { ProfilingConfig } from '.'; import { registerServices } from './services/register_services'; import { createProfilingEsClient } from './utils/create_profiling_es_client'; -import { ProfilingPluginStartDeps } from './types'; +import type { ProfilingPluginStartDeps } from './types'; export type ProfilingDataAccessPluginSetup = ReturnType; export type ProfilingDataAccessPluginStart = ReturnType; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/fetch_flamechart/index.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/fetch_flamechart/index.ts index 5fe47a9e56079..9280cba74579f 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/fetch_flamechart/index.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/fetch_flamechart/index.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; import { profilingAWSCostDiscountRate, profilingCo2PerKWH, @@ -16,7 +16,7 @@ import { profilingAzureCostDiscountRate, } from '@kbn/observability-plugin/common'; import { percentToFactor } from '../../utils/percent_to_factor'; -import { RegisterServicesParams } from '../register_services'; +import type { RegisterServicesParams } from '../register_services'; export interface FetchFlamechartParams { esClient: ElasticsearchClient; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/es_functions.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/es_functions.ts index 2692af8f2fdc0..abda08a1a6a62 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/es_functions.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/es_functions.ts @@ -14,15 +14,11 @@ import { profilingAzureCostDiscountRate, profilingShowErrorFrames, } from '@kbn/observability-plugin/common'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; -import { - AggregationField, - convertTonsToKgs, - ESTopNFunctions, - TopNFunctions, -} from '@kbn/profiling-utils'; -import { RegisterServicesParams } from '../register_services'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; +import type { AggregationField, ESTopNFunctions, TopNFunctions } from '@kbn/profiling-utils'; +import { convertTonsToKgs } from '@kbn/profiling-utils'; +import type { RegisterServicesParams } from '../register_services'; import { percentToFactor } from '../../utils/percent_to_factor'; export interface FetchFunctionsParams { diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/index.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/index.ts index 5f3e8fae8c89b..fe1d8340931d7 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/index.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/functions/index.ts @@ -14,12 +14,12 @@ import { profilingAzureCostDiscountRate, profilingShowErrorFrames, } from '@kbn/observability-plugin/common'; -import { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; +import type { CoreRequestHandlerContext, ElasticsearchClient } from '@kbn/core/server'; import { createTopNFunctions } from '@kbn/profiling-utils'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { percentToFactor } from '../../utils/percent_to_factor'; import { withProfilingSpan } from '../../utils/with_profiling_span'; -import { RegisterServicesParams } from '../register_services'; +import type { RegisterServicesParams } from '../register_services'; import { searchStackTraces } from '../search_stack_traces'; export interface FetchFunctionsParams { diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/register_services.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/register_services.ts index 57cb21ee57a74..468451c46a706 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/register_services.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/register_services.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { CloudStart } from '@kbn/cloud-plugin/server'; -import { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { FleetStartContract } from '@kbn/fleet-plugin/server'; +import type { CloudStart } from '@kbn/cloud-plugin/server'; +import type { ElasticsearchClient, Logger } from '@kbn/core/server'; +import type { FleetStartContract } from '@kbn/fleet-plugin/server'; import { createFetchFlamechart } from './fetch_flamechart'; import { createGetStatusService } from './status'; -import { ProfilingESClient } from '../../common/profiling_es_client'; +import type { ProfilingESClient } from '../../common/profiling_es_client'; import { createFetchFunctions } from './functions'; import { createSetupState } from './setup_state'; import { createFetchESFunctions } from './functions/es_functions'; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/search_stack_traces/index.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/search_stack_traces/index.ts index 5ed44f9b0f6d0..d246ceaf96104 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/search_stack_traces/index.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/search_stack_traces/index.ts @@ -6,8 +6,8 @@ */ import { decodeStackTraceResponse } from '@kbn/profiling-utils'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ProfilingESClient } from '../../../common/profiling_es_client'; +import type { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { ProfilingESClient } from '../../../common/profiling_es_client'; interface Params { client: ProfilingESClient; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/cloud_setup_state.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/cloud_setup_state.ts index 3673e4191e3fc..ea7cc7fa7762d 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/cloud_setup_state.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/cloud_setup_state.ts @@ -5,9 +5,10 @@ * 2.0. */ -import { RecursivePartial } from '@elastic/eui'; -import { ProfilingCloudSetupOptions } from '../../../common'; -import { CloudSetupState, createDefaultCloudSetupState } from '../../../common/cloud_setup'; +import type { RecursivePartial } from '@elastic/eui'; +import type { ProfilingCloudSetupOptions } from '../../../common'; +import type { CloudSetupState } from '../../../common/cloud_setup'; +import { createDefaultCloudSetupState } from '../../../common/cloud_setup'; import { validateMaximumBuckets, validateResourceManagement, diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/index.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/index.ts index 6e1b62b28f85d..ada348dcf986d 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/index.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/index.ts @@ -4,11 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { IScopedClusterClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { IScopedClusterClient, SavedObjectsClientContract } from '@kbn/core/server'; import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; -import { CloudSetupStateType } from '../../../common/cloud_setup'; -import { SetupStateType } from '../../../common/setup'; -import { RegisterServicesParams } from '../register_services'; +import type { CloudSetupStateType } from '../../../common/cloud_setup'; +import type { SetupStateType } from '../../../common/setup'; +import type { RegisterServicesParams } from '../register_services'; import { cloudSetupState } from './cloud_setup_state'; import { selfManagedSetupState } from './self_managed_setup_state'; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/self_managed_setup_state.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/self_managed_setup_state.ts index ac7ff7ae7459e..1ea23616d4b2e 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/self_managed_setup_state.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/setup_state/self_managed_setup_state.ts @@ -10,12 +10,8 @@ import { validateResourceManagement, } from '../../../common/cluster_settings'; import { hasProfilingData } from '../../../common/has_profiling_data'; -import { - createDefaultSetupState, - mergePartialSetupStates, - ProfilingSetupOptions, - SetupState, -} from '../../../common/setup'; +import type { ProfilingSetupOptions, SetupState } from '../../../common/setup'; +import { createDefaultSetupState, mergePartialSetupStates } from '../../../common/setup'; export async function selfManagedSetupState(params: ProfilingSetupOptions): Promise { const state = createDefaultSetupState(); diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/status/index.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/status/index.ts index b7f791a166385..8042853bf81dd 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/services/status/index.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/services/status/index.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { IScopedClusterClient, SavedObjectsClientContract } from '@kbn/core/server'; -import { ProfilingStatus } from '@kbn/profiling-utils'; +import type { IScopedClusterClient, SavedObjectsClientContract } from '@kbn/core/server'; +import type { ProfilingStatus } from '@kbn/profiling-utils'; import { areCloudResourcesSetup } from '../../../common/cloud_setup'; import { areResourcesSetup } from '../../../common/setup'; -import { RegisterServicesParams } from '../register_services'; +import type { RegisterServicesParams } from '../register_services'; import { getSetupState } from '../setup_state'; export interface HasSetupParams { diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/types.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/types.ts index f7adb62b63b19..04eef1084033e 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/types.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/types.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { CloudStart } from '@kbn/cloud-plugin/server'; -import { FleetStartContract } from '@kbn/fleet-plugin/server'; +import type { CloudStart } from '@kbn/cloud-plugin/server'; +import type { FleetStartContract } from '@kbn/fleet-plugin/server'; export interface ProfilingPluginStartDeps { fleet?: FleetStartContract; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/create_profiling_es_client.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/create_profiling_es_client.ts index e80a36087b533..5e595a3ce0eb0 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/create_profiling_es_client.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/create_profiling_es_client.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ElasticsearchClient } from '@kbn/core/server'; +import type { ElasticsearchClient } from '@kbn/core/server'; import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { BaseFlameGraph, @@ -13,7 +13,7 @@ import type { ProfilingStatusResponse, StackTraceResponse, } from '@kbn/profiling-utils'; -import { ProfilingESClient } from '../../common/profiling_es_client'; +import type { ProfilingESClient } from '../../common/profiling_es_client'; import { unwrapEsResponse } from './unwrap_es_response'; import { withProfilingSpan } from './with_profiling_span'; diff --git a/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/with_profiling_span.ts b/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/with_profiling_span.ts index 6d366799780e7..201b9643cb49d 100644 --- a/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/with_profiling_span.ts +++ b/x-pack/solutions/observability/plugins/profiling_data_access/server/utils/with_profiling_span.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { withSpan, SpanOptions, parseSpanOptions } from '@kbn/apm-utils'; +import type { SpanOptions } from '@kbn/apm-utils'; +import { withSpan, parseSpanOptions } from '@kbn/apm-utils'; export function withProfilingSpan( optionsOrName: SpanOptions | string,