diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index ac9ccb04c68e2..c731227f3b53a 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -321,6 +321,7 @@ enabled: - x-pack/test/functional/apps/saved_objects_management/config.ts - x-pack/test/functional/apps/saved_query_management/config.ts - x-pack/test/functional/apps/security/config.ts + - x-pack/test/functional/apps/slo/embeddables/config.ts - x-pack/test/functional/apps/snapshot_restore/config.ts - x-pack/test/functional/apps/spaces/config.ts - x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts diff --git a/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml b/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml index db4ed5e38da4c..60bedaafba586 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml @@ -20,7 +20,7 @@ spec: spec: env: SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' - ES_SERVERLESS_IMAGE: latest + ES_SERVERLESS_IMAGE: docker.elastic.co/elasticsearch-ci/elasticsearch-serverless:latest ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' REPORT_FAILED_TESTS_TO_GITHUB: 'true' allow_rebuilds: true diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index 99f5c98a06c35..23e490e88ec10 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -17,8 +17,15 @@ agents: steps: - label: "Annotate runtime parameters" command: | - buildkite-agent annotate --context es-serverless-image --style info "ES Serverless image: $ES_SERVERLESS_IMAGE" buildkite-agent annotate --context kibana-commit --style info "Kibana build hash: $BUILDKITE_BRANCH / $BUILDKITE_COMMIT" + cat << EOF | buildkite-agent annotate --context es-serverless-image --style info + ES Serverless image: \`$ES_SERVERLESS_IMAGE\` + + To run this locally: + \`\`\` + node scripts/es serverless --image $ES_SERVERLESS_IMAGE + \`\`\` + EOF - group: "(:kibana: x :elastic:) Trigger Kibana Serverless suite" if: "build.env('SKIP_VERIFICATION') != '1' && build.env('SKIP_VERIFICATION') != 'true'" diff --git a/.buildkite/scripts/lifecycle/post_command.sh b/.buildkite/scripts/lifecycle/post_command.sh index 218184d36f65a..b22293dbcb8b6 100755 --- a/.buildkite/scripts/lifecycle/post_command.sh +++ b/.buildkite/scripts/lifecycle/post_command.sh @@ -43,7 +43,10 @@ if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then buildkite-agent artifact upload '.es/**/*.hprof' buildkite-agent artifact upload 'data/es_debug_*.tar.gz' - if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]]; then + if [[ $BUILDKITE_COMMAND_EXIT_STATUS -ne 0 ]] && \ + # Skip when triggered from elasticsearch's validation pipeline + [[ $BUILDKITE_TRIGGERED_FROM_BUILD_PIPELINE_SLUG != 'elasticsearch-serverless-intake' ]] + then echo "--- Run Failed Test Reporter" node scripts/report_failed_tests --build-url="${BUILDKITE_BUILD_URL}#${BUILDKITE_JOB_ID}" 'target/junit/**/*.xml' fi diff --git a/.buildkite/scripts/steps/serverless/build_and_deploy.sh b/.buildkite/scripts/steps/serverless/build_and_deploy.sh index 8fb982c11d9bf..88ce6d9ea3bb4 100644 --- a/.buildkite/scripts/steps/serverless/build_and_deploy.sh +++ b/.buildkite/scripts/steps/serverless/build_and_deploy.sh @@ -154,7 +154,7 @@ $BUILDKITE_PULL_REQUEST ### Further details -Caused by @$GITHUB_PR_TRIGGER_USER using the github label in https://github.com/elastic/kibana/pull/$BUILDKITE_PULL_REQUEST +Caused by the GitHub label 'ci:project-deploy-observability' in https://github.com/elastic/kibana/pull/$BUILDKITE_PULL_REQUEST EOF GH_TOKEN="$GITHUB_TOKEN" \ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c503ad05d345d..de091b2a82ede 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -532,6 +532,7 @@ examples/locator_examples @elastic/appex-sharedux examples/locator_explorer @elastic/appex-sharedux packages/kbn-logging @elastic/kibana-core packages/kbn-logging-mocks @elastic/kibana-core +x-pack/plugins/observability_solution/logs_data_access @elastic/obs-ux-logs-team x-pack/plugins/observability_solution/logs_explorer @elastic/obs-ux-logs-team x-pack/plugins/observability_solution/logs_shared @elastic/obs-ux-logs-team x-pack/plugins/logstash @elastic/logstash @@ -1028,10 +1029,9 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql ### Observability Plugins -# Observability robots -/.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots -/.github/workflows/undeploy-my-kibana.yml @elastic/observablt-robots -/.github/workflows/oblt-github-commands @elastic/observablt-robots +# Observability AI Assistant +x-pack/test/observability_ai_assistant_api_integration @elastic/obs-ai-assistant +x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant # Infra Monitoring ## This plugin mostly contains the codebase for the infra services, but also includes some code for the Logs UI app. @@ -1686,6 +1686,11 @@ x-pack/plugins/observability_solution/synthetics/server/saved_objects/saved_obje x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_monitor.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security x-pack/plugins/observability_solution/synthetics/server/saved_objects/synthetics_param.ts @elastic/obs-ux-infra_services-team @elastic/kibana-security +# Specialised GitHub workflows for the Observability robots +/.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots @elastic/kibana-operations +/.github/workflows/oblt-github-commands @elastic/observablt-robots @elastic/kibana-operations +/.github/workflows/undeploy-my-kibana.yml @elastic/observablt-robots @elastic/kibana-operations + #### ## These rules are always last so they take ultimate priority over everything else #### diff --git a/.github/workflows/undeploy-my-kibana.yml b/.github/workflows/undeploy-my-kibana.yml index a288702cbb537..778ab4c73e302 100644 --- a/.github/workflows/undeploy-my-kibana.yml +++ b/.github/workflows/undeploy-my-kibana.yml @@ -10,7 +10,7 @@ name: undeploy-my-kibana on: - pull_request: + pull_request_target: types: [closed] permissions: diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 709ce8c9c1674..c97a28a953e22 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 173ed91a9a850..472ab50fccc8e 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index b23807e92e502..19cf332deff9a 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 49139a3b4058a..9c0942af8f184 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 095bc4d551205..4f331e34794a4 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index 284c66b4eb5c9..d7cac23f6082c 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -418,7 +418,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/index_pattern\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/samples\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/error/{errorId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search 2023-10-31\" | \"POST /api/apm/services/{serviceName}/annotation 2023-10-31\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/services/{serviceName}/alerts_count\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/transactions\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /api/apm/settings/agent-configuration 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/view 2023-10-31\" | \"DELETE /api/apm/settings/agent-configuration 2023-10-31\" | \"PUT /api/apm/settings/agent-configuration 2023-10-31\" | \"POST /api/apm/settings/agent-configuration/search 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/environments 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/agent_name 2023-10-31\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps 2023-10-31\" | \"POST /api/apm/sourcemaps 2023-10-31\" | \"DELETE /api/apm/sourcemaps/{id} 2023-10-31\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema 2023-10-31\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys 2023-10-31\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/get_latest_agent_versions\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate\" | \"GET /internal/apm/mobile-services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/mobile-services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/error_terms\" | \"POST /internal/apm/mobile-services/{serviceName}/crashes/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/distribution\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\" | \"GET /internal/apm/mobile-services/{serviceName}/most_used_charts\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/sessions\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/http_requests\" | \"GET /internal/apm/mobile-services/{serviceName}/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/location/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/terms\" | \"GET /internal/apm/mobile-services/{serviceName}/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/detailed_statistics\" | \"GET /internal/apm/diagnostics\" | \"POST /internal/apm/assistant/get_apm_timeseries\" | \"GET /internal/apm/assistant/get_downstream_dependencies\" | \"GET /internal/apm/services/{serviceName}/profiling/flamegraph\" | \"GET /internal/apm/profiling/status\" | \"GET /internal/apm/services/{serviceName}/profiling/functions\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\" | \"POST /internal/apm/custom-dashboard\" | \"DELETE /internal/apm/custom-dashboard\" | \"GET /internal/apm/services/{serviceName}/dashboards\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/index_pattern\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/samples\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/error/{errorId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search 2023-10-31\" | \"POST /api/apm/services/{serviceName}/annotation 2023-10-31\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/services/{serviceName}/alerts_count\" | \"GET /internal/apm/assets/services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/transactions\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /api/apm/settings/agent-configuration 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/view 2023-10-31\" | \"DELETE /api/apm/settings/agent-configuration 2023-10-31\" | \"PUT /api/apm/settings/agent-configuration 2023-10-31\" | \"POST /api/apm/settings/agent-configuration/search 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/environments 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/agent_name 2023-10-31\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps 2023-10-31\" | \"POST /api/apm/sourcemaps 2023-10-31\" | \"DELETE /api/apm/sourcemaps/{id} 2023-10-31\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema 2023-10-31\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys 2023-10-31\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/get_latest_agent_versions\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate\" | \"GET /internal/apm/mobile-services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/mobile-services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/error_terms\" | \"POST /internal/apm/mobile-services/{serviceName}/crashes/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/distribution\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\" | \"GET /internal/apm/mobile-services/{serviceName}/most_used_charts\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/sessions\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/http_requests\" | \"GET /internal/apm/mobile-services/{serviceName}/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/location/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/terms\" | \"GET /internal/apm/mobile-services/{serviceName}/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/detailed_statistics\" | \"GET /internal/apm/diagnostics\" | \"POST /internal/apm/assistant/get_apm_timeseries\" | \"GET /internal/apm/assistant/get_downstream_dependencies\" | \"GET /internal/apm/services/{serviceName}/profiling/flamegraph\" | \"GET /internal/apm/profiling/status\" | \"GET /internal/apm/services/{serviceName}/profiling/functions\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\" | \"POST /internal/apm/custom-dashboard\" | \"DELETE /internal/apm/custom-dashboard\" | \"GET /internal/apm/services/{serviceName}/dashboards\"" ], "path": "x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -5661,6 +5661,26 @@ "SavedServiceGroup", "[]; }>; } & ", "APMRouteCreateOptions", + "; \"GET /internal/apm/assets/services\": { endpoint: \"GET /internal/apm/assets/services\"; params?: ", + "TypeC", + "<{ query: ", + "IntersectionC", + "<[", + "TypeC", + "<{ kuery: ", + "StringC", + "; }>, ", + "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>]>; }> | undefined; handler: ({}: ", + "APMRouteHandlerResources", + " & { params: { query: { kuery: string; } & { start: number; end: number; }; }; }) => Promise<", + "AssetServicesResponse", + ">; } & ", + "APMRouteCreateOptions", "; \"GET /internal/apm/services/{serviceName}/alerts_count\": { endpoint: \"GET /internal/apm/services/{serviceName}/alerts_count\"; params?: ", "TypeC", "<{ path: ", diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index a0a7a03572657..591a7433debbe 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 29 | 0 | 29 | 122 | +| 29 | 0 | 29 | 123 | ## Client diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 0844fa4dd3fe3..b7e3d32e9a8d7 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index de01bf7f76ed9..cac5994e90206 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index 7b99fda286bae..c58d9cfdda075 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index c7dbcabe37daf..da393cc648c8d 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 663b7dd1cb538..49fb07a7fb3e5 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 5bc2cc57f2743..9a1d982a312c9 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index bb409c50cc116..073d6a34d86f4 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 7226a09be9006..eef9ad6abc7d9 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index d1f671e74d57b..0db5f19b9d05f 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 1634bd8716509..29262e6a30e50 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 5588ec3b565d2..542cb320910d3 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 9b53acccd0876..2a64d3e8903ad 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 89b93bd765013..3ba3b360af9ee 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index a5a3a671c1236..e0a13c396ad4a 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 35ed12091f46f..c1aa80a071032 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 58fe59fed06ca..67f2a9474ccfe 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index e0524524cd58b..c5fe080ae2ce2 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.devdocs.json b/api_docs/dashboard.devdocs.json index 2a1d5cfce3cd1..612cf9f1ea2ec 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -393,54 +393,6 @@ ], "returnComment": [], "initialIsOpen": false - }, - { - "parentPluginId": "dashboard", - "id": "def-public.registerDashboardPanelPlacementSetting", - "type": "Function", - "tags": [], - "label": "registerDashboardPanelPlacementSetting", - "description": [], - "signature": [ - "(embeddableType: string, getPanelPlacementSettings: GetPanelPlacementSettings) => void" - ], - "path": "src/plugins/dashboard/public/dashboard_container/external_api/dashboard_panel_placement_registry.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "dashboard", - "id": "def-public.registerDashboardPanelPlacementSetting.$1", - "type": "string", - "tags": [], - "label": "embeddableType", - "description": [], - "signature": [ - "string" - ], - "path": "src/plugins/dashboard/public/dashboard_container/external_api/dashboard_panel_placement_registry.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - }, - { - "parentPluginId": "dashboard", - "id": "def-public.registerDashboardPanelPlacementSetting.$2", - "type": "Function", - "tags": [], - "label": "getPanelPlacementSettings", - "description": [], - "signature": [ - "GetPanelPlacementSettings" - ], - "path": "src/plugins/dashboard/public/dashboard_container/external_api/dashboard_panel_placement_registry.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false } ], "interfaces": [ @@ -724,6 +676,79 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "dashboard", + "id": "def-public.IProvidesLegacyPanelPlacementSettings", + "type": "Interface", + "tags": [], + "label": "IProvidesLegacyPanelPlacementSettings", + "description": [], + "signature": [ + { + "pluginId": "dashboard", + "scope": "public", + "docId": "kibDashboardPluginApi", + "section": "def-public.IProvidesLegacyPanelPlacementSettings", + "text": "IProvidesLegacyPanelPlacementSettings" + }, + "" + ], + "path": "src/plugins/dashboard/public/dashboard_container/panel_placement/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-public.IProvidesLegacyPanelPlacementSettings.getLegacyPanelPlacementSettings", + "type": "Function", + "tags": [], + "label": "getLegacyPanelPlacementSettings", + "description": [], + "signature": [ + "(input: InputType, attributes?: AttributesType | undefined) => Partial<", + "PanelPlacementSettings", + ">" + ], + "path": "src/plugins/dashboard/public/dashboard_container/panel_placement/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-public.IProvidesLegacyPanelPlacementSettings.getLegacyPanelPlacementSettings.$1", + "type": "Uncategorized", + "tags": [], + "label": "input", + "description": [], + "signature": [ + "InputType" + ], + "path": "src/plugins/dashboard/public/dashboard_container/panel_placement/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dashboard", + "id": "def-public.IProvidesLegacyPanelPlacementSettings.getLegacyPanelPlacementSettings.$2", + "type": "Uncategorized", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + "AttributesType | undefined" + ], + "path": "src/plugins/dashboard/public/dashboard_container/panel_placement/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false } ], "enums": [ @@ -1089,6 +1114,56 @@ "trackAdoption": false, "children": [], "returnComment": [] + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardStart.registerDashboardPanelPlacementSetting", + "type": "Function", + "tags": [], + "label": "registerDashboardPanelPlacementSetting", + "description": [], + "signature": [ + "(embeddableType: string, getPanelPlacementSettings: ", + "GetPanelPlacementSettings", + ") => void" + ], + "path": "src/plugins/dashboard/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardStart.registerDashboardPanelPlacementSetting.$1", + "type": "string", + "tags": [], + "label": "embeddableType", + "description": [], + "signature": [ + "string" + ], + "path": "src/plugins/dashboard/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "dashboard", + "id": "def-public.DashboardStart.registerDashboardPanelPlacementSetting.$2", + "type": "Function", + "tags": [], + "label": "getPanelPlacementSettings", + "description": [], + "signature": [ + "GetPanelPlacementSettings", + "" + ], + "path": "src/plugins/dashboard/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "lifecycle": "start", diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 53bb6a224cdd6..9d1a5e549842b 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 112 | 0 | 109 | 12 | +| 116 | 0 | 113 | 13 | ## Client diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index df982a4052f9f..79301bce42404 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.devdocs.json b/api_docs/data.devdocs.json index c204f00dce9b7..0fbdccbfc5bab 100644 --- a/api_docs/data.devdocs.json +++ b/api_docs/data.devdocs.json @@ -504,9 +504,9 @@ }, ", options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -546,9 +546,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -2208,17 +2208,17 @@ "signature": [ "(response: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, ") => ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -2237,9 +2237,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -2385,9 +2385,9 @@ }, ", options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -2427,9 +2427,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -3837,9 +3837,9 @@ "Observable", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -4598,9 +4598,9 @@ }, "; }) => ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" } @@ -4954,9 +4954,9 @@ "signature": [ "(response?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -4975,9 +4975,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -7565,503 +7565,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-public.IEsSearchRequest", - "type": "Interface", - "tags": [], - "label": "IEsSearchRequest", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - " extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchRequest", - "text": "IKibanaSearchRequest" - }, - "" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-public.IEsSearchRequest.indexType", - "type": "string", - "tags": [], - "label": "indexType", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchRequest", - "type": "Interface", - "tags": [], - "label": "IKibanaSearchRequest", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchRequest", - "text": "IKibanaSearchRequest" - }, - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchRequest.id", - "type": "string", - "tags": [], - "label": "id", - "description": [ - "\nAn id can be used to uniquely identify this request." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchRequest.params", - "type": "Uncategorized", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "Params | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse", - "type": "Interface", - "tags": [], - "label": "IKibanaSearchResponse", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.id", - "type": "string", - "tags": [], - "label": "id", - "description": [ - "\nSome responses may contain a unique id to identify the request this response came from." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.total", - "type": "number", - "tags": [], - "label": "total", - "description": [ - "\nIf relevant to the search strategy, return a total number\nthat represents how progress is indicated." - ], - "signature": [ - "number | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.loaded", - "type": "number", - "tags": [], - "label": "loaded", - "description": [ - "\nIf relevant to the search strategy, return a loaded number\nthat represents how progress is indicated." - ], - "signature": [ - "number | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.isRunning", - "type": "CompoundType", - "tags": [], - "label": "isRunning", - "description": [ - "\nIndicates whether search is still in flight" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.isPartial", - "type": "CompoundType", - "tags": [], - "label": "isPartial", - "description": [ - "\nIndicates whether the results returned are complete or partial" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.isRestored", - "type": "CompoundType", - "tags": [], - "label": "isRestored", - "description": [ - "\nIndicates whether the results returned are from the async-search index" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.isStored", - "type": "CompoundType", - "tags": [], - "label": "isStored", - "description": [ - "\nIndicates whether the search has been saved to a search-session object and long keepAlive was set" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.warning", - "type": "string", - "tags": [], - "label": "warning", - "description": [ - "\nOptional warnings returned from Elasticsearch (for example, deprecation warnings)" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.rawResponse", - "type": "Uncategorized", - "tags": [], - "label": "rawResponse", - "description": [ - "\nThe raw response returned by the internal search method (usually the raw ES response)" - ], - "signature": [ - "RawResponse" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.IKibanaSearchResponse.requestParams", - "type": "Object", - "tags": [], - "label": "requestParams", - "description": [ - "\nHTTP request parameters from elasticsearch transport client t" - ], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SanitizedConnectionRequestParams", - "text": "SanitizedConnectionRequestParams" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions", - "type": "Interface", - "tags": [], - "label": "ISearchOptions", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.abortSignal", - "type": "Object", - "tags": [], - "label": "abortSignal", - "description": [ - "\nAn `AbortSignal` that allows the caller of `search` to abort a search request." - ], - "signature": [ - "AbortSignal | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.strategy", - "type": "string", - "tags": [], - "label": "strategy", - "description": [ - "\nUse this option to force using a specific server side search strategy. Leave empty to use the default strategy." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.legacyHitsTotal", - "type": "CompoundType", - "tags": [], - "label": "legacyHitsTotal", - "description": [ - "\nRequest the legacy format for the total number of hits. If sending `rest_total_hits_as_int` to\nsomething other than `true`, this should be set to `false`." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.sessionId", - "type": "string", - "tags": [], - "label": "sessionId", - "description": [ - "\nA session ID, grouping multiple search requests into a single session." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.isStored", - "type": "CompoundType", - "tags": [], - "label": "isStored", - "description": [ - "\nWhether the session is already saved (i.e. sent to background)" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.isSearchStored", - "type": "CompoundType", - "tags": [], - "label": "isSearchStored", - "description": [ - "\nWhether the search was successfully polled after session was saved. Search was added to a session saved object and keepAlive extended." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.isRestore", - "type": "CompoundType", - "tags": [], - "label": "isRestore", - "description": [ - "\nWhether the session is restored (i.e. search requests should re-use the stored search IDs,\nrather than starting from scratch)" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.retrieveResults", - "type": "CompoundType", - "tags": [], - "label": "retrieveResults", - "description": [ - "\nBy default, when polling, we don't retrieve the results of the search request (until it is complete). (For async\nsearch, this is the difference between calling _async_search/{id} and _async_search/status/{id}.) setting this to\n`true` will request the search results, regardless of whether or not the search is complete." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.executionContext", - "type": "Object", - "tags": [], - "label": "executionContext", - "description": [ - "\nRepresents a meta-information about a Kibana entity intitating a saerch request." - ], - "signature": [ - { - "pluginId": "@kbn/core-execution-context-common", - "scope": "common", - "docId": "kibKbnCoreExecutionContextCommonPluginApi", - "section": "def-common.KibanaExecutionContext", - "text": "KibanaExecutionContext" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.indexPattern", - "type": "Object", - "tags": [], - "label": "indexPattern", - "description": [ - "\nIndex pattern reference is used for better error messages" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchOptions.transport", - "type": "Object", - "tags": [], - "label": "transport", - "description": [ - "\nTransportRequestOptions, other than `signal`, to pass through to the ES client.\nTo pass an abort signal, use {@link ISearchOptions.abortSignal}" - ], - "signature": [ - "Omit<", - "TransportRequestOptions", - ", \"signal\"> | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-public.ISearchStartSearchSource", @@ -9926,32 +9429,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-public.IEsSearchResponse", - "type": "Type", - "tags": [], - "label": "IEsSearchResponse", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "<", - "SearchResponse", - ">>" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-public.IFieldParamType", @@ -10022,126 +9499,23 @@ { "pluginId": "expressions", "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.ExecutionContext", - "text": "ExecutionContext" - }, - "<", - { - "pluginId": "inspector", - "scope": "common", - "docId": "kibInspectorPluginApi", - "section": "def-common.Adapters", - "text": "Adapters" - }, - ">>" - ], - "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-public.ISearchGeneric", - "type": "Type", - "tags": [], - "label": "ISearchGeneric", - "description": [], - "signature": [ - " = ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchRequestParams", - "text": "ISearchRequestParams" - }, - ">, SearchStrategyResponse extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - " = ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchResponse", - "text": "IEsSearchResponse" - }, - ">(request: SearchStrategyRequest, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => ", - "Observable", - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-public.ISearchGeneric.$1", - "type": "Uncategorized", - "tags": [], - "label": "request", - "description": [], - "signature": [ - "SearchStrategyRequest" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false + "docId": "kibExpressionsPluginApi", + "section": "def-common.ExecutionContext", + "text": "ExecutionContext" }, + "<", { - "parentPluginId": "data", - "id": "def-public.ISearchGeneric.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } + "pluginId": "inspector", + "scope": "common", + "docId": "kibInspectorPluginApi", + "section": "def-common.Adapters", + "text": "Adapters" + }, + ">>" ], + "path": "src/plugins/data_views/common/expressions/load_index_pattern.ts", + "deprecated": false, + "trackAdoption": false, "initialIsOpen": false }, { @@ -10320,9 +9694,9 @@ "Observable", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -12663,25 +12037,25 @@ "ISearchStart", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchRequest", "text": "IEsSearchRequest" }, "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, ">, ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -17816,258 +17190,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.IEsSearchRequest", - "type": "Interface", - "tags": [], - "label": "IEsSearchRequest", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - " extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchRequest", - "text": "IKibanaSearchRequest" - }, - "" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.IEsSearchRequest.indexType", - "type": "string", - "tags": [], - "label": "indexType", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions", - "type": "Interface", - "tags": [], - "label": "ISearchOptions", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.abortSignal", - "type": "Object", - "tags": [], - "label": "abortSignal", - "description": [ - "\nAn `AbortSignal` that allows the caller of `search` to abort a search request." - ], - "signature": [ - "AbortSignal | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.strategy", - "type": "string", - "tags": [], - "label": "strategy", - "description": [ - "\nUse this option to force using a specific server side search strategy. Leave empty to use the default strategy." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.legacyHitsTotal", - "type": "CompoundType", - "tags": [], - "label": "legacyHitsTotal", - "description": [ - "\nRequest the legacy format for the total number of hits. If sending `rest_total_hits_as_int` to\nsomething other than `true`, this should be set to `false`." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.sessionId", - "type": "string", - "tags": [], - "label": "sessionId", - "description": [ - "\nA session ID, grouping multiple search requests into a single session." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.isStored", - "type": "CompoundType", - "tags": [], - "label": "isStored", - "description": [ - "\nWhether the session is already saved (i.e. sent to background)" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.isSearchStored", - "type": "CompoundType", - "tags": [], - "label": "isSearchStored", - "description": [ - "\nWhether the search was successfully polled after session was saved. Search was added to a session saved object and keepAlive extended." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.isRestore", - "type": "CompoundType", - "tags": [], - "label": "isRestore", - "description": [ - "\nWhether the session is restored (i.e. search requests should re-use the stored search IDs,\nrather than starting from scratch)" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.retrieveResults", - "type": "CompoundType", - "tags": [], - "label": "retrieveResults", - "description": [ - "\nBy default, when polling, we don't retrieve the results of the search request (until it is complete). (For async\nsearch, this is the difference between calling _async_search/{id} and _async_search/status/{id}.) setting this to\n`true` will request the search results, regardless of whether or not the search is complete." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.executionContext", - "type": "Object", - "tags": [], - "label": "executionContext", - "description": [ - "\nRepresents a meta-information about a Kibana entity intitating a saerch request." - ], - "signature": [ - { - "pluginId": "@kbn/core-execution-context-common", - "scope": "common", - "docId": "kibKbnCoreExecutionContextCommonPluginApi", - "section": "def-common.KibanaExecutionContext", - "text": "KibanaExecutionContext" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.indexPattern", - "type": "Object", - "tags": [], - "label": "indexPattern", - "description": [ - "\nIndex pattern reference is used for better error messages" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-server.ISearchOptions.transport", - "type": "Object", - "tags": [], - "label": "transport", - "description": [ - "\nTransportRequestOptions, other than `signal`, to pass through to the ES client.\nTo pass an abort signal, use {@link ISearchOptions.abortSignal}" - ], - "signature": [ - "Omit<", - "TransportRequestOptions", - ", \"signal\"> | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false } ], "enums": [ @@ -18139,32 +17261,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-server.IEsSearchResponse", - "type": "Type", - "tags": [], - "label": "IEsSearchResponse", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "<", - "SearchResponse", - ">>" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-server.ParsedInterval", @@ -18556,25 +17652,25 @@ "ISearchStart", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchRequest", "text": "IEsSearchRequest" }, "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, ">, ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, diff --git a/api_docs/data.mdx b/api_docs/data.mdx index a24e4d2ffabd6..db1c02fd0f7fe 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3290 | 31 | 2621 | 23 | +| 3186 | 31 | 2575 | 23 | ## Client diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 0bf26636c080a..3d90c12fc736a 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3290 | 31 | 2621 | 23 | +| 3186 | 31 | 2575 | 23 | ## Client diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 4bc4cce6d7450..b4bd0847179ab 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -179,9 +179,9 @@ "Observable", "; isStored: () => boolean; isRestore: () => boolean; restore: (sessionId: string) => void; continue: (sessionId: string) => void; cancel: () => Promise; renameCurrentSession: (newName: string) => Promise; isCurrentSession: (sessionId?: string | undefined) => boolean; getSearchOptions: (sessionId?: string | undefined) => Required = ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchRequest", "text": "IEsSearchRequest" }, "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, ">, SearchStrategyResponse extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, " = ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, ">(request: SearchStrategyRequest, options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -440,7 +440,7 @@ "signature": [ "SearchStrategyRequest" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "packages/kbn-search-types/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -453,15 +453,15 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, " | undefined" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "packages/kbn-search-types/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -635,9 +635,9 @@ "Observable", "; isStored: () => boolean; isRestore: () => boolean; restore: (sessionId: string) => void; continue: (sessionId: string) => void; cancel: () => Promise; renameCurrentSession: (newName: string) => Promise; isCurrentSession: (sessionId?: string | undefined) => boolean; getSearchOptions: (sessionId?: string | undefined) => Required; isStored: () => boolean; isRestore: () => boolean; restore: (sessionId: string) => void; continue: (sessionId: string) => void; cancel: () => Promise; renameCurrentSession: (newName: string) => Promise; isCurrentSession: (sessionId?: string | undefined) => boolean; getSearchOptions: (sessionId?: string | undefined) => Required) => { getId: (args_0: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchRequest", "text": "IKibanaSearchRequest" }, ", args_1: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, ") => Promise; trackId: (searchRequest: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchRequest", "text": "IKibanaSearchRequest" }, ", searchId: string, options: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -2689,9 +2689,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchClient", "text": "ISearchClient" } @@ -3272,9 +3272,9 @@ "signature": [ "(request: SearchStrategyRequest, options: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -3318,9 +3318,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" } @@ -3364,9 +3364,9 @@ "signature": [ "((id: string, options: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -3408,9 +3408,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" } @@ -3454,9 +3454,9 @@ "signature": [ "((id: string, keepAlive: string, options: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -3513,9 +3513,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" } @@ -4245,9 +4245,9 @@ }, ", options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -4287,9 +4287,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -5949,17 +5949,17 @@ "signature": [ "(response: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, ") => ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -5978,9 +5978,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -6126,9 +6126,9 @@ }, ", options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -6168,9 +6168,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -7152,9 +7152,9 @@ "Observable", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -8169,9 +8169,9 @@ }, " | undefined, options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -8226,9 +8226,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -9567,9 +9567,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -9624,9 +9624,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -10349,9 +10349,9 @@ "Observable", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -14831,9 +14831,9 @@ }, "; }) => ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" } @@ -15747,9 +15747,9 @@ "signature": [ "(response?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -15768,9 +15768,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -16047,9 +16047,9 @@ "signature": [ "(response?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -16068,9 +16068,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -16624,9 +16624,9 @@ "signature": [ " ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -26913,9 +26913,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -27373,119 +27373,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.IEsErrorAttributes", - "type": "Interface", - "tags": [], - "label": "IEsErrorAttributes", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.IEsErrorAttributes.error", - "type": "CompoundType", - "tags": [], - "label": "error", - "description": [], - "signature": [ - "ErrorCause", - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IEsErrorAttributes.rawResponse", - "type": "Object", - "tags": [], - "label": "rawResponse", - "description": [], - "signature": [ - "SearchResponseBody", - "> | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IEsErrorAttributes.requestParams", - "type": "Object", - "tags": [], - "label": "requestParams", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SanitizedConnectionRequestParams", - "text": "SanitizedConnectionRequestParams" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.IEsSearchRequest", - "type": "Interface", - "tags": [], - "label": "IEsSearchRequest", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - " extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchRequest", - "text": "IKibanaSearchRequest" - }, - "" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.IEsSearchRequest.indexType", - "type": "string", - "tags": [], - "label": "indexType", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.IInspectorInfo", @@ -27560,251 +27447,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchRequest", - "type": "Interface", - "tags": [], - "label": "IKibanaSearchRequest", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchRequest", - "text": "IKibanaSearchRequest" - }, - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchRequest.id", - "type": "string", - "tags": [], - "label": "id", - "description": [ - "\nAn id can be used to uniquely identify this request." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchRequest.params", - "type": "Uncategorized", - "tags": [], - "label": "params", - "description": [], - "signature": [ - "Params | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse", - "type": "Interface", - "tags": [], - "label": "IKibanaSearchResponse", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.id", - "type": "string", - "tags": [], - "label": "id", - "description": [ - "\nSome responses may contain a unique id to identify the request this response came from." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.total", - "type": "number", - "tags": [], - "label": "total", - "description": [ - "\nIf relevant to the search strategy, return a total number\nthat represents how progress is indicated." - ], - "signature": [ - "number | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.loaded", - "type": "number", - "tags": [], - "label": "loaded", - "description": [ - "\nIf relevant to the search strategy, return a loaded number\nthat represents how progress is indicated." - ], - "signature": [ - "number | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.isRunning", - "type": "CompoundType", - "tags": [], - "label": "isRunning", - "description": [ - "\nIndicates whether search is still in flight" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.isPartial", - "type": "CompoundType", - "tags": [], - "label": "isPartial", - "description": [ - "\nIndicates whether the results returned are complete or partial" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.isRestored", - "type": "CompoundType", - "tags": [], - "label": "isRestored", - "description": [ - "\nIndicates whether the results returned are from the async-search index" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.isStored", - "type": "CompoundType", - "tags": [], - "label": "isStored", - "description": [ - "\nIndicates whether the search has been saved to a search-session object and long keepAlive was set" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.warning", - "type": "string", - "tags": [], - "label": "warning", - "description": [ - "\nOptional warnings returned from Elasticsearch (for example, deprecation warnings)" - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.rawResponse", - "type": "Uncategorized", - "tags": [], - "label": "rawResponse", - "description": [ - "\nThe raw response returned by the internal search method (usually the raw ES response)" - ], - "signature": [ - "RawResponse" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.IKibanaSearchResponse.requestParams", - "type": "Object", - "tags": [], - "label": "requestParams", - "description": [ - "\nHTTP request parameters from elasticsearch transport client t" - ], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.SanitizedConnectionRequestParams", - "text": "SanitizedConnectionRequestParams" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.IMetricAggConfig", @@ -27943,457 +27585,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient", - "type": "Interface", - "tags": [], - "label": "ISearchClient", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.search", - "type": "Function", - "tags": [], - "label": "search", - "description": [], - "signature": [ - " = ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchRequestParams", - "text": "ISearchRequestParams" - }, - ">, SearchStrategyResponse extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - " = ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchResponse", - "text": "IEsSearchResponse" - }, - ">(request: SearchStrategyRequest, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => ", - "Observable", - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.search.$1", - "type": "Uncategorized", - "tags": [], - "label": "request", - "description": [], - "signature": [ - "SearchStrategyRequest" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.search.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.cancel", - "type": "Function", - "tags": [], - "label": "cancel", - "description": [ - "\nUsed to cancel an in-progress search request." - ], - "signature": [ - "(id: string, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => Promise" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.cancel.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.cancel.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.extend", - "type": "Function", - "tags": [], - "label": "extend", - "description": [ - "\nUsed to extend the TTL of an in-progress search request." - ], - "signature": [ - "(id: string, keepAlive: string, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => Promise" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.extend.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.extend.$2", - "type": "string", - "tags": [], - "label": "keepAlive", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchClient.extend.$3", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions", - "type": "Interface", - "tags": [], - "label": "ISearchOptions", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.abortSignal", - "type": "Object", - "tags": [], - "label": "abortSignal", - "description": [ - "\nAn `AbortSignal` that allows the caller of `search` to abort a search request." - ], - "signature": [ - "AbortSignal | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.strategy", - "type": "string", - "tags": [], - "label": "strategy", - "description": [ - "\nUse this option to force using a specific server side search strategy. Leave empty to use the default strategy." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.legacyHitsTotal", - "type": "CompoundType", - "tags": [], - "label": "legacyHitsTotal", - "description": [ - "\nRequest the legacy format for the total number of hits. If sending `rest_total_hits_as_int` to\nsomething other than `true`, this should be set to `false`." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.sessionId", - "type": "string", - "tags": [], - "label": "sessionId", - "description": [ - "\nA session ID, grouping multiple search requests into a single session." - ], - "signature": [ - "string | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.isStored", - "type": "CompoundType", - "tags": [], - "label": "isStored", - "description": [ - "\nWhether the session is already saved (i.e. sent to background)" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.isSearchStored", - "type": "CompoundType", - "tags": [], - "label": "isSearchStored", - "description": [ - "\nWhether the search was successfully polled after session was saved. Search was added to a session saved object and keepAlive extended." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.isRestore", - "type": "CompoundType", - "tags": [], - "label": "isRestore", - "description": [ - "\nWhether the session is restored (i.e. search requests should re-use the stored search IDs,\nrather than starting from scratch)" - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.retrieveResults", - "type": "CompoundType", - "tags": [], - "label": "retrieveResults", - "description": [ - "\nBy default, when polling, we don't retrieve the results of the search request (until it is complete). (For async\nsearch, this is the difference between calling _async_search/{id} and _async_search/status/{id}.) setting this to\n`true` will request the search results, regardless of whether or not the search is complete." - ], - "signature": [ - "boolean | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.executionContext", - "type": "Object", - "tags": [], - "label": "executionContext", - "description": [ - "\nRepresents a meta-information about a Kibana entity intitating a saerch request." - ], - "signature": [ - { - "pluginId": "@kbn/core-execution-context-common", - "scope": "common", - "docId": "kibKbnCoreExecutionContextCommonPluginApi", - "section": "def-common.KibanaExecutionContext", - "text": "KibanaExecutionContext" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.indexPattern", - "type": "Object", - "tags": [], - "label": "indexPattern", - "description": [ - "\nIndex pattern reference is used for better error messages" - ], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataView", - "text": "DataView" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptions.transport", - "type": "Object", - "tags": [], - "label": "transport", - "description": [ - "\nTransportRequestOptions, other than `signal`, to pass through to the ES client.\nTo pass an abort signal, use {@link ISearchOptions.abortSignal}" - ], - "signature": [ - "Omit<", - "TransportRequestOptions", - ", \"signal\"> | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.ISearchStartSearchSource", @@ -29938,49 +29129,49 @@ "signature": [ " = ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchRequest", "text": "IEsSearchRequest" }, "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, ">, SearchStrategyResponse extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, " = ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, ">(request: SearchStrategyRequest, options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, @@ -30003,7 +29194,7 @@ "signature": [ "SearchStrategyRequest" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "packages/kbn-search-types/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -30016,15 +29207,15 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, " | undefined" ], - "path": "src/plugins/data/common/search/types.ts", + "path": "packages/kbn-search-types/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -30499,9 +29690,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" } @@ -30569,9 +29760,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -31950,9 +31141,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -33585,32 +32776,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.IEsSearchResponse", - "type": "Type", - "tags": [], - "label": "IEsSearchResponse", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - "<", - "SearchResponse", - ">>" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.IFieldParamType", @@ -33803,277 +32968,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.ISearchCancelGeneric", - "type": "Type", - "tags": [], - "label": "ISearchCancelGeneric", - "description": [], - "signature": [ - "(id: string, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => Promise" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchCancelGeneric.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchCancelGeneric.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchExtendGeneric", - "type": "Type", - "tags": [], - "label": "ISearchExtendGeneric", - "description": [], - "signature": [ - "(id: string, keepAlive: string, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => Promise" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchExtendGeneric.$1", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchExtendGeneric.$2", - "type": "string", - "tags": [], - "label": "keepAlive", - "description": [], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchExtendGeneric.$3", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchGeneric", - "type": "Type", - "tags": [], - "label": "ISearchGeneric", - "description": [], - "signature": [ - " = ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchRequest", - "text": "IEsSearchRequest" - }, - "<", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchRequestParams", - "text": "ISearchRequestParams" - }, - ">, SearchStrategyResponse extends ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IKibanaSearchResponse", - "text": "IKibanaSearchResponse" - }, - " = ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.IEsSearchResponse", - "text": "IEsSearchResponse" - }, - ">(request: SearchStrategyRequest, options?: ", - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined) => ", - "Observable", - "" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "data", - "id": "def-common.ISearchGeneric.$1", - "type": "Uncategorized", - "tags": [], - "label": "request", - "description": [], - "signature": [ - "SearchStrategyRequest" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchGeneric.$2", - "type": "Object", - "tags": [], - "label": "options", - "description": [], - "signature": [ - { - "pluginId": "data", - "scope": "common", - "docId": "kibDataSearchPluginApi", - "section": "def-common.ISearchOptions", - "text": "ISearchOptions" - }, - " | undefined" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchOptionsSerializable", - "type": "Type", - "tags": [], - "label": "ISearchOptionsSerializable", - "description": [ - "\nSame as `ISearchOptions`, but contains only serializable fields, which can\nbe sent over the network." - ], - "signature": [ - "{ executionContext?: ", - { - "pluginId": "@kbn/core-execution-context-common", - "scope": "common", - "docId": "kibKbnCoreExecutionContextCommonPluginApi", - "section": "def-common.KibanaExecutionContext", - "text": "KibanaExecutionContext" - }, - " | undefined; isStored?: boolean | undefined; isRestore?: boolean | undefined; sessionId?: string | undefined; strategy?: string | undefined; legacyHitsTotal?: boolean | undefined; isSearchStored?: boolean | undefined; retrieveResults?: boolean | undefined; }" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "data", - "id": "def-common.ISearchRequestParams", - "type": "Type", - "tags": [], - "label": "ISearchRequestParams", - "description": [], - "signature": [ - "{ trackTotalHits?: boolean | undefined; } & ", - "SearchRequest" - ], - "path": "src/plugins/data/common/search/strategies/es_search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.ISearchSource", @@ -34250,9 +33144,9 @@ "Observable", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, @@ -34585,21 +33479,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "data", - "id": "def-common.SanitizedConnectionRequestParams", - "type": "Type", - "tags": [], - "label": "SanitizedConnectionRequestParams", - "description": [], - "signature": [ - "{ path: string; method: string; querystring?: string | undefined; }" - ], - "path": "src/plugins/data/common/search/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "data", "id": "def-common.SEARCH_SESSION_TYPE", @@ -34869,9 +33748,9 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchRequest", "text": "IKibanaSearchRequest" }, @@ -38820,9 +37699,9 @@ }, " | undefined, options?: ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchOptions", "text": "ISearchOptions" }, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 9415fe33098ca..5f92e6832115b 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3290 | 31 | 2621 | 23 | +| 3186 | 31 | 2575 | 23 | ## Client diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 869b23298d66f..6e3792506141f 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 1ddda81277c9f..c7b5f38dcf75c 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index 48cf5d9d19191..455a22b35ee63 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 21d3b7fd7eb6c..743ccc7638e35 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 0b86d3d8cae54..839abc15f799c 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 0d9610cc17ed8..dcd924fde95e4 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 76cead6936a2e..849e0ca6b4d29 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -100,7 +100,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | graph, visTypeTimeseries, dataViewManagement, dataViews | - | | | graph, visTypeTimeseries, dataViewManagement | - | | | visualizations, graph | - | -| | devTools, console, crossClusterReplication, grokdebugger, ingestPipelines, osquery, infra, painlessLab, searchprofiler, metricsDataAccess, apm, observabilityOnboarding, filesManagement | - | | | @kbn/core, lens, savedObjects | - | | | dashboard | - | | | embeddable, dashboard | - | @@ -116,7 +115,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dataViewManagement | - | | | unifiedSearch | - | | | unifiedSearch | - | -| | data, timelines, observabilityShared, cloudSecurityPosture, console, runtimeFields, indexManagement | - | | | embeddableEnhanced | - | | | visTypeGauge | - | | | visTypePie | - | @@ -131,12 +129,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | canvas | - | | | canvas | - | | | canvas | - | +| | @kbn/core-logging-server-internal, security | - | | | spaces, savedObjectsManagement | - | +| | infra, metricsDataAccess, apm, observabilityOnboarding | - | +| | observabilityShared | - | | | @kbn/core-elasticsearch-server-internal, @kbn/core-plugins-server-internal, enterpriseSearch, observabilityOnboarding, console | - | -| | @kbn/content-management-table-list-view, filesManagement | - | | | @kbn/react-kibana-context-styled, kibanaReact | - | | | enterpriseSearch | - | | | encryptedSavedObjects | - | +| | @kbn/content-management-table-list-view, filesManagement | - | | | @kbn/core | - | | | @kbn/core | - | | | @kbn/core-lifecycle-browser-mocks, @kbn/core, @kbn/core-plugins-browser-internal | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 27c5df18820d2..20a6c5bee834a 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -91,6 +91,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## @kbn/core-logging-server-internal + +| Deprecated API | Reference location(s) | Remove By | +| ---------------|-----------|-----------| +| | [index.ts](https://github.com/elastic/kibana/tree/main/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/index.ts#:~:text=max), [create_retention_policy.ts](https://github.com/elastic/kibana/tree/main/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.ts#:~:text=max), [appenders.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/logging/core-logging-server-internal/src/appenders/appenders.test.ts#:~:text=max), [rolling_file_appender.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.ts#:~:text=max), [create_retention_policy.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.test.ts#:~:text=max), [numeric_strategy.test.ts](https://github.com/elastic/kibana/tree/main/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.ts#:~:text=max) | - | + + + ## @kbn/core-plugins-browser-internal | Deprecated API | Reference location(s) | Remove By | @@ -498,7 +506,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [overview_tab.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/pages/configurations/findings_flyout/overview_tab.tsx#:~:text=indexPatternId) | - | -| | [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint), [take_action.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/public/components/take_action.tsx#:~:text=toMountPoint) | - | | | [csp_benchmark_rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/server/saved_objects/csp_benchmark_rule.ts#:~:text=migrations) | - | | | [csp_benchmark_rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/server/saved_objects/csp_benchmark_rule.ts#:~:text=schemas), [csp_settings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture/server/saved_objects/csp_settings.ts#:~:text=schemas) | - | @@ -508,8 +515,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/src/plugins/console/public/shared_imports.ts#:~:text=toMountPoint), [use_send_current_request.ts](https://github.com/elastic/kibana/tree/main/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts#:~:text=toMountPoint), [use_send_current_request.ts](https://github.com/elastic/kibana/tree/main/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts#:~:text=toMountPoint) | - | -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/src/plugins/console/public/shared_imports.ts#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/src/plugins/console/server/plugin.ts#:~:text=legacy) | - | @@ -526,7 +531,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/shared_imports.ts#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -566,7 +570,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [delete_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx#:~:text=toMountPoint), [delete_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx#:~:text=toMountPoint), [extend_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx#:~:text=toMountPoint), [extend_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx#:~:text=toMountPoint), [inspect_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx#:~:text=toMountPoint), [inspect_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx#:~:text=toMountPoint), [rename_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx#:~:text=toMountPoint), [rename_button.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx#:~:text=toMountPoint), [search_interceptor.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/search_interceptor/search_interceptor.ts#:~:text=toMountPoint), [search_interceptor.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/search/search_interceptor/search_interceptor.ts#:~:text=toMountPoint)+ 2 more | - | | | [session_service.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/search/session/session_service.ts#:~:text=authc) | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | | | [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference) | - | @@ -620,14 +623,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## devTools - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dev_tools/public/application.tsx#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dev_tools/public/application.tsx#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/dev_tools/public/application.tsx#:~:text=KibanaThemeProvider) | - | - - - ## discover | Deprecated API | Reference location(s) | Remove By | @@ -729,7 +724,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [mount_management_section.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/files_management/public/mount_management_section.tsx#:~:text=KibanaThemeProvider), [mount_management_section.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/files_management/public/mount_management_section.tsx#:~:text=KibanaThemeProvider), [mount_management_section.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/files_management/public/mount_management_section.tsx#:~:text=KibanaThemeProvider) | - | | | [app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/files_management/public/app.tsx#:~:text=withoutPageTemplateWrapper) | - | @@ -779,14 +773,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## grokdebugger - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/grokdebugger/public/shared_imports.ts#:~:text=KibanaThemeProvider) | - | - - - ## home | Deprecated API | Reference location(s) | Remove By | @@ -814,14 +800,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## indexManagement - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [use_datastreams_rollover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx#:~:text=toMountPoint), [use_datastreams_rollover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx#:~:text=toMountPoint) | - | - - - ## infra | Deprecated API | Reference location(s) | Remove By | @@ -831,14 +809,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## ingestPipelines - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ingest_pipelines/public/shared_imports.ts#:~:text=KibanaThemeProvider) | - | - - - ## inputControlVis | Deprecated API | Reference location(s) | Remove By | @@ -1026,7 +996,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [read_pack_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts#:~:text=migrationVersion) | - | | | [read_pack_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts#:~:text=migrationVersion), [read_pack_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts#:~:text=migrationVersion), [read_pack_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts#:~:text=migrationVersion), [read_pack_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts#:~:text=migrationVersion) | - | | | [pack_queries_status_table.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/packs/pack_queries_status_table.tsx#:~:text=indexPatternId), [view_results_in_discover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/discover/view_results_in_discover.tsx#:~:text=indexPatternId), [use_discover_link.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/common/hooks/use_discover_link.tsx#:~:text=indexPatternId) | - | -| | [osquery_result_wrapper.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx#:~:text=KibanaThemeProvider), [osquery_result_wrapper.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx#:~:text=KibanaThemeProvider), [osquery_result_wrapper.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx#:~:text=KibanaThemeProvider), [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_imports.ts#:~:text=KibanaThemeProvider), [osquery_results.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx#:~:text=KibanaThemeProvider), [osquery_results.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx#:~:text=KibanaThemeProvider), [osquery_results.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx#:~:text=KibanaThemeProvider), [services_wrapper.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx#:~:text=KibanaThemeProvider), [services_wrapper.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx#:~:text=KibanaThemeProvider), [services_wrapper.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx#:~:text=KibanaThemeProvider)+ 3 more | - | | | [create_action_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/osquery/server/handlers/action/create_action_service.ts#:~:text=license%24) | 8.8.0 | @@ -1035,7 +1004,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24) | 8.8.0 | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24) | 8.8.0 | @@ -1094,14 +1062,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## runtimeFields - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/runtime_fields/public/shared_imports.ts#:~:text=toMountPoint), [load_editor.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/runtime_fields/public/load_editor.tsx#:~:text=toMountPoint), [load_editor.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/runtime_fields/public/load_editor.tsx#:~:text=toMountPoint) | - | - - - ## savedObjects | Deprecated API | Reference location(s) | Remove By | @@ -1173,7 +1133,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24) | 8.8.0 | @@ -1198,6 +1157,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/plugin.ts#:~:text=license%24) | 8.8.0 | | | [logout_app.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=appBasePath) | 8.8.0 | +| | [config.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/config.ts#:~:text=max) | - | @@ -1316,14 +1276,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ -## timelines - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [add_to_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx#:~:text=toMountPoint), [add_to_timeline.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx#:~:text=toMountPoint) | - | - - - ## transform | Deprecated API | Reference location(s) | Remove By | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 45880b3aab478..ea903eef3797f 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -61,7 +61,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| crossClusterReplication | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| licenseManagement | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | | painlessLab | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24), [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24) | 8.8.0 | | management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 70d8fec48f675..b9671fc89977e 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 3ed163306f4d8..7f12b2a105ddd 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 574ec86ffa16b..c8309e656840a 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index 1ebf9f0042d24..f67f46321371b 100644 --- a/api_docs/discover_shared.mdx +++ b/api_docs/discover_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared title: "discoverShared" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverShared plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index c5cebb79ff606..336c702ea79a8 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index b7b731a79f6bc..263909e2786be 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 3341d4cbcb067..6d6901072ec3e 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index da425a48825c4..bb3ae41eb7873 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 51b077a35e624..216cf2ce92fd6 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index e166c2cd4760e..dd3d6df6cb9e0 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 499395d0a5f80..ed5a406497685 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 38ae9906bbfa3..b21006a989db5 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index 795776becbba7..de2416c53a370 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 6a3318686eb2b..24757d53aa566 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 3eeab1bd6a119..f08168b0e528e 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 8fad6c1899f93..45d19f2b97eb8 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 3c8968b906c6c..b992b80510546 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index dee5f318899c5..687b6dd01d7ea 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 5d9503c29f4ca..fadcf806b1264 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 7acfddbfa1d9d..f82ce405874c1 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 7e131e0d95bef..5827c08fd0239 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index da3a895aa85fc..1710d1f090a2e 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index ee70ec383511b..d043276cff4a9 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 78d2e31c20b4d..02b75736e37b2 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index c60b801cce605..49e2413a490a5 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index a87d18068d2f4..ed1139853e276 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 1750cd4bdb8f6..1290430d4804c 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index b3713d1daf0a6..5d0bc5a5670a2 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index eb6779c5d6d10..6cd603f4a1079 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index d39de9e24ca0f..4129c9a81368e 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index d391a443c8239..6fdd0c2b08fd4 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index f6d4decc4253f..2166ae9f94064 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index c4c663ceb012a..83103692b6c9b 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index 41878c8cdd293..cab4b5531acde 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 17c7135fc4aad..473c2cc3baa33 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 7f45d347348b5..c1ddab4229876 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index e481317b42753..2ceb4069b3829 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 9848246ec3030..d4768e196cd02 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 470efd0812c03..6083cda50f495 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index e3f14ee9e0660..098f957e148f0 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index ee494624f0757..f56a9a99eac78 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index d858892f9033f..fd2c12aea6168 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index 37ee393ee2f8f..4968ea8189e6b 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 1b976ae1b0e81..847d11c8667c7 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 8729d7559fa72..531870a1e9ed3 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index d893c481508a4..c7b0aa9ef57f4 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index 2757c4931f8bc..db7abeac39fca 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 589e2f702c117..f5e4be2325036 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index 051536dd66167..28241065347a8 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index d1941f9637db7..b493e068f3462 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 8762f3ee24736..e876794a0a29d 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 3312c155a68bc..5b75a4b87ba7f 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 1ccb81c3e7eb6..ec4ee14a23f20 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index be184f83ddaf3..a33b141872cbd 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index acb84b4355cc6..17170cd2e8b96 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index e7abeb156a96d..24ee3a3cd2a27 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 02fa34ce165a4..76d5690b927c7 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index fd9c2319bd577..ef1d4eebe2f3b 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 0e0c8ef36becb..a9ecb02d5ba04 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 18d59b670641c..cd51da8cd6dff 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 9bd18a3d9abec..b91df3bfe873c 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index c15b7c7ef5b7d..bc674e4e8c6b8 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 09638a5f6b74b..a98af1191d8a2 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 6540dbab69c59..67e3d4aa33309 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.devdocs.json b/api_docs/kbn_apm_synthtrace.devdocs.json index d0025a57d215c..26ccc25ade717 100644 --- a/api_docs/kbn_apm_synthtrace.devdocs.json +++ b/api_docs/kbn_apm_synthtrace.devdocs.json @@ -142,7 +142,7 @@ "label": "getDefaultPipeline", "description": [], "signature": [ - "(includeSerialization?: boolean) => (base: ", + "({ includeSerialization, versionOverride, }?: { includeSerialization?: boolean | undefined; versionOverride?: string | undefined; }) => (base: ", "Readable", ") => NodeJS.WritableStream" ], @@ -153,17 +153,43 @@ { "parentPluginId": "@kbn/apm-synthtrace", "id": "def-server.ApmSynthtraceEsClient.getDefaultPipeline.$1", - "type": "boolean", + "type": "Object", "tags": [], - "label": "includeSerialization", + "label": "{\n includeSerialization,\n versionOverride,\n }", "description": [], - "signature": [ - "boolean" - ], "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.ApmSynthtraceEsClient.getDefaultPipeline.$1.includeSerialization", + "type": "CompoundType", + "tags": [], + "label": "includeSerialization", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.ApmSynthtraceEsClient.getDefaultPipeline.$1.versionOverride", + "type": "string", + "tags": [], + "label": "versionOverride", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ], "returnComment": [] @@ -336,6 +362,71 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.AssetsSynthtraceEsClient", + "type": "Class", + "tags": [], + "label": "AssetsSynthtraceEsClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/apm-synthtrace", + "scope": "server", + "docId": "kibKbnApmSynthtracePluginApi", + "section": "def-server.AssetsSynthtraceEsClient", + "text": "AssetsSynthtraceEsClient" + }, + " extends ", + "SynthtraceEsClient", + "<", + "ServiceAssetDocument", + ">" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.AssetsSynthtraceEsClient.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.AssetsSynthtraceEsClient.Unnamed.$1", + "type": "CompoundType", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "{ client: ", + "default", + "; logger: ", + "Logger", + "; } & ", + "AssetsSynthtraceEsClientOptions" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/assets/assets_synthtrace_es_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/apm-synthtrace", "id": "def-server.InfraSynthtraceEsClient", diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index f6b92ad91107b..5b66e7754096e 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 44 | 0 | 44 | 7 | +| 49 | 0 | 49 | 8 | ## Server diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index bfbcb567342b0..cd9c1ce15472e 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 657a310a53098..298d3e1e811fa 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index e4524f172df03..f0c4637577970 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 36099e3986fb7..89b12c9528fbf 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index c98158a697585..fbe7211a59441 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index 8dbddc0741730..9f5689d279914 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index e994af75fb2f4..ee14f8f017141 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index f18bec1cf3968..05536c9c82e71 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index d37c702da68b2..06e4db887f2d1 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index c4ecf87c8763b..56696648ce6a1 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 68075f8d06843..c074588f46d40 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 4a8eca2d9af65..50a954803bd3a 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 2e359484dcc0d..7f65cbb3eb8e3 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 1a73689359748..a5cb4f3b07c83 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 7031acdf265e3..86d408c78601a 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index cb3a3a75d675f..c5181c7c77308 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index da05dea343893..19bb0be97f739 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index e6dc15dbc8453..26540a0351fe7 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 2ebb2d897eeaf..ac0a9ae50a4fd 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 7a14311fe30e0..84fe63900433a 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.devdocs.json b/api_docs/kbn_config_schema.devdocs.json index 3df7fa2d9f311..2c82087ed0c2e 100644 --- a/api_docs/kbn_config_schema.devdocs.json +++ b/api_docs/kbn_config_schema.devdocs.json @@ -2646,7 +2646,7 @@ "label": "metaFields", "description": [], "signature": [ - "{ readonly META_FIELD_X_OAS_REF_ID: \"x-oas-ref-id\"; readonly META_FIELD_X_OAS_OPTIONAL: \"x-oas-optional\"; readonly META_FIELD_X_OAS_DEPRECATED: \"x-oas-deprecated\"; readonly META_FIELD_X_OAS_MAX_LENGTH: \"x-oas-max-length\"; readonly META_FIELD_X_OAS_MIN_LENGTH: \"x-oas-min-length\"; readonly META_FIELD_X_OAS_GET_ADDITIONAL_PROPERTIES: \"x-oas-get-additional-properties\"; }" + "{ readonly META_FIELD_X_OAS_ANY: \"x-oas-any-type\"; readonly META_FIELD_X_OAS_REF_ID: \"x-oas-ref-id\"; readonly META_FIELD_X_OAS_OPTIONAL: \"x-oas-optional\"; readonly META_FIELD_X_OAS_DEPRECATED: \"x-oas-deprecated\"; readonly META_FIELD_X_OAS_MAX_LENGTH: \"x-oas-max-length\"; readonly META_FIELD_X_OAS_MIN_LENGTH: \"x-oas-min-length\"; readonly META_FIELD_X_OAS_GET_ADDITIONAL_PROPERTIES: \"x-oas-get-additional-properties\"; }" ], "path": "packages/kbn-config-schema/index.ts", "deprecated": false, diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 0fc39d33b308a..2b17857f3c023 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index a8a8ebd43f2e9..75d0a599435aa 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index 9edbb1bcc79e9..b3b9f2ce79c87 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index c4e702effe2ed..e4c9f92c29f1d 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index c7f2d0b14bf3b..ed4826eaffe90 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index 304e2ebc2be29..6b0bdcec8df93 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index d527c61de76fa..e7af9490d99bc 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index 06529e168fde7..0126509e2afe3 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 38252235b09c1..dc799588417b7 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 35cdeca0a43f0..43dc492a3f313 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 361ff3ce6ad42..c6b27d7b4eea7 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index a95e15382c2e4..88d5e6395fcbc 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 6bd8c64715367..1d0afbbe4e8de 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 0ad672567dadd..d0d1890b5cec1 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index a03f34a6daba3..7ae6f74c06313 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 94d1c4c5893a2..aca9944b8b3bd 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index bdc261c3715f7..182fd67da3945 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 532d09c5de9d0..d1a73257cf2ae 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 6e6bd57d09d2a..0773097b21dc9 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index a41bafe2cbfa8..d88648d8ecfe0 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 6fd71fa75f235..292c9aed89e8a 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 1d3ec84bb49e8..744e6ad46d85e 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index ff19c00a9abba..2b0f7b8f03fa5 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index bef8de0e02bb4..356d0f5cb264d 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index a062d7d3d30d1..20e800550fc34 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 9959e2e522134..38416df7af8c8 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 2316c0aaad5ff..caa21412e6017 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 1f814f098b0f9..36e5dd62b8bf1 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 5a94d0dfa4a6f..8efc9d567203e 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 73b2fbf4e3441..f5f6973f08a72 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 76820f579d703..bc952f16110ab 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 99bbf94dea6ec..da0c09e5b2251 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index 22dc903841248..63857fc79896d 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 095378610de76..57e8143bad792 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 75a0bd6c3b847..3eddae0f7e3b5 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index d3d35d5d42a24..96f4a17b02d69 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 4c331a7d984db..0aeb19fa34abc 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index bcc323b87fa97..579abaac9d310 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 51f92dd52a091..d789d30249b8e 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index 04c7a9dde51b0..5d471bfca41be 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 330726097ef53..6c149581238fe 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index a6059f5f0f551..959bdf23d5fe9 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 6691494e3e29e..d40a6f6905ade 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index aa441e6a4cca5..afddd87a7174a 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 92056c0cae36a..6cf2b6f4eee76 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 2a18583cc2918..ed5d10ceed6c3 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index d9d9b5e3ea011..04d8197c262ad 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index 95edbdc790eef..39625f7070c59 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 71c9b0ab17617..3663be3a829e6 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 9bb13e132ee72..2343eebc3a2c0 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 09ecb830110f5..081a3802319bf 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index acfcdf31c7fa6..cc2abc79f2f56 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json b/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json index bb7b98d72132f..1c0a249cb0f90 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json +++ b/api_docs/kbn_core_elasticsearch_server_internal.devdocs.json @@ -3114,7 +3114,7 @@ "label": "ElasticsearchConfigType", "description": [], "signature": [ - "{ readonly username?: string | undefined; readonly password?: string | undefined; readonly serviceAccountToken?: string | undefined; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; readonly healthCheck: Readonly<{} & { delay: moment.Duration; startupDelay: moment.Duration; }>; readonly hosts: string | string[]; readonly requestTimeout: moment.Duration; readonly compression: boolean; readonly apiVersion: string; readonly customHeaders: Record; readonly sniffOnStart: boolean; readonly sniffInterval: false | moment.Duration; readonly sniffOnConnectionFault: boolean; readonly maxSockets: number; readonly maxIdleSockets: number; readonly idleSocketTimeout: moment.Duration; readonly requestHeadersWhitelist: string | string[]; readonly shardTimeout: moment.Duration; readonly pingTimeout: moment.Duration; readonly logQueries: boolean; readonly ignoreVersionMismatch: boolean; readonly skipStartupConnectionCheck: boolean; readonly apisToRedactInLogs: Readonly<{ method?: string | undefined; } & { path: string; }>[]; }" + "{ readonly username?: string | undefined; readonly password?: string | undefined; readonly serviceAccountToken?: string | undefined; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; } & { verificationMode: \"none\" | \"full\" | \"certificate\"; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; alwaysPresentCertificate: boolean; }>; readonly healthCheck: Readonly<{} & { delay: moment.Duration; startupDelay: moment.Duration; }>; readonly hosts: string | string[]; readonly apiVersion: string; readonly customHeaders: Record; readonly sniffOnStart: boolean; readonly sniffInterval: false | moment.Duration; readonly sniffOnConnectionFault: boolean; readonly maxSockets: number; readonly maxIdleSockets: number; readonly idleSocketTimeout: moment.Duration; readonly compression: boolean; readonly requestHeadersWhitelist: string | string[]; readonly shardTimeout: moment.Duration; readonly requestTimeout: moment.Duration; readonly pingTimeout: moment.Duration; readonly logQueries: boolean; readonly ignoreVersionMismatch: boolean; readonly skipStartupConnectionCheck: boolean; readonly apisToRedactInLogs: Readonly<{ method?: string | undefined; } & { path: string; }>[]; }" ], "path": "packages/core/elasticsearch/core-elasticsearch-server-internal/src/elasticsearch_config.ts", "deprecated": false, diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 1ce07eb4f3baf..983f6d8ec4530 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index 2849dc0a39603..b8be0e3df7d73 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 64c5d74ecbb10..5c93b6efc449d 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 75b694bb064c8..27de00226eca1 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 91d1d170b5795..16c483e81a231 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 3da6175d3f3b0..2ec143d0e726d 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 60f8a79f50fa7..8105db63625a9 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index db245e7272a86..471eb19a560fa 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index 37a2da21eb8ed..8ec2742997d67 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 75e0be1c9858a..d996ec932a761 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index df8908743e40b..0c81e68f609c1 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 7f47d3a0a744f..ff0e4fcf80efb 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 100239a806ae8..40115683515f4 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index afae0e5f3a8c3..08508488a882d 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 21c3099fe03a0..aec2bcd38e876 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index 75f6a45ba516b..5449ee21814ed 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 1055592ea94a4..27ab0060f3a1e 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index 1c0fbe3d2dc24..b95be25068fa5 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 7a6dcb74cf6f6..990df98d68829 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 7a90c62273848..b00bdb75ddc5f 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 1ab82caded78f..d676745502b7c 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index a85a3ab667db4..151d290017216 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.devdocs.json b/api_docs/kbn_core_http_router_server_internal.devdocs.json index 829b1aa399a2a..389698df3e85c 100644 --- a/api_docs/kbn_core_http_router_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_router_server_internal.devdocs.json @@ -722,39 +722,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/core-http-router-server-internal", - "id": "def-common.isKibanaResponse", - "type": "Function", - "tags": [], - "label": "isKibanaResponse", - "description": [], - "signature": [ - "(response: Record) => boolean" - ], - "path": "packages/core/http/core-http-router-server-internal/src/response.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/core-http-router-server-internal", - "id": "def-common.isKibanaResponse.$1", - "type": "Object", - "tags": [], - "label": "response", - "description": [], - "signature": [ - "Record" - ], - "path": "packages/core/http/core-http-router-server-internal/src/response.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/core-http-router-server-internal", "id": "def-common.isSafeMethod", diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 8fd07425cc0e0..9726326b3558f 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 50 | 7 | 50 | 6 | +| 48 | 7 | 48 | 6 | ## Common diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index f2c3593331481..5f912403a2588 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index 0dcd5420dc4c1..2b48cd4c4d9da 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -282,6 +282,39 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-common.isKibanaResponse", + "type": "Function", + "tags": [], + "label": "isKibanaResponse", + "description": [], + "signature": [ + "(response: Record) => boolean" + ], + "path": "packages/core/http/core-http-server/src/router/response.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-common.isKibanaResponse.$1", + "type": "Object", + "tags": [], + "label": "response", + "description": [], + "signature": [ + "Record" + ], + "path": "packages/core/http/core-http-server/src/router/response.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [ @@ -12489,7 +12522,7 @@ "tags": [], "label": "description", "description": [ - "Human-friendly description of this endpoint" + "A short, human-friendly description of this endpoint" ], "signature": [ "string | undefined" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index c472f0ebe5ff6..e224ad9a6035f 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 481 | 2 | 191 | 0 | +| 483 | 2 | 193 | 0 | ## Common diff --git a/api_docs/kbn_core_http_server_internal.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index c4010593eac4d..6d7734efc14d9 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -1449,7 +1449,7 @@ "label": "HttpConfigType", "description": [], "signature": [ - "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly port: number; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly cdn: Readonly<{ url?: string | undefined; } & {}>; readonly oas: Readonly<{} & { enabled: boolean; }>; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", + "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly port: number; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly cdn: Readonly<{ url?: string | undefined; } & {}>; readonly oas: Readonly<{} & { enabled: boolean; }>; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 910010ca0ceb2..c69d5b90084e5 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.devdocs.json b/api_docs/kbn_core_http_server_mocks.devdocs.json index 45b54fad65d91..780df3a7f05fc 100644 --- a/api_docs/kbn_core_http_server_mocks.devdocs.json +++ b/api_docs/kbn_core_http_server_mocks.devdocs.json @@ -27,7 +27,7 @@ "label": "createConfigService", "description": [], "signature": [ - "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; port: number; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -64,7 +64,7 @@ "label": "{\n server,\n externalUrl,\n csp,\n}", "description": [], "signature": [ - "Partial<{ server: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; port: number; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + "Partial<{ server: Partial; truststore: Readonly<{ path?: string | undefined; password?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 89445d54b7b71..d76c0bc89d77a 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 73f2fefbfc46d..32c0d38bcfcf9 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 066273b3b0e0c..eb761476f0830 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 381f45c60f72e..bc81df8420ef1 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 07e1549cde04f..7d5183a45b681 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index fc583cb5f8bcb..bec1ac40ae6ca 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 90b96fefbe14e..f689b2fc48671 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index ae23ca4179954..845e53a0f33ac 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index 0a38fc21c7c9e..13170bbff73bd 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 806e6c1c00ac6..33da1ee92153e 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 372effb040a6e..007fbb2a1f029 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index b1d494155a09e..d1fc7449d1ffd 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 29232e1a58112..7cd88b481829e 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index b2e91c9e80541..d0204543b18e5 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index e4d8d49777d28..ef9e4035ec842 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.devdocs.json b/api_docs/kbn_core_logging_server.devdocs.json index 1fa70ad1480c0..d65947d07dd66 100644 --- a/api_docs/kbn_core_logging_server.devdocs.json +++ b/api_docs/kbn_core_logging_server.devdocs.json @@ -516,14 +516,46 @@ "parentPluginId": "@kbn/core-logging-server", "id": "def-common.NumericRollingStrategyConfig.max", "type": "number", - "tags": [], + "tags": [ + "deprecated" + ], "label": "max", "description": [ - "\nThe maximum number of files to keep. Once this number is reached, oldest\nfiles will be deleted. Defaults to `7`" + "\nThe maximum number of files to keep. Once this number is reached, oldest\nfiles will be deleted. Defaults to `7`\n" ], "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/core-logging-server-internal", + "path": "packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/index.ts" + }, + { + "plugin": "@kbn/core-logging-server-internal", + "path": "packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.ts" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/server/config.ts" + }, + { + "plugin": "@kbn/core-logging-server-internal", + "path": "packages/core/logging/core-logging-server-internal/src/appenders/appenders.test.ts" + }, + { + "plugin": "@kbn/core-logging-server-internal", + "path": "packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.ts" + }, + { + "plugin": "@kbn/core-logging-server-internal", + "path": "packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.test.ts" + }, + { + "plugin": "@kbn/core-logging-server-internal", + "path": "packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.ts" + } + ] } ], "initialIsOpen": false @@ -586,6 +618,69 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/core-logging-server", + "id": "def-common.RetentionPolicyConfig", + "type": "Interface", + "tags": [], + "label": "RetentionPolicyConfig", + "description": [], + "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-logging-server", + "id": "def-common.RetentionPolicyConfig.maxFiles", + "type": "number", + "tags": [], + "label": "maxFiles", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-logging-server", + "id": "def-common.RetentionPolicyConfig.maxAccumulatedFileSize", + "type": "Object", + "tags": [], + "label": "maxAccumulatedFileSize", + "description": [], + "signature": [ + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ByteSizeValue", + "text": "ByteSizeValue" + }, + " | undefined" + ], + "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-logging-server", + "id": "def-common.RetentionPolicyConfig.removeOlderThan", + "type": "Object", + "tags": [], + "label": "removeOlderThan", + "description": [], + "signature": [ + "moment.Duration | undefined" + ], + "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/core-logging-server", "id": "def-common.RewriteAppenderConfig", @@ -775,6 +870,29 @@ "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-logging-server", + "id": "def-common.RollingFileAppenderConfig.retention", + "type": "Object", + "tags": [], + "label": "retention", + "description": [ + "\nThe {@link RetentionPolicy | retention strategy} to use to know which files to keep." + ], + "signature": [ + { + "pluginId": "@kbn/core-logging-server", + "scope": "common", + "docId": "kibKbnCoreLoggingServerPluginApi", + "section": "def-common.RetentionPolicyConfig", + "text": "RetentionPolicyConfig" + }, + " | undefined" + ], + "path": "packages/core/logging/core-logging-server/src/appenders/rolling_file.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 747260090f84f..6e0c449eac193 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 56 | 0 | 30 | 0 | +| 61 | 0 | 34 | 0 | ## Common diff --git a/api_docs/kbn_core_logging_server_internal.devdocs.json b/api_docs/kbn_core_logging_server_internal.devdocs.json index cff5e7635a67a..e0f23e8668c97 100644 --- a/api_docs/kbn_core_logging_server_internal.devdocs.json +++ b/api_docs/kbn_core_logging_server_internal.devdocs.json @@ -135,7 +135,7 @@ "section": "def-common.Type", "text": "Type" }, - " | Readonly<{ pattern?: string | undefined; highlight?: boolean | undefined; } & { type: \"pattern\"; }>; }> | Readonly<{} & { type: \"file\"; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ pattern?: string | undefined; highlight?: boolean | undefined; } & { type: \"pattern\"; }>; fileName: string; }> | Readonly<{} & { type: \"rewrite\"; policy: Readonly<{} & { type: \"meta\"; mode: \"update\" | \"remove\"; properties: Readonly<{ value?: string | number | boolean | null | undefined; } & { path: string; }>[]; }>; appenders: string[]; }> | Readonly<{} & { type: \"rolling-file\"; policy: Readonly<{} & { type: \"size-limit\"; size: ", + " | Readonly<{ pattern?: string | undefined; highlight?: boolean | undefined; } & { type: \"pattern\"; }>; }> | Readonly<{} & { type: \"file\"; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ pattern?: string | undefined; highlight?: boolean | undefined; } & { type: \"pattern\"; }>; fileName: string; }> | Readonly<{} & { type: \"rewrite\"; policy: Readonly<{} & { type: \"meta\"; mode: \"update\" | \"remove\"; properties: Readonly<{ value?: string | number | boolean | null | undefined; } & { path: string; }>[]; }>; appenders: string[]; }> | Readonly<{ retention?: Readonly<{ maxFiles?: number | undefined; maxAccumulatedFileSize?: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -143,7 +143,15 @@ "section": "def-common.ByteSizeValue", "text": "ByteSizeValue" }, - "; }> | Readonly<{} & { type: \"time-interval\"; interval: moment.Duration; modulate: boolean; }>; strategy: ", + " | undefined; removeOlderThan?: moment.Duration | undefined; } & {}> | undefined; } & { type: \"rolling-file\"; policy: Readonly<{} & { type: \"size-limit\"; size: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ByteSizeValue", + "text": "ByteSizeValue" + }, + "; }> | Readonly<{} & { type: \"time-interval\"; interval: moment.Duration; modulate: boolean; }>; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ pattern?: string | undefined; highlight?: boolean | undefined; } & { type: \"pattern\"; }>; fileName: string; strategy: ", { "pluginId": "@kbn/core-logging-server", "scope": "common", @@ -151,7 +159,7 @@ "section": "def-common.NumericRollingStrategyConfig", "text": "NumericRollingStrategyConfig" }, - "; layout: Readonly<{} & { type: \"json\"; }> | Readonly<{ pattern?: string | undefined; highlight?: boolean | undefined; } & { type: \"pattern\"; }>; fileName: string; }>>" + "; }>>" ], "path": "packages/core/logging/core-logging-server-internal/src/appenders/appenders.ts", "deprecated": false, diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index b87806c8f29e7..760557105a87c 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 7e34e4dccb834..b82faa7111ba5 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 53e97ef2bd19a..445fcdec86565 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 24a7e5c131ad0..dc3d05b3153d8 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index e6316d6979319..1bc8688caa7a7 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 1a53f81f2ef61..1d617f1be6101 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 68ae2c809567c..e9c6293b64430 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index 9f316811e7b09..7b245c5cf780a 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 586fce400dfc1..b3a41fa67c52e 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index abbb03ebc3abe..8cd0b0260693d 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 6395df82803cc..55ca4f3be1b62 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index e3ce6e4a5f2f0..60c43cf7a649c 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 2ea0fe3132c10..7ca68f076f4be 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 44e15976edd6b..7658e594740b4 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 81f51e12a7dcb..e87a66421f7e8 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index fa09cc682b6a2..98bc840b48c98 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 9757ae8a9d5e6..e3c26bed11d6f 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 1512a06899618..90c11f14a1bdf 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 48a0d4a499103..839614d42e4d3 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index dbc9f639fb173..2c3880639fe58 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index c68d3738fc0d3..c60007d70b375 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.devdocs.json b/api_docs/kbn_core_plugins_server.devdocs.json index 4a254538d5052..3fa52e5e006e1 100644 --- a/api_docs/kbn_core_plugins_server.devdocs.json +++ b/api_docs/kbn_core_plugins_server.devdocs.json @@ -647,7 +647,7 @@ "signature": [ "{ legacy: { globalConfig$: ", "Observable", - " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -673,7 +673,7 @@ }, ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: ", "ByteSizeValueUnit", - " | undefined) => string; }>; }>; }>>; get: () => Readonly<{ elasticsearch: Readonly<{ readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + " | undefined) => string; }>; }>; }>>; get: () => Readonly<{ elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -1285,7 +1285,7 @@ "label": "SharedGlobalConfig", "description": [], "signature": [ - "{ readonly elasticsearch: Readonly<{ readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; readonly path: Readonly<{ readonly data: string; }>; readonly savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + "{ readonly elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; readonly path: Readonly<{ readonly data: string; }>; readonly savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index cc38691bbb838..35db2858409ad 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index a51129c15d708..54aa75555c9d9 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 19a17e85d37f3..c88919959e2fb 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 33f23a14c5580..0ed8711e1a1b2 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 1e0e1b6a7f55d..4eb54c651a446 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index f2b46a6881f19..436a3836e9d79 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index f2472b6e48ee6..025dc4d6e1b2a 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index ae67ba27724aa..bc16a26267810 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index e06735c97fdbb..9f29959ed0c21 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index bb4378eadc76d..2100a394cefc6 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 5b75c3023f6ab..37fa387eca4ca 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 93f2c1060b190..eeb74d584370a 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 07c3849ccff85..19bebc9ef34d8 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index 5a44952788449..0e53013e21a44 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index b7be04c13a6ce..0b19cbee2153b 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 6f6b0f6bbb7b3..c3a4ef433b8bc 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 257ca3b7da962..c55f7ffe60544 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 50a7ff20c624a..65734f8dc89af 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index dc337e01a36ea..537f839182955 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index 41fb3833ab207..cec081caa4a88 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 6b4d296b2269c..c854da3f18a81 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 1c37c674251b2..b096ae1f2fb4e 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index fc673edc2237d..994913340f0bb 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index ff3e1586ddfd9..4cad47eb2ea47 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index f115e3d4fb826..079c840a0575c 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index a7de3d3fa2e03..2cb7c25990a94 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index 1c6a82a269a8a..ddc3f058c2d6a 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 5d210e729f92a..da2262d12f311 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 310912ee46299..a2b59ce4027c2 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index ee15f57320883..702823d36c75e 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 95a030beaf4b8..37d008db98cfa 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 4efa4716816fb..87f1afc656fe0 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index b9daca78bda20..6d6984a63e61e 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index ce997b3e56b81..f7d53f72c5cc8 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 4e19bf206c358..f240e1a37bde7 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 9709b22cbe738..bd182f6862096 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 19d5948c5dd74..072a3c0407348 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 0165cdfc937a2..17f97653e96d2 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index f969e1bd2a20d..f41de20ef3ec4 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index a134001742210..eb94978d41bb8 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index 1802f6068f7ca..910430d3c00f1 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 69161336d824d..a99bc9987aad7 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 3ae9b3ac37b3f..d1997051e26d4 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 2e87a7a8a7f94..1426fd9790084 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 9552b3616e07f..74d3ffa972a4d 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 812e1bb2db4c8..23a064a18e107 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index e1bb7155ef1d5..c3bcf2f4cb839 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 8dd7e3b786f1b..8e1dd17213070 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index fb497b83c8508..7dc47ed62b266 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 6e4535e755767..349774a0ae6bf 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index fbd628e68db83..5f4e7699e945c 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index ccd501052f76b..e4f32e583c914 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 5c6e081394321..7b7f063f5c673 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 6f8402990befd..c4705707e829e 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index 69070d77bfa4d..5733e7e33b5f3 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index 04a57f8ba1604..4160a6ec7a066 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 2e0ffc34911d8..5f351efba4b36 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index 07c5002dfa7fb..bd8fb5b2c19d2 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 9d7a978714b2b..75cb8e8cf1148 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index 512ea9e7f6cd3..66277cb1a8de1 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index b0f8d04fec13c..fa2fe401989fc 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index 478d3e5ee56e7..242a27790bf8c 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 820dbb335f433..cb08d234122ee 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index cf495eca51d36..26b4c22ca7202 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index b917b3c2ddd8a..a311d93e31e01 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index b90269f277bc3..52bb61f369f44 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 8c26e4b54da23..ecccd86c12734 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index 67a86f5f16410..27186905263aa 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 3109582a6ba43..275e28e391a07 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index feb37fcd4a09e..f42a92325fd6d 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index 93b51c32f271a..e62bbe224ae1a 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index eecc34cfd400a..09e1b29a53c35 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index 7f72624e9b526..20d5016c6d7df 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 953def3a022cf..aa0fa31ebf6ff 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index 624bc803c91fa..7fd70263f9adf 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 7823bf7450ba3..c2079b98cdc97 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index 4d0666f647faa..4aff3270dd8ce 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 5e0d20899efce..d09a87ace569d 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 13e6fdc4f2670..474ecf8edf677 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 9119e91a60f35..c8f3ae1c4c20a 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index b94ce2ca93cc4..835e163e103da 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index cdd7abddbe027..0ebd955604ef6 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index 43f640f2bf29e..885d3321b2210 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 54b4dae91e645..3dd32b22e818a 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 32a64921ec3d8..039f16fd0191e 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index a8d33f2f391cd..3efdc6df0eff2 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index 8b219686c5783..f662db109b1a3 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index 946c15fd9fdf7..79b67bd422bc9 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index b35ff786ae1ca..943a776c32b06 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 13ada6e7c678e..2771a2eac3c7e 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 9cad77187b968..1eb1aeeaa3cd9 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 04e043e1da456..3bd620fa58904 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index 7898719de430b..347c8ce6af279 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index 1c929bafba9ad..cbede5bf09db9 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index e27ae0b79a759..c4f37fddc57d7 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 2d60b867b1b9e..a7542207d2e00 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index ef9e8e6bff630..2b6ffb2ad08cf 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index dbf7eda425f2c..1fd8e7a918f3c 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index a143e09478b97..c0f4d889ffa01 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index 457890d11cedc..b0e3cd3b3f508 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 62bad6209ec17..f4c68bbbf0bd5 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 24b4f9b43eac8..1a6bbe320cddb 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index da348a607361e..d6ed825ea89f0 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 4635b574bcb82..c76fcd89d96ef 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 0811cc27d1ee0..23b41fabb47c6 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 8a7da6cc3d36f..c5197372a3732 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index 023850ec9ab08..e44a580c68951 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.devdocs.json b/api_docs/kbn_esql_utils.devdocs.json index c96dcca210c0b..c8468e95b5a46 100644 --- a/api_docs/kbn_esql_utils.devdocs.json +++ b/api_docs/kbn_esql_utils.devdocs.json @@ -67,6 +67,99 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.appendWhereClauseToESQLQuery", + "type": "Function", + "tags": [], + "label": "appendWhereClauseToESQLQuery", + "description": [], + "signature": [ + "(baseESQLQuery: string, field: string, value: unknown, operation: \"+\" | \"-\" | \"_exists_\", fieldType: string | undefined) => string" + ], + "path": "packages/kbn-esql-utils/src/utils/append_to_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.appendWhereClauseToESQLQuery.$1", + "type": "string", + "tags": [], + "label": "baseESQLQuery", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-esql-utils/src/utils/append_to_query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.appendWhereClauseToESQLQuery.$2", + "type": "string", + "tags": [], + "label": "field", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-esql-utils/src/utils/append_to_query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.appendWhereClauseToESQLQuery.$3", + "type": "Unknown", + "tags": [], + "label": "value", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/kbn-esql-utils/src/utils/append_to_query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.appendWhereClauseToESQLQuery.$4", + "type": "CompoundType", + "tags": [], + "label": "operation", + "description": [], + "signature": [ + "\"+\" | \"-\" | \"_exists_\"" + ], + "path": "packages/kbn-esql-utils/src/utils/append_to_query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.appendWhereClauseToESQLQuery.$5", + "type": "string", + "tags": [], + "label": "fieldType", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-esql-utils/src/utils/append_to_query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-utils", "id": "def-common.getESQLAdHocDataview", @@ -137,6 +230,180 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns", + "type": "Function", + "tags": [], + "label": "getESQLQueryColumns", + "description": [], + "signature": [ + "({\n esqlQuery,\n search,\n signal,\n}: { esqlQuery: string; search: ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchGeneric", + "text": "ISearchGeneric" + }, + "; signal?: AbortSignal | undefined; }) => Promise<", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + "[]>" + ], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns.$1", + "type": "Object", + "tags": [], + "label": "{\n esqlQuery,\n search,\n signal,\n}", + "description": [], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns.$1.esqlQuery", + "type": "string", + "tags": [], + "label": "esqlQuery", + "description": [], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns.$1.search", + "type": "Function", + "tags": [], + "label": "search", + "description": [], + "signature": [ + " = ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchRequest", + "text": "IEsSearchRequest" + }, + "<", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchRequestParams", + "text": "ISearchRequestParams" + }, + ">, SearchStrategyResponse extends ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + " = ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + ">(request: SearchStrategyRequest, options?: ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => ", + "Observable", + "" + ], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns.$1.search.$1", + "type": "Uncategorized", + "tags": [], + "label": "request", + "description": [], + "signature": [ + "SearchStrategyRequest" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns.$1.search.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.getESQLQueryColumns.$1.signal", + "type": "Object", + "tags": [], + "label": "signal", + "description": [], + "signature": [ + "AbortSignal | undefined" + ], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-utils", "id": "def-common.getESQLWithSafeLimit", diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index a2f4402ea34de..e99d145b804cc 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 23 | 0 | 21 | 0 | +| 36 | 0 | 34 | 0 | ## Common diff --git a/api_docs/kbn_esql_validation_autocomplete.devdocs.json b/api_docs/kbn_esql_validation_autocomplete.devdocs.json index fc9229883fba6..bdaab839c8862 100644 --- a/api_docs/kbn_esql_validation_autocomplete.devdocs.json +++ b/api_docs/kbn_esql_validation_autocomplete.devdocs.json @@ -384,7 +384,7 @@ "label": "getAllFunctions", "description": [], "signature": [ - "(options: { type: \"grouping\" | \"agg\" | \"builtin\" | \"eval\" | (\"grouping\" | \"agg\" | \"builtin\" | \"eval\")[]; } | undefined) => ", + "(options: { type: \"agg\" | \"builtin\" | \"eval\" | (\"agg\" | \"builtin\" | \"eval\")[]; } | undefined) => ", { "pluginId": "@kbn/esql-validation-autocomplete", "scope": "common", @@ -417,7 +417,7 @@ "label": "type", "description": [], "signature": [ - "\"grouping\" | \"agg\" | \"builtin\" | \"eval\" | (\"grouping\" | \"agg\" | \"builtin\" | \"eval\")[]" + "\"agg\" | \"builtin\" | \"eval\" | (\"agg\" | \"builtin\" | \"eval\")[]" ], "path": "packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts", "deprecated": false, @@ -3149,7 +3149,7 @@ "label": "type", "description": [], "signature": [ - "\"grouping\" | \"agg\" | \"builtin\" | \"eval\"" + "\"agg\" | \"builtin\" | \"eval\"" ], "path": "packages/kbn-esql-validation-autocomplete/src/definitions/types.ts", "deprecated": false, diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 249cb5ed75f3d..d8a22c3c8e1aa 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 522618f72a112..0497932a15450 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 8d2d4837ecc8b..4b575ae79ec83 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 70e8f3e01e482..88f832c05b67c 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 4a79f85d7e498..603ed7c7cf2ed 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.devdocs.json b/api_docs/kbn_field_utils.devdocs.json index 157c6b0aeaef4..6ffd8029c7422 100644 --- a/api_docs/kbn_field_utils.devdocs.json +++ b/api_docs/kbn_field_utils.devdocs.json @@ -19,6 +19,64 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "@kbn/field-utils", + "id": "def-common.comboBoxFieldOptionMatcher", + "type": "Function", + "tags": [], + "label": "comboBoxFieldOptionMatcher", + "description": [ + "\nAdapts fieldNameWildcardMatcher to combobox props." + ], + "signature": [ + "({ option: { name, label }, searchValue, }: { option: { name?: string | undefined; label: string; }; searchValue: string; }) => boolean" + ], + "path": "packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/field-utils", + "id": "def-common.comboBoxFieldOptionMatcher.$1", + "type": "Object", + "tags": [], + "label": "{\n option: { name, label },\n searchValue,\n}", + "description": [], + "path": "packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/field-utils", + "id": "def-common.comboBoxFieldOptionMatcher.$1.option", + "type": "Object", + "tags": [], + "label": "option", + "description": [], + "signature": [ + "{ name?: string | undefined; label: string; }" + ], + "path": "packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/field-utils", + "id": "def-common.comboBoxFieldOptionMatcher.$1.searchValue", + "type": "string", + "tags": [], + "label": "searchValue", + "description": [], + "path": "packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/field-utils", "id": "def-common.FieldDescription", diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 4fb0a35c238be..6839efe3a3ccd 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 50 | 0 | 42 | 1 | +| 54 | 0 | 45 | 1 | ## Common diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index f6aa92280ce39..f615623cf250b 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 54f6fb3e7ff3b..ed99d2a221503 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index fb4e129fdc4b7..d219f60dfb064 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index f47c8d0c2ba8b..1a7eb37080649 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index a927efa2d702f..30580ae4c8d44 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 6edd155471161..fc3cffb14612d 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 914af1dd7dd06..dae29500ce1c3 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 8cec7f511e239..f4e63a110b2ef 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 114518143d099..9b706e6126c4c 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 9da18676fc9e5..f600b15499a81 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index b743ede5062f5..82102f4a3b2f4 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index f3aca403306b1..2348cb255c8f2 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index ee8fb0e53101c..287b7475f75f7 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 970372c0a3fb4..3b4980b3e373c 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 8b46090bd01fa..b5cfe939cbfb1 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 734dec10d3ba8..50da53e3223bf 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index 8430e417516cb..a4f18d7409c5c 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 7e495fb9f92ea..3018154addf45 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 88130ef950632..009b605b19a58 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 8263dfae4a34a..cd478ada61389 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index 518769edad85e..cf26044b404a0 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index b7f985e7af673..278ebcf7b790d 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 9088e7207f757..548a257461c60 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index 00138d84053a4..859ce5160f1cd 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 93097f4524e87..b0faa49a4da1a 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 6780f396ad21e..34f26aac4015b 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index c1a14f14e4ef5..73e6e70858a32 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 8f58d209f90ae..af6a2e5b0dfec 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index 883de660fdbe1..e4af7c8ed45d7 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index 257e1a56bc391..caeff8291997f 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index f863e325272dd..c1f6703381756 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index 68596564adb0e..0e90670db8588 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index dd752dc01afa7..1062960e6baa7 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index e732d39b741e2..43d31a7111ca6 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index b1a450ad7f8eb..77dea1a4d5ff9 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index 6896e1cbdacb5..1c406bb36d017 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index 6ecdc484a9dbc..b84cc994d7233 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 42df626d29838..cb5ba34545130 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 7327aa7e05bcd..4ba501fa9ce51 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index dcf8f5fbc4fca..17a64de2c250e 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 1ee9b8b3bb7e5..9416cdb7b2d7e 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 4f590e67a27f9..6bd16cbbeaaa5 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index 6fb20cd7c43f1..5c3d1a0123ac6 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 7b9a2033fe8da..656399f08cc8a 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index dcb3a9f8dd6bf..9f6d19f82c8ab 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 5edc0d8fe83dd..8177ce30e5845 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 5bf64bb180c89..7076e947ab449 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 3dd840a222309..ee05e2aa8891b 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 160a069e6ab6d..73cd348654f9a 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.devdocs.json b/api_docs/kbn_ml_cancellable_search.devdocs.json index 499b6b7d30191..1f4d3468b63d8 100644 --- a/api_docs/kbn_ml_cancellable_search.devdocs.json +++ b/api_docs/kbn_ml_cancellable_search.devdocs.json @@ -37,9 +37,9 @@ }, ") => { runRequest: JSX.Element" + "({ color, id, threshold }: Props) => JSX.Element" ], "path": "x-pack/packages/observability/alert_details/src/components/alert_threshold_time_range_rect.tsx", "deprecated": false, @@ -137,7 +137,7 @@ "id": "def-common.AlertThresholdTimeRangeRect.$1", "type": "Object", "tags": [], - "label": "{ alertStarted, color, id, threshold }", + "label": "{ color, id, threshold }", "description": [], "signature": [ "Props" diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 6a03375f2acc1..96c658019a75c 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 8fd14ed4e3625..58e29d82f0290 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index f530e6ccf3ba4..63a76e69b532e 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index 1b356bc305cf6..4d47bfec0599a 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 705a3c5ef554a..aca31e63e1315 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 3c7e0b0156b03..45ea3093a17eb 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 195406d4b8675..c7a1e8379b09f 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 5e64e8c5865a4..25541a0714530 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index ba952b1d130d4..1dd72a622d926 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 472817e1498e3..f54b24e9715e6 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index 147e1b99a5445..0cb0928413318 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 79fb6159331e9..c8eecd043d12b 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 42114547d9672..fd779bc7cd835 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 83a13ad723506..584bdf62f3b36 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index b196c87f62f36..baffa06d1b7a5 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 8cf550f330c27..ce0ea9cce6ee3 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index 016961031dab6..1c55b41484b3c 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 035c320e955da..a63dee90884f9 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.devdocs.json b/api_docs/kbn_react_hooks.devdocs.json new file mode 100644 index 0000000000000..fbe31cf8a7b8c --- /dev/null +++ b/api_docs/kbn_react_hooks.devdocs.json @@ -0,0 +1,170 @@ +{ + "id": "@kbn/react-hooks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.useBoolean", + "type": "Function", + "tags": [], + "label": "useBoolean", + "description": [], + "signature": [ + "(initialValue?: boolean) => ", + { + "pluginId": "@kbn/react-hooks", + "scope": "common", + "docId": "kibKbnReactHooksPluginApi", + "section": "def-common.UseBooleanResult", + "text": "UseBooleanResult" + } + ], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.useBoolean.$1", + "type": "boolean", + "tags": [], + "label": "initialValue", + "description": [], + "signature": [ + "boolean" + ], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.UseBooleanHandlers", + "type": "Interface", + "tags": [], + "label": "UseBooleanHandlers", + "description": [], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.UseBooleanHandlers.on", + "type": "Function", + "tags": [], + "label": "on", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.UseBooleanHandlers.off", + "type": "Function", + "tags": [], + "label": "off", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.UseBooleanHandlers.toggle", + "type": "Function", + "tags": [], + "label": "toggle", + "description": [], + "signature": [ + "(nextValue?: any) => void" + ], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.UseBooleanHandlers.toggle.$1", + "type": "Any", + "tags": [], + "label": "nextValue", + "description": [], + "signature": [ + "any" + ], + "path": "node_modules/react-use/lib/useToggle.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/react-hooks", + "id": "def-common.UseBooleanResult", + "type": "Type", + "tags": [], + "label": "UseBooleanResult", + "description": [], + "signature": [ + "[boolean, ", + { + "pluginId": "@kbn/react-hooks", + "scope": "common", + "docId": "kibKbnReactHooksPluginApi", + "section": "def-common.UseBooleanHandlers", + "text": "UseBooleanHandlers" + }, + "]" + ], + "path": "packages/kbn-react-hooks/src/use_boolean/use_boolean.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx new file mode 100644 index 0000000000000..a4a9827078195 --- /dev/null +++ b/api_docs/kbn_react_hooks.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnReactHooksPluginApi +slug: /kibana-dev-docs/api/kbn-react-hooks +title: "@kbn/react-hooks" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/react-hooks plugin +date: 2024-05-08 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] +--- +import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; + + + +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 8 | 0 | 7 | 0 | + +## Common + +### Functions + + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index f24d57fa16f7d..737794c7a7018 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index e5534f5bfa600..a3924dc98533d 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index 174f54e32e6a0..c1eb84d8dcef9 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 450a675ccfa4a..8dc725ac9b19d 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index b169e84e6f233..24aea98682596 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 75a71f27b38cb..1dea19036a56b 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index ffe0ec4dbbfcf..994174d383db5 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 95a76726f31d9..a036728bfa474 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index a5816d13a81ce..b4d823ce189ef 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index bb3d45f0dbf79..ea397c55aeaad 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index c471f1b69636d..384a1b6c3ce9a 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index 0362f4b8b4bbc..13e1763209f46 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index f089b5361a1b2..64e9d43ac3c5e 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 58fee25329c12..229970ec38a14 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index ff60d5c2a6edb..a997f48a76a6c 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 754e5df33ec6e..6a835280cde95 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index b091989cb810b..b984a825f34d4 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index 4d565cc085b58..448006dab4f13 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index 298d172e87f38..84489934e1c4f 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index defe2de3d0c4d..c8c1349a7e6bc 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index f47ed80994086..f67184cffcb19 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index f2b9c1620c87c..86b4955b8d39b 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 36cd39ec0e337..00308de9965f8 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index d918585a73d6e..63b8d8665a2e2 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index 3939bc0d6c3cb..8ca9c60efac79 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index 175b8f83ddf12..d6bf8f4481a7d 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 8e60accce1647..cda7f96c0a91f 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index f62eda687fdb0..56d61e43af6ac 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 2c4ee4d736209..51f2fbc6c137c 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 9e847c53f837c..a0105096c3fb8 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.devdocs.json b/api_docs/kbn_search_errors.devdocs.json index 897b63cf2bbcc..abb6c8f63c181 100644 --- a/api_docs/kbn_search_errors.devdocs.json +++ b/api_docs/kbn_search_errors.devdocs.json @@ -47,7 +47,14 @@ "label": "attributes", "description": [], "signature": [ - "IEsErrorAttributes | undefined" + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsErrorAttributes", + "text": "IEsErrorAttributes" + }, + " | undefined" ], "path": "packages/kbn-search-errors/src/es_error.tsx", "deprecated": false, @@ -361,7 +368,15 @@ "section": "def-common.KibanaServerError", "text": "KibanaServerError" }, - "" + "<", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsErrorAttributes", + "text": "IEsErrorAttributes" + }, + ">" ], "path": "packages/kbn-search-errors/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index c96821b11542e..79f2a94705686 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index 63c7db66aabea..a9199387d3715 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 541579efc4fb8..bfa697a730ac5 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.devdocs.json b/api_docs/kbn_search_types.devdocs.json new file mode 100644 index 0000000000000..2278e0ff9e98d --- /dev/null +++ b/api_docs/kbn_search_types.devdocs.json @@ -0,0 +1,1023 @@ +{ + "id": "@kbn/search-types", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsErrorAttributes", + "type": "Interface", + "tags": [], + "label": "IEsErrorAttributes", + "description": [], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsErrorAttributes.error", + "type": "CompoundType", + "tags": [], + "label": "error", + "description": [], + "signature": [ + "ErrorCause", + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsErrorAttributes.rawResponse", + "type": "Object", + "tags": [], + "label": "rawResponse", + "description": [], + "signature": [ + "SearchResponseBody", + "> | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsErrorAttributes.requestParams", + "type": "Object", + "tags": [], + "label": "requestParams", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.SanitizedConnectionRequestParams", + "text": "SanitizedConnectionRequestParams" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsSearchRequest", + "type": "Interface", + "tags": [], + "label": "IEsSearchRequest", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchRequest", + "text": "IEsSearchRequest" + }, + " extends ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchRequest", + "text": "IKibanaSearchRequest" + }, + "" + ], + "path": "packages/kbn-search-types/src/es_search_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsSearchRequest.indexType", + "type": "string", + "tags": [], + "label": "indexType", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-search-types/src/es_search_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchRequest", + "type": "Interface", + "tags": [], + "label": "IKibanaSearchRequest", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchRequest", + "text": "IKibanaSearchRequest" + }, + "" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchRequest.id", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "\nAn id can be used to uniquely identify this request." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchRequest.params", + "type": "Uncategorized", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "Params | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse", + "type": "Interface", + "tags": [], + "label": "IKibanaSearchResponse", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + "" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.id", + "type": "string", + "tags": [], + "label": "id", + "description": [ + "\nSome responses may contain a unique id to identify the request this response came from." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.total", + "type": "number", + "tags": [], + "label": "total", + "description": [ + "\nIf relevant to the search strategy, return a total number\nthat represents how progress is indicated." + ], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.loaded", + "type": "number", + "tags": [], + "label": "loaded", + "description": [ + "\nIf relevant to the search strategy, return a loaded number\nthat represents how progress is indicated." + ], + "signature": [ + "number | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.isRunning", + "type": "CompoundType", + "tags": [], + "label": "isRunning", + "description": [ + "\nIndicates whether search is still in flight" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.isPartial", + "type": "CompoundType", + "tags": [], + "label": "isPartial", + "description": [ + "\nIndicates whether the results returned are complete or partial" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.isRestored", + "type": "CompoundType", + "tags": [], + "label": "isRestored", + "description": [ + "\nIndicates whether the results returned are from the async-search index" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.isStored", + "type": "CompoundType", + "tags": [], + "label": "isStored", + "description": [ + "\nIndicates whether the search has been saved to a search-session object and long keepAlive was set" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.warning", + "type": "string", + "tags": [], + "label": "warning", + "description": [ + "\nOptional warnings returned from Elasticsearch (for example, deprecation warnings)" + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.rawResponse", + "type": "Uncategorized", + "tags": [], + "label": "rawResponse", + "description": [ + "\nThe raw response returned by the internal search method (usually the raw ES response)" + ], + "signature": [ + "RawResponse" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IKibanaSearchResponse.requestParams", + "type": "Object", + "tags": [], + "label": "requestParams", + "description": [ + "\nHTTP request parameters from elasticsearch transport client t" + ], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.SanitizedConnectionRequestParams", + "text": "SanitizedConnectionRequestParams" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/kibana_search_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient", + "type": "Interface", + "tags": [], + "label": "ISearchClient", + "description": [], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.search", + "type": "Function", + "tags": [], + "label": "search", + "description": [], + "signature": [ + " = ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchRequest", + "text": "IEsSearchRequest" + }, + "<", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchRequestParams", + "text": "ISearchRequestParams" + }, + ">, SearchStrategyResponse extends ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + " = ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + ">(request: SearchStrategyRequest, options?: ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => ", + "Observable", + "" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.search.$1", + "type": "Uncategorized", + "tags": [], + "label": "request", + "description": [], + "signature": [ + "SearchStrategyRequest" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.search.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.cancel", + "type": "Function", + "tags": [], + "label": "cancel", + "description": [ + "\nUsed to cancel an in-progress search request." + ], + "signature": [ + "(id: string, options?: ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => Promise" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.cancel.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.cancel.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.extend", + "type": "Function", + "tags": [], + "label": "extend", + "description": [ + "\nUsed to extend the TTL of an in-progress search request." + ], + "signature": [ + "(id: string, keepAlive: string, options?: ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => Promise" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.extend.$1", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.extend.$2", + "type": "string", + "tags": [], + "label": "keepAlive", + "description": [], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchClient.extend.$3", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions", + "type": "Interface", + "tags": [], + "label": "ISearchOptions", + "description": [], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.abortSignal", + "type": "Object", + "tags": [], + "label": "abortSignal", + "description": [ + "\nAn `AbortSignal` that allows the caller of `search` to abort a search request." + ], + "signature": [ + "AbortSignal | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.strategy", + "type": "string", + "tags": [], + "label": "strategy", + "description": [ + "\nUse this option to force using a specific server side search strategy. Leave empty to use the default strategy." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.legacyHitsTotal", + "type": "CompoundType", + "tags": [], + "label": "legacyHitsTotal", + "description": [ + "\nRequest the legacy format for the total number of hits. If sending `rest_total_hits_as_int` to\nsomething other than `true`, this should be set to `false`." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.sessionId", + "type": "string", + "tags": [], + "label": "sessionId", + "description": [ + "\nA session ID, grouping multiple search requests into a single session." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.isStored", + "type": "CompoundType", + "tags": [], + "label": "isStored", + "description": [ + "\nWhether the session is already saved (i.e. sent to background)" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.isSearchStored", + "type": "CompoundType", + "tags": [], + "label": "isSearchStored", + "description": [ + "\nWhether the search was successfully polled after session was saved. Search was added to a session saved object and keepAlive extended." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.isRestore", + "type": "CompoundType", + "tags": [], + "label": "isRestore", + "description": [ + "\nWhether the session is restored (i.e. search requests should re-use the stored search IDs,\nrather than starting from scratch)" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.retrieveResults", + "type": "CompoundType", + "tags": [], + "label": "retrieveResults", + "description": [ + "\nBy default, when polling, we don't retrieve the results of the search request (until it is complete). (For async\nsearch, this is the difference between calling _async_search/{id} and _async_search/status/{id}.) setting this to\n`true` will request the search results, regardless of whether or not the search is complete." + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.executionContext", + "type": "Object", + "tags": [], + "label": "executionContext", + "description": [ + "\nRepresents a meta-information about a Kibana entity intitating a saerch request." + ], + "signature": [ + { + "pluginId": "@kbn/core-execution-context-common", + "scope": "common", + "docId": "kibKbnCoreExecutionContextCommonPluginApi", + "section": "def-common.KibanaExecutionContext", + "text": "KibanaExecutionContext" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.indexPattern", + "type": "Object", + "tags": [], + "label": "indexPattern", + "description": [ + "\nIndex pattern reference is used for better error messages" + ], + "signature": [ + { + "pluginId": "dataViews", + "scope": "common", + "docId": "kibDataViewsPluginApi", + "section": "def-common.DataView", + "text": "DataView" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptions.transport", + "type": "Object", + "tags": [], + "label": "transport", + "description": [ + "\nTransportRequestOptions, other than `signal`, to pass through to the ES client.\nTo pass an abort signal, use {@link ISearchOptions.abortSignal}" + ], + "signature": [ + "Omit<", + "TransportRequestOptions", + ", \"signal\"> | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.IEsSearchResponse", + "type": "Type", + "tags": [], + "label": "IEsSearchResponse", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + "<", + "SearchResponse", + ">>" + ], + "path": "packages/kbn-search-types/src/es_search_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchGeneric", + "type": "Type", + "tags": [], + "label": "ISearchGeneric", + "description": [], + "signature": [ + " = ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchRequest", + "text": "IEsSearchRequest" + }, + "<", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchRequestParams", + "text": "ISearchRequestParams" + }, + ">, SearchStrategyResponse extends ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IKibanaSearchResponse", + "text": "IKibanaSearchResponse" + }, + " = ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.IEsSearchResponse", + "text": "IEsSearchResponse" + }, + ">(request: SearchStrategyRequest, options?: ", + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined) => ", + "Observable", + "" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchGeneric.$1", + "type": "Uncategorized", + "tags": [], + "label": "request", + "description": [], + "signature": [ + "SearchStrategyRequest" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchGeneric.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + { + "pluginId": "@kbn/search-types", + "scope": "common", + "docId": "kibKbnSearchTypesPluginApi", + "section": "def-common.ISearchOptions", + "text": "ISearchOptions" + }, + " | undefined" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchOptionsSerializable", + "type": "Type", + "tags": [], + "label": "ISearchOptionsSerializable", + "description": [ + "\nSame as `ISearchOptions`, but contains only serializable fields, which can\nbe sent over the network." + ], + "signature": [ + "{ executionContext?: ", + { + "pluginId": "@kbn/core-execution-context-common", + "scope": "common", + "docId": "kibKbnCoreExecutionContextCommonPluginApi", + "section": "def-common.KibanaExecutionContext", + "text": "KibanaExecutionContext" + }, + " | undefined; isStored?: boolean | undefined; isRestore?: boolean | undefined; sessionId?: string | undefined; strategy?: string | undefined; legacyHitsTotal?: boolean | undefined; isSearchStored?: boolean | undefined; retrieveResults?: boolean | undefined; }" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.ISearchRequestParams", + "type": "Type", + "tags": [], + "label": "ISearchRequestParams", + "description": [], + "signature": [ + "{ trackTotalHits?: boolean | undefined; } & ", + "SearchRequest" + ], + "path": "packages/kbn-search-types/src/es_search_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/search-types", + "id": "def-common.SanitizedConnectionRequestParams", + "type": "Type", + "tags": [], + "label": "SanitizedConnectionRequestParams", + "description": [], + "signature": [ + "{ path: string; method: string; querystring?: string | undefined; }" + ], + "path": "packages/kbn-search-types/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx new file mode 100644 index 0000000000000..98737a76c1d68 --- /dev/null +++ b/api_docs/kbn_search_types.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnSearchTypesPluginApi +slug: /kibana-dev-docs/api/kbn-search-types +title: "@kbn/search-types" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/search-types plugin +date: 2024-05-08 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] +--- +import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; + + + +Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 50 | 0 | 25 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 3d7fa23500d08..0ba38dd17380c 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 49d71376966f4..894066c8b1fe9 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index c1c4f1febc74c..674c0abea2b40 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 44259ba44f358..963b42e46dd90 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index 068c67ade5634..c04c7de538c73 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index daa048aea5428..cb253347cbc41 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 783888be45d79..24e88411d9141 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 3d32c87bdfbde..cce9a8844406d 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index a03ceb372a78a..0f3d7d1df612e 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index d8e20ebb22902..3ea5e0624cf2f 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 3f746498799c3..84f480182714e 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index 1ed62a1f7112d..5bbd897cc3517 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index e561cd9db72cf..7c5b557d9f0db 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index 163d845782706..2001d71073087 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 016e7d81c05bf..03964bf312ca5 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index 2ccdbd4b131e9..67ba959b10650 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index cbb650bea9e51..ce2018bfb9ef9 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 90a1dc6991f53..7111cece6d4e2 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 6f428437c4cf1..95effbf79e021 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index b54e020c37452..b1fceac4a47df 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 65b5f90c5ab8f..58668baf6d733 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 702615e07593b..5b482f7a56b9b 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 4f6bceea8271a..44fd3534e446a 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 29209165370b5..48e1fdd678901 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index b743b238d1ade..cc8027cc3be35 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 66cb46d1658be..b464b612968c0 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index f96786e523057..f34f682ad1b48 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 112957c994e09..3808fbcebc308 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index d7c30cf15b82f..c165d5180e19b 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index 4df9389cc6988..7df050ea213c7 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 281a0e42da914..d2bd002648b79 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index e417886944f27..f32ab84c1c539 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 3f1156d752e47..61d49f298f277 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 13ed420268c47..bb968c2716759 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index bc42fc22a8e6d..f7d5e865ed06a 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 6ab5d1864ed93..19f0fe11a6370 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 87356bb823eab..79e9c33b322e4 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 91f2fdd7f17e7..3d015816baa52 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 87a6d7f6e65bb..c012bd8998dba 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 7571a19febfd2..99eded234e519 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 9811c017721f6..cdffb1b8091cb 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index d7e68caaac563..bd9ab20facdac 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index c60a3ade7e927..3f863f70b1872 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index 639cc762b3f53..bef3b036f9d1e 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 119124a4dfe1b..0f80389d077ff 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index bacf2d75b5730..f59f540c257a6 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 551c9699a968d..a54f9d738ed55 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index df627f8e3bdce..2b75de54cf168 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index 0cb7b0db7edea..855ca7474ee22 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index 82297325b69be..b41f45632d26e 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index cb3b77dc4b256..26189e5b1e596 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 7b0619cb275fe..5966718c556df 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index cbb812b2712d4..285b93461d54f 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 05ffbd8d22550..0bd237db76249 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 772fde1949d18..dce5478e34f04 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index e7af896663c9c..2a71a39a941ea 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 2a468a20741a4..b02276d3e017e 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 106f4b5cd24bc..dee130e7ca4c7 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index f2fa8127b6ba0..b0f1a0bce65d5 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index b223773aa1cf2..edbc47ccce5fc 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index cc80f28e370a2..f5e468c86d9fc 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 34516124b57ea..014630a24dfc8 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 7c2259fe1c33e..9eb76301ad45c 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 6bd20d5ae7532..3ee844b814fd8 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 115edc896826e..8c4a1100e17ef 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 66fd33b9acc90..ce4ce918a5b19 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 8dc682bcd1b43..f99a9c18ce457 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index 3dc6716aaf1ed..349366bed379c 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index ffa4bba20dcf0..7bb92215492e5 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index c19cfb1926dbf..c065418433bc2 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 08608827b8461..3d3c5089239af 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index e6f95b825e6b3..e12f604f5f213 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index c426891cd4c26..2c5a79a636b4b 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 0b8123acb6cb8..078374f3aa83a 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index aedf3ea9ff6a8..d687446afc878 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_es.mdx b/api_docs/kbn_solution_nav_es.mdx index abb2769a08a12..cc72fdeadd5a5 100644 --- a/api_docs/kbn_solution_nav_es.mdx +++ b/api_docs/kbn_solution_nav_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-es title: "@kbn/solution-nav-es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-es plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-es'] --- import kbnSolutionNavEsObj from './kbn_solution_nav_es.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_oblt.mdx b/api_docs/kbn_solution_nav_oblt.mdx index 3f5966e9ee40b..53a91f8725521 100644 --- a/api_docs/kbn_solution_nav_oblt.mdx +++ b/api_docs/kbn_solution_nav_oblt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-oblt title: "@kbn/solution-nav-oblt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-oblt plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-oblt'] --- import kbnSolutionNavObltObj from './kbn_solution_nav_oblt.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 896e53ceabddd..3ee86801b7100 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index f8a45f420beca..a0618235ff0d1 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 1bf2c41f424cd..b34160f5ce46f 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index e33614be845fb..a23ee54528d4e 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index fb5b530fbab75..dc828b440e97d 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 5a31e3ce140f5..1147790709652 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index badabe4828828..ea67dcb00429f 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.devdocs.json b/api_docs/kbn_test_eui_helpers.devdocs.json index bb3fc948f8585..aab4d099fcc9a 100644 --- a/api_docs/kbn_test_eui_helpers.devdocs.json +++ b/api_docs/kbn_test_eui_helpers.devdocs.json @@ -18,6 +18,174 @@ }, "common": { "classes": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness", + "type": "Class", + "tags": [], + "label": "EuiButtonGroupTestHarness", + "description": [], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.testId", + "type": "string", + "tags": [], + "label": "#testId", + "description": [], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.buttonGroup", + "type": "Object", + "tags": [], + "label": "#buttonGroup", + "description": [ + "\nReturns button group or throws" + ], + "signature": [ + "HTMLElement" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.Unnamed.$1", + "type": "string", + "tags": [], + "label": "testId", + "description": [], + "signature": [ + "string" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.testId", + "type": "string", + "tags": [], + "label": "testId", + "description": [ + "\nReturns `data-test-subj` of button group" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.self", + "type": "CompoundType", + "tags": [], + "label": "self", + "description": [ + "\nReturns button group if found, otherwise `null`" + ], + "signature": [ + "HTMLElement | null" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.options", + "type": "Array", + "tags": [], + "label": "options", + "description": [ + "\nReturns all options of button groups" + ], + "signature": [ + "HTMLElement[]" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.selected", + "type": "Object", + "tags": [], + "label": "selected", + "description": [ + "\nReturns selected value of button group" + ], + "signature": [ + "HTMLElement" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.select", + "type": "Function", + "tags": [], + "label": "select", + "description": [ + "\nSelect option from group" + ], + "signature": [ + "(optionName: string | RegExp) => void" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/test-eui-helpers", + "id": "def-common.EuiButtonGroupTestHarness.select.$1", + "type": "CompoundType", + "tags": [], + "label": "optionName", + "description": [], + "signature": [ + "string | RegExp" + ], + "path": "packages/kbn-test-eui-helpers/src/rtl_helpers.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/test-eui-helpers", "id": "def-common.EuiSuperDatePickerTestHarness", diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 30ba40d52aa01..d64acfa934ec9 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 8 | 0 | +| 25 | 0 | 13 | 0 | ## Common diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 00db5b3dcbe50..720d2944cfe9c 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 3714d1b9283f3..d9e5633ebe4b0 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index bfeae4d9e14dc..918e1d1b70c88 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index 7d648c2f006c2..2ee85e0267a7a 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index cf27eb718e2c8..39930a01aa3bf 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 3dea65f6bbc48..b02456af22e81 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index b3cb159a722c3..56680c202444f 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index 5b1db67995190..c37c1a40ed7a7 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 048e69442256f..66105a80c08da 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index d53a09c4fe863..95adc7119b535 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index a3c7dd6a78d83..67e43fd0987c2 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.devdocs.json b/api_docs/kbn_unified_data_table.devdocs.json index d3915e18bc932..087c4916b5b9c 100644 --- a/api_docs/kbn_unified_data_table.devdocs.json +++ b/api_docs/kbn_unified_data_table.devdocs.json @@ -1127,60 +1127,12 @@ "\nFunction to add a filter in the grid cell or document flyout" ], "signature": [ - "(mapping: string | ", - "FieldMapping", - " | undefined, value: unknown, mode: \"+\" | \"-\") => void" + "DocViewFilterFn", + " | undefined" ], "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.UnifiedDataTableProps.onFilter.$1", - "type": "CompoundType", - "tags": [], - "label": "mapping", - "description": [], - "signature": [ - "string | ", - "FieldMapping", - " | undefined" - ], - "path": "packages/kbn-unified-doc-viewer/src/services/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.UnifiedDataTableProps.onFilter.$2", - "type": "Unknown", - "tags": [], - "label": "value", - "description": [], - "signature": [ - "unknown" - ], - "path": "packages/kbn-unified-doc-viewer/src/services/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/unified-data-table", - "id": "def-common.UnifiedDataTableProps.onFilter.$3", - "type": "CompoundType", - "tags": [], - "label": "mode", - "description": [], - "signature": [ - "\"+\" | \"-\"" - ], - "path": "packages/kbn-unified-doc-viewer/src/services/types.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "trackAdoption": false }, { "parentPluginId": "@kbn/unified-data-table", diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index dd14edd8258f9..4b6bfd75b662f 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 152 | 0 | 83 | 2 | +| 149 | 0 | 80 | 2 | ## Common diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 87eb1cbd5279d..c8eba4cf7042d 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 18 | 0 | 17 | 6 | +| 18 | 0 | 17 | 5 | ## Common diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 5dd0e676a7c6d..a8821d93cc15d 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index 2a7f1cb9b5c41..493aed470644a 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 61e4a9716c7e7..d62aa1eb808eb 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index eb6e690321488..d1ac1b7398282 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index a2df23f4db6d3..0f5083903f730 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index 0d30158e019b2..55bf2843a0d5d 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 39f354634d429..d6b517965b9cb 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 95cf99433e25f..18437e06d74c4 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index a859962a2dd5f..e9893305bf30d 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index f1bcf51dd1649..f866cfb34cc88 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 1e45366b9ccfe..b61e1d4b1f5e5 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 40309dc42a145..0603046cae833 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 165aa681bf96a..861d3dce2b527 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 52281269feeee..fb67fa4907473 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -511,86 +511,6 @@ "deprecated": true, "trackAdoption": false, "references": [ - { - "plugin": "devTools", - "path": "src/plugins/dev_tools/public/application.tsx" - }, - { - "plugin": "devTools", - "path": "src/plugins/dev_tools/public/application.tsx" - }, - { - "plugin": "devTools", - "path": "src/plugins/dev_tools/public/application.tsx" - }, - { - "plugin": "console", - "path": "src/plugins/console/public/shared_imports.ts" - }, - { - "plugin": "crossClusterReplication", - "path": "x-pack/plugins/cross_cluster_replication/public/shared_imports.ts" - }, - { - "plugin": "grokdebugger", - "path": "x-pack/plugins/grokdebugger/public/shared_imports.ts" - }, - { - "plugin": "ingestPipelines", - "path": "x-pack/plugins/ingest_pipelines/public/shared_imports.ts" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_imports.ts" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/application.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/application.tsx" - }, - { - "plugin": "osquery", - "path": "x-pack/plugins/osquery/public/application.tsx" - }, { "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx" @@ -603,38 +523,6 @@ "plugin": "infra", "path": "x-pack/plugins/observability_solution/infra/public/apps/common_providers.tsx" }, - { - "plugin": "painlessLab", - "path": "x-pack/plugins/painless_lab/public/shared_imports.ts" - }, - { - "plugin": "painlessLab", - "path": "x-pack/plugins/painless_lab/public/application/index.tsx" - }, - { - "plugin": "painlessLab", - "path": "x-pack/plugins/painless_lab/public/application/index.tsx" - }, - { - "plugin": "painlessLab", - "path": "x-pack/plugins/painless_lab/public/application/index.tsx" - }, - { - "plugin": "searchprofiler", - "path": "x-pack/plugins/searchprofiler/public/shared_imports.ts" - }, - { - "plugin": "searchprofiler", - "path": "x-pack/plugins/searchprofiler/public/application/index.tsx" - }, - { - "plugin": "searchprofiler", - "path": "x-pack/plugins/searchprofiler/public/application/index.tsx" - }, - { - "plugin": "searchprofiler", - "path": "x-pack/plugins/searchprofiler/public/application/index.tsx" - }, { "plugin": "metricsDataAccess", "path": "x-pack/plugins/observability_solution/metrics_data_access/public/apps/common_providers.tsx" @@ -670,18 +558,6 @@ { "plugin": "observabilityOnboarding", "path": "x-pack/plugins/observability_solution/observability_onboarding/public/application/app.tsx" - }, - { - "plugin": "filesManagement", - "path": "src/plugins/files_management/public/mount_management_section.tsx" - }, - { - "plugin": "filesManagement", - "path": "src/plugins/files_management/public/mount_management_section.tsx" - }, - { - "plugin": "filesManagement", - "path": "src/plugins/files_management/public/mount_management_section.tsx" } ], "children": [ @@ -1140,62 +1016,6 @@ "deprecated": true, "trackAdoption": false, "references": [ - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/delete_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/extend_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/inspect_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/session/sessions_mgmt/components/actions/rename_button.tsx" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/search_interceptor/search_interceptor.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/search_interceptor/search_interceptor.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/search_interceptor/search_interceptor.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/public/search/search_interceptor/search_interceptor.ts" - }, - { - "plugin": "timelines", - "path": "x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx" - }, - { - "plugin": "timelines", - "path": "x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx" - }, { "plugin": "observabilityShared", "path": "x-pack/plugins/observability_solution/observability_shared/public/components/header_menu/header_menu_portal.tsx" @@ -1203,58 +1023,6 @@ { "plugin": "observabilityShared", "path": "x-pack/plugins/observability_solution/observability_shared/public/components/header_menu/header_menu_portal.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" - }, - { - "plugin": "cloudSecurityPosture", - "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" - }, - { - "plugin": "console", - "path": "src/plugins/console/public/shared_imports.ts" - }, - { - "plugin": "console", - "path": "src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts" - }, - { - "plugin": "console", - "path": "src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts" - }, - { - "plugin": "runtimeFields", - "path": "x-pack/plugins/runtime_fields/public/shared_imports.ts" - }, - { - "plugin": "runtimeFields", - "path": "x-pack/plugins/runtime_fields/public/load_editor.tsx" - }, - { - "plugin": "runtimeFields", - "path": "x-pack/plugins/runtime_fields/public/load_editor.tsx" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" } ], "children": [ diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 15c98f393e363..4a5e447ebc22f 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 0e79720dd9a39..c5987e0625d6b 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 556bdadb5bccc..14b69c5f3111c 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 4729800a40c59..03bb3fcadeb27 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 79d72eeaaf4a3..abe562b59fa86 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index a07fb610d5c7e..9d08bf7c6f91b 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 9d8fdd627f3a8..d9009a3981dee 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.devdocs.json b/api_docs/links.devdocs.json index d052432919c25..55d1053815fad 100644 --- a/api_docs/links.devdocs.json +++ b/api_docs/links.devdocs.json @@ -473,7 +473,13 @@ "text": "FinderAttributes" }, ">,", - "IProvidesPanelPlacementSettings", + { + "pluginId": "dashboard", + "scope": "public", + "docId": "kibDashboardPluginApi", + "section": "def-public.IProvidesLegacyPanelPlacementSettings", + "text": "IProvidesLegacyPanelPlacementSettings" + }, "<", "LinksInput", ", unknown>" @@ -649,10 +655,10 @@ }, { "parentPluginId": "links", - "id": "def-public.LinksFactoryDefinition.getPanelPlacementSettings", + "id": "def-public.LinksFactoryDefinition.getLegacyPanelPlacementSettings", "type": "Function", "tags": [], - "label": "getPanelPlacementSettings", + "label": "getLegacyPanelPlacementSettings", "description": [], "signature": [ "(input: ", @@ -673,7 +679,7 @@ "children": [ { "parentPluginId": "links", - "id": "def-public.LinksFactoryDefinition.getPanelPlacementSettings.$1", + "id": "def-public.LinksFactoryDefinition.getLegacyPanelPlacementSettings.$1", "type": "CompoundType", "tags": [], "label": "input", @@ -688,7 +694,7 @@ }, { "parentPluginId": "links", - "id": "def-public.LinksFactoryDefinition.getPanelPlacementSettings.$2", + "id": "def-public.LinksFactoryDefinition.getLegacyPanelPlacementSettings.$2", "type": "Unknown", "tags": [], "label": "attributes", diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 035400db3cad7..d98527bad0d80 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index c12dd0d9d8171..601b7ab5b477b 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index da8e8c7c9f023..9de811c374e1c 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index eb51764c9c05b..d8f6568f15fa1 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index cd357b6b4d059..19c68ac040353 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index dc828b0c0a133..f10d07d9b6d91 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -1930,6 +1930,83 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "maps", + "id": "def-public.CreateLayerDescriptorParams", + "type": "Interface", + "tags": [], + "label": "CreateLayerDescriptorParams", + "description": [], + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "maps", + "id": "def-public.CreateLayerDescriptorParams.indexPatternId", + "type": "string", + "tags": [], + "label": "indexPatternId", + "description": [], + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "maps", + "id": "def-public.CreateLayerDescriptorParams.geoFieldName", + "type": "string", + "tags": [], + "label": "geoFieldName", + "description": [], + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "maps", + "id": "def-public.CreateLayerDescriptorParams.geoFieldType", + "type": "Enum", + "tags": [], + "label": "geoFieldType", + "description": [], + "signature": [ + { + "pluginId": "maps", + "scope": "common", + "docId": "kibMapsPluginApi", + "section": "def-common.ES_GEO_FIELD_TYPE", + "text": "ES_GEO_FIELD_TYPE" + } + ], + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "maps", + "id": "def-public.CreateLayerDescriptorParams.query", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | undefined" + ], + "path": "x-pack/plugins/maps/public/classes/sources/es_search_source/create_layer_descriptor.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "maps", "id": "def-public.EMSTermJoinConfig", @@ -4583,7 +4660,13 @@ "text": "LayerDescriptor" }, " | null>; createESSearchSourceLayerDescriptor: (params: ", - "CreateLayerDescriptorParams", + { + "pluginId": "maps", + "scope": "public", + "docId": "kibMapsPluginApi", + "section": "def-public.CreateLayerDescriptorParams", + "text": "CreateLayerDescriptorParams" + }, ") => Promise<", { "pluginId": "maps", diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index d288965633242..0f0a70ea41240 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 281 | 0 | 276 | 32 | +| 286 | 0 | 281 | 31 | ## Client diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 00dd51c2a4b09..6eb44fae8bfaa 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 49a2fe7eda0f4..de788f8c267bd 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index efdaa699d2236..a473604fc3edb 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index b0526f7f56915..0f94e9167b81e 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index be718bae937f9..e201d8af7cc80 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index b4f1b36105dec..27363d5cc4dfa 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index bec6f84993f29..94563328842e4 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 3057f8271de25..7fbe7f674c983 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 4fbc8daaeb4e7..918662ca938ae 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 4d6b7a14b8f07..ab667349f7f0e 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 3eadecb33d01d..3bcce3480ccbc 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.devdocs.json b/api_docs/observability_a_i_assistant.devdocs.json index ae9c0d2cd624e..f2e981c27e292 100644 --- a/api_docs/observability_a_i_assistant.devdocs.json +++ b/api_docs/observability_a_i_assistant.devdocs.json @@ -1266,7 +1266,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; persist: boolean; signal: AbortSignal; responseLanguage: string; }) => ", + "[]; persist: boolean; disableFunctions: boolean; signal: AbortSignal; responseLanguage: string; }) => ", "Observable", "<", { @@ -1368,6 +1368,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantChatService.complete.$1.disableFunctions", + "type": "boolean", + "tags": [], + "label": "disableFunctions", + "description": [], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "observabilityAIAssistant", "id": "def-public.ObservabilityAIAssistantChatService.complete.$1.signal", @@ -2120,7 +2131,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -2168,7 +2181,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2212,7 +2225,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -2246,7 +2261,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", "[]; }; }; }) => Promise<", "Readable", @@ -2744,7 +2759,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -2792,7 +2809,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2836,7 +2853,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -2870,7 +2889,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", "[]; }; }; }) => Promise<", "Readable", @@ -3956,7 +3975,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -4004,7 +4025,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4048,7 +4069,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -4082,7 +4105,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", "[]; }; }; }) => Promise<", "Readable", @@ -4682,7 +4705,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -4730,7 +4755,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4774,7 +4799,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -4808,7 +4835,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", "[]; }; }; }) => Promise<", "Readable", @@ -5334,7 +5361,7 @@ "section": "def-public.ObservabilityAIAssistantChatService", "text": "ObservabilityAIAssistantChatService" }, - "; persist: boolean; onConversationUpdate?: ((event: ", + "; persist: boolean; disableFunctions?: boolean | undefined; onConversationUpdate?: ((event: ", { "pluginId": "observabilityAIAssistant", "scope": "common", @@ -6068,7 +6095,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -6116,7 +6145,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body?: { actions?: ({ name: string; description: string; } & { parameters?: any; })[] | undefined; } | undefined; query?: { format?: \"default\" | \"openai\" | undefined; } | undefined; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -6160,7 +6189,9 @@ "StringC", "; responseLanguage: ", "StringC", - "; instructions: ", + "; disableFunctions: ", + "Type", + "; instructions: ", "ArrayC", "<", "UnionC", @@ -6194,7 +6225,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; disableFunctions?: boolean | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; } & { body: { screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", "[]; }; }; }) => Promise<", "Readable", @@ -6453,12 +6484,12 @@ "label": "meta", "description": [], "signature": [ - "ErrorMetaAttributes[T] | undefined" + "ErrorMetaAttributes[T]" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts", "deprecated": false, "trackAdoption": false, - "isRequired": false + "isRequired": true } ], "returnComment": [] diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 51ad5cce7aea8..03f804cda0d7e 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 252 | 1 | 250 | 26 | +| 253 | 1 | 251 | 26 | ## Client diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 77849a62edf5a..91392d4dcfd45 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index e2eb7f9bfed06..b3e994e0b9f14 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 91e078dbc9c3a..56d47dea88a85 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 6bc4e23235107..aef1a9f3af95e 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 2f440cacd5428..bc299e6f40165 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.devdocs.json b/api_docs/osquery.devdocs.json index 25200d49eec76..2d09d029c0772 100644 --- a/api_docs/osquery.devdocs.json +++ b/api_docs/osquery.devdocs.json @@ -301,7 +301,7 @@ "label": "createActionService", "description": [], "signature": [ - "{ create: (params: { agent_ids?: string[] | undefined; agent_all?: boolean | undefined; agent_platforms?: string[] | undefined; agent_policy_ids?: string[] | undefined; query?: string | undefined; queries?: { id: string; query: string; ecs_mapping: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; version: string | undefined; platform: string | undefined; removed: boolean | undefined; snapshot: boolean | undefined; }[] | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; ecs_mapping?: { [x: string]: { field?: string | undefined; value?: string | string[] | undefined; }; } | undefined; pack_id?: string | undefined; alert_ids?: string[] | undefined; case_ids?: string[] | undefined; event_ids?: string[] | undefined; metadata?: object | undefined; }, alertData?: OutputOf> | undefined) => Promise<{ response: { action_id: string; '@timestamp': string; expiration: string; type: string; input_type: string; alert_ids: string[] | undefined; event_ids: string[] | undefined; case_ids: string[] | undefined; agent_ids: string[] | undefined; agent_all: boolean | undefined; agent_platforms: string[] | undefined; agent_policy_ids: string[] | undefined; agents: string[]; user_id: string | undefined; metadata: object | undefined; pack_id: string | undefined; pack_name: string | undefined; pack_prebuilt: boolean | undefined; queries: ", + "[]; }; readonly \"kibana.alert.rule.execution.timestamp\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.rule.parameters\": { readonly array: false; readonly type: \"flattened\"; readonly ignore_above: 4096; readonly required: false; }; readonly \"kibana.alert.rule.tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.start\": { readonly type: \"date\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.time_range\": { readonly type: \"date_range\"; readonly format: \"epoch_millis||strict_date_optional_time\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.url\": { readonly type: \"keyword\"; readonly array: false; readonly index: false; readonly required: false; readonly ignore_above: 2048; }; readonly \"kibana.alert.workflow_assignee_ids\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.alert.workflow_status\": { readonly type: \"keyword\"; readonly array: false; readonly required: false; }; readonly \"kibana.alert.workflow_tags\": { readonly type: \"keyword\"; readonly array: true; readonly required: false; }; readonly \"kibana.version\": { readonly type: \"version\"; readonly array: false; readonly required: false; }; }>> & { _index: string; }) | undefined) => Promise<{ response: { action_id: string; '@timestamp': string; expiration: string; type: string; input_type: string; alert_ids: string[] | undefined; event_ids: string[] | undefined; case_ids: string[] | undefined; agent_ids: string[] | undefined; agent_all: boolean | undefined; agent_platforms: string[] | undefined; agent_policy_ids: string[] | undefined; agents: string[]; user_id: string | undefined; metadata: object | undefined; pack_id: string | undefined; pack_name: string | undefined; pack_prebuilt: boolean | undefined; queries: ", "Dictionary", "[]; }; fleetActionsCount: number; }>; stop: () => void; }" ], diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 76f00f03e253b..d415eb4a742aa 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index 04394a7ccf208..1d47d09d063c4 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index a139a7a79ac17..b678d2d9056a8 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 792 | 680 | 42 | +| 794 | 682 | 42 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 48128 | 241 | 36690 | 1850 | +| 48130 | 241 | 36716 | 1851 | ## Plugin Directory @@ -32,7 +32,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 4 | 0 | 4 | 1 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 67 | 0 | 4 | 1 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 862 | 1 | 830 | 54 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | The user interface for Elastic APM | 29 | 0 | 29 | 122 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | The user interface for Elastic APM | 29 | 0 | 29 | 123 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Asset manager plugin for entity assets (inventory, topology, etc) | 9 | 0 | 9 | 2 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | @@ -55,9 +55,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | crossClusterReplication | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | customBranding | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Enables customization of Kibana | 0 | 0 | 0 | 0 | | | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | Add custom data integrations so they can be displayed in the Fleet integrations app | 271 | 0 | 252 | 1 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 112 | 0 | 109 | 12 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds the Dashboard app to Kibana | 116 | 0 | 113 | 13 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 54 | 0 | 51 | 0 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3290 | 31 | 2621 | 23 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 3186 | 31 | 2575 | 23 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin provides the ability to create data views via a modal flyout inside Kibana apps | 35 | 0 | 25 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Reusable data view field editor across Kibana | 72 | 0 | 33 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data view management app | 2 | 0 | 2 | 0 | @@ -130,7 +130,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes the shared components and APIs to access and visualize logs. | 303 | 0 | 277 | 32 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 44 | 0 | 44 | 7 | -| | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 281 | 0 | 276 | 32 | +| | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 286 | 0 | 281 | 31 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 60 | 0 | 60 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Exposes utilities for accessing metrics data | 104 | 8 | 104 | 6 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 153 | 3 | 66 | 100 | @@ -142,7 +142,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 679 | 2 | 670 | 15 | -| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 252 | 1 | 250 | 26 | +| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 253 | 1 | 251 | 26 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 21 | 0 | 21 | 1 | @@ -180,7 +180,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Serverless customizations for search. | 6 | 0 | 6 | 0 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 134 | 0 | 134 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds URL Service and sharing capabilities to Kibana | 136 | 0 | 77 | 11 | -| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 62 | 0 | 62 | 1 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 63 | 0 | 63 | 1 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 22 | 1 | 22 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 257 | 0 | 66 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 25 | 0 | 25 | 3 | @@ -193,7 +193,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 0 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 28 | 0 | 10 | 0 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 30 | 0 | 14 | 4 | -| | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 240 | 1 | 196 | 17 | +| | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 242 | 1 | 198 | 17 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [@elastic/kibana-localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 593 | 1 | 567 | 58 | @@ -247,7 +247,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 44 | 0 | 44 | 7 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 49 | 0 | 49 | 8 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 191 | 0 | 191 | 28 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 11 | 0 | 11 | 0 | | | [@elastic/kibana-qa](https://github.com/orgs/elastic/teams/kibana-qa) | - | 12 | 0 | 12 | 0 | @@ -342,9 +342,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 3 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 50 | 7 | 50 | 6 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 48 | 7 | 48 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 0 | 13 | 1 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 481 | 2 | 191 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 483 | 2 | 193 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 91 | 0 | 78 | 10 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 2 | 0 | @@ -361,7 +361,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 9 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 38 | 0 | 31 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 56 | 0 | 30 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 61 | 0 | 34 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 5 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 0 | 13 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 29 | 0 | 25 | 0 | @@ -490,13 +490,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 26 | 0 | 26 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 63 | 1 | 63 | 6 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 23 | 0 | 21 | 0 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 36 | 0 | 34 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 194 | 0 | 184 | 8 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 39 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 0 | 52 | 1 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 38 | 0 | 14 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 18 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 50 | 0 | 42 | 1 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 54 | 0 | 45 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 0 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 36 | 0 | 21 | 1 | @@ -591,6 +591,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 168 | 0 | 55 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 8 | 0 | 7 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 2 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 4 | 0 | @@ -624,6 +625,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 18 | 1 | 17 | 1 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 25 | 0 | 25 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 20 | 0 | 18 | 1 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 50 | 0 | 25 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 84 | 0 | 37 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 39 | 0 | 14 | 0 | @@ -708,7 +710,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 21 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 5 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 313 | 4 | 265 | 12 | -| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 14 | 0 | 8 | 0 | +| | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 25 | 0 | 13 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 133 | 5 | 103 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 32 | 0 | 13 | 0 | @@ -720,8 +722,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 42 | 0 | 28 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 56 | 0 | 47 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 0 | 8 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 152 | 0 | 83 | 2 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 18 | 0 | 17 | 6 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 149 | 0 | 80 | 2 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 18 | 0 | 17 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list and field stats which can be integrated into apps | 293 | 0 | 269 | 10 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 13 | 0 | 9 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 2 | 1 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index efdf8d65ace9d..9e9503f3774e4 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index eac63ccd835f7..bc38f1e53691a 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index faca5e50bfcca..a75f20e8c0c32 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index 0a7fc6d41e0cf..5adbf4bec3a77 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index f5ec485de9125..2d6e3543b877f 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 42cfb4679b5a9..522da7446a24a 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index 43627a3b533be..85b1516b57059 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index ea8018275ab54..642c93433b951 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -107,15 +107,7 @@ "label": "get", "description": [], "signature": [ - "({ id, index }: GetAlertParams) => Promise> | undefined>" + "({ id, index }: GetAlertParams) => Promise<{ _index: string; \"@timestamp\"?: string | undefined; \"kibana.alert.rule.rule_type_id\"?: string | undefined; \"kibana.alert.rule.consumer\"?: string | undefined; \"kibana.alert.instance.id\"?: string | undefined; \"kibana.alert.rule.category\"?: string | undefined; \"kibana.alert.rule.name\"?: string | undefined; \"kibana.alert.rule.producer\"?: string | undefined; \"kibana.alert.rule.revision\"?: number | undefined; \"kibana.alert.rule.uuid\"?: string | undefined; \"kibana.alert.status\"?: string | undefined; \"kibana.alert.uuid\"?: string | undefined; \"kibana.space_ids\"?: string[] | undefined; \"event.action\"?: string | undefined; tags?: string[] | undefined; \"kibana.alert.rule.execution.uuid\"?: string | undefined; \"event.kind\"?: string | undefined; \"kibana.alert.action_group\"?: string | undefined; \"kibana.alert.case_ids\"?: string[] | undefined; \"kibana.alert.consecutive_matches\"?: number | undefined; \"kibana.alert.duration.us\"?: number | undefined; \"kibana.alert.end\"?: string | undefined; \"kibana.alert.flapping\"?: boolean | undefined; \"kibana.alert.flapping_history\"?: boolean[] | undefined; \"kibana.alert.last_detected\"?: string | undefined; \"kibana.alert.maintenance_window_ids\"?: string[] | undefined; \"kibana.alert.reason\"?: string | undefined; \"kibana.alert.rule.execution.timestamp\"?: string | undefined; \"kibana.alert.rule.parameters\"?: { [key: string]: unknown; } | undefined; \"kibana.alert.rule.tags\"?: string[] | undefined; \"kibana.alert.start\"?: string | undefined; \"kibana.alert.time_range\"?: unknown; \"kibana.alert.url\"?: string | undefined; \"kibana.alert.workflow_assignee_ids\"?: string[] | undefined; \"kibana.alert.workflow_status\"?: string | undefined; \"kibana.alert.workflow_tags\"?: string[] | undefined; \"kibana.version\"?: string | undefined; \"ecs.version\"?: string | undefined; \"kibana.alert.risk_score\"?: number | undefined; \"kibana.alert.rule.author\"?: string | undefined; \"kibana.alert.rule.created_at\"?: string | undefined; \"kibana.alert.rule.created_by\"?: string | undefined; \"kibana.alert.rule.description\"?: string | undefined; \"kibana.alert.rule.enabled\"?: string | undefined; \"kibana.alert.rule.from\"?: string | undefined; \"kibana.alert.rule.interval\"?: string | undefined; \"kibana.alert.rule.license\"?: string | undefined; \"kibana.alert.rule.note\"?: string | undefined; \"kibana.alert.rule.references\"?: string[] | undefined; \"kibana.alert.rule.rule_id\"?: string | undefined; \"kibana.alert.rule.rule_name_override\"?: string | undefined; \"kibana.alert.rule.to\"?: string | undefined; \"kibana.alert.rule.type\"?: string | undefined; \"kibana.alert.rule.updated_at\"?: string | undefined; \"kibana.alert.rule.updated_by\"?: string | undefined; \"kibana.alert.rule.version\"?: string | undefined; \"kibana.alert.severity\"?: string | undefined; \"kibana.alert.suppression.docs_count\"?: number | undefined; \"kibana.alert.suppression.end\"?: string | undefined; \"kibana.alert.suppression.start\"?: string | undefined; \"kibana.alert.suppression.terms.field\"?: string[] | undefined; \"kibana.alert.suppression.terms.value\"?: string[] | undefined; \"kibana.alert.system_status\"?: string | undefined; \"kibana.alert.workflow_reason\"?: string | undefined; \"kibana.alert.workflow_status_updated_at\"?: string | undefined; \"kibana.alert.workflow_user\"?: string | undefined; }>" ], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, @@ -5239,9 +5231,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -5336,17 +5328,17 @@ "description": [], "signature": [ { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchRequest", "text": "IEsSearchRequest" }, "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.ISearchRequestParams", "text": "ISearchRequestParams" }, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 86901614cbdaa..3b1b0e7752876 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 051fb1734a681..e06eba1c01efc 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 36e1fa909947c..87f00527ef708 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index b3c8ae4a7d12b..0895892fedb95 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 979571044c8c0..92e8567148323 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 600c95448e9b8..4fc36a967196f 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index e16d7ec8a47fa..bede53d59531f 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.devdocs.json b/api_docs/saved_search.devdocs.json index a02e0482b5f0b..8898805e7cbbb 100644 --- a/api_docs/saved_search.devdocs.json +++ b/api_docs/saved_search.devdocs.json @@ -1233,9 +1233,9 @@ "Observable", "<", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IKibanaSearchResponse", "text": "IKibanaSearchResponse" }, diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 94b2e7497cfa2..3f9074fb2a169 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 575004c4152cd..e97edb9dde8e5 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 1e160cd2c822a..2b3918dba22e4 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 0920c4796cc0a..8f2f96937f4a5 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 33c0305bf4d83..2977c1e7989d7 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 2dcabacd4f1c4..367d882d94871 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 8c2e6e5b8a93a..60b2295bfb982 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index 2ce600a624ca8..1298c0bc66463 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -485,7 +485,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantModelEvaluation\" | \"attackDiscoveryEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" + "\"assistantModelEvaluation\" | \"attackDiscoveryEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -565,7 +565,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantModelEvaluation\" | \"attackDiscoveryEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" + "\"assistantModelEvaluation\" | \"attackDiscoveryEnabled\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"responseActionsSentinelOneGetFileEnabled\" | \"agentStatusClientEnabled\" | \"responseActionsCrowdstrikeManualHostIsolationEnabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jamfDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | \"aiAssistantFlyoutMode\" | \"valueListItemsModalEnabled\" | \"bulkCustomHighlightedFieldsEnabled\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -1964,7 +1964,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3054,7 +3054,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3230,7 +3230,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly responseActionsSentinelOneGetFileEnabled: boolean; readonly agentStatusClientEnabled: boolean; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly attackDiscoveryEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jamfDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; readonly aiAssistantFlyoutMode: boolean; readonly valueListItemsModalEnabled: boolean; readonly bulkCustomHighlightedFieldsEnabled: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3296,7 +3296,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly responseActionsSentinelOneGetFileEnabled: false; readonly agentStatusClientEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: true; readonly expandableTimelineFlyoutEnabled: true; readonly alertsPageFiltersEnabled: true; readonly attackDiscoveryEnabled: false; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: false; readonly aiAssistantFlyoutMode: false; readonly valueListItemsModalEnabled: true; readonly bulkCustomHighlightedFieldsEnabled: false; }" + "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly responseActionsSentinelOneGetFileEnabled: false; readonly agentStatusClientEnabled: false; readonly responseActionsCrowdstrikeManualHostIsolationEnabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: true; readonly expandableTimelineFlyoutEnabled: true; readonly alertsPageFiltersEnabled: true; readonly attackDiscoveryEnabled: false; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jamfDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: false; readonly aiAssistantFlyoutMode: true; readonly valueListItemsModalEnabled: true; readonly bulkCustomHighlightedFieldsEnabled: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index 1306a9339f83b..a70f8a0547753 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 82259b84e3002..cfe0f17474bc5 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index 362ee997d6636..ae5b63b94d265 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index 970c960b1395e..6baed8cb30777 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index 1e0ce15aa1a1e..ea59ceec49bab 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 60b8375d50808..461daf517809d 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index 7e91dc6372916..7fc3002d2eca6 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 0eaa3e1ae4a50..97b2df157c884 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.devdocs.json b/api_docs/slo.devdocs.json index d72df3a83365e..8cd578a4bcd01 100644 --- a/api_docs/slo.devdocs.json +++ b/api_docs/slo.devdocs.json @@ -493,6 +493,26 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "slo", + "id": "def-public.SloPublicPluginsStart.dashboard", + "type": "Object", + "tags": [], + "label": "dashboard", + "description": [], + "signature": [ + { + "pluginId": "dashboard", + "scope": "public", + "docId": "kibDashboardPluginApi", + "section": "def-public.DashboardStart", + "text": "DashboardStart" + } + ], + "path": "x-pack/plugins/observability_solution/slo/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "slo", "id": "def-public.SloPublicPluginsStart.dataViewEditor", diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index bda2a73d4f91c..44a18b30c5fbd 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 62 | 0 | 62 | 1 | +| 63 | 0 | 63 | 1 | ## Client diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index 6d0b105813bb1..31d2c540f45a3 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index d272249856b51..16cbc76f35084 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index be7f7d2f70e80..28495844f9704 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 8696438346477..0445a5baf2905 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 8517d37d6bb1c..4d613c46b6bb3 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.devdocs.json b/api_docs/telemetry.devdocs.json index 0f8df405a433a..20738f47f4682 100644 --- a/api_docs/telemetry.devdocs.json +++ b/api_docs/telemetry.devdocs.json @@ -630,7 +630,7 @@ "When the data comes from a matching index-pattern, the name of the pattern" ], "signature": [ - "\"search\" | \"logstash\" | \"alerts\" | \"apm\" | \"metricbeat\" | \"enterprise-search\" | \"app-search\" | \"magento2\" | \"magento\" | \"shopify\" | \"wordpress\" | \"drupal\" | \"joomla\" | \"sharepoint\" | \"squarespace\" | \"sitecore\" | \"weebly\" | \"acquia\" | \"filebeat\" | \"functionbeat\" | \"heartbeat\" | \"fluentd\" | \"telegraf\" | \"prometheusbeat\" | \"fluentbit\" | \"nginx\" | \"apache\" | \"endgame\" | \"logs-endpoint\" | \"metrics-endpoint\" | \"siem-signals\" | \"auditbeat\" | \"winlogbeat\" | \"packetbeat\" | \"tomcat\" | \"artifactory\" | \"aruba\" | \"barracuda\" | \"bluecoat\" | \"arcsight\" | \"checkpoint\" | \"cisco\" | \"citrix\" | \"cyberark\" | \"cylance\" | \"fireeye\" | \"fortinet\" | \"infoblox\" | \"kaspersky\" | \"mcafee\" | \"paloaltonetworks\" | \"rsa\" | \"snort\" | \"sonicwall\" | \"sophos\" | \"squid\" | \"symantec\" | \"tippingpoint\" | \"trendmicro\" | \"tripwire\" | \"zscaler\" | \"zeek\" | \"sigma_doc\" | \"ecs-corelight\" | \"suricata\" | \"wazuh\" | \"meow\" | \"host_risk_score\" | \"user_risk_score\" | undefined" + "\"search\" | \"logstash\" | \"alerts\" | \"apm\" | \"metricbeat\" | \"enterprise-search\" | \"app-search\" | \"magento2\" | \"magento\" | \"shopify\" | \"wordpress\" | \"drupal\" | \"joomla\" | \"sharepoint\" | \"squarespace\" | \"sitecore\" | \"weebly\" | \"acquia\" | \"filebeat\" | \"generic-filebeat\" | \"generic-metricbeat\" | \"functionbeat\" | \"generic-functionbeat\" | \"heartbeat\" | \"generic-heartbeat\" | \"generic-logstash\" | \"fluentd\" | \"telegraf\" | \"prometheusbeat\" | \"fluentbit\" | \"nginx\" | \"apache\" | \"generic-logs\" | \"endgame\" | \"logs-endpoint\" | \"metrics-endpoint\" | \"siem-signals\" | \"auditbeat\" | \"winlogbeat\" | \"packetbeat\" | \"tomcat\" | \"artifactory\" | \"aruba\" | \"barracuda\" | \"bluecoat\" | \"arcsight\" | \"checkpoint\" | \"cisco\" | \"citrix\" | \"cyberark\" | \"cylance\" | \"fireeye\" | \"fortinet\" | \"infoblox\" | \"kaspersky\" | \"mcafee\" | \"paloaltonetworks\" | \"rsa\" | \"snort\" | \"sonicwall\" | \"sophos\" | \"squid\" | \"symantec\" | \"tippingpoint\" | \"trendmicro\" | \"tripwire\" | \"zscaler\" | \"zeek\" | \"sigma_doc\" | \"ecs-corelight\" | \"suricata\" | \"wazuh\" | \"meow\" | \"host_risk_score\" | \"user_risk_score\" | undefined" ], "path": "src/plugins/telemetry/server/telemetry_collection/get_data_telemetry/get_data_telemetry.ts", "deprecated": false, diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index ec2bca106690c..4269973b07e21 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index e89fdfd7e3680..a536545d66574 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index ac6b6b40e0bfa..80a6ebae54b87 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index b080c2a499419..70ad1b531d17d 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index c07fb591f400d..f054fbf7b03b7 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 006cc0d46feb6..9f639a8013797 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 45985f6614a8e..c4025785898db 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -999,6 +999,44 @@ "path": "x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "timelines", + "id": "def-public.AddToTimelineButtonProps.startServices", + "type": "Object", + "tags": [], + "label": "startServices", + "description": [], + "signature": [ + "{ i18n: ", + { + "pluginId": "@kbn/core-i18n-browser", + "scope": "common", + "docId": "kibKbnCoreI18nBrowserPluginApi", + "section": "def-common.I18nStart", + "text": "I18nStart" + }, + "; analytics: ", + { + "pluginId": "@kbn/core-analytics-browser", + "scope": "common", + "docId": "kibKbnCoreAnalyticsBrowserPluginApi", + "section": "def-common.AnalyticsServiceStart", + "text": "AnalyticsServiceStart" + }, + "; theme: ", + { + "pluginId": "@kbn/core-theme-browser", + "scope": "common", + "docId": "kibKbnCoreThemeBrowserPluginApi", + "section": "def-common.ThemeServiceSetup", + "text": "ThemeServiceSetup" + }, + "; }" + ], + "path": "x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1122,6 +1160,45 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "timelines", + "id": "def-public.TimelinesStartServices", + "type": "Type", + "tags": [], + "label": "TimelinesStartServices", + "description": [], + "signature": [ + "{ i18n: ", + { + "pluginId": "@kbn/core-i18n-browser", + "scope": "common", + "docId": "kibKbnCoreI18nBrowserPluginApi", + "section": "def-common.I18nStart", + "text": "I18nStart" + }, + "; analytics: ", + { + "pluginId": "@kbn/core-analytics-browser", + "scope": "common", + "docId": "kibKbnCoreAnalyticsBrowserPluginApi", + "section": "def-common.AnalyticsServiceStart", + "text": "AnalyticsServiceStart" + }, + "; theme: ", + { + "pluginId": "@kbn/core-theme-browser", + "scope": "common", + "docId": "kibKbnCoreThemeBrowserPluginApi", + "section": "def-common.ThemeServiceSetup", + "text": "ThemeServiceSetup" + }, + "; }" + ], + "path": "x-pack/plugins/timelines/public/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [], @@ -2513,9 +2590,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -3069,9 +3146,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -3278,9 +3355,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -3394,9 +3471,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, @@ -3544,9 +3621,9 @@ }, " extends ", { - "pluginId": "data", + "pluginId": "@kbn/search-types", "scope": "common", - "docId": "kibDataSearchPluginApi", + "docId": "kibKbnSearchTypesPluginApi", "section": "def-common.IEsSearchResponse", "text": "IEsSearchResponse" }, diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index ccca8a43de1e7..665641a20157f 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-threat-hunting-investigations](https://github.com/org | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 240 | 1 | 196 | 17 | +| 242 | 1 | 198 | 17 | ## Client diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index a25f16dd619a9..840aaab6087dc 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index eca2964533658..dbc666e7c26d8 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 5058cdffd4ac4..17b2ee4aa95e8 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 8af03c38f004a..05f77c246c3f8 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index fac5210d56421..5f9ade7eeec18 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index aee168c5df40a..7486dcb2635df 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.devdocs.json b/api_docs/unified_search.devdocs.json index d89079af5b706..e3d2077b12292 100644 --- a/api_docs/unified_search.devdocs.json +++ b/api_docs/unified_search.devdocs.json @@ -2681,7 +2681,7 @@ "UnifiedSearchServerPluginSetupDependencies", ") => { autocomplete: { getAutocompleteSettings: () => { terminateAfter: number; timeout: number; }; getInitializerContextConfig: () => { legacy: { globalConfig$: ", "Observable", - " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -2707,7 +2707,7 @@ }, ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: ", "ByteSizeValueUnit", - " | undefined) => string; }>; }>; }>>; get: () => Readonly<{ elasticsearch: Readonly<{ readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + " | undefined) => string; }>; }>; }>>; get: () => Readonly<{ elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -2914,7 +2914,7 @@ "signature": [ "{ getAutocompleteSettings: () => { terminateAfter: number; timeout: number; }; getInitializerContextConfig: () => { legacy: { globalConfig$: ", "Observable", - " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + " moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -2940,7 +2940,7 @@ }, ") => boolean; getValueInBytes: () => number; toString: (returnUnit?: ", "ByteSizeValueUnit", - " | undefined) => string; }>; }>; }>>; get: () => Readonly<{ elasticsearch: Readonly<{ readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", + " | undefined) => string; }>; }>; }>>; get: () => Readonly<{ elasticsearch: Readonly<{ readonly shardTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly requestTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; readonly pingTimeout: Readonly<{ clone: () => moment.Duration; humanize: { (argWithSuffix?: boolean | undefined, argThresholds?: moment.argThresholdOpts | undefined): string; (argThresholds?: moment.argThresholdOpts | undefined): string; }; abs: () => moment.Duration; as: (units: moment.unitOfTime.Base) => number; get: (units: moment.unitOfTime.Base) => number; milliseconds: () => number; asMilliseconds: () => number; seconds: () => number; asSeconds: () => number; minutes: () => number; asMinutes: () => number; hours: () => number; asHours: () => number; days: () => number; asDays: () => number; weeks: () => number; asWeeks: () => number; months: () => number; asMonths: () => number; years: () => number; asYears: () => number; add: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; subtract: (inp?: moment.DurationInputArg1, unit?: moment.unitOfTime.DurationConstructor | undefined) => moment.Duration; locale: { (): string; (locale: moment.LocaleSpecifier): moment.Duration; }; localeData: () => moment.Locale; toISOString: () => string; toJSON: () => string; isValid: () => boolean; lang: { (locale: moment.LocaleSpecifier): moment.Moment; (): moment.Locale; }; toIsoString: () => string; format: moment.Format; }>; }>; path: Readonly<{ readonly data: string; }>; savedObjects: Readonly<{ readonly maxImportPayloadBytes: Readonly<{ isGreaterThan: (other: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 2f41980b34bc9..c9b605c7285eb 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index eba497a6952ed..cb7c06dead6d2 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index a198aaaba4126..6d6c2088c1aac 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index 31832260e2fd4..552d55f1b5722 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index f1b96d3999c81..8a5a3b8a0295d 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index a71e9fba20a0b..ab0f426c53d28 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 387b70e192f95..09cfab6e6a817 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 748556e3faa42..12bcbdfdcf772 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index f20c0c981a92c..eb32e545f7a85 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index acb29d8e7e4fa..2f9ccc4572e19 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 684e3aaecc5c7..2b1bc6b4d0345 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index 81b6cde81544e..d4b7d7cb61a53 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 4bfb0ef160d17..261265f9cd663 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 1952c98e82926..f608063fff904 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 3644910866695..eea54e65a3ad7 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 0a7694215ef86..820464e0da685 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 5b5f03ac16d6d..cdc3d96d1852f 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-05-06 +date: 2024-05-08 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/docs/CHANGELOG.asciidoc b/docs/CHANGELOG.asciidoc index e821cb98f4fd0..09b083b7213b2 100644 --- a/docs/CHANGELOG.asciidoc +++ b/docs/CHANGELOG.asciidoc @@ -10,6 +10,7 @@ Review important information about the {kib} 8.x releases. +* <> * <> * <> * <> @@ -65,6 +66,19 @@ Review important information about the {kib} 8.x releases. -- +[[release-notes-8.13.4]] +== {kib} 8.13.4 + +The 8.13.4 release includes the following bug fixes. + +[float] +[[fixes-v8.13.4]] +=== Bug Fixes +Lens & Visualizations:: +* Fixes table sorting when changing the interval on the time picker in *Lens* ({kibana-pull}182173[#182173]). +Dashboards:: +* Fixes a bug with drilldowns where the control group on a source dashboard could be replaced by the control group from the destination dashboard ({kibana-pull}179485[#179485]). + [[release-notes-8.13.3]] == {kib} 8.13.3 diff --git a/docs/api/role-management/put.asciidoc b/docs/api/role-management/put.asciidoc index 5061276078295..ce293f75b63ae 100644 --- a/docs/api/role-management/put.asciidoc +++ b/docs/api/role-management/put.asciidoc @@ -26,7 +26,7 @@ To use the create or update role API, you must have the `manage_security` cluste `elasticsearch`:: (Optional, object) {es} cluster and index privileges. Valid keys include - `cluster`, `indices`, `remote_indices`, and `run_as`. For more information, see + `cluster`, `indices`, `remote_indices`, `remote_cluster`, and `run_as`. For more information, see {ref}/defining-roles.html[Defining roles]. `kibana`:: @@ -210,6 +210,12 @@ $ curl -X PUT api/security/role/my_kibana_role "names": [ "remote_index1", "remote_index2" ], "privileges": [ "all" ] } + ], + "remote_cluster": [ + { + "clusters": [ "remote_cluster1" ], + "privileges": [ "monitor_enrich" ] + } ] }, "kibana": [ diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index b5a11cf016bc7..f6653998374a1 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -651,6 +651,10 @@ the infrastructure monitoring use-case within Kibana. using the CURL scripts in the scripts folder. +|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/logs_data_access/README.md[logsDataAccess] +|Exposes services to access logs data. + + |{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/logs_explorer/README.md[logsExplorer] |This plugin is home to the component and related types. It implements several of the underlying concepts that the Observability Logs Explorer app builds upon. diff --git a/docs/playground/images/chat-interface.png b/docs/playground/images/chat-interface.png new file mode 100644 index 0000000000000..8f13fba59666e Binary files /dev/null and b/docs/playground/images/chat-interface.png differ diff --git a/docs/playground/images/edit-query.png b/docs/playground/images/edit-query.png new file mode 100644 index 0000000000000..a1122dbf9ba6a Binary files /dev/null and b/docs/playground/images/edit-query.png differ diff --git a/docs/playground/images/select-indices.png b/docs/playground/images/select-indices.png new file mode 100644 index 0000000000000..9fe455bdb0be2 Binary files /dev/null and b/docs/playground/images/select-indices.png differ diff --git a/docs/playground/index.asciidoc b/docs/playground/index.asciidoc new file mode 100644 index 0000000000000..fe0aaea05a305 --- /dev/null +++ b/docs/playground/index.asciidoc @@ -0,0 +1,203 @@ +[role="xpack"] +[[playground]] += Playground + +preview::[] + +// Variable (attribute) definition +:x: Playground + +Use {x} to combine your Elasticsearch data with the power of large language models (LLMs) for retrieval augmented generation (RAG). +The chat interface translates your natural language questions into {es} queries, retrieves the most relevant results from your {es} documents, and passes those documents to the LLM to generate tailored responses. + +Once you start chatting, use the UI to view and modify the Elasticsearch queries that search your data. +You can also view the underlying Python code that powers the chat interface, and download this code to integrate into your own application. + +Learn how to get started on this page. +Refer to the following for more advanced topics: + +* <> +* <> +* <> + +[float] +[[playground-how-it-works]] +== How {x} works + +Here's a simpified overview of how {x} works: + +* User *creates a connection* to LLM provider +* User *selects a model* to use for generating responses +* User *define the model's behavior and tone* with initial instructions +** *Example*: "_You are a friendly assistant for question-answering tasks. Keep responses as clear and concise as possible._" +* User *selects {es} indices* to search +* User *enters a question* in the chat interface +* {x} *autogenerates an {es} query* to retrieve relevant documents +** User can *view and modify underlying {es} query* in the UI +* {x} *auto-selects relevant fields* from retrieved documents to pass to the LLM +** User can *edit fields targeted* +* {x} passes *filtered documents* to the LLM +** The LLM generates a response based on the original query, initial instructions, chat history, and {es} context +* User can *view the Python code* that powers the chat interface +** User can also *Download the code* to integrate into application + +[float] +[[playground-availability-prerequisites]] +== Availability and prerequisites + +For Elastic Cloud and self-managed deployments {x} is available in the *Search* space in {kib}, under *Content* > *{x}*. + +For Elastic Serverless, {x} is available in your {es} project UI. +// TODO: Confirm URL path for Serverless + +To use {x}, you'll need the following: + +1. An Elastic *v8.14.0+* deployment or {es} *Serverless* project. (Start a https://cloud.elastic.co/registration[free trial]). +2. At least one *{es} index* with documents to search. +** See <> if you'd like to ingest sample data. +3. An account with a *supported LLM provider*. {x} supports the following: ++ +[cols="2a,2a,1a", options="header"] +|=== +| Provider | Models | Notes + +| *Amazon Bedrock* +a| +* Anthropic: Claude 3 Sonnet +* Anthropic: Claude 3 Haiku +a| +Does not currently support streaming. + +| *OpenAI* +a| +* GPT-3 turbo +* GPT-4 turbo +a| + +| *Azure OpenAI* +a| +* GPT-3 turbo +* GPT-4 turbo +a| + +|=== + +[float] +[[playground-getting-started]] +== Getting started + +[float] +[[playground-getting-started-connect]] +=== Connect to LLM provider + +To get started with {x}, you need to create a <> for your LLM provider. +Follow these steps on the {x} landing page: + +. Under *Connect to LLM*, click *Create connector*. +. Select your *LLM provider*. +. *Name* your connector. +. Select a *URL endpoint* (or use the default). +. Enter *access credentials* for your LLM provider. + +[TIP] +==== +If you need to update a connector, or add a new one, click the wrench button (🔧) under *Model settings*. +==== + +[float] +[[playground-getting-started-ingest]] +=== Ingest data (optional) + +_You can skip this step if you already have data in one or more {es} indices._ + +There are many options for ingesting data into {es}, including: + +* The {enterprise-search-ref}/crawler.html[Elastic crawler] for web content (*NOTE*: Not yet available in _Serverless_) +* {enterprise-search-ref}/connectors.html[Elastic connectors] for data synced from third-party sources +* The {es} {ref}/docs-bulk.html[Bulk API] for JSON documents ++ +.*Expand* for example +[%collapsible] +============== +To add a few documents to an index called `books` run the following in Dev Tools Console: + +[source,console] +---- +POST /_bulk +{ "index" : { "_index" : "books" } } +{"name": "Snow Crash", "author": "Neal Stephenson", "release_date": "1992-06-01", "page_count": 470} +{ "index" : { "_index" : "books" } } +{"name": "Revelation Space", "author": "Alastair Reynolds", "release_date": "2000-03-15", "page_count": 585} +{ "index" : { "_index" : "books" } } +{"name": "1984", "author": "George Orwell", "release_date": "1985-06-01", "page_count": 328} +{ "index" : { "_index" : "books" } } +{"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227} +{ "index" : { "_index" : "books" } } +{"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268} +{ "index" : { "_index" : "books" } } +{"name": "The Handmaids Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} +---- +============== + +We've also provided some Jupyter notebooks to easily ingest sample data into {es}. +Find these in the https://github.com/elastic/elasticsearch-labs/blob/main/notebooks/ingestion-and-chunking[elasticsearch-labs] repository. +These notebooks use the official {es} Python client. +// TODO: [The above link will be broken until https://github.com/elastic/elasticsearch-labs/pull/232 is merged] + +[float] +[[playground-getting-started-index]] +=== Select {es} indices + +Once you've connected to your LLM provider, it's time to choose the data you want to search. +Follow the steps under *Select indices*: + +. Select one or more {es} indices under *Add index*. +. Click *Start* to launch the chat interface. ++ +[.screenshot] +image::select-indices.png[width=400] + +Learn more about the underlying {es} queries used to search your data in <>. + +[float] +[[playground-getting-started-setup-chat]] +=== Set up the chat interface + +You can start chatting with your data immediately, but you might want to tweak some defaults first. + +[.screenshot] +image::chat-interface.png[] + +You can adjust the following under *Model settings*: + +* *Model*. The model used for generating responses. +* *Instructions*. Also known as the _system prompt_, these initial instructions and guidelines define the behavior of the model throughout the conversation. Be *clear and specific* for best results. +* *Include citations*. A toggle to include citations from the relevant {es} documents in responses. + +{x} also uses another LLM under the hood, to encode all previous questions and responses, and make them available to the main model. +This ensures the model has "conversational memory". + +Under *Indices*, you can edit which {es} indices will be searched. +This will affect the underlying {es} query. + +[TIP] +==== +Click *✨ Regenerate* to resend the last query to the model for a fresh response. + +Click *⟳ Clear chat* to clear chat history and start a new conversation. +==== + +[float] +[[playground-next-steps]] +=== Next steps + +Once you've got {x} up and running, and you've tested out the chat interface, you might want to explore some more advanced topics: + +* <> +* <> +* <> + +include::playground-context.asciidoc[] +include::playground-query.asciidoc[] +include::playground-troubleshooting.asciidoc[] + diff --git a/docs/playground/playground-context.asciidoc b/docs/playground/playground-context.asciidoc new file mode 100644 index 0000000000000..c0c4533fcb1a0 --- /dev/null +++ b/docs/playground/playground-context.asciidoc @@ -0,0 +1,68 @@ +[role="xpack"] +[[playground-context]] +== Optimize model context + +preview::[] + +// Variable (attribute) definition +:x: Playground + +Context is the information you provide to the LLM, to optimize the relevance of your query results. +Without additional context, an LLM will generate results solely based on its training data. +In {x}, this additional context is the information contained in your {es} indices. + +There are a few ways to optimize this context for better results. +Some adjustments can be made directly in the {x} UI. +Others require refining your indexing strategy, and potentially reindexing your data. + +[float] +[[playground-context-ui]] +== Edit context in UI + +Use the *Edit context* button in the {x} UI to adjust the number of documents and fields sent to the LLM. + +If you're hitting context length limits, try the following: + +* Limit the number of documents retrieved +* Pick a field with less tokens, reducing the context length + +[float] +[[playground-context-index]] +== Other context optimizations + +This section covers additional context optimizations that you won't be able to make directly in the UI. + +[float] +[[playground-context-index-chunking]] +=== Chunking large documents + +If you're working with large fields, you may need to adjust your indexing strategy. +Consider breaking your documents into smaller chunks, such as sentences or paragraphs. + +If you don't yet have a chunking strategy, start by chunking your documents into passages. + +Otherwise, consider updating your chunking strategy, for example, from sentence based to paragraph based chunking. + +Refer to the following Python notebooks for examples of how to chunk your documents: + +* https://github.com/elastic/elasticsearch-labs/tree/main/notebooks/ingestion-and-chunking/json-chunking-ingest.ipynb[JSON documents] +* https://github.com/elastic/elasticsearch-labs/tree/main/notebooks/ingestion-and-chunking/pdf-chunking-ingest.ipynb[PDF document] +* https://github.com/elastic/elasticsearch-labs/tree/main/notebooks/ingestion-and-chunking/website-chunking-ingest.ipynb[Website content] + +[float] +[[playground-context-balance]] +=== Balancing cost and latency + +Here are some general recommendations for balancing cost and latency with different context sizes: + +Optimize context length:: +Determine the optimal context length through empirical testing. +Start with a baseline and adjust incrementally to find a balance that optimizes both response quality and system performance. +Implement token pruning for ELSER model:: +If you're using our ELSER model, consider implementing token pruning to reduce the number of tokens sent to the model. +Refer to these relevant blog posts: ++ +* https://www.elastic.co/search-labs/blog/introducing-elser-v2-part-2[Optimizing retrieval with ELSER v2] +* https://www.elastic.co/search-labs/blog/text-expansion-pruning[Improving text expansion performance using token pruning] +Monitor and adjust:: +Continuously monitor the effects of context size changes on performance and adjust as necessary. diff --git a/docs/playground/playground-query.asciidoc b/docs/playground/playground-query.asciidoc new file mode 100644 index 0000000000000..11ed2e71b1a2d --- /dev/null +++ b/docs/playground/playground-query.asciidoc @@ -0,0 +1,51 @@ +[xpack] +[[playground-query]] +== View and modify queries + +:x: Playground + +preview::[] + +Once you've set up your chat interface, you can start chatting with the model. +{x} will automatically generate {es} queries based on your questions, and retrieve the most relevant documents from your {es} indices. +The {x} UI enables you to view and modify these queries. + +* Click *View query* to open the visual query editor. +* Modify the query by selecting fields to query per index. +* Click *Save changes*. + +[TIP] +==== +The `{query}` variable represents the user's question, rewritten as an {es} query. +==== + +The following screenshot shows the query editor in the {x} UI. +In this simple example, the `books` index has two fields: `author` and `name`. +Selecting a field adds it to the `fields` array in the query. + +[.screenshot] +image::images/edit-query.png[View and modify queries] + +[float] +[[playground-query-relevance]] +=== Improving relevance + +The fields you select in the query editor determine the relevance of the retrieved documents. + +Remember that the next step in the workflow is to send the retrieved documents to the LLM to answer the question. +Context length is an important factor in ensuring the model has enough information to generate a relevant answer. +Refer to <> for more information. + +<> provides tips on how to diagnose and fix relevance issues. + +[.screenshot] + + + +[NOTE] +==== +{x} uses the {ref}/retriever.html[`retriever`] syntax for {es} queries. +Retrievers make it easier to compose and test different retrieval strategies in your search pipelines. +==== +// TODO: uncomment and add to note once following page is live +//Refer to {ref}/retrievers-overview.html[documentation] for a high level overview of retrievers. \ No newline at end of file diff --git a/docs/playground/playground-troubleshooting.asciidoc b/docs/playground/playground-troubleshooting.asciidoc new file mode 100644 index 0000000000000..8fece498b12d5 --- /dev/null +++ b/docs/playground/playground-troubleshooting.asciidoc @@ -0,0 +1,26 @@ +[role="xpack"] +[[playground-troubleshooting]] +== Troubleshooting + +preview::[] + +:x: Playground + +Dense vectors are not searchable:: +Embeddings must be generated using the {ref}/inference-processor.html[inference processor] with an ML node. + +Context length error:: +You'll need to adjust the size of the context you're sending to the model. +Refer to <>. + +LLM credentials not working:: +Under *Model settings*, use the wrench button (🔧) to edit your GenAI connector settings. + +Poor answer quality:: +Check the retrieved documents to see if they are valid. +Adjust your {es} queries to improve the relevance of the documents retrieved. Refer to <>. ++ +You can update the initial instructions to be more detailed. This is called 'prompt engineering'. Refer to this https://platform.openai.com/docs/guides/prompt-engineering[OpenAI guide] for more information. ++ +You might need to click *⟳ Clear chat* to clear chat history and start a new conversation. +If you mix topics, the model will find it harder to generate relevant responses. \ No newline at end of file diff --git a/docs/redirects.asciidoc b/docs/redirects.asciidoc index 007a9d9f48cfc..be017fbd1c94e 100644 --- a/docs/redirects.asciidoc +++ b/docs/redirects.asciidoc @@ -432,9 +432,4 @@ This connector was renamed. Refer to <>. == APIs For the most up-to-date API details, refer to the -{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[alerting], {kib-repo}/tree/{branch}/x-pack/plugins/cases/docs/openapi[cases], {kib-repo}/tree/{branch}/x-pack/plugins/actions/docs/openapi[connectors], and {kib-repo}/tree/{branch}/x-pack/plugins/ml/common/openapi[machine learning] open API specifications. - -[role="exclude",id="playground"] -== Playground - -Coming in 8.14.0. \ No newline at end of file +{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[alerting], {kib-repo}/tree/{branch}/x-pack/plugins/cases/docs/openapi[cases], {kib-repo}/tree/{branch}/x-pack/plugins/actions/docs/openapi[connectors], and {kib-repo}/tree/{branch}/x-pack/plugins/ml/common/openapi[machine learning] open API specifications. \ No newline at end of file diff --git a/docs/user/index.asciidoc b/docs/user/index.asciidoc index bf21f7b262924..419574804312c 100644 --- a/docs/user/index.asciidoc +++ b/docs/user/index.asciidoc @@ -28,6 +28,8 @@ include::alerting/index.asciidoc[] include::{kibana-root}/docs/observability/index.asciidoc[] +include::{kibana-root}/docs/playground/index.asciidoc[] + include::{kibana-root}/docs/apm/index.asciidoc[] include::{kibana-root}/docs/siem/index.asciidoc[] diff --git a/fleet_packages.json b/fleet_packages.json index 15a653900f8b4..06a0f983657e5 100644 --- a/fleet_packages.json +++ b/fleet_packages.json @@ -42,12 +42,12 @@ }, { "name": "profiler_symbolizer", - "version": "8.12.0", + "version": "8.14.0", "forceAlignStackVersion": true }, { "name": "profiler_collector", - "version": "8.12.0", + "version": "8.14.0", "forceAlignStackVersion": true }, { @@ -56,6 +56,6 @@ }, { "name": "security_detection_engine", - "version": "8.13.5" + "version": "8.13.6" } ] \ No newline at end of file diff --git a/package.json b/package.json index 1f73374cd2d63..29487ced40a10 100644 --- a/package.json +++ b/package.json @@ -558,6 +558,7 @@ "@kbn/locator-explorer-plugin": "link:examples/locator_explorer", "@kbn/logging": "link:packages/kbn-logging", "@kbn/logging-mocks": "link:packages/kbn-logging-mocks", + "@kbn/logs-data-access-plugin": "link:x-pack/plugins/observability_solution/logs_data_access", "@kbn/logs-explorer-plugin": "link:x-pack/plugins/observability_solution/logs_explorer", "@kbn/logs-shared-plugin": "link:x-pack/plugins/observability_solution/logs_shared", "@kbn/logstash-plugin": "link:x-pack/plugins/logstash", @@ -1372,7 +1373,7 @@ "@mapbox/vector-tile": "1.3.1", "@octokit/rest": "^16.35.0", "@parcel/watcher": "^2.1.0", - "@redocly/cli": "^1.6.0", + "@redocly/cli": "^1.12.0", "@statoscope/webpack-plugin": "^5.28.2", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", @@ -1463,7 +1464,6 @@ "@types/json5": "^2.2.0", "@types/jsonwebtoken": "^9.0.0", "@types/license-checker": "15.0.0", - "@types/listr": "^0.14.0", "@types/loader-utils": "^2.0.3", "@types/lodash": "^4.14.159", "@types/lru-cache": "^5.1.0", @@ -1641,7 +1641,7 @@ "json5": "^2.2.3", "jsondiffpatch": "0.4.1", "license-checker": "^25.0.1", - "listr": "^0.14.1", + "listr2": "^8.2.1", "lmdb": "^2.9.2", "loader-utils": "^2.0.4", "marge": "^1.0.1", diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx index 39a7a25424d6f..ed23d25434664 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/breadcrumbs.tsx @@ -41,7 +41,7 @@ export function buildBreadcrumbs({ solutionNavigations?: { definitions: SolutionNavigationDefinitions; activeId: string; - onChange: (id: string, options?: { redirect?: boolean }) => void; + onChange: (id: string) => void; }; }): ChromeProjectBreadcrumb[] { const rootCrumb = buildRootCrumb({ @@ -107,7 +107,7 @@ function buildRootCrumb({ solutionNavigations?: { definitions: SolutionNavigationDefinitions; activeId: string; - onChange: (id: string, options?: { redirect?: boolean }) => void; + onChange: (id: string) => void; }; }): ChromeProjectBreadcrumb { if (solutionNavigations) { diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts index 508e72c5b86b4..71fac1455031b 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts @@ -1003,28 +1003,18 @@ describe('solution navigations', () => { } }); - it('should throw if the active solution navigation is not registered', async () => { - const { projectNavigation } = setup(); - - projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2 }); - - expect(() => { - projectNavigation.changeActiveSolutionNavigation('3'); - }).toThrowErrorMatchingInlineSnapshot( - `"Solution navigation definition with id \\"3\\" does not exist."` - ); - }); - it('should change the active solution if no node match the current Location', async () => { - const { projectNavigation, navLinksService } = setup({ + const { projectNavigation, navLinksService, application } = setup({ locationPathName: '/app/app3', // we are on app3 which only exists in solution3 navLinkIds: ['app1', 'app2', 'app3'], }); + navLinksService.get.mockReturnValue({ url: '/app/app3', href: '/app/app3' } as any); + const getActiveDefinition = () => - lastValueFrom(projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1))); + firstValueFrom(projectNavigation.getActiveSolutionNavDefinition$()); - projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2, 3: solution3 }); + projectNavigation.updateSolutionNavigations({ solution1, solution2, solution3 }); { const definition = await getActiveDefinition(); @@ -1032,20 +1022,12 @@ describe('solution navigations', () => { } // Change to solution 2, but we are still on '/app/app3' which only exists in solution3 - projectNavigation.changeActiveSolutionNavigation('2'); + projectNavigation.changeActiveSolutionNavigation('solution2'); { const definition = await getActiveDefinition(); expect(definition?.id).toBe('solution3'); // The solution3 was activated as it matches the "/app/app3" location + expect(application.navigateToUrl).toHaveBeenCalled(); // Redirect } - - navLinksService.get.mockReturnValue({ url: '/app/app2', href: '/app/app2' } as any); - projectNavigation.changeActiveSolutionNavigation('2', { redirect: true }); // We ask to redirect to the home page of solution 2 - { - const definition = await getActiveDefinition(); - expect(definition?.id).toBe('solution2'); - } - - navLinksService.get.mockReset(); }); }); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts index 1f3efef5d7821..ddd00cea5b37e 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts @@ -33,7 +33,6 @@ import { type Observable, type Subscription, take, - debounceTime, } from 'rxjs'; import { type Location, createLocation } from 'history'; import deepEqual from 'react-fast-compare'; @@ -80,26 +79,30 @@ export class ProjectNavigationService { }>({ breadcrumbs: [], params: { absolute: false } }); private readonly stop$ = new ReplaySubject(1); private readonly solutionNavDefinitions$ = new BehaviorSubject({}); + // As the active definition **id** and the definitions are set independently, one before the other without + // any guarantee of order, we need to store the next active definition id in a separate BehaviorSubject + private readonly nextSolutionNavDefinitionId$ = new BehaviorSubject(null); + // The active solution navigation definition id that has been initiated and is currently active private readonly activeSolutionNavDefinitionId$ = new BehaviorSubject(null); private readonly location$ = new BehaviorSubject(createLocation('/')); private deepLinksMap$: Observable> = of({}); private cloudLinks$ = new BehaviorSubject({}); private application?: InternalApplicationStart; private navLinksService?: ChromeNavLinks; - private http?: InternalHttpStart; + private _http?: InternalHttpStart; private navigationChangeSubscription?: Subscription; private unlistenHistory?: () => void; public start({ application, navLinksService, http, chromeBreadcrumbs$, logger }: StartDeps) { this.application = application; this.navLinksService = navLinksService; - this.http = http; + this._http = http; this.logger = logger; this.onHistoryLocationChange(application.history.location); this.unlistenHistory = application.history.listen(this.onHistoryLocationChange.bind(this)); this.handleActiveNodesChange(); - this.handleEmptyActiveNodes(); + this.handleSolutionNavDefinitionChange(); this.deepLinksMap$ = navLinksService.getNavLinks$().pipe( map((navLinks) => { @@ -137,7 +140,7 @@ export class ProjectNavigationService { }, getNavigationTreeUi$: this.getNavigationTreeUi$.bind(this), getActiveNodes$: () => { - return this.activeNodes$.pipe(takeUntil(this.stop$)); + return this.activeNodes$.pipe(takeUntil(this.stop$), distinctUntilChanged(deepEqual)); }, setSideNavComponent: this.setSideNavComponent.bind(this), getProjectSideNavComponent$: () => { @@ -178,7 +181,10 @@ export class ProjectNavigationService { ? { definitions: solutionNavDefinitions, activeId: activeSolutionNavDefinitionId, - onChange: this.changeActiveSolutionNavigation.bind(this), + onChange: (id: string) => { + this.goToSolutionHome(id); + this.changeActiveSolutionNavigation(id); + }, } : undefined; @@ -217,14 +223,13 @@ export class ProjectNavigationService { private initNavigation(id: string, navTreeDefinition$: Observable) { if (this.activeSolutionNavDefinitionId$.getValue() === id) return; - this.activeSolutionNavDefinitionId$.next(id); - if (this.navigationChangeSubscription) { this.navigationChangeSubscription.unsubscribe(); } let initialised = false; this.projectNavigationNavTreeFlattened = {}; + this.navigationChangeSubscription = combineLatest([ navTreeDefinition$, this.deepLinksMap$, @@ -243,13 +248,26 @@ export class ProjectNavigationService { next: ({ navigationTree, navigationTreeUI }) => { this.navigationTree$.next(navigationTree); this.navigationTreeUi$.next(navigationTreeUI); - this.projectNavigationNavTreeFlattened = flattenNav(navigationTree); - // At initialization, we want to force the update of the active nodes, so 2 empty arrays [] - // are not considered equal and we update the Observable value. - this.updateActiveProjectNavigationNodes({ forceUpdate: !initialised }); - initialised = true; + // Verify if the current location is part of the navigation tree of + // the initiated solution. If not, we need to find the correct solution + const activeNodes = this.updateActiveProjectNavigationNodes(); + let willChangeSolution = false; + + if (activeNodes.length === 0) { + const solutionForCurrentLocation = this.findSolutionForCurrentLocation(); + if (solutionForCurrentLocation) { + willChangeSolution = true; + this.goToSolutionHome(solutionForCurrentLocation); + this.changeActiveSolutionNavigation(solutionForCurrentLocation); + } + } + + if (!initialised && !willChangeSolution) { + this.activeSolutionNavDefinitionId$.next(id); + initialised = true; + } }, error: (err) => { this.logger?.error(err); @@ -271,7 +289,7 @@ export class ProjectNavigationService { flattendTree?: Record; } = {}): ChromeProjectNavigationNode[][] { if (!this.application) return []; - if (!Object.keys(this.projectNavigationNavTreeFlattened).length) return []; + if (!Object.keys(flattendTree).length) return []; const location = _location ?? this.application.history.location; let currentPathname = this.http?.basePath.prepend(location.pathname) ?? location.pathname; @@ -292,23 +310,15 @@ export class ProjectNavigationService { */ private updateActiveProjectNavigationNodes({ location, - forceUpdate = false, - }: { location?: Location; forceUpdate?: boolean } = {}) { + }: { location?: Location } = {}): ChromeProjectNavigationNode[][] { const activeNodes = this.findActiveNodes({ location }); - // Each time we call findActiveNodes() we create a new array of activeNodes. As this array is used - // in React in useCallback() and useMemo() dependencies arrays it triggers an infinite navigation - // tree registration loop. To avoid that we only notify the listeners when the activeNodes array - // has actually changed. - const requiresUpdate = forceUpdate ? true : !deepEqual(activeNodes, this.activeNodes$.value); - - if (!requiresUpdate) return; - this.activeNodes$.next(activeNodes); + return activeNodes; } private onHistoryLocationChange(location: Location) { - this.location$.next(location); this.updateActiveProjectNavigationNodes({ location }); + this.location$.next(location); } private handleActiveNodesChange() { @@ -338,30 +348,17 @@ export class ProjectNavigationService { * lands on a page that does not belong to the current active solution navigation. In this case, * we need to find the correct solution navigation based on the current location and switch to it. */ - private handleEmptyActiveNodes() { - combineLatest([ - this.activeNodes$, - this.solutionNavDefinitions$, - this.activeSolutionNavDefinitionId$.pipe(distinctUntilChanged()), - this.location$, - ]) - .pipe(takeUntil(this.stop$), debounceTime(20)) - .subscribe(([activeNodes, definitions, activeSolution, location]) => { - if ( - activeNodes.length > 0 || - activeSolution === null || - Object.keys(definitions).length === 0 || - Object.keys(this.projectNavigationNavTreeFlattened).length === 0 - ) { - return; - } + private findSolutionForCurrentLocation(): string | null { + if (Object.keys(this.solutionNavDefinitions$.getValue()).length === 0) return null; - // We have an active solution navigation but no active nodes, this means that - // the current location is not part of the current solution navigation. - // We need to find the correct solution navigation based on the current location. - let found = false; + let idFound: string | null = null; + combineLatest([this.solutionNavDefinitions$, this.location$]) + .pipe(take(1)) + .subscribe(([definitions, location]) => { Object.entries(definitions).forEach(([id, definition]) => { + if (idFound) return; + combineLatest([definition.navigationTree$, this.deepLinksMap$, this.cloudLinks$]) .pipe( take(1), @@ -373,72 +370,71 @@ export class ProjectNavigationService { ) ) .subscribe(({ navigationTree }) => { - if (found) return; - const maybeActiveNodes = this.findActiveNodes({ location, flattendTree: flattenNav(navigationTree), }); if (maybeActiveNodes.length > 0) { - found = true; - this.changeActiveSolutionNavigation(id); + idFound = id; } }); }); }); + + return idFound; } private setSideNavComponent(component: SideNavComponent | null) { this.customProjectSideNavComponent$.next({ current: component }); } - private changeActiveSolutionNavigation( - id: string | null, - { onlyIfNotSet = false, redirect = false } = {} - ) { - if (this.activeSolutionNavDefinitionId$.getValue() === id) return; - if (onlyIfNotSet && this.activeSolutionNavDefinitionId$.getValue() !== null) { - return; - } - - const definitions = this.solutionNavDefinitions$.getValue(); - this.activeSolutionNavDefinitionId$.next(null); - // We don't want to change to "classic" if `id` is `null` when we haven't received - // any definitions yet. Serverless Kibana could be impacted by this. - // When we **do** have definitions, then passing `null` does mean we should change to "classic". - if (Object.keys(definitions).length > 0) { - if (id === null) { - this.navigationTree$.next(undefined); - this.activeSolutionNavDefinitionId$.next(null); - } else { - const definition = definitions[id]; - if (!definition) { - throw new Error(`Solution navigation definition with id "${id}" does not exist.`); + private handleSolutionNavDefinitionChange() { + combineLatest([ + this.solutionNavDefinitions$, + this.nextSolutionNavDefinitionId$.pipe(distinctUntilChanged()), + ]) + .pipe(takeUntil(this.stop$)) + .subscribe(([definitions, nextId]) => { + const definition = typeof nextId === 'string' ? definitions[nextId] : undefined; + const noActiveDefinition = + Object.keys(definitions).length === 0 || !definition || nextId === null; + + if (noActiveDefinition) { + this.navigationTree$.next(undefined); + this.activeNodes$.next([]); + return; } const { sideNavComponent } = definition; if (sideNavComponent) { this.setSideNavComponent(sideNavComponent); } + this.initNavigation(nextId, definition.navigationTree$); + }); + } - let location: Location | undefined; - if (redirect) { - // Navigate to the new home page if it's defined, otherwise navigate to the default home page - const link = this.navLinksService?.get(definition.homePage ?? 'home'); - if (link) { - const linkUrl = this.http?.basePath.remove(link.url) ?? link.url; - location = createLocation(linkUrl); - this.location$.next(location); - this.application?.navigateToUrl(link.href); - } - } + private goToSolutionHome(id: string) { + const definitions = this.solutionNavDefinitions$.getValue(); + const definition = definitions[id]; + if (!definition) { + throw new Error(`No solution navigation definition found for id ${id}`); + } - this.initNavigation(id, definition.navigationTree$); - } - } else if (id !== null) { - this.activeSolutionNavDefinitionId$.next(id); + // Navigate to the new home page if it's defined + const link = this.navLinksService?.get(definition.homePage ?? 'undefined'); + if (!link) { + throw new Error(`No home page defined for solution navigation ${definition.id}`); } + + const location = createLocation(link.url); + this.location$.next(location); + this.application?.navigateToUrl(link.url); + } + + private changeActiveSolutionNavigation(id: string | null) { + if (this.nextSolutionNavDefinitionId$.getValue() === id) return; + this.nextSolutionNavDefinitionId$.next(id); } private getSolutionsNavDefinitions$() { @@ -451,9 +447,8 @@ export class ProjectNavigationService { map(([definitions, id]) => { if (id === null) return null; if (Object.keys(definitions).length === 0) return null; - if (!definitions[id]) { - throw new Error(`Solution navigation definition with id "${id}" does not exist.`); - } + if (!definitions[id]) return null; + // We strip out the sideNavComponent from the definition as it should only be used internally const { sideNavComponent, ...definition } = definitions[id]; return definition; @@ -475,6 +470,13 @@ export class ProjectNavigationService { } } + private get http() { + if (!this._http) { + throw new Error('Http service not provided.'); + } + return this._http; + } + public stop() { this.stop$.next(); this.unlistenHistory?.(); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/types.ts b/packages/core/chrome/core-chrome-browser-internal/src/types.ts index 6413c0a683112..41f96b6e751d6 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/types.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/types.ts @@ -113,14 +113,6 @@ export interface InternalChromeStart extends ChromeStart { * @param id The id of the active solution navigation. If `null` is provided, the solution navigation * will be replaced with the legacy Kibana navigation. */ - changeActiveSolutionNavigation( - id: string | null, - options?: { - /** only change if there isn't any active solution yet */ - onlyIfNotSet?: boolean; - /** redirect to the new navigation home page */ - redirect?: boolean; - } - ): void; + changeActiveSolutionNavigation(id: string | null): void; }; } diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx index a536cb0e0bfd8..abb617e988724 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx @@ -22,7 +22,7 @@ export const getSolutionNavSwitcherBreadCrumb = ({ }: { definitions: SolutionNavigationDefinitions; activeId: string; - onChange: (id: string, options?: { redirect?: boolean }) => void; + onChange: (id: string) => void; cloudLinks: CloudLinks; }): ChromeProjectBreadcrumb => { const text = Object.values(definitions).find(({ id }) => id === activeId)?.title; @@ -48,7 +48,7 @@ export const getSolutionNavSwitcherBreadCrumb = ({ iconType={icon as string} data-test-subj={`solutionNavSwitcher-${id}`} onClick={() => { - onChange(id, { redirect: true }); + onChange(id); closePopover(); }} />, diff --git a/packages/core/http/core-http-server/src/router/route.ts b/packages/core/http/core-http-server/src/router/route.ts index 2bbe26e1ea47a..bb3e59cfcd00b 100644 --- a/packages/core/http/core-http-server/src/router/route.ts +++ b/packages/core/http/core-http-server/src/router/route.ts @@ -160,7 +160,7 @@ export interface RouteConfigOptions { idleSocket?: number; }; - /** Human-friendly description of this endpoint */ + /** A short, human-friendly description of this endpoint */ description?: string; } diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/mocks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/mocks.ts index ae52a8556784b..360487c0c5c3c 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/mocks.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/mocks.ts @@ -12,13 +12,16 @@ import type { RollingFileContext } from './rolling_file_context'; import type { RollingFileManager } from './rolling_file_manager'; import type { TriggeringPolicy } from './policies/policy'; import type { RollingStrategy } from './strategies/strategy'; +import type { RetentionPolicy } from './retention/retention_policy'; -const createContextMock = (filePath: string) => { +const createContextMock = (filePath: string = 'kibana.log') => { const mock: jest.Mocked = { currentFileSize: 0, currentFileTime: 0, filePath, refreshFileInfo: jest.fn(), + getOrderedRolledFiles: jest.fn(), + setOrderedRolledFileFn: jest.fn(), }; return mock; }; @@ -52,10 +55,18 @@ const createFileManagerMock = () => { return mock; }; +const createRetentionPolicyMock = () => { + const mock: jest.Mocked = { + apply: jest.fn(), + }; + return mock; +}; + export const rollingFileAppenderMocks = { createContext: createContextMock, createStrategy: createStrategyMock, createPolicy: createPolicyMock, createLayout: createLayoutMock, createFileManager: createFileManagerMock, + createRetentionPolicy: createRetentionPolicyMock, }; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.test.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.test.ts new file mode 100644 index 0000000000000..24974d4e33e44 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.test.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { RollingStrategyConfig } from '@kbn/core-logging-server'; +import { mergeRetentionPolicyConfig } from './create_retention_policy'; + +describe('mergeRetentionPolicyConfig', () => { + const createRollingStrategyConfig = (max: number): RollingStrategyConfig => { + return { + type: 'numeric', + pattern: '-%i', + max, + }; + }; + + it('uses the value from the retention strategy config if defined', () => { + const merged = mergeRetentionPolicyConfig({ maxFiles: 42 }, createRollingStrategyConfig(10)); + expect(merged).toEqual({ + maxFiles: 42, + }); + }); + + it('uses the value from the rolling strategy config not defined on the retention config', () => { + const merged = mergeRetentionPolicyConfig({}, createRollingStrategyConfig(10)); + expect(merged).toEqual({ + maxFiles: 10, + }); + }); +}); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.ts new file mode 100644 index 0000000000000..33e8bb4c8da35 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/create_retention_policy.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { RetentionPolicyConfig, RollingStrategyConfig } from '@kbn/core-logging-server'; +import type { RollingFileContext } from '../rolling_file_context'; +import { GenericRetentionPolicy, type RetentionPolicy } from './retention_policy'; + +export const createRetentionPolicy = ( + config: RetentionPolicyConfig, + context: RollingFileContext +): RetentionPolicy => { + return new GenericRetentionPolicy(config, context); +}; + +export const mergeRetentionPolicyConfig = ( + config: RetentionPolicyConfig | undefined, + strategyConfig: RollingStrategyConfig +): RetentionPolicyConfig => { + return { + ...config, + maxFiles: config?.maxFiles || strategyConfig.max, + }; +}; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/fs.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/fs.ts new file mode 100644 index 0000000000000..ffa0f5d4ebe21 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/fs.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { unlink, stat } from 'fs/promises'; + +export const deleteFiles = async ({ filesToDelete }: { filesToDelete: string[] }) => { + await Promise.all(filesToDelete.map((fileToDelete) => unlink(fileToDelete))); +}; + +export type GetFileInfoResult = { exist: false } | { exist: true; size: number; mtime: Date }; + +export const getFileInfo = async (absFilePath: string): Promise => { + try { + const { size, mtime } = await stat(absFilePath); + return { exist: true, size, mtime }; + } catch (e) { + if (e.code === 'ENOENT') { + return { exist: false }; + } + throw e; + } +}; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/index.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/index.ts new file mode 100644 index 0000000000000..26fac7ac06e80 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { retentionPolicyConfigSchema, type RetentionPolicy } from './retention_policy'; +export { createRetentionPolicy, mergeRetentionPolicyConfig } from './create_retention_policy'; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.test.mocks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.test.mocks.ts new file mode 100644 index 0000000000000..b3aeb0c5fb97c --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.test.mocks.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { listFilesOlderThan, listFilesExceedingSize } from './utils'; +import type { deleteFiles } from './fs'; + +export const listFilesExceedingSizeMock: jest.MockedFn = jest.fn(); +export const listFilesOlderThanMock: jest.MockedFn = jest.fn(); + +jest.doMock('./utils', () => { + const actual = jest.requireActual('./utils'); + return { + ...actual, + listFilesExceedingSize: listFilesExceedingSizeMock, + listFilesOlderThan: listFilesOlderThanMock, + }; +}); + +export const deleteFilesMock: jest.MockedFn = jest.fn(); + +jest.doMock('./fs', () => { + const actual = jest.requireActual('./fs'); + return { + ...actual, + deleteFiles: deleteFilesMock, + }; +}); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.test.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.test.ts new file mode 100644 index 0000000000000..142523b4bf8eb --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.test.ts @@ -0,0 +1,141 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { + listFilesExceedingSizeMock, + listFilesOlderThanMock, + deleteFilesMock, +} from './retention_policy.test.mocks'; +import type { RetentionPolicyConfig } from '@kbn/core-logging-server'; +import { rollingFileAppenderMocks } from '../mocks'; +import { GenericRetentionPolicy, retentionPolicyConfigSchema } from './retention_policy'; + +describe('GenericRetentionPolicy', () => { + let context: ReturnType; + let config: RetentionPolicyConfig; + + beforeEach(() => { + deleteFilesMock.mockReset(); + listFilesExceedingSizeMock.mockReset(); + listFilesOlderThanMock.mockReset(); + + context = rollingFileAppenderMocks.createContext(); + }); + + it('supports the maxFile directive', async () => { + config = retentionPolicyConfigSchema.validate({ + maxFiles: 2, + }); + context.getOrderedRolledFiles.mockResolvedValue(['file-1', 'file-2', 'file-3', 'file-4']); + + const policy = new GenericRetentionPolicy(config, context); + + await policy.apply(); + + expect(deleteFilesMock).toHaveBeenCalledTimes(1); + expect(deleteFilesMock).toHaveBeenCalledWith({ + filesToDelete: ['file-3', 'file-4'], + }); + }); + + it('supports the maxAccumulatedFileSize directive', async () => { + config = retentionPolicyConfigSchema.validate({ + maxAccumulatedFileSize: '50b', + }); + context.getOrderedRolledFiles.mockResolvedValue(['file-1', 'file-2', 'file-3', 'file-4']); + + listFilesExceedingSizeMock.mockResolvedValue(['file-4']); + + const policy = new GenericRetentionPolicy(config, context); + + await policy.apply(); + + expect(listFilesOlderThanMock).not.toHaveBeenCalled(); + expect(listFilesExceedingSizeMock).toHaveBeenCalledTimes(1); + expect(listFilesExceedingSizeMock).toHaveBeenCalledWith({ + orderedFiles: ['file-1', 'file-2', 'file-3', 'file-4'], + maxSizeInBytes: config.maxAccumulatedFileSize!.getValueInBytes(), + }); + + expect(deleteFilesMock).toHaveBeenCalledTimes(1); + expect(deleteFilesMock).toHaveBeenCalledWith({ + filesToDelete: ['file-4'], + }); + }); + + it('supports the removeOlderThan directive', async () => { + config = retentionPolicyConfigSchema.validate({ + removeOlderThan: '30d', + }); + context.getOrderedRolledFiles.mockResolvedValue(['file-1', 'file-2', 'file-3', 'file-4']); + + listFilesOlderThanMock.mockResolvedValue(['file-2', 'file-3', 'file-4']); + + const policy = new GenericRetentionPolicy(config, context); + + await policy.apply(); + + expect(listFilesExceedingSizeMock).not.toHaveBeenCalled(); + expect(listFilesOlderThanMock).toHaveBeenCalledTimes(1); + expect(listFilesOlderThanMock).toHaveBeenCalledWith({ + orderedFiles: ['file-1', 'file-2', 'file-3', 'file-4'], + duration: config.removeOlderThan!, + }); + + expect(deleteFilesMock).toHaveBeenCalledTimes(1); + expect(deleteFilesMock).toHaveBeenCalledWith({ + filesToDelete: ['file-2', 'file-3', 'file-4'], + }); + }); + + it('supports all directives at the same time', async () => { + config = retentionPolicyConfigSchema.validate({ + maxFiles: 3, + removeOlderThan: '30d', + maxAccumulatedFileSize: '50b', + }); + context.getOrderedRolledFiles.mockResolvedValue(['file-1', 'file-2', 'file-3', 'file-4']); + + listFilesOlderThanMock.mockResolvedValue(['file-2']); + listFilesExceedingSizeMock.mockResolvedValue(['file-3']); + + const policy = new GenericRetentionPolicy(config, context); + + await policy.apply(); + + expect(listFilesExceedingSizeMock).toHaveBeenCalledTimes(1); + expect(listFilesExceedingSizeMock).toHaveBeenCalledWith({ + orderedFiles: ['file-1', 'file-2', 'file-3', 'file-4'], + maxSizeInBytes: config.maxAccumulatedFileSize!.getValueInBytes(), + }); + + expect(listFilesOlderThanMock).toHaveBeenCalledTimes(1); + expect(listFilesOlderThanMock).toHaveBeenCalledWith({ + orderedFiles: ['file-1', 'file-2', 'file-3', 'file-4'], + duration: config.removeOlderThan!, + }); + + expect(deleteFilesMock).toHaveBeenCalledTimes(1); + expect(deleteFilesMock).toHaveBeenCalledWith({ + filesToDelete: ['file-4', 'file-3', 'file-2'], + }); + }); + + it('do not call deleteFiles if no file should be deleted', async () => { + config = retentionPolicyConfigSchema.validate({ + maxFiles: 5, + }); + context.getOrderedRolledFiles.mockResolvedValue(['file-1', 'file-2', 'file-3', 'file-4']); + + const policy = new GenericRetentionPolicy(config, context); + + await policy.apply(); + + expect(deleteFilesMock).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.ts new file mode 100644 index 0000000000000..9f2150e4a575d --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/retention_policy.ts @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { dirname, join } from 'path'; +import { schema } from '@kbn/config-schema'; +import type { RetentionPolicyConfig } from '@kbn/core-logging-server'; +import type { RollingFileContext } from '../rolling_file_context'; +import { deleteFiles } from './fs'; +import { listFilesExceedingSize, listFilesOlderThan } from './utils'; + +export const retentionPolicyConfigSchema = schema.object( + { + maxFiles: schema.maybe(schema.number({ min: 1, max: 365 })), + maxAccumulatedFileSize: schema.maybe(schema.byteSize()), + removeOlderThan: schema.maybe(schema.duration({ max: '365d' })), + }, + { + validate: (config) => { + if (!config.maxFiles && !config.maxAccumulatedFileSize && !config.removeOlderThan) { + return 'Retention policy must define at least one directive: maxFiles, maxAccumulatedFileSize or removeOlderThan'; + } + }, + } +); + +export interface RetentionPolicy { + /** + * Apply the configured policy, checking the existing log files bound to the appender + * and disposing of those that should. + */ + apply(): Promise; +} + +export class GenericRetentionPolicy implements RetentionPolicy { + private readonly logFileFolder; + + constructor( + private readonly config: RetentionPolicyConfig, + private readonly context: RollingFileContext + ) { + this.logFileFolder = dirname(this.context.filePath); + } + + async apply() { + const { maxFiles, maxAccumulatedFileSize, removeOlderThan } = this.config; + const orderedFilesBaseNames = await this.context.getOrderedRolledFiles(); + const absOrderedFiles = orderedFilesBaseNames.map((filepath) => + join(this.logFileFolder, filepath) + ); + + const filesToDelete: Set = new Set(); + + if (maxFiles) { + const exceedingFiles = absOrderedFiles.slice(maxFiles, absOrderedFiles.length); + exceedingFiles.forEach((file) => filesToDelete.add(file)); + } + + if (maxAccumulatedFileSize) { + const toRemoveByFileSize = await listFilesExceedingSize({ + orderedFiles: absOrderedFiles, + maxSizeInBytes: maxAccumulatedFileSize.getValueInBytes(), + }); + toRemoveByFileSize.forEach((file) => filesToDelete.add(file)); + } + + if (removeOlderThan) { + const toRemoveByAge = await listFilesOlderThan({ + orderedFiles: absOrderedFiles, + duration: removeOlderThan, + }); + toRemoveByAge.forEach((file) => filesToDelete.add(file)); + } + + if (filesToDelete.size > 0) { + await deleteFiles({ + filesToDelete: [...filesToDelete], + }); + } + } +} diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.test.mocks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.test.mocks.ts new file mode 100644 index 0000000000000..ed8da1f9e513b --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.test.mocks.ts @@ -0,0 +1,19 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { getFileInfo } from './fs'; + +export const getFileInfoMock: jest.MockedFn = jest.fn(); + +jest.doMock('./fs', () => { + const actual = jest.requireActual('./fs'); + return { + ...actual, + getFileInfo: getFileInfoMock, + }; +}); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.test.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.test.ts new file mode 100644 index 0000000000000..deba5ff7265f8 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.test.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment from 'moment-timezone'; +import { getFileInfoMock } from './utils.test.mocks'; +import { listFilesOlderThan, listFilesExceedingSize } from './utils'; + +describe('listFilesExceedingSize', () => { + beforeEach(() => { + getFileInfoMock.mockReset(); + }); + + const mockWithSizeMap = (fileSizeMap: Record) => { + getFileInfoMock.mockImplementation(async (fileName) => { + const fileSize = fileSizeMap[fileName]; + if (fileSize !== undefined) { + return { exist: true, size: fileSize, mtime: new Date() }; + } + return { exist: false }; + }); + }; + + it('returns an empty list if total accumulated size is lower than the limit', async () => { + mockWithSizeMap({ + 'file-1': 50, + 'file-2': 50, + 'file-3': 50, + }); + + const result = await listFilesExceedingSize({ + orderedFiles: ['file-1', 'file-2', 'file-3'], + maxSizeInBytes: 200, + }); + + expect(result).toEqual([]); + }); + + it('returns the list of files over the limit, including the one that breached the limit', async () => { + mockWithSizeMap({ + 'file-1': 100, + 'file-2': 100, + 'file-3': 100, + 'file-4': 100, + }); + + const result = await listFilesExceedingSize({ + orderedFiles: ['file-1', 'file-2', 'file-3', 'file-4'], + maxSizeInBytes: 250, + }); + + expect(result).toEqual(['file-3', 'file-4']); + }); +}); + +describe('listFilesOlderThan', () => { + beforeEach(() => { + getFileInfoMock.mockReset(); + }); + + const mockWithMtime = (fileMtimeMap: Record) => { + getFileInfoMock.mockImplementation(async (fileName) => { + const fileDate = fileMtimeMap[fileName]; + if (fileDate !== undefined) { + return { exist: true, size: 0, mtime: fileDate }; + } + return { exist: false }; + }); + }; + + it('returns an empty list if total accumulated size is lower than the limit', async () => { + mockWithMtime({ + 'file-1': moment().add(-1, 'day').toDate(), + 'file-2': moment().add(-10, 'day').toDate(), + 'file-3': moment().add(-20, 'day').toDate(), + }); + + const result = await listFilesOlderThan({ + orderedFiles: ['file-1', 'file-2', 'file-3'], + duration: moment.duration(15, 'day'), + }); + + expect(result).toEqual(['file-3']); + }); + + it('ignores files that were not found', async () => { + mockWithMtime({ + 'file-1': moment().add(-1, 'day').toDate(), + 'file-2': moment().add(-20, 'day').toDate(), + 'file-3': undefined, + }); + + const result = await listFilesOlderThan({ + orderedFiles: ['file-1', 'file-2', 'file-3'], + duration: moment.duration(15, 'day'), + }); + + expect(result).toEqual(['file-2']); + }); +}); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.ts new file mode 100644 index 0000000000000..4b75ac5eb6380 --- /dev/null +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/retention/utils.ts @@ -0,0 +1,56 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment, { type Duration } from 'moment-timezone'; +import { getFileInfo } from './fs'; + +export const listFilesExceedingSize = async ({ + orderedFiles, + maxSizeInBytes, +}: { + orderedFiles: string[]; + maxSizeInBytes: number; +}): Promise => { + let currentSize = 0; + + for (let i = 0; i < orderedFiles.length; i++) { + const filePath = orderedFiles[i]; + const stats = await getFileInfo(filePath); + if (stats.exist) { + currentSize += stats.size; + if (currentSize > maxSizeInBytes) { + return orderedFiles.slice(i); + } + } + } + + return []; +}; + +export const listFilesOlderThan = async ({ + orderedFiles, + duration, +}: { + orderedFiles: string[]; + duration: Duration; +}): Promise => { + const filesOlderThanLimit = []; + const timeLimit = moment().subtract(duration).toDate().getTime(); + + for (let i = 0; i < orderedFiles.length; i++) { + const filePath = orderedFiles[i]; + const stats = await getFileInfo(filePath); + if (stats.exist) { + if (stats.mtime.getTime() < timeLimit) { + filesOlderThanLimit.push(filePath); + } + } + } + + return filesOlderThanLimit; +}; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.mocks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.mocks.ts index b903710632969..2384db0d573a4 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.mocks.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.mocks.ts @@ -38,10 +38,20 @@ jest.doMock('./rolling_file_context', () => ({ RollingFileContext: RollingFileContextMock, })); +export const createRetentionPolicyMock = jest.fn(); +jest.doMock('./retention', () => { + const actual = jest.requireActual('./retention'); + return { + ...actual, + createRetentionPolicy: createRetentionPolicyMock, + }; +}); + export const resetAllMocks = () => { LayoutsMock.create.mockReset(); createTriggeringPolicyMock.mockReset(); createRollingStrategyMock.mockReset(); + createRetentionPolicyMock.mockReset(); RollingFileManagerMock.mockReset(); RollingFileContextMock.mockReset(); }; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.ts index f5bdc5d307084..1379dc13da70f 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.test.ts @@ -9,6 +9,7 @@ import { createRollingStrategyMock, createTriggeringPolicyMock, + createRetentionPolicyMock, LayoutsMock, resetAllMocks, RollingFileContextMock, @@ -38,6 +39,9 @@ const config: RollingFileAppenderConfig = { max: 5, pattern: '-%i', }, + retention: { + maxFiles: 7, + }, }; const createLogRecord = (parts: Partial = {}): LogRecord => ({ @@ -72,6 +76,7 @@ describe('RollingFileAppender', () => { let layout: ReturnType; let strategy: ReturnType; let policy: ReturnType; + let retention: ReturnType; let context: ReturnType; let fileManager: ReturnType; @@ -85,6 +90,9 @@ describe('RollingFileAppender', () => { strategy = rollingFileAppenderMocks.createStrategy(); createRollingStrategyMock.mockReturnValue(strategy); + retention = rollingFileAppenderMocks.createRetentionPolicy(); + createRetentionPolicyMock.mockReturnValue(retention); + context = rollingFileAppenderMocks.createContext('file-path'); RollingFileContextMock.mockImplementation(() => context); @@ -111,6 +119,9 @@ describe('RollingFileAppender', () => { expect(createTriggeringPolicyMock).toHaveBeenCalledTimes(1); expect(createTriggeringPolicyMock).toHaveBeenCalledWith(config.policy, context); + expect(createRetentionPolicyMock).toHaveBeenCalledTimes(1); + expect(createRetentionPolicyMock).toHaveBeenCalledWith(config.retention, context); + expect(createRollingStrategyMock).toHaveBeenCalledTimes(1); expect(createRollingStrategyMock).toHaveBeenCalledWith(config.strategy, context); }); @@ -189,6 +200,21 @@ describe('RollingFileAppender', () => { expect(fileManager.closeStream).toHaveBeenCalledTimes(1); }); + it('triggers the retention policy once the rollout is complete', async () => { + const { promise, resolve } = createPromiseResolver(); + strategy.rollout.mockReturnValue(promise); + + const log = createLogRecord({ message: '1' }); + appender.append(log); + + expect(retention.apply).not.toHaveBeenCalled(); + + resolve(); + await nextTick(); + + expect(retention.apply).toHaveBeenCalledTimes(1); + }); + it('logs the event once the rollout is complete', async () => { const { promise, resolve } = createPromiseResolver(); strategy.rollout.mockReturnValue(promise); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.ts index 3dee8a83c4c08..33c3af6ed5a5f 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_appender.ts @@ -7,12 +7,26 @@ */ import { schema } from '@kbn/config-schema'; -import { LogRecord, Layout, DisposableAppender } from '@kbn/logging'; +import type { LogRecord, Layout, DisposableAppender } from '@kbn/logging'; import type { RollingFileAppenderConfig } from '@kbn/core-logging-server'; import { Layouts } from '../../layouts/layouts'; import { BufferAppender } from '../buffer/buffer_appender'; -import { createTriggeringPolicy, triggeringPolicyConfigSchema, TriggeringPolicy } from './policies'; -import { RollingStrategy, createRollingStrategy, rollingStrategyConfigSchema } from './strategies'; +import { + createTriggeringPolicy, + triggeringPolicyConfigSchema, + type TriggeringPolicy, +} from './policies'; +import { + createRollingStrategy, + rollingStrategyConfigSchema, + type RollingStrategy, +} from './strategies'; +import { + createRetentionPolicy, + mergeRetentionPolicyConfig, + retentionPolicyConfigSchema, + type RetentionPolicy, +} from './retention'; import { RollingFileManager } from './rolling_file_manager'; import { RollingFileContext } from './rolling_file_context'; @@ -27,6 +41,7 @@ export class RollingFileAppender implements DisposableAppender { fileName: schema.string(), policy: triggeringPolicyConfigSchema, strategy: rollingStrategyConfigSchema, + retention: schema.maybe(retentionPolicyConfigSchema), }); private isRolling = false; @@ -36,8 +51,9 @@ export class RollingFileAppender implements DisposableAppender { private readonly layout: Layout; private readonly context: RollingFileContext; private readonly fileManager: RollingFileManager; - private readonly policy: TriggeringPolicy; - private readonly strategy: RollingStrategy; + private readonly triggeringPolicy: TriggeringPolicy; + private readonly rollingStrategy: RollingStrategy; + private readonly retentionPolicy: RetentionPolicy; private readonly buffer: BufferAppender; constructor(config: RollingFileAppenderConfig) { @@ -45,8 +61,12 @@ export class RollingFileAppender implements DisposableAppender { this.context.refreshFileInfo(); this.fileManager = new RollingFileManager(this.context); this.layout = Layouts.create(config.layout); - this.policy = createTriggeringPolicy(config.policy, this.context); - this.strategy = createRollingStrategy(config.strategy, this.context); + this.triggeringPolicy = createTriggeringPolicy(config.policy, this.context); + this.rollingStrategy = createRollingStrategy(config.strategy, this.context); + this.retentionPolicy = createRetentionPolicy( + mergeRetentionPolicyConfig(config.retention, config.strategy), + this.context + ); this.buffer = new BufferAppender(); } @@ -96,8 +116,9 @@ export class RollingFileAppender implements DisposableAppender { } this.isRolling = true; try { - await this.strategy.rollout(); + await this.rollingStrategy.rollout(); await this.fileManager.closeStream(); + await this.retentionPolicy.apply(); } catch (e) { // eslint-disable-next-line no-console console.error('[RollingFileAppender]: error while rolling file: ', e); @@ -129,6 +150,6 @@ export class RollingFileAppender implements DisposableAppender { * Checks if the current event should trigger a rollout */ private needRollout(record: LogRecord) { - return this.policy.isTriggeringEvent(record); + return this.triggeringPolicy.isTriggeringEvent(record); } } diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_context.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_context.ts index 744a15535a863..995cd08583e05 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_context.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/rolling_file_context.ts @@ -8,6 +8,8 @@ import { statSync } from 'fs'; +export type GetOrderedRolledFileFn = () => Promise; + /** * Context shared between the rolling file manager, policy and strategy. */ @@ -36,4 +38,17 @@ export class RollingFileContext { this.currentFileSize = 0; } } + + #orderedRolledFileFn?: GetOrderedRolledFileFn; + + public async getOrderedRolledFiles(): Promise { + if (this.#orderedRolledFileFn) { + return this.#orderedRolledFileFn(); + } + throw new Error('orderedRolledFileFn not registered on the context'); + } + + public setOrderedRolledFileFn(fn: GetOrderedRolledFileFn) { + this.#orderedRolledFileFn = fn; + } } diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.mocks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.mocks.ts index 4ba76cb5148a0..cba9531feaa11 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.mocks.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.mocks.ts @@ -7,14 +7,12 @@ */ export const getOrderedRolledFilesMock = jest.fn(); -export const deleteFilesMock = jest.fn(); export const rollPreviousFilesInOrderMock = jest.fn(); export const rollCurrentFileMock = jest.fn(); export const shouldSkipRolloutMock = jest.fn(); jest.doMock('./rolling_tasks', () => ({ getOrderedRolledFiles: getOrderedRolledFilesMock, - deleteFiles: deleteFilesMock, rollPreviousFilesInOrder: rollPreviousFilesInOrderMock, rollCurrentFile: rollCurrentFileMock, shouldSkipRollout: shouldSkipRolloutMock, @@ -23,7 +21,6 @@ jest.doMock('./rolling_tasks', () => ({ export const resetAllMock = () => { shouldSkipRolloutMock.mockReset(); getOrderedRolledFilesMock.mockReset(); - deleteFilesMock.mockReset(); rollPreviousFilesInOrderMock.mockReset(); rollCurrentFileMock.mockReset(); }; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.ts index 731c0079bd9e7..3571daa30ab43 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.test.ts @@ -10,7 +10,6 @@ import { join } from 'path'; import { resetAllMock, shouldSkipRolloutMock, - deleteFilesMock, getOrderedRolledFilesMock, rollCurrentFileMock, rollPreviousFilesInOrderMock, @@ -42,6 +41,11 @@ describe('NumericRollingStrategy', () => { resetAllMock(); }); + it('calls `context.setOrderedRolledFileFn` in constructor', () => { + expect(context.setOrderedRolledFileFn).toHaveBeenCalledTimes(1); + expect(context.setOrderedRolledFileFn).toHaveBeenCalledWith(expect.any(Function)); + }); + it('calls `getOrderedRolledFiles` with the correct parameters', async () => { await strategy.rollout(); @@ -53,23 +57,6 @@ describe('NumericRollingStrategy', () => { }); }); - it('calls `deleteFiles` with the correct files', async () => { - getOrderedRolledFilesMock.mockResolvedValue([ - 'kibana.1.log', - 'kibana.2.log', - 'kibana.3.log', - 'kibana.4.log', - ]); - - await strategy.rollout(); - - expect(deleteFilesMock).toHaveBeenCalledTimes(1); - expect(deleteFilesMock).toHaveBeenCalledWith({ - filesToDelete: ['kibana.3.log', 'kibana.4.log'], - logFileFolder, - }); - }); - it('calls `rollPreviousFilesInOrder` with the correct files', async () => { getOrderedRolledFilesMock.mockResolvedValue([ 'kibana.1.log', @@ -82,7 +69,7 @@ describe('NumericRollingStrategy', () => { expect(rollPreviousFilesInOrderMock).toHaveBeenCalledTimes(1); expect(rollPreviousFilesInOrderMock).toHaveBeenCalledWith({ - filesToRoll: ['kibana.1.log', 'kibana.2.log'], + filesToRoll: ['kibana.1.log', 'kibana.2.log', 'kibana.3.log', 'kibana.4.log'], logFileFolder, logFileBaseName, pattern, @@ -116,24 +103,14 @@ describe('NumericRollingStrategy', () => { await strategy.rollout(); - const deleteFilesCall = deleteFilesMock.mock.invocationCallOrder[0]; const rollPreviousFilesInOrderCall = rollPreviousFilesInOrderMock.mock.invocationCallOrder[0]; const rollCurrentFileCall = rollCurrentFileMock.mock.invocationCallOrder[0]; const refreshFileInfoCall = context.refreshFileInfo.mock.invocationCallOrder[0]; - expect(deleteFilesCall).toBeLessThan(rollPreviousFilesInOrderCall); expect(rollPreviousFilesInOrderCall).toBeLessThan(rollCurrentFileCall); expect(rollCurrentFileCall).toBeLessThan(refreshFileInfoCall); }); - it('do not calls `deleteFiles` if no file should be deleted', async () => { - getOrderedRolledFilesMock.mockResolvedValue(['kibana.1.log', 'kibana.2.log']); - - await strategy.rollout(); - - expect(deleteFilesMock).not.toHaveBeenCalled(); - }); - it('do not calls `rollPreviousFilesInOrder` if no file should be rolled', async () => { getOrderedRolledFilesMock.mockResolvedValue([]); @@ -154,7 +131,6 @@ describe('NumericRollingStrategy', () => { await strategy.rollout(); expect(getOrderedRolledFilesMock).not.toHaveBeenCalled(); - expect(deleteFilesMock).not.toHaveBeenCalled(); expect(rollPreviousFilesInOrderMock).not.toHaveBeenCalled(); expect(rollCurrentFileMock).not.toHaveBeenCalled(); expect(context.refreshFileInfo).not.toHaveBeenCalled(); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.ts index f63c78264dc46..8791b3f46e52a 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/numeric_strategy.ts @@ -14,7 +14,6 @@ import { RollingFileContext } from '../../rolling_file_context'; import { shouldSkipRollout, getOrderedRolledFiles, - deleteFiles, rollCurrentFile, rollPreviousFilesInOrder, } from './rolling_tasks'; @@ -46,7 +45,8 @@ export const numericRollingStrategyConfigSchema = schema.object({ * strategy: * type: numeric * pattern: "-%i" - * max: 2 + * retention: + * maxFiles: 2 * ``` * - During the first rollover kibana.log is renamed to kibana-1.log. A new kibana.log file is created and starts * being written to. @@ -69,6 +69,15 @@ export class NumericRollingStrategy implements RollingStrategy { this.logFilePath = this.context.filePath; this.logFileBaseName = basename(this.context.filePath); this.logFileFolder = dirname(this.context.filePath); + context.setOrderedRolledFileFn(this.getOrderedRolledFiles.bind(this)); + } + + private async getOrderedRolledFiles() { + return await getOrderedRolledFiles({ + logFileFolder: this.logFileFolder, + logFileBaseName: this.logFileBaseName, + pattern: this.config.pattern, + }); } async rollout() { @@ -82,20 +91,15 @@ export class NumericRollingStrategy implements RollingStrategy { } // get the files matching the pattern in the folder, and sort them by `%i` value - const orderedFiles = await getOrderedRolledFiles({ - logFileFolder, - logFileBaseName, - pattern, - }); - const filesToRoll = orderedFiles.slice(0, this.config.max - 1); - const filesToDelete = orderedFiles.slice(filesToRoll.length, orderedFiles.length); - - if (filesToDelete.length > 0) { - await deleteFiles({ logFileFolder, filesToDelete }); - } + const orderedFilesToRoll = await this.getOrderedRolledFiles(); - if (filesToRoll.length > 0) { - await rollPreviousFilesInOrder({ filesToRoll, logFileFolder, logFileBaseName, pattern }); + if (orderedFilesToRoll.length > 0) { + await rollPreviousFilesInOrder({ + filesToRoll: orderedFilesToRoll, + logFileFolder, + logFileBaseName, + pattern, + }); } await rollCurrentFile({ pattern, logFileBaseName, logFileFolder }); diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.mocks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.mocks.ts index 03d51ea68cac1..3a69c86fcb747 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.mocks.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.mocks.ts @@ -7,20 +7,17 @@ */ export const readdirMock = jest.fn(); -export const unlinkMock = jest.fn(); export const renameMock = jest.fn(); export const accessMock = jest.fn(); jest.doMock('fs/promises', () => ({ readdir: readdirMock, - unlink: unlinkMock, rename: renameMock, access: accessMock, })); export const clearAllMocks = () => { readdirMock.mockClear(); - unlinkMock.mockClear(); renameMock.mockClear(); accessMock.mockClear(); }; diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.ts index 3f7c56bac582b..12d408f9ab611 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.test.ts @@ -7,18 +7,11 @@ */ import { join } from 'path'; -import { - accessMock, - readdirMock, - renameMock, - unlinkMock, - clearAllMocks, -} from './rolling_tasks.test.mocks'; +import { accessMock, readdirMock, renameMock, clearAllMocks } from './rolling_tasks.test.mocks'; import { shouldSkipRollout, rollCurrentFile, rollPreviousFilesInOrder, - deleteFiles, getOrderedRolledFiles, } from './rolling_tasks'; @@ -97,26 +90,6 @@ describe('NumericRollingStrategy tasks', () => { }); }); - describe('deleteFiles', () => { - it('calls `unlink` once for each file', async () => { - await deleteFiles({ - logFileFolder: 'log-folder', - filesToDelete: ['file-a', 'file-b', 'file-c'], - }); - - expect(unlinkMock).toHaveBeenCalledTimes(3); - }); - it('calls `unlink` with the correct parameters', async () => { - await deleteFiles({ - logFileFolder: 'log-folder', - filesToDelete: ['file-a', 'file-b'], - }); - - expect(unlinkMock).toHaveBeenNthCalledWith(1, join('log-folder', 'file-a')); - expect(unlinkMock).toHaveBeenNthCalledWith(2, join('log-folder', 'file-b')); - }); - }); - describe('getOrderedRolledFiles', () => { it('returns the rolled files matching the pattern in order', async () => { readdirMock.mockResolvedValue([ diff --git a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.ts b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.ts index 15bae8901ddcb..4f880653cb81b 100644 --- a/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.ts +++ b/packages/core/logging/core-logging-server-internal/src/appenders/rolling_file/strategies/numeric/rolling_tasks.ts @@ -7,7 +7,7 @@ */ import { join } from 'path'; -import { readdir, unlink, access } from 'fs/promises'; +import { readdir, access } from 'fs/promises'; import { getFileNameMatcher, getRollingFileName } from './pattern_matcher'; import { moveFile } from './utils'; @@ -47,16 +47,6 @@ export const getOrderedRolledFiles = async ({ .map(({ fileName }) => fileName); }; -export const deleteFiles = async ({ - logFileFolder, - filesToDelete, -}: { - logFileFolder: string; - filesToDelete: string[]; -}) => { - await Promise.all(filesToDelete.map((fileToDelete) => unlink(join(logFileFolder, fileToDelete)))); -}; - export const rollPreviousFilesInOrder = async ({ filesToRoll, logFileFolder, diff --git a/packages/core/logging/core-logging-server/index.ts b/packages/core/logging/core-logging-server/index.ts index 1cade96cf3d01..16f4b188fee23 100644 --- a/packages/core/logging/core-logging-server/index.ts +++ b/packages/core/logging/core-logging-server/index.ts @@ -23,4 +23,5 @@ export type { RewritePolicyConfig, MetaRewritePolicyConfigProperty, MetaRewritePolicyConfig, + RetentionPolicyConfig, } from './src/appenders'; diff --git a/packages/core/logging/core-logging-server/src/appenders/index.ts b/packages/core/logging/core-logging-server/src/appenders/index.ts index 698b70c939347..ddaa4c9ee1ae1 100644 --- a/packages/core/logging/core-logging-server/src/appenders/index.ts +++ b/packages/core/logging/core-logging-server/src/appenders/index.ts @@ -26,6 +26,7 @@ export type { TimeIntervalTriggeringPolicyConfig, NumericRollingStrategyConfig, RollingStrategyConfig, + RetentionPolicyConfig, } from './rolling_file'; /** @public */ diff --git a/packages/core/logging/core-logging-server/src/appenders/rolling_file.ts b/packages/core/logging/core-logging-server/src/appenders/rolling_file.ts index 4de6c92cedd0a..dda8a57a940c7 100644 --- a/packages/core/logging/core-logging-server/src/appenders/rolling_file.ts +++ b/packages/core/logging/core-logging-server/src/appenders/rolling_file.ts @@ -32,6 +32,10 @@ export interface RollingFileAppenderConfig { * The {@link RollingStrategy | rollout strategy} to use for rolling. */ strategy: RollingStrategyConfig; + /** + * The {@link RetentionPolicy | retention strategy} to use to know which files to keep. + */ + retention?: RetentionPolicyConfig; } /** @@ -106,6 +110,14 @@ export interface NumericRollingStrategyConfig { /** * The maximum number of files to keep. Once this number is reached, oldest * files will be deleted. Defaults to `7` + * + * @deprecated use retention policy instead */ max: number; } + +export interface RetentionPolicyConfig { + maxFiles?: number; + maxAccumulatedFileSize?: ByteSizeValue; + removeOlderThan?: Duration; +} diff --git a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts index f39d0d8ab26a8..d4861ae5808ad 100644 --- a/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts +++ b/packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts @@ -182,7 +182,7 @@ export const HASH_TO_VERSION_MAP = { 'infrastructure-monitoring-log-view|c50526fc6040c5355ed027d34d05b35c': '10.0.0', 'infrastructure-ui-source|3d1b76c39bfb2cc8296b024d73854724': '10.0.0', 'ingest_manager_settings|b91ffb075799c78ffd7dbd51a279c8c9': '10.1.0', - 'ingest-agent-policies|0fd93cd11c019b118e93a9157c22057b': '10.1.0', + 'ingest-agent-policies|0ab9774bc7728d0c0f37d841570f2872': '10.2.0', 'ingest-download-sources|0b0f6828e59805bd07a650d80817c342': '10.0.0', 'ingest-outputs|b1237f7fdc0967709e75d65d208ace05': '10.6.0', 'ingest-package-policies|ca63c4c5a946704f045803a6b975dbc6': '10.9.0', diff --git a/packages/core/status/core-status-server-internal/src/routes/status.ts b/packages/core/status/core-status-server-internal/src/routes/status.ts index 1faa623467b58..5557a4d60aaef 100644 --- a/packages/core/status/core-status-server-internal/src/routes/status.ts +++ b/packages/core/status/core-status-server-internal/src/routes/status.ts @@ -13,14 +13,10 @@ import type { PluginName } from '@kbn/core-base-common'; import type { IRouter } from '@kbn/core-http-server'; import type { MetricsServiceSetup } from '@kbn/core-metrics-server'; import type { CoreIncrementUsageCounter } from '@kbn/core-usage-data-server'; -import type { StatusResponse } from '@kbn/core-status-common-internal'; -import { - type ServiceStatus, - type ServiceStatusLevel, - type CoreStatus, - ServiceStatusLevels, -} from '@kbn/core-status-common'; +import { type ServiceStatus, type CoreStatus, ServiceStatusLevels } from '@kbn/core-status-common'; +import { StatusResponse } from '@kbn/core-status-common-internal'; import { calculateLegacyStatus, type LegacyStatusInfo } from '../legacy_status'; +import { statusResponse, type RedactedStatusHttpBody } from './status_response_schemas'; const SNAPSHOT_POSTFIX = /-SNAPSHOT$/; @@ -53,14 +49,6 @@ interface StatusHttpBody extends Omit { status: StatusInfo | LegacyStatusInfo; } -export interface RedactedStatusHttpBody { - status: { - overall: { - level: ServiceStatusLevel; - }; - }; -} - const SERVICE_UNAVAILABLE_NOT_REPORTED: ServiceStatus = { level: ServiceStatusLevels.unavailable, summary: 'Status not yet reported', @@ -100,21 +88,43 @@ export const registerStatusRoute = ({ // ROUTE_TAG_ACCEPT_JWT from '@kbn/security-plugin/server' that cannot be imported here directly. tags: ['api', 'security:acceptJWT'], access: 'public', // needs to be public to allow access from "system" users like k8s readiness probes. + description: `Get Kibana's current status.`, }, validate: { - query: schema.object( - { - v7format: schema.maybe(schema.boolean()), - v8format: schema.maybe(schema.boolean()), - }, - { - validate: ({ v7format, v8format }) => { - if (typeof v7format === 'boolean' && typeof v8format === 'boolean') { - return `provide only one format option: v7format or v8format`; - } + request: { + query: schema.object( + { + v7format: schema.maybe( + schema.boolean({ + meta: { description: 'Set to "true" to get the response in v7 format.' }, + }) + ), + v8format: schema.maybe( + schema.boolean({ + meta: { description: 'Set to "true" to get the response in v8 format.' }, + }) + ), }, - } - ), + { + validate: ({ v7format, v8format }) => { + if (typeof v7format === 'boolean' && typeof v8format === 'boolean') { + return `provide only one format option: v7format or v8format`; + } + }, + meta: { + description: `Return status in a specific format. If both v7 and v8 are requested the request will be rejected.`, + }, + } + ), + }, + response: { + 200: { + body: statusResponse, + }, + 503: { + body: statusResponse, + }, + }, }, }, async (context, req, res) => { @@ -217,7 +227,7 @@ const getRedactedStatusResponse = ({ const body: RedactedStatusHttpBody = { status: { overall: { - level: coreOverall.level, + level: coreOverall.level.toString(), }, }, }; diff --git a/packages/core/status/core-status-server-internal/src/routes/status_preboot.ts b/packages/core/status/core-status-server-internal/src/routes/status_preboot.ts index 88adf8c418506..91ec970217526 100644 --- a/packages/core/status/core-status-server-internal/src/routes/status_preboot.ts +++ b/packages/core/status/core-status-server-internal/src/routes/status_preboot.ts @@ -8,7 +8,7 @@ import type { IRouter } from '@kbn/core-http-server'; import { ServiceStatusLevels } from '@kbn/core-status-common'; -import type { RedactedStatusHttpBody } from './status'; +import type { RedactedStatusHttpBody } from './status_response_schemas'; export const registerPrebootStatusRoute = ({ router }: { router: IRouter }) => { router.get( @@ -25,7 +25,7 @@ export const registerPrebootStatusRoute = ({ router }: { router: IRouter }) => { const body: RedactedStatusHttpBody = { status: { overall: { - level: ServiceStatusLevels.unavailable, + level: ServiceStatusLevels.unavailable.toString(), }, }, }; diff --git a/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts b/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts new file mode 100644 index 0000000000000..36671f2089bb2 --- /dev/null +++ b/packages/core/status/core-status-server-internal/src/routes/status_response_schemas.ts @@ -0,0 +1,180 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { schema, type Type, type TypeOf } from '@kbn/config-schema'; +import type { BuildFlavor } from '@kbn/config'; +import type { ServiceStatusLevelId, ServiceStatus } from '@kbn/core-status-common'; + +import type { + StatusResponse, + StatusInfoCoreStatus, + ServerMetrics, + StatusInfo, + ServerVersion, +} from '@kbn/core-status-common-internal'; + +const serviceStatusLevelId: () => Type = () => + schema.oneOf( + [ + schema.literal('available'), + schema.literal('degraded'), + schema.literal('unavailable'), + schema.literal('critical'), + ], + { meta: { description: 'Service status levels as human and machine readable values.' } } + ); + +const statusInfoServiceStatus: () => Type< + Omit & { level: ServiceStatusLevelId } +> = () => + schema.object({ + level: serviceStatusLevelId(), + summary: schema.string({ + meta: { description: 'A human readable summary of the service status.' }, + }), + detail: schema.maybe( + schema.string({ meta: { description: 'Human readable detail of the service status.' } }) + ), + documentationUrl: schema.maybe( + schema.string({ + meta: { description: 'A URL to further documentation regarding this service.' }, + }) + ), + meta: schema.recordOf(schema.string(), schema.any(), { + meta: { description: 'An unstructured set of extra metadata about this service.' }, + }), + }); + +const statusInfoCoreStatus: () => Type = () => + schema.object( + { + elasticsearch: statusInfoServiceStatus(), + savedObjects: statusInfoServiceStatus(), + }, + { meta: { description: 'Statuses of core Kibana services.' } } + ); + +/** Only include a subset of fields for OAS documentation, for now */ +const serverMetrics: () => Type> = () => + schema.object( + { + elasticsearch_client: schema.object( + { + totalActiveSockets: schema.number({ + meta: { description: 'Count of network sockets currently in use.' }, + }), + totalIdleSockets: schema.number({ + meta: { description: 'Count of network sockets currently idle.' }, + }), + totalQueuedRequests: schema.number({ + meta: { description: 'Count of requests not yet assigned to sockets.' }, + }), + }, + { meta: { description: `Current network metrics of Kibana's Elasticsearch client.` } } + ), + last_updated: schema.string({ meta: { description: 'The time metrics were collected.' } }), + collection_interval_in_millis: schema.number({ + meta: { description: 'The interval at which metrics should be collected.' }, + }), + }, + { + meta: { + description: 'Metric groups collected by Kibana.', + }, + } + ); + +const buildFlavour: () => Type = () => + schema.oneOf([schema.literal('serverless'), schema.literal('traditional')], { + meta: { + description: + 'The build flavour determines configuration and behavior of Kibana. On premise users will almost always run the "traditional" flavour, while other flavours are reserved for Elastic-specific use cases.', + }, + }); + +const serverVersion: () => Type = () => + schema.object({ + number: schema.string({ + meta: { description: 'A semantic version number.' }, + }), + build_hash: schema.string({ + meta: { + description: 'A unique hash value representing the git commit of this Kibana build.', + }, + }), + build_number: schema.number({ + meta: { + description: + 'A monotonically increasing number, each subsequent build will have a higher number.', + }, + }), + build_snapshot: schema.boolean({ + meta: { description: 'Whether this build is a snapshot build.' }, + }), + build_flavor: buildFlavour(), + build_date: schema.string({ meta: { description: 'The date and time of this build.' } }), + }); + +const statusInfo: () => Type = () => + schema.object({ + overall: statusInfoServiceStatus(), + core: statusInfoCoreStatus(), + plugins: schema.recordOf(schema.string(), statusInfoServiceStatus(), { + meta: { description: 'A dynamic mapping of plugin ID to plugin status.' }, + }), + }); + +/** Excluding metrics for brevity, for now */ +const fullStatusResponse: () => Type> = () => + schema.object( + { + name: schema.string({ meta: { description: 'Kibana instance name.' } }), + uuid: schema.string({ + meta: { + description: + 'Unique, generated Kibana instance UUID. This UUID should persist even if the Kibana process restarts.', + }, + }), + version: serverVersion(), + status: statusInfo(), + metrics: serverMetrics(), + }, + { + meta: { + id: 'core.status.response', + description: `Kibana's operational status as well as a detailed breakdown of plugin statuses indication of various loads (like event loop utilization and network traffic) at time of request.`, + }, + } + ); + +const redactedStatusResponse = () => + schema.object( + { + status: schema.object({ + overall: schema.object({ + level: serviceStatusLevelId(), + }), + }), + }, + { + meta: { + id: 'core.status.redactedResponse', + description: `A minimal representation of Kibana's operational status.`, + }, + } + ); + +/** Lazily load this schema */ +export const statusResponse = () => + schema.oneOf([fullStatusResponse(), redactedStatusResponse()], { + meta: { + description: `Kibana's operational status. A minimal response is sent for unauthorized users.`, + }, + }); + +export type RedactedStatusHttpBody = TypeOf; diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts index 11602704cf0f0..a2f5baacca07a 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.test.ts @@ -377,9 +377,12 @@ describe('CoreUsageDataService', () => { }, "environment": Object { "memory": Object { + "arrayBuffersBytes": 1, + "externalBytes": 1, "heapSizeLimit": 1, "heapTotalBytes": 1, "heapUsedBytes": 1, + "residentSetSizeBytes": 1, }, }, "services": Object { diff --git a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts index 261db435a1a73..eaa2b0888147b 100644 --- a/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts +++ b/packages/core/usage-data/core-usage-data-server-internal/src/core_usage_data_service.ts @@ -333,6 +333,9 @@ export class CoreUsageDataService }, environment: { memory: { + arrayBuffersBytes: this.opsMetrics.process.memory.array_buffers_in_bytes, + residentSetSizeBytes: this.opsMetrics.process.memory.resident_set_size_in_bytes, + externalBytes: this.opsMetrics.process.memory.external_in_bytes, heapSizeLimit: this.opsMetrics.process.memory.heap.size_limit, heapTotalBytes: this.opsMetrics.process.memory.heap.total_in_bytes, heapUsedBytes: this.opsMetrics.process.memory.heap.used_in_bytes, diff --git a/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts b/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts index 3b81d25460d9d..1c13f607912dc 100644 --- a/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts +++ b/packages/core/usage-data/core-usage-data-server-mocks/src/core_usage_data_service.mock.ts @@ -128,6 +128,9 @@ const createStartContractMock = () => { }, environment: { memory: { + arrayBuffersBytes: 1, + externalBytes: 1, + residentSetSizeBytes: 1, heapSizeLimit: 1, heapTotalBytes: 1, heapUsedBytes: 1, diff --git a/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts b/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts index c10ad14d9f7f3..f3905c9879c66 100644 --- a/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts +++ b/packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts @@ -38,6 +38,9 @@ export interface CoreServicesUsageData { */ export interface CoreEnvironmentUsageData { memory: { + arrayBuffersBytes: number; + residentSetSizeBytes: number; + externalBytes: number; heapTotalBytes: number; heapUsedBytes: number; /** V8 heap size limit */ diff --git a/packages/kbn-apm-synthtrace/index.ts b/packages/kbn-apm-synthtrace/index.ts index 8ed45126e7cf9..459e3802ae660 100644 --- a/packages/kbn-apm-synthtrace/index.ts +++ b/packages/kbn-apm-synthtrace/index.ts @@ -14,7 +14,7 @@ export { InfraSynthtraceEsClient } from './src/lib/infra/infra_synthtrace_es_cli export { InfraSynthtraceKibanaClient } from './src/lib/infra/infra_synthtrace_kibana_client'; export { MonitoringSynthtraceEsClient } from './src/lib/monitoring/monitoring_synthtrace_es_client'; export { LogsSynthtraceEsClient } from './src/lib/logs/logs_synthtrace_es_client'; - +export { AssetsSynthtraceEsClient } from './src/lib/assets/assets_synthtrace_es_client'; export { addObserverVersionTransform, deleteSummaryFieldTransform, diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/apm_pipeline.ts b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/apm_pipeline.ts index bd6acc25431a7..a31b800d864c5 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/apm_pipeline.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/apm_pipeline.ts @@ -6,11 +6,13 @@ * Side Public License, v 1. */ +import semver from 'semver'; import { PassThrough, pipeline, Readable } from 'stream'; import { getDedotTransform } from '../../../shared/get_dedot_transform'; import { getSerializeTransform } from '../../../shared/get_serialize_transform'; import { Logger } from '../../../utils/create_logger'; import { fork } from '../../../utils/stream_utils'; +import { deleteSummaryFieldTransform } from '../../../utils/transform_helpers'; import { createBreakdownMetricsAggregator } from '../../aggregators/create_breakdown_metrics_aggregator'; import { createServiceMetricsAggregator } from '../../aggregators/create_service_metrics_aggregator'; import { createServiceSummaryMetricsAggregator } from '../../aggregators/create_service_summary_metrics_aggregator'; @@ -22,22 +24,32 @@ import { getRoutingTransform } from './get_routing_transform'; export function apmPipeline(logger: Logger, version: string, includeSerialization: boolean = true) { return (base: Readable) => { + const continousRollupSupported = + !version || semver.gte(semver.coerce(version)?.version ?? version, '8.7.0'); + const aggregators = [ createTransactionMetricsAggregator('1m'), - createTransactionMetricsAggregator('10m'), - createTransactionMetricsAggregator('60m'), - createServiceMetricsAggregator('1m'), - createServiceMetricsAggregator('10m'), - createServiceMetricsAggregator('60m'), - createServiceSummaryMetricsAggregator('1m'), - createServiceSummaryMetricsAggregator('10m'), - createServiceSummaryMetricsAggregator('60m'), createSpanMetricsAggregator('1m'), - createSpanMetricsAggregator('10m'), - createSpanMetricsAggregator('60m'), + ...(continousRollupSupported + ? [ + createTransactionMetricsAggregator('10m'), + createTransactionMetricsAggregator('60m'), + createServiceMetricsAggregator('1m'), + createServiceMetricsAggregator('10m'), + createServiceMetricsAggregator('60m'), + createServiceSummaryMetricsAggregator('1m'), + createServiceSummaryMetricsAggregator('10m'), + createServiceSummaryMetricsAggregator('60m'), + createSpanMetricsAggregator('10m'), + createSpanMetricsAggregator('60m'), + ] + : []), ]; const serializationTransform = includeSerialization ? [getSerializeTransform()] : []; + const removeDurationSummaryTransform = !continousRollupSupported + ? [deleteSummaryFieldTransform()] + : []; return pipeline( // @ts-expect-error Some weird stuff here with the type definition for pipeline. We have tests! @@ -49,6 +61,7 @@ export function apmPipeline(logger: Logger, version: string, includeSerializatio getApmServerMetadataTransform(version), getRoutingTransform(), getDedotTransform(), + ...removeDurationSummaryTransform, (err) => { if (err) { logger.error(err); diff --git a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts index 310c33c10483d..db63334009d3a 100644 --- a/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts +++ b/packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_es_client/index.ts @@ -65,7 +65,15 @@ export class ApmSynthtraceEsClient extends SynthtraceEsClient { this.logger.info(`Updated component template: ${name}`); } - getDefaultPipeline(includeSerialization: boolean = true) { - return apmPipeline(this.logger, this.version, includeSerialization); + getDefaultPipeline( + { + includeSerialization, + versionOverride, + }: { + includeSerialization?: boolean; + versionOverride?: string; + } = { includeSerialization: true } + ) { + return apmPipeline(this.logger, versionOverride ?? this.version, includeSerialization); } } diff --git a/packages/kbn-apm-synthtrace/src/scenarios/service_summary_field_version_dependent.ts b/packages/kbn-apm-synthtrace/src/scenarios/service_summary_field_version_dependent.ts index 37999bff114c2..fed416d787936 100644 --- a/packages/kbn-apm-synthtrace/src/scenarios/service_summary_field_version_dependent.ts +++ b/packages/kbn-apm-synthtrace/src/scenarios/service_summary_field_version_dependent.ts @@ -8,36 +8,26 @@ import { ApmFields, apm } from '@kbn/apm-synthtrace-client'; import { random } from 'lodash'; -import { pipeline, Readable } from 'stream'; +import { Readable } from 'stream'; import semver from 'semver'; import { Scenario } from '../cli/scenario'; -import { - addObserverVersionTransform, - deleteSummaryFieldTransform, -} from '../lib/utils/transform_helpers'; import { withClient } from '../lib/utils/with_client'; +import { RunOptions } from '../cli/utils/parse_run_cli_flags'; +import { Logger } from '../lib/utils/create_logger'; -const scenario: Scenario = async ({ logger, versionOverride }) => { +const scenario: Scenario = async ({ + logger, + versionOverride, +}: RunOptions & { logger: Logger }) => { const version = versionOverride as string; - const isLegacy = versionOverride && semver.lt(version, '8.7.0'); + const isLegacy = version ? semver.lt(version as string, '8.7.0') : false; return { bootstrap: async ({ apmEsClient }) => { if (isLegacy) { apmEsClient.pipeline((base: Readable) => { - const defaultPipeline = apmEsClient.getDefaultPipeline()( - base - ) as unknown as NodeJS.ReadableStream; - - return pipeline( - defaultPipeline, - addObserverVersionTransform(version), - deleteSummaryFieldTransform(), - (err) => { - if (err) { - logger.error(err); - } - } - ); + return apmEsClient.getDefaultPipeline({ + versionOverride: version, + })(base); }); } }, @@ -45,7 +35,7 @@ const scenario: Scenario = async ({ logger, versionOverride }) => { const successfulTimestamps = range.ratePerMinute(6); const instance = apm .service({ - name: `java${isLegacy ? '-legacy' : ''}`, + name: `java`, environment: 'production', agentName: 'java', }) diff --git a/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts b/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts index afdec115f5b9e..187be94f62e36 100644 --- a/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts +++ b/packages/kbn-apm-synthtrace/src/scenarios/traces_logs_assets.ts @@ -10,6 +10,7 @@ import { ApmFields, generateLongId, generateShortId, + infra, Instance, log, Serializable, @@ -23,16 +24,37 @@ const ENVIRONMENT = getSynthtraceEnvironment(__filename); const scenario: Scenario = async (runOptions) => { const { logger } = runOptions; - const { numServices = 3 } = runOptions.scenarioOpts || {}; + const { numServices = 3, numHosts = 10 } = runOptions.scenarioOpts || {}; return { - generate: ({ range, clients: { apmEsClient, assetsEsClient, logsEsClient } }) => { + generate: ({ + range, + clients: { apmEsClient, assetsEsClient, logsEsClient, infraEsClient }, + }) => { const transactionName = '240rpm/75% 1000ms'; const successfulTimestamps = range.interval('1m').rate(1); const failedTimestamps = range.interval('1m').rate(1); const serviceNames = [...Array(numServices).keys()].map((index) => `synth-node-${index}`); + const HOSTS = Array(numHosts) + .fill(0) + .map((_, idx) => infra.host(`my-host-${idx}`)); + + const hosts = range + .interval('30s') + .rate(1) + .generator((timestamp) => + HOSTS.flatMap((host) => [ + host.cpu().timestamp(timestamp), + host.memory().timestamp(timestamp), + host.network().timestamp(timestamp), + host.load().timestamp(timestamp), + host.filesystem().timestamp(timestamp), + host.diskio().timestamp(timestamp), + ]) + ); + const instances = serviceNames.map((serviceName) => apm .service({ name: serviceName, environment: ENVIRONMENT, agentName: 'nodejs' }) @@ -97,6 +119,12 @@ const scenario: Scenario = async (runOptions) => { return [...successfulTraceEvents, ...failedTraceEvents, ...metricsets]; }; + const MESSAGE_LOG_LEVELS = [ + { message: 'A simple log with something random in the middle', level: 'info' }, + { message: 'Yet another debug log', level: 'debug' }, + { message: 'Error with certificate: "ca_trusted_fingerprint"', level: 'error' }, + ]; + const logsWithTraces = range .interval('1m') .rate(1) @@ -104,10 +132,8 @@ const scenario: Scenario = async (runOptions) => { return Array(3) .fill(0) .map(() => { - const { message, level } = { - message: 'A simple log with something random in the middle', - level: 'info', - }; + const index = Math.floor(Math.random() * 3); + const { message, level } = MESSAGE_LOG_LEVELS[index]; const CLUSTER = { clusterId: generateShortId(), clusterName: 'synth-cluster-2', @@ -145,10 +171,8 @@ const scenario: Scenario = async (runOptions) => { return Array(3) .fill(0) .map(() => { - const { message, level } = { - message: 'A simple log with something random in the middle', - level: 'info', - }; + const index = Math.floor(Math.random() * 3); + const { message, level } = MESSAGE_LOG_LEVELS[index]; const CLUSTER = { clusterId: generateShortId(), clusterName: 'synth-cluster-2', @@ -206,6 +230,10 @@ const scenario: Scenario = async (runOptions) => { apmEsClient, logger.perf('generating_apm_events', () => tracesGen) ), + withClient( + infraEsClient, + logger.perf('generating_infra_hosts', () => hosts) + ), ]; }, }; diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index 8d0f793317f5c..65fd6af2ce919 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -510,6 +510,7 @@ "revision", "schema_version", "status", + "supports_agentless", "unenroll_timeout", "updated_at", "updated_by" diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index 4a1016cf62224..03a189b1549be 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -1711,6 +1711,9 @@ "status": { "type": "keyword" }, + "supports_agentless": { + "type": "boolean" + }, "unenroll_timeout": { "type": "integer" }, diff --git a/packages/kbn-config-schema/index.ts b/packages/kbn-config-schema/index.ts index c5b46932463db..0ab1fd640d7af 100644 --- a/packages/kbn-config-schema/index.ts +++ b/packages/kbn-config-schema/index.ts @@ -244,6 +244,7 @@ export const schema = { export type Schema = typeof schema; import { + META_FIELD_X_OAS_ANY, META_FIELD_X_OAS_REF_ID, META_FIELD_X_OAS_OPTIONAL, META_FIELD_X_OAS_DEPRECATED, @@ -253,6 +254,7 @@ import { } from './src/oas_meta_fields'; export const metaFields = Object.freeze({ + META_FIELD_X_OAS_ANY, META_FIELD_X_OAS_REF_ID, META_FIELD_X_OAS_OPTIONAL, META_FIELD_X_OAS_DEPRECATED, diff --git a/packages/kbn-config-schema/src/oas_meta_fields.ts b/packages/kbn-config-schema/src/oas_meta_fields.ts index ad04f9b30ef16..814bb32e7ea41 100644 --- a/packages/kbn-config-schema/src/oas_meta_fields.ts +++ b/packages/kbn-config-schema/src/oas_meta_fields.ts @@ -17,3 +17,4 @@ export const META_FIELD_X_OAS_GET_ADDITIONAL_PROPERTIES = 'x-oas-get-additional-properties' as const; export const META_FIELD_X_OAS_REF_ID = 'x-oas-ref-id' as const; export const META_FIELD_X_OAS_DEPRECATED = 'x-oas-deprecated' as const; +export const META_FIELD_X_OAS_ANY = 'x-oas-any-type' as const; diff --git a/packages/kbn-config-schema/src/types/any_type.test.ts b/packages/kbn-config-schema/src/types/any_type.test.ts index ab04ee631e051..5fada37e45c83 100644 --- a/packages/kbn-config-schema/src/types/any_type.test.ts +++ b/packages/kbn-config-schema/src/types/any_type.test.ts @@ -6,7 +6,9 @@ * Side Public License, v 1. */ +import { get } from 'lodash'; import { schema } from '../..'; +import { META_FIELD_X_OAS_ANY } from '../oas_meta_fields'; test('works for any value', () => { expect(schema.any().validate(true)).toBe(true); @@ -30,6 +32,12 @@ test('includes namespace in failure', () => { ); }); +test('meta', () => { + expect(get(schema.any().getSchema().describe(), 'metas[0]')).toEqual({ + [META_FIELD_X_OAS_ANY]: true, + }); +}); + describe('#defaultValue', () => { test('returns default when undefined', () => { expect(schema.any({ defaultValue: true }).validate(undefined)).toBe(true); diff --git a/packages/kbn-config-schema/src/types/any_type.ts b/packages/kbn-config-schema/src/types/any_type.ts index e62ac85ea87af..5b7b355d9965d 100644 --- a/packages/kbn-config-schema/src/types/any_type.ts +++ b/packages/kbn-config-schema/src/types/any_type.ts @@ -8,11 +8,12 @@ import typeDetect from 'type-detect'; import { internals } from '../internals'; +import { META_FIELD_X_OAS_ANY } from '../oas_meta_fields'; import { Type, TypeOptions } from './type'; export class AnyType extends Type { constructor(options?: TypeOptions) { - super(internals.any(), options); + super(internals.any().meta({ [META_FIELD_X_OAS_ANY]: true }), options); } protected handleError(type: string, { value }: Record) { diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/packages/kbn-doc-links/src/get_doc_links.ts index f42bd3b688e4e..16d4fc648c3c6 100644 --- a/packages/kbn-doc-links/src/get_doc_links.ts +++ b/packages/kbn-doc-links/src/get_doc_links.ts @@ -578,21 +578,33 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D ? `${SERVERLESS_OBSERVABILITY_DOCS}create-custom-threshold-alert-rule` : `${OBSERVABILITY_DOCS}custom-threshold-alert.html`, monitorStatus: `${OBSERVABILITY_DOCS}monitor-status-alert.html`, - monitorUptime: `${OBSERVABILITY_DOCS}monitor-uptime.html`, + monitorUptime: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}monitor-synthetics` + : `${OBSERVABILITY_DOCS}monitor-uptime.html`, tlsCertificate: `${OBSERVABILITY_DOCS}tls-certificate-alert.html`, uptimeDurationAnomaly: `${OBSERVABILITY_DOCS}duration-anomaly-alert.html`, - monitorLogs: `${OBSERVABILITY_DOCS}monitor-logs.html`, + monitorLogs: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}discover-and-explore-logs` + : `${OBSERVABILITY_DOCS}monitor-logs.html`, analyzeMetrics: isServerless ? `${SERVERLESS_OBSERVABILITY_DOCS}infrastructure-monitoring` : `${OBSERVABILITY_DOCS}analyze-metrics.html`, - monitorUptimeSynthetics: `${OBSERVABILITY_DOCS}monitor-uptime-synthetics.html`, + monitorUptimeSynthetics: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}monitor-synthetics` + : `${OBSERVABILITY_DOCS}monitor-uptime-synthetics.html`, userExperience: `${OBSERVABILITY_DOCS}user-experience.html`, createAlerts: isServerless ? `${SERVERLESS_OBSERVABILITY_DOCS}alerting` : `${OBSERVABILITY_DOCS}create-alerts.html`, - syntheticsAlerting: `${OBSERVABILITY_DOCS}synthetics-settings.html#synthetics-settings-alerting`, - syntheticsCommandReference: `${OBSERVABILITY_DOCS}synthetics-configuration.html#synthetics-configuration-playwright-options`, - syntheticsProjectMonitors: `${OBSERVABILITY_DOCS}synthetic-run-tests.html#synthetic-monitor-choose-project`, + syntheticsAlerting: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}synthetics-settings#alerting` + : `${OBSERVABILITY_DOCS}synthetics-settings.html#synthetics-settings-alerting`, + syntheticsCommandReference: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}synthetics-configuration#playwrightoptions` + : `${OBSERVABILITY_DOCS}synthetics-configuration.html#synthetics-configuration-playwright-options`, + syntheticsProjectMonitors: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}synthetics-get-started-project` + : `${OBSERVABILITY_DOCS}synthetic-run-tests.html#synthetic-monitor-choose-project`, syntheticsMigrateFromIntegration: `${OBSERVABILITY_DOCS}synthetics-migrate-from-integration.html`, sloBurnRateRule: isServerless ? `${SERVERLESS_OBSERVABILITY_DOCS}create-slo-burn-rate-alert-rule` @@ -940,7 +952,9 @@ export const getDocLinks = ({ kibanaBranch, buildFlavor }: GetDocLinkOptions): D apiKeyPrivileges: `${SERVERLESS_DOCS}api-keys#restrict-privileges`, }, synthetics: { - featureRoles: `${OBSERVABILITY_DOCS}synthetics-feature-roles.html`, + featureRoles: isServerless + ? `${SERVERLESS_OBSERVABILITY_DOCS}synthetics-feature-roles` + : `${OBSERVABILITY_DOCS}synthetics-feature-roles.html`, }, telemetry: { settings: `${KIBANA_DOCS}telemetry-settings-kbn.html`, diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts index 02d609c9a9a17..f173ec52039e7 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts @@ -109,6 +109,8 @@ function getFunctionSignaturesByReturnType( const list = []; if (agg) { list.push(...statsAggregationFunctionDefinitions); + // right now all grouping functions are agg functions too + list.push(...groupingFunctionDefinitions); } if (grouping) { list.push(...groupingFunctionDefinitions); @@ -120,7 +122,10 @@ function getFunctionSignaturesByReturnType( if (builtin) { list.push(...builtinFunctions.filter(({ name }) => (skipAssign ? name !== '=' : true))); } - return list + + const deduped = Array.from(new Set(list)); + + return deduped .filter(({ signatures, ignoreAsSuggestion, supportedCommands, supportedOptions, name }) => { if (ignoreAsSuggestion) { return false; @@ -732,7 +737,7 @@ describe('autocomplete', () => { testSuggestions( 'from a | stats round(', [ - ...getFunctionSignaturesByReturnType('stats', 'number', { agg: true }), + ...getFunctionSignaturesByReturnType('stats', 'number', { agg: true, grouping: true }), ...getFieldNamesByType('number'), ...getFunctionSignaturesByReturnType('eval', 'number', { evalMath: true }, undefined, [ 'round', diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts index d45ffcde9c8a2..db1824dac44f7 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts @@ -1106,12 +1106,16 @@ async function getFunctionArgsSuggestions( new Set( fnDefinition.signatures.reduce((acc, signature) => { const p = signature.params[argIndex]; - const _suggestions: string[] = - p && p.literalSuggestions - ? p.literalSuggestions - : p && p.literalOptions - ? p.literalOptions - : []; + if (!p) { + return acc; + } + + const _suggestions: string[] = p.literalSuggestions + ? p.literalSuggestions + : p.literalOptions + ? p.literalOptions + : []; + return acc.concat(_suggestions); }, [] as string[]) ) diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts index 861d18110d08f..414c0fa6a8a9a 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts @@ -134,6 +134,8 @@ export const commandDefinitions: CommandDefinition[] = [ } function checkAggExistence(arg: ESQLFunction): boolean { + // TODO the grouping function check may not + // hold true for all future cases if (isAggFunction(arg)) { return true; } @@ -172,6 +174,8 @@ export const commandDefinitions: CommandDefinition[] = [ // * or if it's a builtin function, then all operands are agg functions or literals // * or if it's a eval function then all arguments are agg functions or literals function checkFunctionContent(arg: ESQLFunction) { + // TODO the grouping function check may not + // hold true for all future cases if (isAggFunction(arg)) { return true; } diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts index bfa718353f6b2..205b2d158fd05 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/functions.ts @@ -606,48 +606,6 @@ export const evalFunctionsDefinitions: FunctionDefinition[] = [ returnType: 'number', examples: [], }, - { - params: [ - { - name: 'unit', - type: 'string', - literalOptions: dateDiffOptions, - literalSuggestions: dateDiffSuggestions, - }, - { name: 'startTimestamp', type: 'string', constantOnly: true }, - { name: 'endTimestamp', type: 'date' }, - ], - returnType: 'number', - examples: [], - }, - { - params: [ - { - name: 'unit', - type: 'string', - literalOptions: dateDiffOptions, - literalSuggestions: dateDiffSuggestions, - }, - { name: 'startTimestamp', type: 'date' }, - { name: 'endTimestamp', type: 'string', constantOnly: true }, - ], - returnType: 'number', - examples: [], - }, - { - params: [ - { - name: 'unit', - type: 'string', - literalOptions: dateDiffOptions, - literalSuggestions: dateDiffSuggestions, - }, - { name: 'startTimestamp', type: 'string', constantOnly: true }, - { name: 'endTimestamp', type: 'string', constantOnly: true }, - ], - returnType: 'number', - examples: [], - }, ], }, { diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts index 612b898d4c6c6..fc725cbe0b429 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/grouping.ts @@ -16,8 +16,9 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [ description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.autoBucketDoc', { defaultMessage: `Automatically bucket dates based on a given range and bucket target.`, }), - type: 'grouping', - supportedCommands: [], + // type agg because it can also be used as an aggregation... + type: 'agg', + supportedCommands: ['stats'], supportedOptions: ['by'], signatures: [ { @@ -31,7 +32,7 @@ export const groupingFunctionDefinitions: FunctionDefinition[] = [ { params: [ { name: 'field', type: 'number' }, - { name: 'buckets', type: 'time_literal', constantOnly: true }, + { name: 'buckets', type: 'number', constantOnly: true }, ], returnType: 'number', examples: ['from index | eval hd = bucket(bytes, 1 hour)'], diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts index 0ae892bf98fa6..b4997f68ba919 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts @@ -9,7 +9,7 @@ import type { ESQLCommand, ESQLCommandOption, ESQLFunction, ESQLMessage } from '@kbn/esql-ast'; export interface FunctionDefinition { - type: 'builtin' | 'agg' | 'eval' | 'grouping'; + type: 'builtin' | 'agg' | 'eval'; ignoreAsSuggestion?: boolean; name: string; alias?: string[]; diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts index 868e8f3f9212a..fb1d3d648142b 100644 --- a/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts @@ -214,14 +214,18 @@ export function getCommandOption(optionName: CommandOptionsDefinition['name']) { ); } -function compareLiteralType(argTypes: string, item: ESQLLiteral) { +function compareLiteralType(argType: string, item: ESQLLiteral) { if (item.literalType !== 'string') { - return argTypes === item.literalType; + if (argType === item.literalType) { + return true; + } + return false; } - if (argTypes === 'chrono_literal') { + if (argType === 'chrono_literal') { return chronoLiterals.some(({ name }) => name === item.text); } - return argTypes === item.literalType; + // date-type parameters accept string literals because of ES auto-casting + return ['string', 'date'].includes(argType); } export function getColumnHit( diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json index 40738d519679b..660fff0bb7d8f 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json +++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json @@ -952,19 +952,6 @@ "error": [], "warning": [] }, - { - "query": "row var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", to_datetime(\"a\"))", - "error": [], - "warning": [] - }, - { - "query": "row var = date_extract(\"a\", \"a\")", - "error": [ - "Argument of [date_extract] must be [chrono_literal], found value [\"a\"] type [string]", - "Argument of [date_extract] must be [date], found value [\"a\"] type [string]" - ], - "warning": [] - }, { "query": "row var = date_format(now(), \"a\")", "error": [], @@ -975,19 +962,6 @@ "error": [], "warning": [] }, - { - "query": "row var = date_format(to_datetime(\"a\"), to_string(\"a\"))", - "error": [], - "warning": [] - }, - { - "query": "row var = date_format(\"a\", 5)", - "error": [ - "Argument of [date_format] must be [date], found value [\"a\"] type [string]", - "Argument of [date_format] must be [string], found value [5] type [number]" - ], - "warning": [] - }, { "query": "row var = date_parse(\"a\", \"a\")", "error": [], @@ -1021,19 +995,6 @@ "error": [], "warning": [] }, - { - "query": "row var = date_trunc(1 year, to_datetime(\"a\"))", - "error": [], - "warning": [] - }, - { - "query": "row var = date_trunc(\"a\", \"a\")", - "error": [ - "Argument of [date_trunc] must be [time_literal], found value [\"a\"] type [string]", - "Argument of [date_trunc] must be [date], found value [\"a\"] type [string]" - ], - "warning": [] - }, { "query": "row var = e()", "error": [], @@ -9121,6 +9082,37 @@ ], "warning": [] }, + { + "query": "from a_index | eval var = date_diff(\"year\", dateField, dateField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval date_diff(\"year\", dateField, dateField)", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval var = date_diff(\"year\", to_datetime(stringField), to_datetime(stringField))", + "error": [], + "warning": [] + }, + { + "query": "from a_index | eval date_diff(numberField, stringField, stringField)", + "error": [ + "Argument of [date_diff] must be [string], found value [numberField] type [number]", + "Argument of [date_diff] must be [date], found value [stringField] type [string]", + "Argument of [date_diff] must be [date], found value [stringField] type [string]" + ], + "warning": [] + }, + { + "query": "from a_index | eval date_diff(\"year\", dateField, dateField, extraArg)", + "error": [ + "Error: [date_diff] function expects exactly 3 arguments, got 4." + ], + "warning": [] + }, { "query": "from a_index | eval var = date_extract(\"ALIGNED_DAY_OF_WEEK_IN_MONTH\", dateField)", "error": [], @@ -15778,17 +15770,19 @@ "warning": [] }, { - "query": "from a_index | stats by bucket(numberField, 1 year)", + "query": "from a_index | stats by bucket(numberField, 5)", "error": [], "warning": [] }, { - "query": "from a_index | stats by bucket(numberField, 1 year)", - "error": [], + "query": "from a_index | stats by bucket(numberField, numberField)", + "error": [ + "Argument of [bucket] must be a constant, received [numberField]" + ], "warning": [] }, { - "query": "from a_index | stats by bin(numberField, 1 year)", + "query": "from a_index | stats by bin(numberField, 5)", "error": [], "warning": [] }, diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts index 578d3e9d79b6a..1d7d080b6c5c0 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts @@ -622,7 +622,17 @@ describe('validation logic', () => { // the right error message if ( params.every(({ type }) => type !== 'any') && - !['to_version', 'mv_sort', 'date_diff'].includes(name) + ![ + 'to_version', + 'mv_sort', + // skip the date functions because the row tests always throw in + // a string literal and expect it to be invalid for the date functions + // but it's always valid because ES will parse it as a date + 'date_diff', + 'date_extract', + 'date_format', + 'date_trunc', + ].includes(name) ) { // now test nested functions const fieldMappingWithNestedFunctions = getFieldMapping(params, { @@ -1289,7 +1299,6 @@ describe('validation logic', () => { ); }); for (const { name, signatures, ...rest } of numericOrStringFunctions) { - if (name === 'date_diff') continue; // date_diff is hard to test const supportedSignatures = signatures.filter(({ returnType }) => // TODO — not sure why the tests have this limitation... seems like any type // that can be part of a boolean expression should be allowed in a where clause @@ -1489,7 +1498,6 @@ describe('validation logic', () => { } for (const { name, alias, signatures, ...defRest } of evalFunctionsDefinitions) { - if (name === 'date_diff') continue; // date_diff is hard to test for (const { params, ...signRest } of signatures) { const fieldMapping = getFieldMapping(params); testErrorsAndWarnings( @@ -1561,7 +1569,7 @@ describe('validation logic', () => { // the right error message if ( params.every(({ type }) => type !== 'any') && - !['to_version', 'mv_sort', 'date_diff'].includes(name) + !['to_version', 'mv_sort'].includes(name) ) { // now test nested functions const fieldMappingWithNestedFunctions = getFieldMapping(params, { @@ -2251,7 +2259,7 @@ describe('validation logic', () => { // the right error message if ( params.every(({ type }) => type !== 'any') && - !['to_version', 'mv_sort', 'date_diff'].includes(name) + !['to_version', 'mv_sort'].includes(name) ) { // now test nested functions const fieldMappingWithNestedAggsFunctions = getFieldMapping(params, { diff --git a/packages/kbn-field-utils/index.ts b/packages/kbn-field-utils/index.ts index 643e22ce6450a..d631c51c757a4 100644 --- a/packages/kbn-field-utils/index.ts +++ b/packages/kbn-field-utils/index.ts @@ -21,6 +21,7 @@ export { getFieldTypeDescription } from './src/utils/get_field_type_description' export { getFieldTypeName, UNKNOWN_FIELD_TYPE_MESSAGE } from './src/utils/get_field_type_name'; export { fieldNameWildcardMatcher, + comboBoxFieldOptionMatcher, getFieldSearchMatchingHighlight, } from './src/utils/field_name_wildcard_matcher'; diff --git a/packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts b/packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts index 063ca3a16e01a..ba06e36e95c9f 100644 --- a/packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts +++ b/packages/kbn-field-utils/src/utils/field_name_wildcard_matcher.ts @@ -42,6 +42,19 @@ export const fieldNameWildcardMatcher = ( return (!!field.displayName && regExp.test(field.displayName)) || regExp.test(field.name); }; +/** + * Adapts fieldNameWildcardMatcher to combobox props. + * @param field + * @param fieldSearchHighlight + */ +export const comboBoxFieldOptionMatcher = ({ + option: { name, label }, + searchValue, +}: { + option: { name?: string; label: string }; + searchValue: string; +}) => fieldNameWildcardMatcher({ name: name || label, displayName: label }, searchValue); + /** * Get `highlight` string to be used together with `EuiHighlight` * @param displayName diff --git a/packages/kbn-journeys/services/synthtrace.ts b/packages/kbn-journeys/services/synthtrace.ts index ffb4f06f20007..d96e186c1b1e6 100644 --- a/packages/kbn-journeys/services/synthtrace.ts +++ b/packages/kbn-journeys/services/synthtrace.ts @@ -117,7 +117,7 @@ async function initApmSynthtraceClient(options: SynthtraceClientOptions) { version: packageVersion, }); - synthEsClient.pipeline(synthEsClient.getDefaultPipeline(false)); + synthEsClient.pipeline(synthEsClient.getDefaultPipeline({ includeSerialization: false })); return synthEsClient; } diff --git a/packages/kbn-management/settings/setting_ids/index.ts b/packages/kbn-management/settings/setting_ids/index.ts index f4a30dac6cb12..93646978aa1a6 100644 --- a/packages/kbn-management/settings/setting_ids/index.ts +++ b/packages/kbn-management/settings/setting_ids/index.ts @@ -139,6 +139,7 @@ export const OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR = 'observability:apmEnableServiceInventoryTableSearchBar'; export const OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID = 'observability:logsExplorer:allowedDataViews'; +export const OBSERVABILITY_APM_ENABLE_MULTI_SIGNAL = 'observability:apmEnableMultiSignal'; // Reporting settings export const XPACK_REPORTING_CUSTOM_PDF_LOGO_ID = 'xpackReporting:customPdfLogo'; diff --git a/packages/kbn-openapi-bundler/README.md b/packages/kbn-openapi-bundler/README.md index 4a82cb9c20339..0a096b3f28152 100644 --- a/packages/kbn-openapi-bundler/README.md +++ b/packages/kbn-openapi-bundler/README.md @@ -1,15 +1,15 @@ # OpenAPI Specs Bundler for Kibana -`@kbn/openapi-bundler` is a tool for transforming multiple OpenAPI specification files (source specs) into a single bundled specification file (target spec). -This can be used for API docs generation purposes. This approach allows you to: +`@kbn/openapi-bundler` is a tool for transforming multiple OpenAPI specification files (source specs) into a bundled specification file(s) (target spec). The number of resulting bundles depends on a number of versions +used in the OpenAPI specification files. The package can be used for API documentation generation purposes. This approach allows you to: -- Abstract away the knowledge of where you keep your OpenAPI specs, how many specs there are, and how to find them. The Docs team should only know where a single file is located - the bundle. +- Abstract away the knowledge of where you keep your OpenAPI specs, how many specs are there, and how to find them. Consumer should only know where result files are located - the bundles. - Omit internal API endpoints from the bundle. - Omit API endpoints that are hidden behind a feature flag and haven't been released yet. - Omit parts of schemas that are hidden behind a feature flag (e.g. a new property added to an existing response schema). - Omit custom OpenAPI attributes from the bundle, such as `x-codegen-enabled`, `x-internal`, and `x-modify` (see below). - Transform the target schema according to the custom OpenAPI attributes, such as `x-modify`. -- Resolve references and inline some of them for better readability. The bundled file contains only local references and paths. +- Resolve references, inline some of them and merge allOf object schemas for better readability. The bundled file contains only local references and paths. ## Getting started @@ -22,16 +22,22 @@ Currently package supports only programmatic API. As the next step you need to c ```ts require('../../../../../src/setup_node_env'); const { bundle } = require('@kbn/openapi-bundler'); -const { resolve } = require('path'); +const { join, resolve } = require('path'); // define ROOT as `my-plugin` instead of `my-plugin/scripts/openapi` // pay attention to this constant when your script's location is different const ROOT = resolve(__dirname, '../..'); bundle({ - rootDir: ROOT, // Root path e.g. plugin root directory - sourceGlob: './**/*.schema.yaml', // Glob pattern to find OpenAPI specification files - outputFilePath: './target/openapi/my-plugin.bundled.schema.yaml', // + // Root path e.g. plugin root directory + rootDir: ROOT, + // Glob pattern to find OpenAPI specification files, relative to `rootDir` + sourceGlob: './**/*.schema.yaml', + // Output file path. Absolute or related to the node.js working directory. + // It may contain `{version}` placeholder which is optional. `{version}` placeholder + // will be replaced with the bundled specs version or filename will be prepended with + // version when placeholder is omitted, e.g. `2023-10-31-my-plugin.bundled.schema.yaml`. + outputFilePath: join(ROOT, 'target/openapi/my-plugin-{version}.bundled.schema.yaml'), }); ``` diff --git a/packages/kbn-openapi-bundler/src/__test__/bundle_refs.test.ts b/packages/kbn-openapi-bundler/src/__test__/bundle_refs.test.ts new file mode 100644 index 0000000000000..3d5472d4d8308 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/bundle_refs.test.ts @@ -0,0 +1,407 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { OpenAPIV3 } from 'openapi-types'; +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - bundle references', () => { + it('bundles files with external references', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: './common.schema.yaml#/components/schemas/TestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + post: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: './common.schema.yaml#/components/schemas/TestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + }); + const commonSpec = createOASDocument({ + info: { + version: 'not set', + }, + components: { + schemas: { + TestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec1, + 2: spec2, + common: commonSpec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + }, + }, + }, + }); + expect(bundledSpec.paths['/api/some_api']!.post!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + }, + }, + }, + }); + expect(bundledSpec.components!.schemas).toMatchObject({ + TestSchema: commonSpec.components!.schemas!.TestSchema, + }); + }); + + it('bundles one file with a local reference', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + TestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']).toEqual({ + get: expect.objectContaining({ + responses: expect.objectContaining({ + '200': expect.objectContaining({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + }, + }, + }, + }), + }), + }), + }); + expect(bundledSpec.components!.schemas!.TestSchema).toEqual( + spec.components!.schemas!.TestSchema + ); + }); + + it('bundles one file with an external reference', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: './common.schema.yaml#/components/schemas/TestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + }); + const commonSpec = createOASDocument({ + info: { + version: 'not set', + }, + components: { + schemas: { + TestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + common: commonSpec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']).toEqual({ + get: expect.objectContaining({ + responses: expect.objectContaining({ + '200': expect.objectContaining({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + }, + }, + }, + }), + }), + }), + }); + expect(bundledSpec.components!.schemas!.TestSchema).toMatchObject( + commonSpec.components!.schemas!.TestSchema + ); + }); + + it('bundles conflicting but equal references', async () => { + const ConflictTestSchema: OpenAPIV3.SchemaObject = { + type: 'integer', + minimum: 1, + }; + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/ConflictTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { ConflictTestSchema }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + put: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/ConflictTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { ConflictTestSchema }, + }, + }); + + const { '2023-10-31.yaml': bundledSpec } = await bundleSpecs({ '1': spec1, '2': spec2 }); + + expect(bundledSpec.paths['/api/some_api']).toEqual({ + get: spec1.paths['/api/some_api']!.get, + put: spec2.paths['/api/some_api']!.put, + }); + expect(bundledSpec.components).toMatchObject({ schemas: { ConflictTestSchema } }); + }); + + it('DOES NOT bundle external conflicting references encountered in on spec file', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + fieldA: { + $ref: './common_a.schema.yaml#/components/schemas/ConflictTestSchema', + }, + fieldB: { + $ref: './common_b.schema.yaml#/components/schemas/ConflictTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + const commonSpecA = createOASDocument({ + components: { + schemas: { + ConflictTestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + const commonSpecB = createOASDocument({ + components: { + schemas: { + ConflictTestSchema: { + type: 'object', + properties: { + someField: { + type: 'string', + }, + }, + }, + }, + }, + }); + + await expect( + bundleSpecs({ + 1: spec, + common_a: commonSpecA, + common_b: commonSpecB, + }) + ).rejects.toThrowError(/\/components\/schemas\/ConflictTestSchema/); + }); + + it('DOES NOT bundle conflicting references encountered in separate specs', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/ConflictTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + ConflictTestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + put: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/ConflictTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + ConflictTestSchema: { + type: 'integer', + minimum: 1, + }, + }, + }, + }); + + await expect( + bundleSpecs({ + 1: spec1, + 2: spec2, + }) + ).rejects.toThrowError(/\/components\/schemas\/ConflictTestSchema/); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/bundle_simple_specs.test.ts b/packages/kbn-openapi-bundler/src/__test__/bundle_simple_specs.test.ts new file mode 100644 index 0000000000000..15ef0e8215908 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/bundle_simple_specs.test.ts @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - simple specs', () => { + it('bundles two simple specs', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + fieldA: { + type: 'integer', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + post: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + fieldB: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec1, + 2: spec2, + }) + ); + + expect(bundledSpec.paths['/api/some_api']).toEqual({ + get: spec1.paths['/api/some_api']?.get, + post: spec2.paths['/api/some_api']?.post, + }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/bundle_specs.ts b/packages/kbn-openapi-bundler/src/__test__/bundle_specs.ts new file mode 100644 index 0000000000000..599f81c0e4c85 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/bundle_specs.ts @@ -0,0 +1,79 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { join } from 'path'; +import { + existsSync, + mkdirSync, + readdirSync, + readFileSync, + rmdirSync, + unlinkSync, + writeFileSync, +} from 'fs'; +import { dump, load } from 'js-yaml'; +import { OpenAPIV3 } from 'openapi-types'; +import { bundle } from '../openapi_bundler'; + +const ROOT_PATH = join(__dirname, '..', '..'); + +export async function bundleSpecs( + oasSpecs: Record +): Promise> { + const randomStr = (Math.random() + 1).toString(36).substring(7); + const folderToBundlePath = join(ROOT_PATH, 'target', 'oas-test', randomStr); + const resultFolderPath = join(ROOT_PATH, 'target', 'oas-test-bundled-result', randomStr); + const bundledFilePathTemplate = join(resultFolderPath, '{version}.yaml'); + + dumpSpecs(folderToBundlePath, oasSpecs); + + await bundleFolder(folderToBundlePath, bundledFilePathTemplate); + + return readBundledSpecs(resultFolderPath); +} + +function removeFolder(folderPath: string): void { + if (existsSync(folderPath)) { + for (const fileName of readdirSync(folderPath)) { + unlinkSync(join(folderPath, fileName)); + } + + rmdirSync(folderPath); + } +} + +function dumpSpecs(folderPath: string, oasSpecs: Record): void { + removeFolder(folderPath); + mkdirSync(folderPath, { recursive: true }); + + for (const [fileName, oasSpec] of Object.entries(oasSpecs)) { + writeFileSync(join(folderPath, `${fileName}.schema.yaml`), dump(oasSpec)); + } +} + +export function readBundledSpecs(folderPath: string): Record { + const bundledSpecs: Record = {}; + + for (const fileName of readdirSync(folderPath)) { + const yaml = readFileSync(join(folderPath, fileName), { encoding: 'utf8' }); + + bundledSpecs[fileName] = load(yaml); + } + + return bundledSpecs; +} + +export async function bundleFolder( + folderToBundlePath: string, + bundledFilePathTemplate: string +): Promise { + await bundle({ + sourceGlob: join(folderToBundlePath, '*.schema.yaml'), + outputFilePath: bundledFilePathTemplate, + }); +} diff --git a/packages/kbn-openapi-bundler/src/__test__/bundle_specs_with_multiple_modifications.test.ts b/packages/kbn-openapi-bundler/src/__test__/bundle_specs_with_multiple_modifications.test.ts new file mode 100644 index 0000000000000..ed57d745f2ee4 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/bundle_specs_with_multiple_modifications.test.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { readFileSync } from 'fs'; +import { load } from 'js-yaml'; +import { join } from 'path'; +import { bundleFolder, readBundledSpecs } from './bundle_specs'; + +const ROOT_PATH = join(__dirname, '..', '..'); + +describe('OpenAPI Bundler - specs with multiple modifications', () => { + it('bundles specs performing multiple modifications without interference', async () => { + const folderToBundlePath = join(__dirname, 'complex_specs'); + const outputFolderPath = join(ROOT_PATH, 'target', 'complex_specs_test'); + const bundledFilePathTemplate = join(outputFolderPath, 'oas-test-bundle-{version}.yaml'); + + await bundleFolder(folderToBundlePath, bundledFilePathTemplate); + + const [bundledSpec] = Object.values(readBundledSpecs(outputFolderPath)); + + const expected = load( + readFileSync(join(folderToBundlePath, 'expected.yaml'), { encoding: 'utf8' }) + ); + + expect(bundledSpec).toEqual(expected); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/circular.test.ts b/packages/kbn-openapi-bundler/src/__test__/circular.test.ts new file mode 100644 index 0000000000000..8d72f28c3779f --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/circular.test.ts @@ -0,0 +1,228 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { dump } from 'js-yaml'; +import { OpenAPIV3 } from 'openapi-types'; +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - circular specs', () => { + it('bundles recursive spec', async () => { + const recursiveSchema: OpenAPIV3.SchemaObject = { + type: 'object', + properties: { + fieldA: { + type: 'integer', + }, + }, + }; + recursiveSchema.properties!.fieldB = recursiveSchema; + + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: recursiveSchema, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(dump(bundledSpec.paths['/api/some_api']!.get!.responses['200'])).toMatchInlineSnapshot(` +"description: Successful response +content: + application/json: + schema: &ref_0 + type: object + properties: + fieldA: + type: integer + fieldB: *ref_0 +" +`); + }); + + it('bundles specs with recursive references', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: './common.schema.yaml#/components/schemas/CircularTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + post: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: './common.schema.yaml#/components/schemas/CircularTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + }); + const commonSpec = createOASDocument({ + info: { + version: 'not set', + }, + components: { + schemas: { + CircularTestSchema: { + type: 'object', + properties: { + field: { + $ref: '#/components/schemas/AnotherCircularTestSchema', + }, + }, + }, + AnotherCircularTestSchema: { + anyOf: [ + { $ref: '#/components/schemas/CircularTestSchema' }, + { type: 'string', enum: ['value1', 'value2'] }, + ], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec1, + 2: spec2, + common: commonSpec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']).toEqual({ + get: expect.objectContaining({ + responses: expect.objectContaining({ + '200': expect.objectContaining({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/CircularTestSchema', + }, + }, + }, + }), + }), + }), + post: expect.objectContaining({ + responses: expect.objectContaining({ + '200': expect.objectContaining({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/CircularTestSchema', + }, + }, + }, + }), + }), + }), + }); + expect(bundledSpec.components).toMatchObject({ schemas: commonSpec.components!.schemas }); + }); + + it('bundles spec with a self-recursive reference', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/CircularTestSchema', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + CircularTestSchema: { + type: 'object', + properties: { + field: { + $ref: '#/components/schemas/CircularTestSchema', + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']).toEqual({ + get: expect.objectContaining({ + responses: expect.objectContaining({ + '200': expect.objectContaining({ + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/CircularTestSchema', + }, + }, + }, + }), + }), + }), + }); + expect(bundledSpec.components!.schemas!.CircularTestSchema).toEqual( + spec.components!.schemas!.CircularTestSchema + ); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/complex_specs/common.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/complex_specs/common.schema.yaml new file mode 100644 index 0000000000000..aaa7af54a2fd1 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/complex_specs/common.schema.yaml @@ -0,0 +1,70 @@ +openapi: 3.0.3 +info: + title: Test endpoint + version: 'no applicable' +paths: {} + +components: + schemas: + FieldSchemaA: + type: object + properties: + fieldX: + type: string + fieldY: + type: integer + + SchemaA: + type: object + properties: + schemaAField1: + type: string + enum: + - value1 + - value2 + schemaAField2: + type: integer + required: + - schemaAField1 + - schemaAField2 + + SchemaB: + allOf: + - $ref: '#/components/schemas/SharedSchema' + - $ref: '#/components/schemas/SchemaA' + - type: object + properties: + schemaBField: + type: boolean + + SharedSchema: + x-inline: true + type: object + properties: + fieldA: + type: string + fieldRef: + $ref: '#/components/schemas/FieldSchemaA' + x-modify: required + fieldB: + type: boolean + + SharedSchemaWithAllOf: + x-inline: true + allOf: + - type: object + properties: + sharedSchemaFieldX: + type: string + sharedSchemaFieldY: + type: string + commonField: + type: string + required: + - commonField + - type: object + properties: + sharedSchemaField1: + type: string + sharedSchemaField2: + type: string diff --git a/packages/kbn-openapi-bundler/src/__test__/complex_specs/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/complex_specs/expected.yaml new file mode 100644 index 0000000000000..9a7660f14070e --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/complex_specs/expected.yaml @@ -0,0 +1,172 @@ +openapi: 3.0.3 +info: + title: Bundled OpenAPI specs + version: '2023-10-31' +servers: + - url: 'http://{kibana_host}:{port}' + variables: + kibana_host: + default: localhost + port: + default: '5601' +security: + - BasicAuth: [] + +paths: + /api/some_api: + get: + operationId: TestEndpointGet + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + fieldA: + type: string + fieldRef: + type: object + properties: + fieldX: + type: string + fieldY: + type: integer + required: + - fieldX + - fieldY + fieldB: + type: boolean + post: + operationId: TestEndpointPost + responses: + '200': + description: Successful response + content: + application/json: + schema: + anyOf: + - type: object + properties: + localField1: + type: string + localField2: + type: string + required: + - localField1 + - type: object + properties: + schemaAField1: + type: string + enum: + - value1 + - value2 + schemaAField2: + type: integer + - type: object + properties: + fieldA: + type: string + fieldRef: + type: object + properties: + fieldX: + type: string + fieldY: + type: integer + required: + - fieldX + - fieldY + fieldB: + type: boolean + put: + operationId: TestEndpointPut + responses: + '200': + description: Successful response + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/SchemaWithOptionalFields' + - $ref: '#/components/schemas/SchemaB' + +components: + securitySchemes: + BasicAuth: + type: http + scheme: basic + schemas: + SchemaWithOptionalFields: + type: object + properties: + fieldA: + type: boolean + fieldB: + type: object + properties: + fieldA: + type: string + fieldRef: + type: object + properties: + fieldX: + type: string + fieldY: + type: integer + required: + - fieldX + - fieldY + fieldB: + type: boolean + sharedSchemaFieldX: + type: string + sharedSchemaFieldY: + type: string + commonField: + type: string + sharedSchemaField1: + type: string + sharedSchemaField2: + type: string + localSchemaFieldA: + type: number + localSchemaFieldB: + type: string + required: + - commonField + SchemaA: + type: object + properties: + schemaAField1: + type: string + enum: + - value1 + - value2 + schemaAField2: + type: integer + required: + - schemaAField1 + - schemaAField2 + SchemaB: + allOf: + - type: object + properties: + fieldA: + type: string + fieldRef: + type: object + properties: + fieldX: + type: string + fieldY: + type: integer + required: + - fieldX + - fieldY + fieldB: + type: boolean + schemaBField: + type: boolean + - $ref: '#/components/schemas/SchemaA' diff --git a/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec1.schema.yaml similarity index 87% rename from packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/spec.schema.yaml rename to packages/kbn-openapi-bundler/src/__test__/complex_specs/spec1.schema.yaml index b1d910fa5e963..0d6656fde5b68 100644 --- a/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/spec.schema.yaml +++ b/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec1.schema.yaml @@ -12,4 +12,5 @@ paths: content: application/json: schema: - $ref: './common.schema.yaml#/components/schemas/TestSchema' + $ref: './common.schema.yaml#/components/schemas/SharedSchema' + x-modify: partial diff --git a/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec2.schema.yaml new file mode 100644 index 0000000000000..a79a78f94950d --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec2.schema.yaml @@ -0,0 +1,26 @@ +openapi: 3.0.3 +info: + title: Test endpoint + version: '2023-10-31' +paths: + /api/some_api: + post: + operationId: TestEndpointPost + responses: + '200': + description: Successful response + content: + application/json: + schema: + anyOf: + - type: object + properties: + localField1: + type: string + localField2: + type: string + required: + - localField1 + - $ref: './common.schema.yaml#/components/schemas/SchemaA' + x-modify: partial + - $ref: './common.schema.yaml#/components/schemas/SharedSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec3.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec3.schema.yaml new file mode 100644 index 0000000000000..d249210fff2d2 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/complex_specs/spec3.schema.yaml @@ -0,0 +1,45 @@ +openapi: 3.0.3 +info: + title: Test endpoint + version: '2023-10-31' +paths: + /api/some_api: + put: + x-codegen-enabled: true + operationId: TestEndpointPut + responses: + '200': + description: Successful response + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/SchemaWithOptionalFields' + - $ref: './common.schema.yaml#/components/schemas/SchemaB' + +components: + schemas: + SchemaWithOptionalFields: + allOf: + - type: object + properties: + fieldA: + type: boolean + fieldB: + $ref: './common.schema.yaml#/components/schemas/SharedSchema' + - $ref: './common.schema.yaml#/components/schemas/SharedSchemaWithAllOf' + - $ref: '#/components/schemas/LocalSchemaWithAllOf' + x-inline: true + + LocalSchemaWithAllOf: + allOf: + - type: object + properties: + localSchemaFieldA: + type: number + localSchemaFieldB: + type: string + commonField: + type: string + required: + - commonField diff --git a/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/expected.yaml deleted file mode 100644 index d8eb6a8b66c68..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/expected.yaml +++ /dev/null @@ -1,40 +0,0 @@ -spec1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/ConflictTestSchema' - -spec2.schema.yaml: - openapi: 3.0.3 - info: - title: Another test endpoint - version: '2023-10-31' - paths: - /api/another_api: - put: - operationId: AnotherTestEndpointPut - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/ConflictTestSchema' - -shared_components.schema.yaml: - components: - schemas: - ConflictTestSchema: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/spec1.schema.yaml deleted file mode 100644 index a44cd371ba326..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/spec1.schema.yaml +++ /dev/null @@ -1,21 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/ConflictTestSchema' - -components: - schemas: - ConflictTestSchema: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/spec2.schema.yaml deleted file mode 100644 index 4a5670f8ae5f5..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/conflicting_but_equal_refs_in_different_specs/spec2.schema.yaml +++ /dev/null @@ -1,21 +0,0 @@ -openapi: 3.0.3 -info: - title: Another test endpoint - version: '2023-10-31' -paths: - /api/another_api: - put: - operationId: AnotherTestEndpointPut - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/ConflictTestSchema' - -components: - schemas: - ConflictTestSchema: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/conflicting_refs_in_different_specs/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/conflicting_refs_in_different_specs/spec1.schema.yaml deleted file mode 100644 index 765811b78a619..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/conflicting_refs_in_different_specs/spec1.schema.yaml +++ /dev/null @@ -1,23 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/ConflictTestSchema' - -components: - schemas: - ConflictTestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/conflicting_refs_in_different_specs/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/conflicting_refs_in_different_specs/spec2.schema.yaml deleted file mode 100644 index 4a5670f8ae5f5..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/conflicting_refs_in_different_specs/spec2.schema.yaml +++ /dev/null @@ -1,21 +0,0 @@ -openapi: 3.0.3 -info: - title: Another test endpoint - version: '2023-10-31' -paths: - /api/another_api: - put: - operationId: AnotherTestEndpointPut - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/ConflictTestSchema' - -components: - schemas: - ConflictTestSchema: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/create_oas_document.ts b/packages/kbn-openapi-bundler/src/__test__/create_oas_document.ts new file mode 100644 index 0000000000000..c91e535e0cf12 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/create_oas_document.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { OpenAPIV3 } from 'openapi-types'; + +export function createOASDocument(overrides: { + openapi?: string; + info?: Partial; + paths?: OpenAPIV3.PathsObject; + components?: OpenAPIV3.ComponentsObject; +}): OpenAPIV3.Document { + return { + openapi: overrides.openapi ?? '3.0.3', + info: { + title: 'Test endpoint', + version: '2023-10-31', + ...overrides.info, + }, + paths: { + ...overrides.paths, + }, + components: { + ...overrides.components, + }, + }; +} diff --git a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions.test.ts b/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions.test.ts new file mode 100644 index 0000000000000..5def26293084b --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions.test.ts @@ -0,0 +1,88 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - different API versions', () => { + it('bundles one endpoint with different versions', async () => { + const spec1 = createOASDocument({ + info: { + version: '2023-10-31', + }, + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field1: { + type: 'integer', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + info: { + version: '2023-11-11', + }, + paths: { + '/api/some_api': { + put: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field1: { + type: 'integer', + }, + field2: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const bundledSpecs = await bundleSpecs({ + 1: spec1, + 2: spec2, + }); + + expect(bundledSpecs).toEqual({ + '2023-10-31.yaml': expect.objectContaining({ + paths: spec1.paths, + }), + '2023-11-11.yaml': expect.objectContaining({ + paths: spec2.paths, + }), + }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/expected.yaml deleted file mode 100644 index 0b916b7b17ac2..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/expected.yaml +++ /dev/null @@ -1,44 +0,0 @@ -version1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer - -version2.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-11-11' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer - field2: - type: string - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/version1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/version1.schema.yaml deleted file mode 100644 index 5b7f6a8718fcf..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/version1.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer diff --git a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/version2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/version2.schema.yaml deleted file mode 100644 index 4492f449ba2fe..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/different_endpoint_versions/version2.schema.yaml +++ /dev/null @@ -1,20 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-11-11' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer - field2: - type: string diff --git a/packages/kbn-openapi-bundler/src/__test__/different_oas_versions.test.ts b/packages/kbn-openapi-bundler/src/__test__/different_oas_versions.test.ts new file mode 100644 index 0000000000000..949f4f882ff4e --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/different_oas_versions.test.ts @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - different OAS versions', () => { + it('DOES NOT bundle specs with different OpenAPI versions', async () => { + const spec1 = createOASDocument({ + openapi: '3.0.3', + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + openapi: '3.1.0', + paths: { + '/api/some_api': { + put: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'boolean', + }, + }, + }, + }, + }, + }, + }, + }, + }); + + await expect( + bundleSpecs({ + 1: spec1, + 2: spec2, + }) + ).rejects.toThrowError(new RegExp('^OpenAPI specs must use the same OpenAPI version')); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/expected.yaml deleted file mode 100644 index 3aa6c7051ebcf..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/expected.yaml +++ /dev/null @@ -1,42 +0,0 @@ -spec1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer - -spec2.schema.yaml: - openapi: 3.1.0 - info: - title: Test endpoint POST - version: '2023-10-31' - paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field2: - type: string - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/spec1.schema.yaml deleted file mode 100644 index 5b7f6a8718fcf..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/spec1.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer diff --git a/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/spec2.schema.yaml deleted file mode 100644 index e437e40e6698e..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/different_openapi_versions/spec2.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.1.0 -info: - title: Test endpoint POST - version: '2023-10-31' -paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field2: - type: string diff --git a/packages/kbn-openapi-bundler/src/__test__/inline_ref.test.ts b/packages/kbn-openapi-bundler/src/__test__/inline_ref.test.ts new file mode 100644 index 0000000000000..913afd934de09 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/inline_ref.test.ts @@ -0,0 +1,227 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - inline references', () => { + it('inlines local references', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + anyOf: [ + { $ref: '#/components/schemas/SchemaToInline' }, + { $ref: '#/components/schemas/SchemaNotToInline1' }, + { $ref: '#/components/schemas/SchemaNotToInline2' }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + SchemaToInline: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': true, + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + SchemaNotToInline1: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': false, + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + SchemaNotToInline2: { + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + anyOf: expect.arrayContaining([ + { + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + ]), + }, + }, + }, + }); + expect(Object.keys(bundledSpec.components!.schemas!)).toEqual([ + 'SchemaNotToInline1', + 'SchemaNotToInline2', + ]); + }); + + it('inlines external references', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + anyOf: [ + { $ref: './common.schema.yaml#/components/schemas/SchemaToInline' }, + { $ref: './common.schema.yaml#/components/schemas/SchemaNotToInline1' }, + { $ref: './common.schema.yaml#/components/schemas/SchemaNotToInline2' }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }); + const commonSpec = createOASDocument({ + components: { + schemas: { + SchemaToInline: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': true, + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + SchemaNotToInline1: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': false, + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + SchemaNotToInline2: { + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + common: commonSpec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + anyOf: expect.arrayContaining([ + { + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + ]), + }, + }, + }, + }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/inline_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/inline_ref/expected.yaml deleted file mode 100644 index 270886caa051e..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/inline_ref/expected.yaml +++ /dev/null @@ -1,50 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - anyOf: - - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema2' - - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema3' - -shared_components.schema.yaml: - components: - schemas: - TestSchema2: - x-inline: false - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - - TestSchema3: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/inline_ref/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/inline_ref/spec.schema.yaml deleted file mode 100644 index f5cdb2694a5c8..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/inline_ref/spec.schema.yaml +++ /dev/null @@ -1,52 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/TestSchema1' - - $ref: '#/components/schemas/TestSchema2' - - $ref: '#/components/schemas/TestSchema3' - -components: - schemas: - TestSchema1: - x-inline: true - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - - TestSchema2: - x-inline: false - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - - TestSchema3: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_partial_node/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_partial_node/expected.yaml deleted file mode 100644 index fa679d0c3f8c0..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_partial_node/expected.yaml +++ /dev/null @@ -1,26 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_partial_node/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_partial_node/spec.schema.yaml deleted file mode 100644 index 9646051aab907..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_partial_node/spec.schema.yaml +++ /dev/null @@ -1,26 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - x-modify: partial - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - required: - - field1 - - field2 diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_partial_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_partial_ref/expected.yaml deleted file mode 100644 index fa679d0c3f8c0..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_partial_ref/expected.yaml +++ /dev/null @@ -1,26 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_partial_ref/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_partial_ref/spec.schema.yaml deleted file mode 100644 index 547bb4cd913be..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_partial_ref/spec.schema.yaml +++ /dev/null @@ -1,31 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/TestSchema' - x-modify: partial - -components: - schemas: - TestSchema: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - required: - - field1 - - field2 diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_required_node/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_required_node/expected.yaml deleted file mode 100644 index 3b075e3cf803b..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_required_node/expected.yaml +++ /dev/null @@ -1,29 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - required: - - field1 - - field2 - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_required_node/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_required_node/spec.schema.yaml deleted file mode 100644 index 68d478ea8caaa..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_required_node/spec.schema.yaml +++ /dev/null @@ -1,23 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - x-modify: required - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_required_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_required_ref/expected.yaml deleted file mode 100644 index 3b075e3cf803b..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_required_ref/expected.yaml +++ /dev/null @@ -1,29 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - required: - - field1 - - field2 - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/modify_required_ref/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/modify_required_ref/spec.schema.yaml deleted file mode 100644 index 0f02e3e905e23..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/modify_required_ref/spec.schema.yaml +++ /dev/null @@ -1,28 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/TestSchema' - x-modify: required - -components: - schemas: - TestSchema: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/omit_unused_schemas.test.ts b/packages/kbn-openapi-bundler/src/__test__/omit_unused_schemas.test.ts new file mode 100644 index 0000000000000..b714ba5ddf834 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/omit_unused_schemas.test.ts @@ -0,0 +1,144 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - omit unused schemas', () => { + it('omits unused local schema', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + TestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.components).not.toMatchObject({ schemas: expect.anything() }); + }); + + it('omits unused external schema', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: './common.schema.yaml#/components/schemas/SchemaA', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + TestSchema: { + type: 'string', + enum: ['value1', 'value2'], + }, + }, + }, + }); + const commonSpec = createOASDocument({ + components: { + schemas: { + SchemaA: { + type: 'number', + }, + SchemaB: { + type: 'string', + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + common: commonSpec, + }) + ); + + expect(bundledSpec.components!.schemas).toEqual({ SchemaA: expect.anything() }); + }); + + it('omits inlined schemas', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { $ref: './common.schema.yaml#/components/schemas/SchemaToInline' }, + }, + }, + }, + }, + }, + }, + }, + }); + const commonSpec = createOASDocument({ + components: { + schemas: { + SchemaToInline: { + // @ts-expect-error custom prop + 'x-inline': true, + type: 'string', + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + common: commonSpec, + }) + ); + + expect(bundledSpec.components).not.toMatchObject({ schemas: expect.anything() }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/common.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/common.schema.yaml deleted file mode 100644 index 6e0ec47b773c5..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/common.schema.yaml +++ /dev/null @@ -1,21 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: {} - -components: - schemas: - CircularTestSchema: - type: string - data: - items: - $ref: '#/components/schemas/AnotherCircularTestSchema' - - AnotherCircularTestSchema: - anyof: - - $ref: '#/components/schemas/CircularTestSchema' - - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/expected.yaml deleted file mode 100644 index cce50159ca39f..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/expected.yaml +++ /dev/null @@ -1,50 +0,0 @@ -spec1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/CircularTestSchema' - -spec2.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint POST - version: '2023-10-31' - paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/CircularTestSchema' - -shared_components.schema.yaml: - components: - schemas: - CircularTestSchema: - type: string - data: - items: - $ref: '#/components/schemas/AnotherCircularTestSchema' - - AnotherCircularTestSchema: - anyof: - - $ref: '#/components/schemas/CircularTestSchema' - - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/spec1.schema.yaml deleted file mode 100644 index 2e64f53087f84..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/spec1.schema.yaml +++ /dev/null @@ -1,15 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './common.schema.yaml#/components/schemas/CircularTestSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/spec2.schema.yaml deleted file mode 100644 index 92ebc5f4468e5..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/recursive_ref_specs/spec2.schema.yaml +++ /dev/null @@ -1,15 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint POST - version: '2023-10-31' -paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './common.schema.yaml#/components/schemas/CircularTestSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/recursive_spec/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/recursive_spec/expected.yaml deleted file mode 100644 index b5bb0cffb6390..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/recursive_spec/expected.yaml +++ /dev/null @@ -1,27 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: &ref0 - type: object - properties: - - name: field1 - required: false - schema: *ref0 - - field2: - required: false - schema: - type: string - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/recursive_spec/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/recursive_spec/spec.schema.yaml deleted file mode 100644 index f9e3d8b2c590e..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/recursive_spec/spec.schema.yaml +++ /dev/null @@ -1,23 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: &ref0 - type: object - properties: - - name: field1 - required: false - schema: *ref0 - - field2: - required: false - schema: - type: string diff --git a/packages/kbn-openapi-bundler/src/__test__/reduce_all_of.test.ts b/packages/kbn-openapi-bundler/src/__test__/reduce_all_of.test.ts new file mode 100644 index 0000000000000..8d79f8d77ea09 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/reduce_all_of.test.ts @@ -0,0 +1,640 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - reduce allOf item', () => { + it('flatten folded allOfs', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + allOf: [ + { + allOf: [ + { + allOf: [ + { $ref: '#/components/schemas/SchemaA' }, + { + type: 'object', + properties: { + fieldA: { type: 'string' }, + }, + required: ['fieldA'], + }, + ], + }, + ], + }, + { $ref: '#/components/schemas/SchemaB' }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + SchemaA: { + type: 'object', + properties: { + fieldX: { type: 'string' }, + }, + }, + SchemaB: { + type: 'object', + properties: { + fieldX: { type: 'string' }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get?.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + allOf: [ + { $ref: '#/components/schemas/SchemaA' }, + { + type: 'object', + properties: { + fieldA: { type: 'string' }, + }, + required: ['fieldA'], + }, + { $ref: '#/components/schemas/SchemaB' }, + ], + }, + }, + }, + }); + }); + + it('unfolds single allOf item', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + allOf: [ + { + type: 'string', + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get?.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { type: 'string' }, + }, + }, + }); + }); + + it('merges non conflicting allOf object schema items', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + allOf: [ + { $ref: '#/components/schemas/SchemaA' }, + { + type: 'object', + properties: { + fieldA: { + type: 'string', + }, + }, + }, + { $ref: '#/components/schemas/SchemaB' }, + { + type: 'object', + properties: { + fieldB: { + type: 'string', + }, + }, + required: ['fieldB'], + }, + { $ref: '#/components/schemas/SchemaC' }, + { + type: 'object', + properties: { + fieldC: { + type: 'string', + }, + }, + required: ['fieldC'], + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + SchemaA: { + type: 'object', + properties: { + fieldX: { type: 'string' }, + }, + }, + SchemaB: { + type: 'object', + properties: { + fieldY: { type: 'string' }, + }, + }, + SchemaC: { + type: 'object', + properties: { + fieldZ: { type: 'string' }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get?.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + allOf: [ + { + type: 'object', + properties: { + fieldA: { + type: 'string', + }, + fieldB: { + type: 'string', + }, + fieldC: { + type: 'string', + }, + }, + required: ['fieldB', 'fieldC'], + }, + { $ref: '#/components/schemas/SchemaA' }, + { $ref: '#/components/schemas/SchemaB' }, + { $ref: '#/components/schemas/SchemaC' }, + ], + }, + }, + }, + }); + }); + + it('DOES NOT merge conflicting incompatible allOf object schema items', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + allOf: [ + { + type: 'object', + properties: { + fieldA: { + type: 'string', + }, + }, + }, + { + type: 'object', + properties: { + fieldB: { + type: 'string', + }, + }, + required: ['fieldB'], + }, + { + type: 'object', + properties: { + fieldA: { + type: 'boolean', + }, + }, + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get?.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + allOf: [ + { + type: 'object', + properties: { + fieldA: { + type: 'string', + }, + }, + }, + { + type: 'object', + properties: { + fieldB: { + type: 'string', + }, + }, + required: ['fieldB'], + }, + { + type: 'object', + properties: { + fieldA: { + type: 'boolean', + }, + }, + }, + ], + }, + }, + }, + }); + }); + + it('merges allOf object schema items with inlined references', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + allOf: [ + { + type: 'string', + enum: ['value1'], + }, + { + type: 'object', + properties: { + fieldA: { + type: 'string', + }, + }, + }, + { + $ref: '#/components/schemas/SchemaA', + }, + { + type: 'object', + properties: { + fieldB: { + type: 'string', + }, + }, + required: ['fieldB'], + }, + { + $ref: '#/components/schemas/SchemaAToInline', + }, + { + $ref: '#/components/schemas/SchemaB', + }, + { + type: 'object', + properties: { + stringField: { + type: 'string', + }, + }, + required: ['stringField'], + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + SchemaAToInline: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': true, + allOf: [ + { + type: 'string', + enum: ['SchemaAToInline-value1'], + }, + { + type: 'object', + properties: { + enumField: { + type: 'string', + enum: ['SchemaAToInline-value2'], + }, + integerField: { + type: 'integer', + minimum: 1, + }, + }, + }, + { + $ref: './common.schema.yaml#/components/schemas/SchemaBToInline', + }, + ], + }, + SchemaA: { + type: 'object', + properties: { + fieldX: { type: 'string' }, + }, + }, + SchemaB: { + type: 'object', + properties: { + fieldY: { type: 'string' }, + }, + }, + }, + }, + }); + const commonSpec = createOASDocument({ + components: { + schemas: { + SchemaBToInline: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': true, + allOf: [ + { + type: 'string', + enum: ['SchemaBToInline-value1', 'SchemaBToInline-value2'], + }, + { + type: 'object', + properties: { + fieldD: { + type: 'string', + }, + fieldE: { + type: 'string', + }, + }, + required: ['fieldE'], + }, + ], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + common: commonSpec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get?.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + allOf: [ + { + type: 'object', + properties: { + fieldA: { + type: 'string', + }, + fieldB: { + type: 'string', + }, + enumField: { + type: 'string', + enum: ['SchemaAToInline-value2'], + }, + integerField: { + type: 'integer', + minimum: 1, + }, + fieldD: { + type: 'string', + }, + fieldE: { + type: 'string', + }, + stringField: { + type: 'string', + }, + }, + required: ['fieldB', 'fieldE', 'stringField'], + }, + { + type: 'string', + enum: ['value1'], + }, + { + $ref: '#/components/schemas/SchemaA', + }, + { + type: 'string', + enum: ['SchemaAToInline-value1'], + }, + { + type: 'string', + enum: ['SchemaBToInline-value1', 'SchemaBToInline-value2'], + }, + { + $ref: '#/components/schemas/SchemaB', + }, + ], + }, + }, + }, + }); + }); + + it('merges allOf object schema items inlined in different document branches with extra field', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + responseSchemaFieldA: { + $ref: '#/components/schemas/SchemaToInline', + }, + responseSchemaFieldB: { + $ref: '#/components/schemas/MySchema', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + MySchema: { + allOf: [ + { + $ref: '#/components/schemas/SchemaToInline', + }, + { + type: 'object', + properties: { + mySchemaSubfield: { + type: 'boolean', + }, + }, + }, + ], + }, + SchemaToInline: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': true, + allOf: [ + { + type: 'object', + properties: { + SchemaToInlineField1: { + type: 'string', + }, + }, + }, + { + type: 'object', + properties: { + SchemaToInlineField2: { + type: 'number', + }, + }, + required: ['field2'], + }, + ], + }, + }, + }, + }); + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get?.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + responseSchemaFieldA: { + type: 'object', + properties: { + SchemaToInlineField1: { + type: 'string', + }, + SchemaToInlineField2: { + type: 'number', + }, + }, + required: ['field2'], + }, + responseSchemaFieldB: { + $ref: '#/components/schemas/MySchema', + }, + }, + }, + }, + }, + }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/remove_props.test.ts b/packages/kbn-openapi-bundler/src/__test__/remove_props.test.ts new file mode 100644 index 0000000000000..d9ab67386f3c2 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/remove_props.test.ts @@ -0,0 +1,210 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { OpenAPIV3 } from 'openapi-types'; +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - remove custom x- props', () => { + it('removes "x-codegen-enabled" property', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + // @ts-expect-error custom prop + 'x-codegen-enabled': true, + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field1: { + type: 'integer', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/api/some_api': { + post: { + // @ts-expect-error custom prop + 'x-codegen-enabled': false, + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field2: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec3 = createOASDocument({ + paths: { + '/api/some_api': { + put: { + // @ts-expect-error custom prop + 'x-codegen-enabled': undefined, + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field2: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec1, + 2: spec2, + 3: spec3, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get).not.toMatchObject({ + 'x-codegen-enabled': expect.anything(), + }); + expect(bundledSpec.paths['/api/some_api']!.post).not.toMatchObject({ + 'x-codegen-enabled': expect.anything(), + }); + expect(bundledSpec.paths['/api/some_api']!.put).not.toMatchObject({ + 'x-codegen-enabled': expect.anything(), + }); + }); + + it('removes "x-inline" property', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + operationId: 'TestEndpointGet', + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/SchemaToInline', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + SchemaToInline: { + // @ts-expect-error OpenAPIV3.Document doesn't allow to add custom props to components.schemas + 'x-inline': true, + type: 'string', + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + const bundledSchema = ( + bundledSpec.paths['/api/some_api']!.get?.responses['200'] as OpenAPIV3.ResponseObject + ).content!['application/json'].schema; + + expect(bundledSchema).not.toMatchObject({ + 'x-inline': expect.anything(), + }); + }); + + it('removes "x-modify" property', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + operationId: 'TestEndpointGet', + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + // @ts-expect-error custom prop + 'x-modify': 'required', + type: 'object', + properties: { + field1: { + type: 'string', + }, + field2: { + type: 'integer', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + const bundledSchema = ( + bundledSpec.paths['/api/some_api']!.get?.responses['200'] as OpenAPIV3.ResponseObject + ).content!['application/json'].schema; + + expect(bundledSchema).not.toMatchObject({ + 'x-modify': expect.anything(), + }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/self_recursive_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/self_recursive_ref/expected.yaml deleted file mode 100644 index 2b75720a069b1..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/self_recursive_ref/expected.yaml +++ /dev/null @@ -1,24 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/CircularTestSchema' - -shared_components.schema.yaml: - components: - schemas: - CircularTestSchema: - type: string - data: - $ref: '#/components/schemas/CircularTestSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/self_recursive_ref/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/self_recursive_ref/spec.schema.yaml deleted file mode 100644 index d90a117818455..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/self_recursive_ref/spec.schema.yaml +++ /dev/null @@ -1,22 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/CircularTestSchema' - -components: - schemas: - CircularTestSchema: - type: string - data: - $ref: '#/components/schemas/CircularTestSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/skip_internal/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/skip_internal/expected.yaml deleted file mode 100644 index d8f6d6cb474bf..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/skip_internal/expected.yaml +++ /dev/null @@ -1,31 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - anyOf: - - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema1' - - type: object - -shared_components.schema.yaml: - components: - schemas: - TestSchema1: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/skip_internal/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/skip_internal/spec.schema.yaml deleted file mode 100644 index 1d172978a4240..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/skip_internal/spec.schema.yaml +++ /dev/null @@ -1,57 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - anyOf: - - $ref: '#/components/schemas/TestSchema1' - - $ref: '#/components/schemas/TestSchema2' - x-internal: true - - type: object - properties: - x-internal: true - field1: - $ref: '#/components/schemas/TestSchema3' - -components: - schemas: - TestSchema1: - # x-internal is not supported here - # x-internal: true - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - - TestSchema2: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 - - TestSchema3: - type: object - properties: - field1: - type: string - enum: [value1] - field2: - type: integer - minimum: 1 diff --git a/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/expected.yaml deleted file mode 100644 index 3015eb607287a..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/expected.yaml +++ /dev/null @@ -1,22 +0,0 @@ -spec1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/spec1.schema.yaml deleted file mode 100644 index 5b7f6a8718fcf..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/spec1.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer diff --git a/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/spec2.schema.yaml deleted file mode 100644 index 5a53977b69100..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/skip_internal_endpoint/spec2.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint POST - version: '2023-10-31' -paths: - /internal/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field2: - type: string diff --git a/packages/kbn-openapi-bundler/src/__test__/skip_nodes.test.ts b/packages/kbn-openapi-bundler/src/__test__/skip_nodes.test.ts new file mode 100644 index 0000000000000..35b1de2b3a0bc --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/skip_nodes.test.ts @@ -0,0 +1,168 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - skip nodes like internal endpoints', () => { + it('skips nodes with x-internal property', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + anyOf: [ + { + $ref: '#/components/schemas/TestSchema1', + }, + { + $ref: '#/components/schemas/TestSchema2', + // @ts-expect-error custom prop + 'x-internal': true, + }, + { + type: 'object', + properties: { + field1: { + type: 'string', + }, + internalField: { + 'x-internal': true, + type: 'string', + }, + }, + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + TestSchema1: { + type: 'object', + properties: { + field1: { + type: 'string', + enum: ['value1'], + }, + field2: { + type: 'integer', + minimum: 1, + }, + }, + }, + TestSchema2: { + type: 'string', + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + anyOf: [ + { + $ref: '#/components/schemas/TestSchema1', + }, + { + type: 'object', + properties: { + field1: { + type: 'string', + }, + }, + }, + ], + }, + }, + }, + }); + }); + + it('skips endpoints starting with /internal', async () => { + const spec1 = createOASDocument({ + paths: { + '/api/some_api': { + get: { + operationId: 'TestEndpointGet', + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field1: { + type: 'integer', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + const spec2 = createOASDocument({ + paths: { + '/internal/some_api': { + post: { + operationId: 'TestEndpointPost', + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + field2: { + type: 'string', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec1, + 2: spec2, + }) + ); + + expect(Object.keys(bundledSpec.paths)).not.toContain('/internal/some_api'); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/common.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/common.schema.yaml deleted file mode 100644 index b710c4e8b114b..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/common.schema.yaml +++ /dev/null @@ -1,13 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: {} - -components: - schemas: - TestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/expected.yaml deleted file mode 100644 index 48c9045d62ce5..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/spec_with_external_ref/expected.yaml +++ /dev/null @@ -1,25 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema' - -shared_components.schema.yaml: - components: - schemas: - TestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/spec_with_local_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/spec_with_local_ref/expected.yaml deleted file mode 100644 index 48c9045d62ce5..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/spec_with_local_ref/expected.yaml +++ /dev/null @@ -1,25 +0,0 @@ -spec.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema' - -shared_components.schema.yaml: - components: - schemas: - TestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/spec_with_local_ref/spec.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/spec_with_local_ref/spec.schema.yaml deleted file mode 100644 index 2339d5eb7aa59..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/spec_with_local_ref/spec.schema.yaml +++ /dev/null @@ -1,23 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/TestSchema' - -components: - schemas: - TestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/expected.yaml deleted file mode 100644 index dbe9fdb445e86..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/expected.yaml +++ /dev/null @@ -1,42 +0,0 @@ -spec1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer - -spec2.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint POST - version: '2023-10-31' - paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field2: - type: string - -shared_components.schema.yaml: - components: {} diff --git a/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/spec1.schema.yaml deleted file mode 100644 index 5b7f6a8718fcf..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/spec1.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field1: - type: integer diff --git a/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/spec2.schema.yaml deleted file mode 100644 index c3ba67e0b46ea..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_simple_specs/spec2.schema.yaml +++ /dev/null @@ -1,18 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint POST - version: '2023-10-31' -paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - field2: - type: string diff --git a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/common.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/common.schema.yaml deleted file mode 100644 index b710c4e8b114b..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/common.schema.yaml +++ /dev/null @@ -1,13 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint - version: '2023-10-31' -paths: {} - -components: - schemas: - TestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/expected.yaml b/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/expected.yaml deleted file mode 100644 index d3040ae511b2c..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/expected.yaml +++ /dev/null @@ -1,42 +0,0 @@ -spec1.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint GET - version: '2023-10-31' - paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema' - -spec2.schema.yaml: - openapi: 3.0.3 - info: - title: Test endpoint POST - version: '2023-10-31' - paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './shared_components.schema.yaml#/components/schemas/TestSchema' - -shared_components.schema.yaml: - components: - schemas: - TestSchema: - type: string - enum: - - value1 - - value2 diff --git a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/spec1.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/spec1.schema.yaml deleted file mode 100644 index c08570d69311c..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/spec1.schema.yaml +++ /dev/null @@ -1,15 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint GET - version: '2023-10-31' -paths: - /api/some_api: - get: - operationId: TestEndpointGet - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './common.schema.yaml#/components/schemas/TestSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/spec2.schema.yaml b/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/spec2.schema.yaml deleted file mode 100644 index 9dec5566875bb..0000000000000 --- a/packages/kbn-openapi-bundler/src/__test__/two_specs_with_external_ref/spec2.schema.yaml +++ /dev/null @@ -1,15 +0,0 @@ -openapi: 3.0.3 -info: - title: Test endpoint POST - version: '2023-10-31' -paths: - /api/some_api: - post: - operationId: TestEndpointPost - responses: - '200': - description: Successful response - content: - application/json: - schema: - $ref: './common.schema.yaml#/components/schemas/TestSchema' diff --git a/packages/kbn-openapi-bundler/src/__test__/x_modify.test.ts b/packages/kbn-openapi-bundler/src/__test__/x_modify.test.ts new file mode 100644 index 0000000000000..cdc53e8369345 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/__test__/x_modify.test.ts @@ -0,0 +1,340 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { bundleSpecs } from './bundle_specs'; +import { createOASDocument } from './create_oas_document'; + +describe('OpenAPI Bundler - x-modify', () => { + it('inlines references with x-modify property', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + anyOf: [ + { + $ref: '#/components/schemas/SchemaWithRequiredFields', + // @ts-expect-error custom prop + 'x-modify': 'partial', + }, + { + $ref: '#/components/schemas/SchemaWithOptionalFields', + 'x-modify': 'required', + }, + ], + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + SchemaWithRequiredFields: { + type: 'object', + properties: { + fieldA: { + type: 'string', + enum: ['value1'], + }, + fieldB: { + type: 'integer', + minimum: 1, + }, + }, + required: ['fieldA', 'fieldB'], + }, + SchemaWithOptionalFields: { + type: 'object', + properties: { + fieldC: { + type: 'string', + enum: ['value1'], + }, + fieldD: { + type: 'integer', + minimum: 1, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: { + anyOf: [ + { + type: 'object', + properties: { + fieldA: { + type: 'string', + enum: ['value1'], + }, + fieldB: { + type: 'integer', + minimum: 1, + }, + }, + }, + { + type: 'object', + properties: { + fieldC: { + type: 'string', + enum: ['value1'], + }, + fieldD: { + type: 'integer', + minimum: 1, + }, + }, + required: ['fieldC', 'fieldD'], + }, + ], + }, + }, + }, + }); + }); + + it('makes properties in an object schema node partial', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + // @ts-expect-error custom prop + 'x-modify': 'partial', + type: 'object', + properties: { + fieldA: { + type: 'string', + enum: ['value1'], + }, + fieldB: { + type: 'integer', + minimum: 1, + }, + }, + required: ['fieldA', 'fieldB'], + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: expect.not.objectContaining({ + required: expect.anything(), + }), + }, + }, + }); + }); + + it('makes properties in a referenced object schema node partial', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + // @ts-expect-error custom prop + 'x-modify': 'partial', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + TestSchema: { + type: 'object', + properties: { + fieldA: { + type: 'string', + enum: ['value1'], + }, + fieldB: { + type: 'integer', + minimum: 1, + }, + }, + required: ['fieldA', 'fieldB'], + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: expect.not.objectContaining({ + required: expect.anything(), + }), + }, + }, + }); + }); + + it('makes properties in an object schema node required', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + // @ts-expect-error custom prop + 'x-modify': 'required', + type: 'object', + properties: { + fieldA: { + type: 'string', + enum: ['value1'], + }, + fieldB: { + type: 'integer', + minimum: 1, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: expect.objectContaining({ + required: ['fieldA', 'fieldB'], + }), + }, + }, + }); + }); + + it('makes properties in a referenced object schema node required', async () => { + const spec = createOASDocument({ + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + $ref: '#/components/schemas/TestSchema', + // @ts-expect-error custom prop + 'x-modify': 'required', + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + TestSchema: { + type: 'object', + properties: { + fieldA: { + type: 'string', + enum: ['value1'], + }, + fieldB: { + type: 'integer', + minimum: 1, + }, + }, + }, + }, + }, + }); + + const [bundledSpec] = Object.values( + await bundleSpecs({ + 1: spec, + }) + ); + + expect(bundledSpec.paths['/api/some_api']!.get!.responses['200']).toMatchObject({ + content: { + 'application/json': { + schema: expect.objectContaining({ + required: ['fieldA', 'fieldB'], + }), + }, + }, + }); + }); +}); diff --git a/packages/kbn-openapi-bundler/src/bundler/bundle_document.ts b/packages/kbn-openapi-bundler/src/bundler/bundle_document.ts index 1f6884a87f677..502ede318ca6d 100644 --- a/packages/kbn-openapi-bundler/src/bundler/bundle_document.ts +++ b/packages/kbn-openapi-bundler/src/bundler/bundle_document.ts @@ -19,6 +19,11 @@ import { createModifyRequiredProcessor } from './document_processors/modify_requ import { X_CODEGEN_ENABLED, X_INLINE, X_INTERNAL, X_MODIFY } from './known_custom_props'; import { RemoveUnusedComponentsProcessor } from './document_processors/remove_unused_components'; import { isPlainObjectType } from '../utils/is_plain_object_type'; +import { + createFlattenFoldedAllOfItemsProcessor, + createMergeNonConflictingAllOfItemsProcessor, + createUnfoldSingleAllOfItemProcessor, +} from './document_processors/reduce_all_of_items'; export class SkipException extends Error { constructor(public documentPath: string, message: string) { @@ -72,7 +77,10 @@ export async function bundleDocument(absoluteDocumentPath: string): Promise `schemas` -> `SomeSchema` and `$ref` property's - * values is updated to `#/components/schemas/SomeSchema`. + * values are updated to be local e.g. `#/components/schemas/SomeSchema`. * - * Conditional dereference means inlining references when `inliningPredicate()` returns `true`. If `inliningPredicate` - * is not passed only bundling happens. + * Some references get inlined based on a condition (conditional dereference). It's controlled by inlining + * property whose value should be `true`. `inliningPropName` specifies inlining property name e.g. `x-inline`. + * Nodes having `x-inline: true` will be inlined. */ -export class BundleRefProcessor { - private refs: ResolvedRef[] = []; +export class BundleRefProcessor implements DocumentNodeProcessor { + private refs = new Map(); + private nodesToInline = new Set>(); constructor(private inliningPropName: string) {} - ref(node: RefNode, resolvedRef: ResolvedRef, context: TraverseDocumentContext): void { - if (!resolvedRef.pointer.startsWith('/components/schemas')) { - throw new Error(`$ref pointer must start with "/components/schemas"`); + onNodeEnter(node: Readonly): void { + if (hasProp(node, this.inliningPropName, true)) { + this.nodesToInline.add(node); } + } - if ( - hasProp(node, this.inliningPropName, true) || - hasProp(resolvedRef.refNode, this.inliningPropName, true) - ) { - inlineRef(node, resolvedRef); + onRefNodeLeave(node: RefNode, resolvedRef: ResolvedRef, context: TraverseDocumentContext): void { + if (!resolvedRef.pointer.startsWith('/components')) { + throw new Error( + `$ref pointer ${chalk.yellow( + resolvedRef.pointer + )} must start with "/components" at ${chalk.bold(resolvedRef.absolutePath)}` + ); + } - delete node[this.inliningPropName]; + if (this.nodesToInline.has(node) || this.nodesToInline.has(resolvedRef.refNode)) { + inlineRef(node, resolvedRef); } else { const rootDocument = this.extractRootDocument(context); @@ -46,16 +63,34 @@ export class BundleRefProcessor { rootDocument.components = {}; } + const ref = this.refs.get(resolvedRef.pointer); + + if (ref && !deepEqual(ref.refNode, resolvedRef.refNode)) { + const documentAbsolutePath = + this.extractParentContext(context).resolvedDocument.absolutePath; + + throw new Error( + `❌ Unable to bundle ${chalk.bold( + documentAbsolutePath + )} due to conflicts in references. Schema ${chalk.yellow( + ref.pointer + )} is defined in ${chalk.blue(ref.absolutePath)} and in ${chalk.magenta( + resolvedRef.absolutePath + )} but has not matching definitions.` + ); + } + node.$ref = this.saveComponent( resolvedRef, rootDocument.components as Record ); - this.refs.push(resolvedRef); + + this.refs.set(resolvedRef.pointer, resolvedRef); } } - getBundledRefs(): ResolvedRef[] { - return this.refs; + getBundledRefs(): IterableIterator { + return this.refs.values(); } private saveComponent(ref: ResolvedRef, components: Record): string { @@ -64,11 +99,15 @@ export class BundleRefProcessor { return `#${ref.pointer}`; } - private extractRootDocument(context: TraverseDocumentContext): Document { + private extractParentContext(context: TraverseDocumentContext): TraverseRootDocumentContext { while (isChildContext(context)) { context = context.parentContext; } - return context.resolvedDocument.document; + return context; + } + + private extractRootDocument(context: TraverseDocumentContext): Document { + return this.extractParentContext(context).resolvedDocument.document; } } diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_partial.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_partial.ts index 13c876b7579ca..5d667eff1bc80 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_partial.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_partial.ts @@ -17,7 +17,7 @@ import { X_MODIFY } from '../known_custom_props'; */ export function createModifyPartialProcessor(): DocumentNodeProcessor { return { - ref(node, resolvedRef) { + onRefNodeLeave(node, resolvedRef) { if (!hasProp(node, X_MODIFY, 'partial')) { return; } @@ -27,7 +27,7 @@ export function createModifyPartialProcessor(): DocumentNodeProcessor { delete node.required; }, - leave(node) { + onNodeLeave(node) { if (!hasProp(node, X_MODIFY, 'partial')) { return; } diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_required.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_required.ts index 14a9ac2ea25c6..769672d64a39d 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_required.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/modify_required.ts @@ -20,7 +20,7 @@ import { inlineRef } from './utils/inline_ref'; */ export function createModifyRequiredProcessor(): DocumentNodeProcessor { return { - ref(node, resolvedRef) { + onRefNodeLeave(node, resolvedRef) { if (!hasProp(node, X_MODIFY, 'required')) { return; } @@ -48,7 +48,7 @@ export function createModifyRequiredProcessor(): DocumentNodeProcessor { node.required = Object.keys(resolvedRef.refNode.properties); }, - leave(node) { + onNodeLeave(node) { if (!hasProp(node, X_MODIFY, 'required')) { return; } diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/flatten_folded_all_of_items.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/flatten_folded_all_of_items.ts new file mode 100644 index 0000000000000..dcf4b82a42af5 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/flatten_folded_all_of_items.ts @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DocumentNodeProcessor } from '../../types'; + +/** + * Creates a node processor to flatten folded `allOf` items. Folded means `allOf` has items + * which are another `allOf`s instead of being e.g. object schemas. + * + * Folded `allOf` schemas is usually a result of inlining references. + * + * Example: + * + * The following folded `allOf`s + * + * ```yaml + * allOf: + * - allOf: + * - type: object + * properties: + * fieldA: + * $ref: '#/components/schemas/FieldA' + * - type: object + * properties: + * fieldB: + * type: string + * ``` + * + * will be transformed to + * + * ```yaml + * allOf: + * - type: object + * properties: + * fieldA: + * $ref: '#/components/schemas/FieldA' + * - type: object + * properties: + * fieldB: + * type: string + * ``` + * + */ +export function createFlattenFoldedAllOfItemsProcessor(): DocumentNodeProcessor { + return { + onNodeLeave(node) { + if (!('allOf' in node) || !Array.isArray(node.allOf)) { + return; + } + + node.allOf = node.allOf.flatMap((childNode) => + 'allOf' in childNode ? childNode.allOf : childNode + ); + }, + }; +} diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/index.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/index.ts new file mode 100644 index 0000000000000..acfe16cc95c5e --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './flatten_folded_all_of_items'; +export * from './merge_non_conflicting_all_of_items'; +export * from './unfold_single_all_of_item'; diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/merge_non_conflicting_all_of_items.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/merge_non_conflicting_all_of_items.ts new file mode 100644 index 0000000000000..87895be952b96 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/merge_non_conflicting_all_of_items.ts @@ -0,0 +1,149 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { omit } from 'lodash'; +import deepEqual from 'fast-deep-equal'; +import { OpenAPIV3 } from 'openapi-types'; +import { isPlainObjectType } from '../../../utils/is_plain_object_type'; +import { DocumentNodeProcessor } from '../../types'; + +type MergedObjectSchema = Required> & + Pick; + +/** + * Creates a node processor to merge object schema definitions when there are no conflicts + * between them. + * + * After inlining references or any other transformations a schema may have `allOf` + * with multiple object schema items. Object schema has `properties` field describing object + * properties and optional `required` field to say which object properties are not optional. + * + * Conflicts between object schemas do now allow merge them. The following conflicts may appear + * + * - Two or more object schemas define the same named object field but definition is different + * - Some of object schemas have optional properties like `readOnly` + * - Two or more object schemas have conflicting optional properties values + * + * Example: + * + * The following `allOf` containing multiple object schemas + * + * ```yaml + * allOf: + * - type: object + * properties: + * fieldA: + * $ref: '#/components/schemas/FieldA' + * - type: object + * properties: + * fieldB: + * type: string + * ``` + * + * will be transformed to + * + * ```yaml + * allOf: + * - type: object + * properties: + * fieldA: + * $ref: '#/components/schemas/FieldA' + * fieldB: + * type: string + * ``` + */ +export function createMergeNonConflictingAllOfItemsProcessor(): DocumentNodeProcessor { + return { + onNodeLeave(allOfNode) { + if ( + !('allOf' in allOfNode) || + !Array.isArray(allOfNode.allOf) || + !canMergeObjectSchemas(allOfNode.allOf) + ) { + return; + } + + const resultItems: [ + MergedObjectSchema, + ...Array + ] = [ + { + type: 'object', + properties: {}, + }, + ]; + const mergedRequired = new Set(); + + for (const item of allOfNode.allOf) { + if (!isObjectNode(item) || !isPlainObjectType(item.properties)) { + resultItems.push(item); + continue; + } + + Object.assign(resultItems[0].properties, item.properties); + + for (const requiredField of item.required ?? []) { + mergedRequired.add(requiredField); + } + } + + if (mergedRequired.size > 0) { + resultItems[0].required = Array.from(mergedRequired); + } + + allOfNode.allOf = resultItems; + }, + }; +} + +/** + * Object schemas can be merged when + * + * - as minimum there are two object schemas + * - object schemas DO NOT contain conflicting fields (same name but different definition) + * - object schemas DO NOT contain fields besides `type`, `properties` and `required` + * + */ +function canMergeObjectSchemas(schemas: OpenAPIV3.SchemaObject[]): boolean { + const props = new Map(); + let objectSchemasCounter = 0; + + for (const node of schemas) { + if (!isObjectNode(node) || !isPlainObjectType(node.properties)) { + continue; + } + + if (getObjectSchemaExtraFieldNames(node).size > 0) { + return false; + } + + const nodePropNames = Object.keys(node.properties); + + for (const nodePropName of nodePropNames) { + const propSchema = props.get(nodePropName); + + if (propSchema && !deepEqual(propSchema, node.properties[nodePropName])) { + return false; + } + + props.set(nodePropName, node.properties[nodePropName]); + } + + objectSchemasCounter++; + } + + return objectSchemasCounter > 1; +} + +function getObjectSchemaExtraFieldNames(schema: OpenAPIV3.SchemaObject): Set { + return new Set(Object.keys(omit(schema, ['type', 'properties', 'required']))); +} + +function isObjectNode(node: unknown): boolean { + return isPlainObjectType(node) && node.type === 'object'; +} diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/unfold_single_all_of_item.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/unfold_single_all_of_item.ts new file mode 100644 index 0000000000000..67a056091db4c --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/reduce_all_of_items/unfold_single_all_of_item.ts @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { DocumentNodeProcessor } from '../../types'; + +/** + * Created a node processor to remove/unfold `allOf` with only single item. + * + * While a schema can be defined like that the most often reason why `allOf` has + * only one item is flattening folded `allOf` items via `flattenFoldedAllOfItems` + * node processor. + * + * Example: + * + * The following single item `allOf` + * + * ```yaml + * allOf: + * - type: object + * properties: + * fieldA: + * $ref: '#/components/schemas/FieldA' + * ``` + * + * will be transformed to + * + * ```yaml + * type: object + * properties: + * fieldA: + * $ref: '#/components/schemas/FieldA' + * ``` + * + */ +export function createUnfoldSingleAllOfItemProcessor(): DocumentNodeProcessor { + return { + onNodeLeave(node) { + if (!('allOf' in node) || !Array.isArray(node.allOf) || node.allOf.length > 1) { + return; + } + + Object.assign(node, node.allOf[0]); + delete node.allOf; + }, + }; +} diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_props.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_props.ts index 616d9db11f55e..02fb2036e2a0c 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_props.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_props.ts @@ -14,13 +14,13 @@ import { DocumentNodeProcessor } from '../types'; */ export function createRemovePropsProcessor(propNames: string[]): DocumentNodeProcessor { return { - leave(node) { + onNodeLeave(node) { if (!isPlainObjectType(node)) { return; } for (const propName of propNames) { - if (!node[propName]) { + if (!Object.hasOwn(node, propName)) { continue; } diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_unused_components.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_unused_components.ts index 1f5053d4667fe..393f986ec5a1a 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_unused_components.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/remove_unused_components.ts @@ -8,7 +8,7 @@ import { hasProp } from '../../utils/has_prop'; import { isPlainObjectType } from '../../utils/is_plain_object_type'; -import { PlainObjectNode, ResolvedRef } from '../types'; +import { DocumentNodeProcessor, PlainObjectNode, ResolvedRef } from '../types'; /** * Helps to remove unused components. @@ -17,10 +17,10 @@ import { PlainObjectNode, ResolvedRef } from '../types'; * and then `removeUnusedComponents()` should be invoked after document processing to perform * actual unused components deletion. */ -export class RemoveUnusedComponentsProcessor { +export class RemoveUnusedComponentsProcessor implements DocumentNodeProcessor { private refs = new Set(); - ref(node: unknown, resolvedRef: ResolvedRef): void { + onRefNodeLeave(node: unknown, resolvedRef: ResolvedRef): void { // If the reference has been inlined by one of the previous processors skip it if (!hasProp(node, '$ref')) { return; diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_internal_path.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_internal_path.ts index 42769eab7a68a..280002ce13890 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_internal_path.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_internal_path.ts @@ -13,7 +13,7 @@ import { DocumentNodeProcessor } from '../types'; */ export function createSkipInternalPathProcessor(skipPathPrefix: string): DocumentNodeProcessor { return { - enter(_, context) { + shouldRemove(_, context) { if (typeof context.parentKey === 'number') { return false; } diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_node_with_internal_prop.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_node_with_internal_prop.ts index 4931036bcd1bc..b674cfb8c0b9c 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_node_with_internal_prop.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/skip_node_with_internal_prop.ts @@ -16,6 +16,6 @@ export function createSkipNodeWithInternalPropProcessor( skipProperty: string ): DocumentNodeProcessor { return { - enter: (node) => skipProperty in node, + shouldRemove: (node) => skipProperty in node, }; } diff --git a/packages/kbn-openapi-bundler/src/bundler/document_processors/utils/inline_ref.ts b/packages/kbn-openapi-bundler/src/bundler/document_processors/utils/inline_ref.ts index 3106bf9cbc95d..fac6c519980b9 100644 --- a/packages/kbn-openapi-bundler/src/bundler/document_processors/utils/inline_ref.ts +++ b/packages/kbn-openapi-bundler/src/bundler/document_processors/utils/inline_ref.ts @@ -6,15 +6,11 @@ * Side Public License, v 1. */ -import { cloneDeep } from 'lodash'; import { DocumentNode, ResolvedRef } from '../../types'; import { InlinableRefNode } from '../types'; export function inlineRef(node: DocumentNode, resolvedRef: ResolvedRef): void { - // Make sure unwanted side effects don't happen when child nodes are processed - const deepClone = cloneDeep(resolvedRef.refNode); - - Object.assign(node, deepClone); + Object.assign(node, resolvedRef.refNode); delete (node as InlinableRefNode).$ref; } diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents.ts deleted file mode 100644 index e27253cefc1c9..0000000000000 --- a/packages/kbn-openapi-bundler/src/bundler/merge_documents.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import deepEqual from 'fast-deep-equal'; -import { basename, dirname, join } from 'path'; -import chalk from 'chalk'; -import { parseRef } from '../utils/parse_ref'; -import { insertRefByPointer } from '../utils/insert_by_json_pointer'; -import { DocumentNodeProcessor, PlainObjectNode, ResolvedDocument, ResolvedRef } from './types'; -import { BundledDocument } from './bundle_document'; -import { processDocument } from './process_document'; - -type MergedDocuments = Record; - -type MergedResult = Record; - -const SHARED_COMPONENTS_FILE_NAME = 'shared_components.schema.yaml'; - -export async function mergeDocuments(bundledDocuments: BundledDocument[]): Promise { - const mergedDocuments: MergedDocuments = {}; - const componentsMap = new Map(); - - for (const bundledDocument of bundledDocuments) { - mergeRefsToMap(bundledDocument.bundledRefs, componentsMap); - - delete bundledDocument.document.components; - - await setRefsFileName(bundledDocument, SHARED_COMPONENTS_FILE_NAME); - mergeDocument(bundledDocument, mergedDocuments); - } - - const result: MergedResult = {}; - - for (const fileName of Object.keys(mergedDocuments)) { - result[fileName] = mergedDocuments[fileName].document; - } - - result[SHARED_COMPONENTS_FILE_NAME] = { - components: componentsMapToComponents(componentsMap), - }; - - return result; -} - -function mergeDocument(resolvedDocument: ResolvedDocument, mergeResult: MergedDocuments): void { - const fileName = basename(resolvedDocument.absolutePath); - - if (!mergeResult[fileName]) { - mergeResult[fileName] = resolvedDocument; - return; - } - - const nonConflictFileName = generateNonConflictingFilePath( - resolvedDocument.absolutePath, - mergeResult - ); - - mergeResult[nonConflictFileName] = resolvedDocument; -} - -function generateNonConflictingFilePath( - documentAbsolutePath: string, - mergeResult: MergedDocuments -): string { - let pathToDocument = dirname(documentAbsolutePath); - let suggestedName = basename(documentAbsolutePath); - - while (mergeResult[suggestedName]) { - suggestedName = `${basename(pathToDocument)}_${suggestedName}`; - pathToDocument = join(pathToDocument, '..'); - } - - return suggestedName; -} - -function mergeRefsToMap(bundledRefs: ResolvedRef[], componentsMap: Map): void { - for (const bundledRef of bundledRefs) { - const existingRef = componentsMap.get(bundledRef.pointer); - - if (!existingRef) { - componentsMap.set(bundledRef.pointer, bundledRef); - continue; - } - - if (deepEqual(existingRef.refNode, bundledRef.refNode)) { - continue; - } - - throw new Error( - `❌ Unable to bundle documents due to conflicts in references. Schema ${chalk.yellow( - bundledRef.pointer - )} is defined in ${chalk.blue(existingRef.absolutePath)} and in ${chalk.magenta( - bundledRef.absolutePath - )} but has not matching definitions.` - ); - } -} - -function componentsMapToComponents( - componentsMap: Map -): Record { - const result: Record = {}; - - for (const resolvedRef of componentsMap.values()) { - insertRefByPointer(resolvedRef.pointer, resolvedRef.refNode, result); - } - - return result; -} - -async function setRefsFileName( - resolvedDocument: ResolvedDocument, - fileName: string -): Promise { - // We don't need to follow references - const stubRefResolver = { - resolveRef: async (refDocumentAbsolutePath: string, pointer: string): Promise => ({ - absolutePath: refDocumentAbsolutePath, - pointer, - document: resolvedDocument.document, - refNode: {}, - }), - resolveDocument: async (): Promise => ({ - absolutePath: '', - document: resolvedDocument.document, - }), - }; - const setRefFileProcessor: DocumentNodeProcessor = { - ref: (node) => { - const { pointer } = parseRef(node.$ref); - - node.$ref = `./${fileName}#${pointer}`; - }, - }; - - await processDocument(resolvedDocument, stubRefResolver, [setRefFileProcessor]); -} diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents/create_blank_oas_document.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents/create_blank_oas_document.ts new file mode 100644 index 0000000000000..925471719b345 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/merge_documents/create_blank_oas_document.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { OpenAPIV3 } from 'openapi-types'; + +export function createBlankOpenApiDocument( + oasVersion: string, + info: OpenAPIV3.InfoObject +): OpenAPIV3.Document { + return { + openapi: oasVersion, + info, + servers: [ + { + url: 'http://{kibana_host}:{port}', + variables: { + kibana_host: { + default: 'localhost', + }, + port: { + default: '5601', + }, + }, + }, + ], + security: [ + { + BasicAuth: [], + }, + ], + paths: {}, + components: { + securitySchemes: { + BasicAuth: { + type: 'http', + scheme: 'basic', + }, + }, + }, + }; +} diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents/index.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents/index.ts new file mode 100644 index 0000000000000..554cf7cd2c2c5 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/merge_documents/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './merge_documents'; diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_documents.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_documents.ts new file mode 100644 index 0000000000000..03275dbf3f3de --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_documents.ts @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import chalk from 'chalk'; +import { OpenAPIV3 } from 'openapi-types'; +import { logger } from '../../logger'; +import { BundledDocument } from '../bundle_document'; +import { mergePaths } from './merge_paths'; +import { mergeSharedComponents } from './merge_shared_components'; + +export async function mergeDocuments( + bundledDocuments: BundledDocument[], + blankOasFactory: (oasVersion: string, apiVersion: string) => OpenAPIV3.Document +): Promise> { + const bundledDocumentsByVersion = splitByVersion(bundledDocuments); + const mergedByVersion = new Map(); + + for (const [apiVersion, singleVersionBundledDocuments] of bundledDocumentsByVersion.entries()) { + const oasVersion = extractOasVersion(singleVersionBundledDocuments); + const mergedDocument = blankOasFactory(oasVersion, apiVersion); + + mergedDocument.paths = mergePaths(singleVersionBundledDocuments); + mergedDocument.components = { + // Copy components defined in the blank OpenAPI document + ...mergedDocument.components, + ...mergeSharedComponents(singleVersionBundledDocuments), + }; + + mergedByVersion.set(mergedDocument.info.version, mergedDocument); + } + + return mergedByVersion; +} + +function splitByVersion(bundledDocuments: BundledDocument[]): Map { + const splitBundledDocuments = new Map(); + + for (const bundledDocument of bundledDocuments) { + const documentInfo = bundledDocument.document.info as OpenAPIV3.InfoObject; + + if (!documentInfo.version) { + logger.warning(`OpenAPI version is missing in ${chalk.bold(bundledDocument.absolutePath)}`); + + continue; + } + + const versionBundledDocuments = splitBundledDocuments.get(documentInfo.version); + + if (!versionBundledDocuments) { + splitBundledDocuments.set(documentInfo.version, [bundledDocument]); + } else { + versionBundledDocuments.push(bundledDocument); + } + } + + return splitBundledDocuments; +} + +function extractOasVersion(bundledDocuments: BundledDocument[]): string { + if (bundledDocuments.length === 0) { + throw new Error('Empty bundled document list'); + } + + const firstBundledDocument = bundledDocuments[0]; + + for (let i = 1; i < bundledDocuments.length; ++i) { + if ( + !areOasVersionsEqual( + bundledDocuments[i].document.openapi as string, + firstBundledDocument.document.openapi as string + ) + ) { + throw new Error( + `OpenAPI specs must use the same OpenAPI version, encountered ${chalk.blue( + bundledDocuments[i].document.openapi + )} at ${chalk.bold(bundledDocuments[i].absolutePath)} does not match ${chalk.blue( + firstBundledDocument.document.openapi + )} at ${chalk.bold(firstBundledDocument.absolutePath)}` + ); + } + } + + const version = firstBundledDocument.document.openapi as string; + + // Automatically promote to the recent OAS 3.0 version which is 3.0.3 + // 3.0.3 is the version used in the specification https://swagger.io/specification/v3/ + return version < '3.0.3' ? '3.0.3' : version; +} + +/** + * Tells if versions are equal by comparing only major and minor OAS version parts + */ +function areOasVersionsEqual(versionA: string, versionB: string): boolean { + // versionA.substring(0, 3) results in `3.0` or `3.1` + return versionA.substring(0, 3) === versionB.substring(0, 3); +} diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_paths.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_paths.ts new file mode 100644 index 0000000000000..1d541b5bb513e --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_paths.ts @@ -0,0 +1,159 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import chalk from 'chalk'; +import { OpenAPIV3 } from 'openapi-types'; +import { BundledDocument } from '../bundle_document'; + +export function mergePaths(bundledDocuments: BundledDocument[]): OpenAPIV3.PathsObject { + const mergedPaths: Record = {}; + + for (const { absolutePath, document } of bundledDocuments) { + if (!document.paths) { + continue; + } + + const pathsObject = document.paths as Record; + + for (const path of Object.keys(pathsObject)) { + if (!mergedPaths[path]) { + mergedPaths[path] = {}; + } + + const sourcePathItem = pathsObject[path]; + const mergedPathItem = mergedPaths[path]; + + try { + mergeOptionalPrimitiveValue('summary', sourcePathItem, mergedPathItem); + } catch { + throw new Error( + `❌ Unable to bundle ${chalk.bold(absolutePath)} since ${chalk.bold( + `paths.${path}.summary` + )}'s value ${chalk.blue( + sourcePathItem.summary + )} doesn't match to already encountered ${chalk.magenta(mergedPathItem.summary)}.` + ); + } + + try { + mergeOptionalPrimitiveValue('description', sourcePathItem, mergedPathItem); + } catch { + throw new Error( + `❌ Unable to bundle ${chalk.bold(absolutePath)} since ${chalk.bold( + `paths.${path}.description` + )}'s value ${chalk.blue( + sourcePathItem.description + )} doesn't match to already encountered ${chalk.magenta(mergedPathItem.description)}.` + ); + } + + try { + mergeOperations(sourcePathItem, mergedPathItem); + } catch (e) { + throw new Error( + `❌ Unable to bundle ${chalk.bold(absolutePath)} since ${chalk.bold( + `paths.${path}.${e.message}` + )}'s definition is duplicated and differs from previously encountered.` + ); + } + + try { + mergeParameters(sourcePathItem, mergedPathItem); + } catch (e) { + throw new Error( + `❌ Unable to bundle ${chalk.bold(absolutePath)} since ${chalk.bold( + `paths.${path}.parameters.[${e.message}]` + )}'s definition is duplicated and differs from previously encountered.` + ); + } + } + } + + return mergedPaths; +} + +const KNOWN_HTTP_METHODS = [ + OpenAPIV3.HttpMethods.HEAD, + OpenAPIV3.HttpMethods.GET, + OpenAPIV3.HttpMethods.POST, + OpenAPIV3.HttpMethods.PATCH, + OpenAPIV3.HttpMethods.PUT, + OpenAPIV3.HttpMethods.OPTIONS, + OpenAPIV3.HttpMethods.DELETE, + OpenAPIV3.HttpMethods.TRACE, +]; + +function mergeOperations( + sourcePathItem: OpenAPIV3.PathItemObject, + mergedPathItem: OpenAPIV3.PathItemObject +) { + for (const httpMethod of KNOWN_HTTP_METHODS) { + if (!sourcePathItem[httpMethod]) { + continue; + } + + if (mergedPathItem[httpMethod]) { + throw new Error(httpMethod); + } + + mergedPathItem[httpMethod] = sourcePathItem[httpMethod]; + } +} + +function mergeOptionalPrimitiveValue( + fieldName: FieldName, + source: { [field in FieldName]?: unknown }, + merged: { [field in FieldName]?: unknown } +): void { + if (!source[fieldName]) { + return; + } + + if (source[fieldName] && !merged[fieldName]) { + merged[fieldName] = source[fieldName]; + } + + if (source[fieldName] !== merged[fieldName]) { + throw new Error(`${fieldName} merge conflict`); + } +} + +function mergeParameters( + sourcePathItem: OpenAPIV3.PathItemObject, + mergedPathItem: OpenAPIV3.PathItemObject +): void { + if (!sourcePathItem.parameters) { + return; + } + + if (!mergedPathItem.parameters) { + mergedPathItem.parameters = []; + } + + for (const sourceParameter of sourcePathItem.parameters) { + if ('$ref' in sourceParameter) { + const existing = mergedPathItem.parameters.find( + (x) => '$ref' in x && x.$ref === sourceParameter.$ref + ); + + if (existing) { + continue; + } + } else { + const existing = mergedPathItem.parameters.find( + (x) => !('$ref' in x) && x.name === sourceParameter.name && x.in === sourceParameter.in + ); + + if (existing) { + throw new Error(`{ "name": "${sourceParameter.name}", "in": "${sourceParameter.in}" }`); + } + } + + mergedPathItem.parameters.push(sourceParameter); + } +} diff --git a/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_shared_components.ts b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_shared_components.ts new file mode 100644 index 0000000000000..72f55645fa717 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/merge_documents/merge_shared_components.ts @@ -0,0 +1,54 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { OpenAPIV3 } from 'openapi-types'; +import deepEqual from 'fast-deep-equal'; +import chalk from 'chalk'; +import { insertRefByPointer } from '../../utils/insert_by_json_pointer'; +import { ResolvedRef } from '../types'; +import { BundledDocument } from '../bundle_document'; + +export function mergeSharedComponents( + bundledDocuments: BundledDocument[] +): OpenAPIV3.ComponentsObject { + const componentsMap = new Map(); + const mergedComponents: Record = {}; + + for (const bundledDocument of bundledDocuments) { + mergeRefsToMap(bundledDocument.bundledRefs, componentsMap); + } + + for (const resolvedRef of componentsMap.values()) { + insertRefByPointer(resolvedRef.pointer, resolvedRef.refNode, mergedComponents); + } + + return mergedComponents; +} + +function mergeRefsToMap(bundledRefs: ResolvedRef[], componentsMap: Map): void { + for (const bundledRef of bundledRefs) { + const existingRef = componentsMap.get(bundledRef.pointer); + + if (!existingRef) { + componentsMap.set(bundledRef.pointer, bundledRef); + continue; + } + + if (deepEqual(existingRef.refNode, bundledRef.refNode)) { + continue; + } + + throw new Error( + `❌ Unable to bundle documents due to conflicts in references. Schema ${chalk.yellow( + bundledRef.pointer + )} is defined in ${chalk.blue(existingRef.absolutePath)} and in ${chalk.magenta( + bundledRef.absolutePath + )} but has not matching definitions.` + ); + } +} diff --git a/packages/kbn-openapi-bundler/src/bundler/process_document.test.ts b/packages/kbn-openapi-bundler/src/bundler/process_document.test.ts index d78a4ce515b65..fd6e73d4272c6 100644 --- a/packages/kbn-openapi-bundler/src/bundler/process_document.test.ts +++ b/packages/kbn-openapi-bundler/src/bundler/process_document.test.ts @@ -19,13 +19,13 @@ describe('processDocument', () => { document: {} as Document, }; const calls: string[] = []; - const processor1 = { - leave() { + const processor1: DocumentNodeProcessor = { + onNodeLeave() { calls.push('processor1'); }, }; - const processor2 = { - leave() { + const processor2: DocumentNodeProcessor = { + onNodeLeave() { calls.push('processor2'); }, }; @@ -46,14 +46,17 @@ describe('processDocument', () => { const calls: string[] = []; const refResolver = new RefResolver(); const processor: DocumentNodeProcessor = { - enter(node) { + onNodeEnter(node) { calls.push(`enter - ${(node as NodeWithId).id}`); + }, + shouldRemove(node) { + calls.push(`shouldRemove - ${(node as NodeWithId).id}`); return false; }, - ref(node) { + onRefNodeLeave(node) { calls.push(`ref - ${(node as NodeWithId).id}`); }, - leave(node) { + onNodeLeave(node) { calls.push(`leave - ${(node as NodeWithId).id}`); }, }; @@ -82,8 +85,11 @@ describe('processDocument', () => { ); expect(calls).toEqual([ + 'shouldRemove - root', 'enter - root', + 'shouldRemove - t1', 'enter - t1', + 'shouldRemove - TestRef', 'enter - TestRef', 'leave - TestRef', 'ref - t1', @@ -92,7 +98,7 @@ describe('processDocument', () => { ]); }); - it('removes a node after "enter" callback returned true', async () => { + it('removes a node after "shouldRemove" callback returned true', async () => { const nodeToRemove = { id: 't2', foo: 'bar', @@ -104,7 +110,7 @@ describe('processDocument', () => { t2: nodeToRemove, }; const removeNodeProcessor: DocumentNodeProcessor = { - enter(node) { + shouldRemove(node) { return node === nodeToRemove; }, }; diff --git a/packages/kbn-openapi-bundler/src/bundler/process_document.ts b/packages/kbn-openapi-bundler/src/bundler/process_document.ts index 1efe64b87b4ed..29344fa4aa7c5 100644 --- a/packages/kbn-openapi-bundler/src/bundler/process_document.ts +++ b/packages/kbn-openapi-bundler/src/bundler/process_document.ts @@ -67,11 +67,13 @@ export async function processDocument( traverseItem.visitedDocumentNodes.add(traverseItem.node); - if (shouldSkipNode(traverseItem, processors)) { + if (shouldRemoveSubTree(traverseItem, processors)) { removeNode(traverseItem); continue; } + applyEnterProcessors(traverseItem, processors); + postOrderTraversalStack.push(traverseItem); if (isRefNode(traverseItem.node)) { @@ -144,14 +146,14 @@ export async function processDocument( // If ref has been inlined by one of the processors it's not a ref node anymore // so we can skip the following processors if (isRefNode(traverseItem.node) && traverseItem.resolvedRef) { - processor.ref?.( + processor.onRefNodeLeave?.( traverseItem.node as RefNode, traverseItem.resolvedRef, traverseItem.context ); } - processor.leave?.(traverseItem.node, traverseItem.context); + processor.onNodeLeave?.(traverseItem.node, traverseItem.context); } } } @@ -165,9 +167,28 @@ export function isRefNode(node: DocumentNode): node is { $ref: string } { return isPlainObject(node) && '$ref' in node; } -function shouldSkipNode(traverseItem: TraverseItem, processors: DocumentNodeProcessor[]): boolean { - return processors?.some((p) => - p.enter?.(traverseItem.node, { +function applyEnterProcessors( + traverseItem: TraverseItem, + processors: DocumentNodeProcessor[] +): void { + for (const processor of processors) { + processor.onNodeEnter?.(traverseItem.node, { + ...traverseItem.context, + parentNode: traverseItem.parentNode, + parentKey: traverseItem.parentKey, + }); + } +} + +/** + * Removes a node with its subtree + */ +function shouldRemoveSubTree( + traverseItem: TraverseItem, + processors: DocumentNodeProcessor[] +): boolean { + return processors.some((p) => + p.shouldRemove?.(traverseItem.node, { ...traverseItem.context, parentNode: traverseItem.parentNode, parentKey: traverseItem.parentKey, diff --git a/packages/kbn-openapi-bundler/src/bundler/types.ts b/packages/kbn-openapi-bundler/src/bundler/types.ts index 06aa533c9122a..fa8a7f3c83120 100644 --- a/packages/kbn-openapi-bundler/src/bundler/types.ts +++ b/packages/kbn-openapi-bundler/src/bundler/types.ts @@ -94,41 +94,70 @@ export type TraverseDocumentEntryContext = TraverseDocumentContext & { }; /** - * Entry processor controls when a node should be omitted from the result document. + * Should remove processor controls whether a node and all its descendants + * should be omitted from the further processing and result document. + * + * When result is + * + * - `true` - omit the node + * - `false` - keep the node * - * When result is `true` - omit the node. */ -export type EntryProcessorFn = ( +export type ShouldRemoveNodeProcessorFn = ( node: Readonly, context: TraverseDocumentEntryContext ) => boolean; -export type LeaveProcessorFn = (node: DocumentNode, context: TraverseDocumentContext) => void; +export type OnNodeEntryProcessorFn = ( + node: Readonly, + context: TraverseDocumentEntryContext +) => void; + +export type OnNodeLeaveProcessorFn = (node: DocumentNode, context: TraverseDocumentContext) => void; -export type RefProcessorFn = ( +export type OnRefNodeLeaveProcessorFn = ( node: RefNode, resolvedRef: ResolvedRef, context: TraverseDocumentContext ) => void; /** + * OpenAPI tree is traversed in two phases + * + * 1. Diving from root to leaves. + * Allows to analyze unprocessed nodes and calculate any metrics if necessary. + * + * 2. Post order traversal from leaves to root. + * Mostly to transform the OpenAPI document. + * * Document or document node processor gives flexibility in modifying OpenAPI specs and/or collect some metrics. - * For convenience it defined handlers invoked upon action or specific node type. + * For convenience there are following node processors supported + * + * 1st phase + * + * - `onNodeEnter` - Callback function is invoked at the first phase (diving from root to leaves) while + * traversing the document. It can be considered in a similar way events dive in DOM during + * capture phase. In the other words it means entering a subtree. It allows to analyze + * unprocessed nodes. * - * Currently the following node types supported + * - `shouldRemove` - Callback function is invoked at the first phase (diving from root to leaves) while + * traversing the document. It controls whether the node will be excluded from further processing + * and the result document eventually. Returning `true` excluded the node while returning `false` + * passes the node untouched. * - * - ref - Callback function is invoked upon leaving ref node (a node having `$ref` key) + * 2nd phase * - * and the following actions + * - `onNodeLeave` - Callback function is invoked upon leaving any type of node. It give an opportunity to + * modify the document like inline references or remove unwanted properties. It can be considered + * in a similar way event bubble in DOM during bubble phase. In the other words it means leaving + * a subtree. * - * - enter - Callback function is invoked upon entering any type of node element including ref nodes. It doesn't allow - * to modify node's content but provides an ability to remove the element by returning `true`. + * - `onRefNodeLeave` - Callback function is invoked upon leaving a reference node (a node having `$ref` key) * - * - leave - Callback function is invoked upon leaving any type of node. It give an opportunity to modify the document like - * dereference refs or remove unwanted properties. */ export interface DocumentNodeProcessor { - enter?: EntryProcessorFn; - leave?: LeaveProcessorFn; - ref?: RefProcessorFn; + shouldRemove?: ShouldRemoveNodeProcessorFn; + onNodeEnter?: OnNodeEntryProcessorFn; + onNodeLeave?: OnNodeLeaveProcessorFn; + onRefNodeLeave?: OnRefNodeLeaveProcessorFn; } diff --git a/packages/kbn-openapi-bundler/src/openapi_bundler.test.ts b/packages/kbn-openapi-bundler/src/openapi_bundler.test.ts deleted file mode 100644 index eaed80727dee8..0000000000000 --- a/packages/kbn-openapi-bundler/src/openapi_bundler.test.ts +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { existsSync, rmSync } from 'fs'; -import { basename, join } from 'path'; -import { bundle } from './openapi_bundler'; -import { readYamlDocument } from './utils/read_yaml_document'; - -const rootPath = join(__dirname, '__test__'); -const targetAbsoluteFilePath = join(rootPath, 'bundled.yaml'); - -describe('OpenAPI Bundler', () => { - afterEach(() => { - removeTargetFile(); - }); - - it('bundles two simple specs', async () => { - await bundleFolder('two_simple_specs'); - await expectBundleToMatchFile('two_simple_specs', 'expected.yaml'); - }); - - it('bundles one file with a local reference', async () => { - await bundleFolder('spec_with_local_ref'); - await expectBundleToMatchFile('spec_with_local_ref', 'expected.yaml'); - }); - - it('bundles one file with an external reference', async () => { - await bundleFolder('spec_with_external_ref'); - await expectBundleToMatchFile('spec_with_external_ref', 'expected.yaml'); - }); - - it('bundles files with external references', async () => { - await bundleFolder('two_specs_with_external_ref'); - await expectBundleToMatchFile('two_specs_with_external_ref', 'expected.yaml'); - }); - - // Fails because `writeYamlDocument()` has `noRefs: true` setting - // it('bundles recursive spec', async () => { - // await bundleFolder('recursive_spec'); - // await expectBundleToMatchFile('recursive_spec', 'expected.yaml'); - // }); - - it('bundles specs with recursive references', async () => { - await bundleFolder('recursive_ref_specs'); - await expectBundleToMatchFile('recursive_ref_specs', 'expected.yaml'); - }); - - it('bundles spec with a self-recursive reference', async () => { - await bundleFolder('self_recursive_ref'); - await expectBundleToMatchFile('self_recursive_ref', 'expected.yaml'); - }); - - it('bundles one endpoint with different versions', async () => { - await bundleFolder('different_endpoint_versions'); - await expectBundleToMatchFile('different_endpoint_versions', 'expected.yaml'); - }); - - it('bundles spec with different OpenAPI versions', async () => { - await bundleFolder('different_openapi_versions'); - await expectBundleToMatchFile('different_openapi_versions', 'expected.yaml'); - }); - - it('bundles conflicting but equal references', async () => { - await bundleFolder('conflicting_but_equal_refs_in_different_specs'); - await expectBundleToMatchFile('conflicting_but_equal_refs_in_different_specs', 'expected.yaml'); - }); - - it('fails to bundle conflicting references encountered in separate specs', async () => { - await expectBundlingError( - 'conflicting_refs_in_different_specs', - /\/components\/schemas\/ConflictTestSchema/ - ); - }); - - describe('x-modify', () => { - it('makes properties in an object node partial', async () => { - await bundleFolder('modify_partial_node'); - await expectBundleToMatchFile('modify_partial_node', 'expected.yaml'); - }); - - it('makes properties in a referenced object node partial', async () => { - await bundleFolder('modify_partial_ref'); - await expectBundleToMatchFile('modify_partial_ref', 'expected.yaml'); - }); - - it('makes properties in an object node required', async () => { - await bundleFolder('modify_required_node'); - await expectBundleToMatchFile('modify_required_node', 'expected.yaml'); - }); - - it('makes properties in a referenced object node required', async () => { - await bundleFolder('modify_required_ref'); - await expectBundleToMatchFile('modify_required_ref', 'expected.yaml'); - }); - }); - - describe('x-inline', () => { - it('inlines a reference', async () => { - await bundleFolder('inline_ref'); - await expectBundleToMatchFile('inline_ref', 'expected.yaml'); - }); - }); - - describe('skip internal', () => { - it('skips nodes with x-internal property', async () => { - await bundleFolder('skip_internal'); - await expectBundleToMatchFile('skip_internal', 'expected.yaml'); - }); - - it('skips endpoints starting with /internal', async () => { - await bundleFolder('skip_internal_endpoint'); - await expectBundleToMatchFile('skip_internal_endpoint', 'expected.yaml'); - }); - }); -}); - -async function bundleFolder(folderName: string): Promise { - await expect( - bundle({ - rootDir: join(rootPath, folderName), - sourceGlob: '*.schema.yaml', - outputFilePath: join('..', basename(targetAbsoluteFilePath)), - }) - ).resolves.toBeUndefined(); -} - -async function expectBundlingError( - folderName: string, - error: string | RegExp | jest.Constructable | Error | undefined -): Promise { - return await expect( - bundle({ - rootDir: join(rootPath, folderName), - sourceGlob: '*.schema.yaml', - outputFilePath: join('..', basename(targetAbsoluteFilePath)), - }) - ).rejects.toThrowError(error); -} - -async function expectBundleToMatchFile( - folderName: string, - expectedFileName: string -): Promise { - expect(existsSync(targetAbsoluteFilePath)).toBeTruthy(); - - const bundledSpec = await readYamlDocument(targetAbsoluteFilePath); - const expectedAbsoluteFilePath = join(rootPath, folderName, expectedFileName); - const expectedSpec = await readYamlDocument(expectedAbsoluteFilePath); - - expect(bundledSpec).toEqual(expectedSpec); -} - -function removeTargetFile(): void { - if (existsSync(targetAbsoluteFilePath)) { - rmSync(targetAbsoluteFilePath, { force: true }); - } -} diff --git a/packages/kbn-openapi-bundler/src/openapi_bundler.ts b/packages/kbn-openapi-bundler/src/openapi_bundler.ts index 451b0ff700bae..554758b622995 100644 --- a/packages/kbn-openapi-bundler/src/openapi_bundler.ts +++ b/packages/kbn-openapi-bundler/src/openapi_bundler.ts @@ -7,43 +7,75 @@ */ import chalk from 'chalk'; +import { isUndefined, omitBy } from 'lodash'; +import { OpenAPIV3 } from 'openapi-types'; import globby from 'globby'; -import { basename, dirname, join, resolve } from 'path'; +import { basename, dirname, resolve } from 'path'; import { BundledDocument, bundleDocument, SkipException } from './bundler/bundle_document'; import { mergeDocuments } from './bundler/merge_documents'; import { removeFilesByGlob } from './utils/remove_files_by_glob'; import { logger } from './logger'; import { writeYamlDocument } from './utils/write_yaml_document'; +import { createBlankOpenApiDocument } from './bundler/merge_documents/create_blank_oas_document'; export interface BundlerConfig { - rootDir: string; sourceGlob: string; outputFilePath: string; + specInfo?: Omit, 'version'>; } -export const bundle = async (config: BundlerConfig) => { - const { - rootDir, - sourceGlob, - outputFilePath: relativeOutputFilePath = 'target/openapi/bundled.schema.yaml', - } = config; - +export const bundle = async ({ + sourceGlob, + outputFilePath = 'bundled-{version}.schema.yaml', + specInfo, +}: BundlerConfig) => { logger.debug(chalk.bold(`Bundling API route schemas`)); - logger.debug(chalk.bold(`Working directory: ${chalk.underline(rootDir)}`)); - logger.debug(`👀 Searching for source files`); + logger.debug(`👀 Searching for source files in ${chalk.underline(sourceGlob)}`); - const outputFilePath = join(rootDir, relativeOutputFilePath); - const sourceFilesGlob = resolve(rootDir, sourceGlob); + const sourceFilesGlob = resolve(sourceGlob); const schemaFilePaths = await globby([sourceFilesGlob]); logger.info(`🕵️‍♀️ Found ${schemaFilePaths.length} schemas`); logSchemas(schemaFilePaths); logger.info(`🧹 Cleaning up any previously generated artifacts`); - await removeFilesByGlob(dirname(outputFilePath), basename(outputFilePath)); + await removeFilesByGlob( + dirname(outputFilePath), + basename(outputFilePath.replace('{version}', '*')) + ); logger.debug(`Processing schemas...`); + const resolvedDocuments = await resolveDocuments(schemaFilePaths); + + logger.success(`Processed ${resolvedDocuments.length} schemas`); + + const blankOasFactory = (oasVersion: string, apiVersion: string) => + createBlankOpenApiDocument(oasVersion, { + version: apiVersion, + title: specInfo?.title ?? 'Bundled OpenAPI specs', + ...omitBy( + { + description: specInfo?.description, + termsOfService: specInfo?.termsOfService, + contact: specInfo?.contact, + license: specInfo?.license, + }, + isUndefined + ), + }); + const resultDocumentsMap = await mergeDocuments(resolvedDocuments, blankOasFactory); + + await writeDocuments(resultDocumentsMap, outputFilePath); +}; + +function logSchemas(schemaFilePaths: string[]): void { + for (const filePath of schemaFilePaths) { + logger.debug(`Found OpenAPI spec ${chalk.bold(filePath)}`); + } +} + +async function resolveDocuments(schemaFilePaths: string[]): Promise { const resolvedDocuments = await Promise.all( schemaFilePaths.map(async (schemaFilePath) => { try { @@ -62,26 +94,9 @@ export const bundle = async (config: BundlerConfig) => { } }) ); - const processedDocuments = filterOutSkippedDocuments(resolvedDocuments); - logger.success(`Processed ${processedDocuments.length} schemas`); - - const resultDocument = await mergeDocuments(processedDocuments); - - try { - await writeYamlDocument(outputFilePath, resultDocument); - - logger.success(`📖 Wrote all bundled OpenAPI specs to ${chalk.bold(outputFilePath)}`); - } catch (e) { - logger.error(`Unable to save bundled document to ${chalk.bold(outputFilePath)}: ${e.message}`); - } -}; - -function logSchemas(schemaFilePaths: string[]): void { - for (const filePath of schemaFilePaths) { - logger.debug(`Found OpenAPI spec ${chalk.bold(filePath)}`); - } + return processedDocuments; } function filterOutSkippedDocuments( @@ -99,3 +114,34 @@ function filterOutSkippedDocuments( return processedDocuments; } + +async function writeDocuments( + resultDocumentsMap: Map, + outputFilePath: string +): Promise { + for (const [version, document] of resultDocumentsMap.entries()) { + const versionedOutputFilePath = getVersionedOutputFilePath(outputFilePath, version); + + try { + await writeYamlDocument(versionedOutputFilePath, document); + + logger.success(`📖 Wrote bundled OpenAPI specs to ${chalk.bold(versionedOutputFilePath)}`); + } catch (e) { + logger.error( + `Unable to save bundled document to ${chalk.bold(versionedOutputFilePath)}: ${e.message}` + ); + } + } +} + +function getVersionedOutputFilePath(outputFilePath: string, version: string): string { + const hasVersionPlaceholder = outputFilePath.indexOf('{version}') > -1; + + if (hasVersionPlaceholder) { + return outputFilePath.replace('{version}', version); + } + + const filename = basename(outputFilePath); + + return outputFilePath.replace(filename, `${version}-${filename}`); +} diff --git a/packages/kbn-openapi-bundler/src/utils/insert_by_json_pointer.ts b/packages/kbn-openapi-bundler/src/utils/insert_by_json_pointer.ts index 8538102305edc..161f548ad2cf9 100644 --- a/packages/kbn-openapi-bundler/src/utils/insert_by_json_pointer.ts +++ b/packages/kbn-openapi-bundler/src/utils/insert_by_json_pointer.ts @@ -10,16 +10,23 @@ * Inserts `data` into the location specified by pointer in the `document`. * * @param pointer [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) - * @param data An object to insert - * @param document A document to insert to + * @param component Component data to insert + * @param componentsObject Components object to insert to */ export function insertRefByPointer( pointer: string, - data: unknown, - document: Record + component: unknown, + componentsObject: Record ): void { + if (!pointer.startsWith('/components')) { + throw new Error( + `insertRefByPointer expected a pointer starting with "/components" but got ${pointer}` + ); + } + + // splitting '/components' by '/' gives ['', 'components'] which should be skipped const segments = pointer.split('/').slice(2); - let target = document; + let target = componentsObject; while (segments.length > 0) { const segment = segments.shift() as string; @@ -31,5 +38,5 @@ export function insertRefByPointer( target = target[segment] as Record; } - Object.assign(target, data); + Object.assign(target, component); } diff --git a/packages/kbn-openapi-bundler/src/utils/write_yaml_document.ts b/packages/kbn-openapi-bundler/src/utils/write_yaml_document.ts index bdcd783e1a214..45ad2d5987bad 100644 --- a/packages/kbn-openapi-bundler/src/utils/write_yaml_document.ts +++ b/packages/kbn-openapi-bundler/src/utils/write_yaml_document.ts @@ -12,7 +12,7 @@ import { dirname } from 'path'; export async function writeYamlDocument(filePath: string, document: unknown): Promise { try { - const yaml = dump(document, { noRefs: true }); + const yaml = stringifyToYaml(document); await fs.mkdir(dirname(filePath), { recursive: true }); await fs.writeFile(filePath, yaml); @@ -20,3 +20,21 @@ export async function writeYamlDocument(filePath: string, document: unknown): Pr throw new Error(`Unable to write bundled yaml: ${e.message}`, { cause: e }); } } + +function stringifyToYaml(document: unknown): string { + try { + // Disable YAML Anchors https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases + // It makes YAML much more human readable + return dump(document, { noRefs: true }); + } catch (e) { + // RangeError might happened because of stack overflow + // due to circular references in the document + // since YAML Anchors are disabled + if (e instanceof RangeError) { + // Try to stringify with YAML Anchors enabled + return dump(document, { noRefs: false }); + } + + throw e; + } +} diff --git a/packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap b/packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap index f24ac58ae3db1..6caf6b33de642 100644 --- a/packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap +++ b/packages/kbn-router-to-openapispec/src/__snapshots__/generate_oas.test.ts.snap @@ -34,6 +34,7 @@ Object { "operationId": "/foo/{id}#0", "parameters": Array [ Object { + "description": "The version of the API to use", "in": "header", "name": "elastic-api-version", "schema": Object { @@ -91,6 +92,7 @@ Object { "description": "No description", }, }, + "summary": "", }, }, }, @@ -137,6 +139,7 @@ Object { "operationId": "/bar#0", "parameters": Array [ Object { + "description": "The version of the API to use", "in": "header", "name": "elastic-api-version", "schema": Object { @@ -157,6 +160,7 @@ Object { "properties": Object { "deprecatedFoo": Object { "deprecated": true, + "description": "deprecated foo", "type": "string", }, "foo": Object { @@ -191,13 +195,14 @@ Object { "application/json; Elastic-Api-Version=oas-test-version-1": Object { "schema": Object { "additionalProperties": false, + "description": "fooResponse", "properties": Object { - "fooResponse": Object { + "fooResponseWithDescription": Object { "type": "string", }, }, "required": Array [ - "fooResponse", + "fooResponseWithDescription", ], "type": "object", }, @@ -209,9 +214,9 @@ Object { }, }, }, - "description": "No description", }, }, + "summary": "versioned route", }, }, "/foo/{id}": Object { @@ -219,6 +224,7 @@ Object { "operationId": "/foo/{id}#0", "parameters": Array [ Object { + "description": "The version of the API to use", "in": "header", "name": "elastic-api-version", "schema": Object { @@ -230,7 +236,7 @@ Object { }, }, Object { - "description": undefined, + "description": "id", "in": "path", "name": "id", "required": true, @@ -240,7 +246,7 @@ Object { }, }, Object { - "description": undefined, + "description": "page", "in": "query", "name": "page", "required": false, @@ -258,6 +264,7 @@ Object { "schema": Object { "additionalProperties": false, "properties": Object { + "any": Object {}, "booleanDefault": Object { "default": true, "description": "defaults to to true", @@ -322,6 +329,7 @@ Object { "map", "record", "union", + "any", ], "type": "object", }, @@ -339,9 +347,122 @@ Object { }, }, }, + "description": "route", + }, + }, + "summary": "route", + }, + }, + }, + "security": Array [ + Object { + "basicAuth": Array [], + }, + ], + "servers": Array [ + Object { + "url": "https://test.oas", + }, + ], + "tags": undefined, +} +`; + +exports[`generateOpenApiDocument unknown schema/validation produces the expected output 1`] = ` +Object { + "components": Object { + "schemas": Object {}, + "securitySchemes": Object { + "apiKeyAuth": Object { + "in": "header", + "name": "Authorization", + "type": "apiKey", + }, + "basicAuth": Object { + "scheme": "basic", + "type": "http", + }, + }, + }, + "externalDocs": undefined, + "info": Object { + "description": undefined, + "title": "test", + "version": "99.99.99", + }, + "openapi": "3.0.0", + "paths": Object { + "/foo/{id}": Object { + "get": Object { + "operationId": "/foo/{id}#0", + "parameters": Array [ + Object { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": Object { + "default": "2023-10-31", + "enum": Array [ + "2023-10-31", + ], + "type": "string", + }, + }, + ], + "requestBody": Object { + "content": Object { + "application/json; Elastic-Api-Version=2023-10-31": Object { + "schema": Object {}, + }, + }, + }, + "responses": Object { + "200": Object { + "content": Object { + "application/json; Elastic-Api-Version=2023-10-31": Object { + "schema": Object {}, + }, + }, "description": "No description", }, }, + "summary": "", + }, + }, + "/test": Object { + "get": Object { + "operationId": "/test#0", + "parameters": Array [ + Object { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": Object { + "default": "123", + "enum": Array [ + "123", + ], + "type": "string", + }, + }, + ], + "requestBody": Object { + "content": Object { + "application/json; Elastic-Api-Version=123": Object { + "schema": Object {}, + }, + }, + }, + "responses": Object { + "200": Object { + "content": Object { + "application/json; Elastic-Api-Version=123": Object { + "schema": Object {}, + }, + }, + }, + }, + "summary": "", }, }, }, diff --git a/packages/kbn-router-to-openapispec/src/generate_oas.test.ts b/packages/kbn-router-to-openapispec/src/generate_oas.test.ts index 5942779931167..4ccc02f31c355 100644 --- a/packages/kbn-router-to-openapispec/src/generate_oas.test.ts +++ b/packages/kbn-router-to-openapispec/src/generate_oas.test.ts @@ -8,7 +8,7 @@ import { generateOpenApiDocument } from './generate_oas'; import { schema } from '@kbn/config-schema'; -import { createTestRouters, createRouter } from './generate_oas.test.util'; +import { createTestRouters, createRouter, createVersionedRouter } from './generate_oas.test.util'; describe('generateOpenApiDocument', () => { describe('@kbn/config-schema', () => { @@ -71,4 +71,67 @@ describe('generateOpenApiDocument', () => { ).toMatchSnapshot(); }); }); + + describe('unknown schema/validation', () => { + it('produces the expected output', () => { + expect( + generateOpenApiDocument( + { + routers: [ + createRouter({ + routes: [ + { + isVersioned: false, + path: '/foo/{id}', + method: 'get', + validationSchemas: { + request: { + params: () => ({ value: {} }), // custom validation fn + body: () => ({ value: {} }), + }, + response: { + [200]: { + body: () => undefined as any, // unknown schema + }, + }, + }, + options: { tags: ['foo'] }, + handler: jest.fn(), + }, + ], + }), + ], + versionedRouters: [ + createVersionedRouter({ + routes: [ + { + method: 'get', + path: '/test', + options: { access: 'public' }, + handlers: [ + { + fn: jest.fn(), + options: { + validate: { + request: { body: () => ({ value: {} }) }, + response: { 200: { body: (() => {}) as any } }, + }, + version: '123', + }, + }, + ], + }, + ], + }), + ], + }, + { + title: 'test', + baseUrl: 'https://test.oas', + version: '99.99.99', + } + ) + ).toMatchSnapshot(); + }); + }); }); diff --git a/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts b/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts index 3cab332a9f3f5..9e9b688ed878e 100644 --- a/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts +++ b/packages/kbn-router-to-openapispec/src/generate_oas.test.util.ts @@ -32,6 +32,7 @@ export const testSchema = schema.object({ scheme: ['prototest'], defaultValue: () => 'prototest://something', }), + any: schema.any({ meta: { description: 'any type' } }), }); type RouterMeta = ReturnType[number]; @@ -52,10 +53,18 @@ const getRouterDefaults = () => ({ isVersioned: false, path: '/foo/{id}', method: 'get', + options: { + tags: ['foo'], + description: 'route', + }, validationSchemas: { request: { - params: schema.object({ id: schema.string({ maxLength: 36 }) }), - query: schema.object({ page: schema.number({ max: 999, min: 1, defaultValue: 1 }) }), + params: schema.object({ + id: schema.string({ maxLength: 36, meta: { description: 'id' } }), + }), + query: schema.object({ + page: schema.number({ max: 999, min: 1, defaultValue: 1, meta: { description: 'page' } }), + }), body: testSchema, }, response: { @@ -65,7 +74,6 @@ const getRouterDefaults = () => ({ unsafe: { body: true }, }, }, - options: { tags: ['foo'] }, handler: jest.fn(), }); @@ -73,6 +81,7 @@ const getVersionedRouterDefaults = () => ({ method: 'get', path: '/bar', options: { + description: 'versioned route', access: 'public', }, handlers: [ @@ -83,11 +92,19 @@ const getVersionedRouterDefaults = () => ({ request: { body: schema.object({ foo: schema.string(), - deprecatedFoo: schema.maybe(schema.string({ meta: { deprecated: true } })), + deprecatedFoo: schema.maybe( + schema.string({ meta: { description: 'deprecated foo', deprecated: true } }) + ), }), }, response: { - [200]: { body: () => schema.object({ fooResponse: schema.string() }) }, + [200]: { + body: () => + schema.object( + { fooResponseWithDescription: schema.string() }, + { meta: { description: 'fooResponse' } } + ), + }, }, }, version: 'oas-test-version-1', diff --git a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/index.ts b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/index.ts index 494745403208c..b58fbdf80de63 100644 --- a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/index.ts +++ b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/index.ts @@ -9,6 +9,7 @@ import type { OpenAPIV3 } from 'openapi-types'; import * as mutations from './mutations'; import type { IContext } from './context'; +import { isAnyType } from './mutations/utils'; interface PostProcessMutationsArgs { schema: OpenAPIV3.SchemaObject; @@ -23,7 +24,12 @@ export const postProcessMutations = ({ ctx, schema }: PostProcessMutationsArgs) const arrayContainers: Array = ['allOf', 'oneOf', 'anyOf']; const walkSchema = (ctx: IContext, schema: OpenAPIV3.SchemaObject): void => { - mutations.processAny(schema); + if (isAnyType(schema)) { + mutations.processAnyType(schema); + return; + } + + mutations.processAllTypes(schema); /* At runtime 'type' can be broader than 'NonArraySchemaObjectType', so we set it to 'string' */ const type: undefined | string = schema.type; if (type === 'array') { diff --git a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/index.ts b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/index.ts index 6accce6bec1a8..02dd08b928a54 100644 --- a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/index.ts +++ b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/index.ts @@ -65,9 +65,16 @@ export const processMap = (ctx: IContext, schema: OpenAPIV3.SchemaObject): void } }; -export const processAny = (schema: OpenAPIV3.SchemaObject): void => { +export const processAllTypes = (schema: OpenAPIV3.SchemaObject): void => { processDeprecated(schema); stripBadDefault(schema); }; +export const processAnyType = (schema: OpenAPIV3.SchemaObject): void => { + // Map schema to an empty object: `{}` + for (const key of Object.keys(schema)) { + deleteField(schema as Record, key); + } +}; + export { processObject } from './object'; diff --git a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts index eacc005936a28..dd1d2e03e5fc2 100644 --- a/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts +++ b/packages/kbn-router-to-openapispec/src/oas_converter/kbn_config_schema/post_process_mutations/mutations/utils.ts @@ -38,3 +38,7 @@ export const processDeprecated = (schema: OpenAPIV3.SchemaObject): void => { export const deleteField = (schema: Record, field: string): void => { delete schema[field]; }; + +export const isAnyType = (schema: OpenAPIV3.SchemaObject): boolean => { + return metaFields.META_FIELD_X_OAS_ANY in schema; +}; diff --git a/packages/kbn-router-to-openapispec/src/process_router.ts b/packages/kbn-router-to-openapispec/src/process_router.ts index fdfe54c3dcb2e..cabb424db196c 100644 --- a/packages/kbn-router-to-openapispec/src/process_router.ts +++ b/packages/kbn-router-to-openapispec/src/process_router.ts @@ -61,6 +61,7 @@ export const processRouter = ( const path: OpenAPIV3.PathItemObject = { [route.method]: { + summary: route.options.description ?? '', requestBody: !!validationSchemas?.body ? { content: { diff --git a/packages/kbn-router-to-openapispec/src/process_versioned_router.test.ts b/packages/kbn-router-to-openapispec/src/process_versioned_router.test.ts index 9d3739134b6d9..7f7d76e654129 100644 --- a/packages/kbn-router-to-openapispec/src/process_versioned_router.test.ts +++ b/packages/kbn-router-to-openapispec/src/process_versioned_router.test.ts @@ -105,7 +105,6 @@ describe('extractVersionedResponses', () => { test('handles full response config as expected', () => { expect(extractVersionedResponses(route, oasConverter)).toEqual({ 200: { - description: 'No description', content: { 'application/test+json; Elastic-Api-Version=2023-10-31': { schema: { @@ -130,7 +129,6 @@ describe('extractVersionedResponses', () => { }, }, 404: { - description: 'No description', content: { 'application/test2+json; Elastic-Api-Version=2023-10-31': { schema: { @@ -145,7 +143,6 @@ describe('extractVersionedResponses', () => { }, }, 500: { - description: 'No description', content: { 'application/test2+json; Elastic-Api-Version=2024-12-31': { schema: { diff --git a/packages/kbn-router-to-openapispec/src/process_versioned_router.ts b/packages/kbn-router-to-openapispec/src/process_versioned_router.ts index 262eb5b04b335..c792e71600557 100644 --- a/packages/kbn-router-to-openapispec/src/process_versioned_router.ts +++ b/packages/kbn-router-to-openapispec/src/process_versioned_router.ts @@ -69,6 +69,7 @@ export const processVersionedRouter = ( ); const path: OpenAPIV3.PathItemObject = { [route.method]: { + summary: route.options.description ?? '', requestBody: hasBody ? { content: extractVersionedRequestBody(route, converter), @@ -122,7 +123,6 @@ export const extractVersionedResponses = ( const schema = converter.convert(maybeSchema); acc[statusCode] = { ...acc[statusCode], - description: route.options.description ?? 'No description', content: { ...((acc[statusCode] ?? {}) as OpenAPIV3.ResponseObject).content, [getVersionedContentTypeString( diff --git a/packages/kbn-router-to-openapispec/src/util.ts b/packages/kbn-router-to-openapispec/src/util.ts index 188d56d9f0b65..7a7c2cf21ebac 100644 --- a/packages/kbn-router-to-openapispec/src/util.ts +++ b/packages/kbn-router-to-openapispec/src/util.ts @@ -50,6 +50,7 @@ export const getVersionedHeaderParam = ( ): OpenAPIV3.ParameterObject => ({ in: 'header', name: 'elastic-api-version', + description: 'The version of the API to use', schema: { type: 'string', enum: versions, diff --git a/packages/kbn-search-connectors/types/native_connectors.ts b/packages/kbn-search-connectors/types/native_connectors.ts index a044dd717ef4f..3c235b0c3f4a3 100644 --- a/packages/kbn-search-connectors/types/native_connectors.ts +++ b/packages/kbn-search-connectors/types/native_connectors.ts @@ -2605,7 +2605,7 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record( [ { title: 'Checking .telemetryrc.json files', - task: () => new Listr(parseConfigsTask(), { exitOnError: true }), + task: (context, task) => task.newListr(parseConfigsTask(), { exitOnError: true }), }, { title: 'Extracting Collectors', - task: (context) => - new Listr(extractCollectorsTask(context, path), { exitOnError: true }), + task: (context, task) => + task.newListr(extractCollectorsTask(context, path), { exitOnError: true }), }, { enabled: () => typeof path !== 'undefined', title: 'Checking collectors in --path are not excluded', - task: ({ roots }: TaskContext) => { - const totalCollections = roots.reduce((acc, root) => { + task: (context) => { + const totalCollections = context.roots.reduce((acc, root) => { return acc + (root.parsedCollections?.length || 0); }, 0); const collectorsInPath = Array.isArray(path) ? path.length : 1; @@ -77,39 +77,41 @@ export function runTelemetryCheck() { }, { title: 'Checking Compatible collector.schema with collector.fetch type', - task: (context) => new Listr(checkCompatibleTypesTask(context), { exitOnError: true }), + task: (context, task) => + task.newListr(checkCompatibleTypesTask(context), { exitOnError: true }), }, { enabled: (_) => fix || !ignoreStoredJson, title: 'Checking Matching collector.schema against stored json files', - task: (context) => - new Listr(checkMatchingSchemasTask(context, !fix), { exitOnError: true }), + task: (context, task) => + task.newListr(checkMatchingSchemasTask(context, !fix), { exitOnError: true }), }, { enabled: (_) => fix, - skip: ({ roots }: TaskContext) => { - const noDiffs = roots.every( + skip: (context) => { + const noDiffs = context.roots.every( ({ esMappingDiffs }) => !esMappingDiffs || !esMappingDiffs.length ); return noDiffs && 'No changes needed.'; }, title: 'Generating new telemetry mappings', - task: (context) => new Listr(generateSchemasTask(context), { exitOnError: true }), + task: (context, task) => + task.newListr(generateSchemasTask(context), { exitOnError: true }), }, { enabled: (_) => fix, - skip: ({ roots }: TaskContext) => { - const noDiffs = roots.every( + skip: (context) => { + const noDiffs = context.roots.every( ({ esMappingDiffs }) => !esMappingDiffs || !esMappingDiffs.length ); return noDiffs && 'No changes needed.'; }, title: 'Updating telemetry mapping files', - task: (context) => new Listr(writeToFileTask(context), { exitOnError: true }), + task: (context, task) => task.newListr(writeToFileTask(context), { exitOnError: true }), }, ], { - renderer: process.env.CI ? 'verbose' : 'default', + renderer: process.env.CI ? 'verbose' : ('default' as any), } ); diff --git a/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts b/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts index 22790ab6a0578..b55833f86c290 100644 --- a/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts +++ b/packages/kbn-telemetry-tools/src/cli/run_telemetry_extract.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import Listr from 'listr'; +import { Listr } from 'listr2'; import { run } from '@kbn/dev-cli-runner'; import { @@ -25,19 +25,21 @@ export function runTelemetryExtract() { [ { title: 'Parsing .telemetryrc.json files', - task: () => new Listr(parseConfigsTask(), { exitOnError: true }), + task: (context, task) => task.newListr(parseConfigsTask(), { exitOnError: true }), }, { title: 'Extracting Telemetry Collectors', - task: (context) => new Listr(extractCollectorsTask(context), { exitOnError: true }), + task: (context, task) => + task.newListr(extractCollectorsTask(context), { exitOnError: true }), }, { title: 'Generating Schema files', - task: (context) => new Listr(generateSchemasTask(context), { exitOnError: true }), + task: (context, task) => + task.newListr(generateSchemasTask(context), { exitOnError: true }), }, { title: 'Writing to file', - task: (context) => new Listr(writeToFileTask(context), { exitOnError: true }), + task: (context, task) => task.newListr(writeToFileTask(context), { exitOnError: true }), }, ], { diff --git a/packages/kbn-visualization-ui-components/components/field_picker/field_picker.tsx b/packages/kbn-visualization-ui-components/components/field_picker/field_picker.tsx index 94b3977c8b031..414b17ccd908d 100644 --- a/packages/kbn-visualization-ui-components/components/field_picker/field_picker.tsx +++ b/packages/kbn-visualization-ui-components/components/field_picker/field_picker.tsx @@ -10,6 +10,7 @@ import './field_picker.scss'; import React from 'react'; import { i18n } from '@kbn/i18n'; import classNames from 'classnames'; +import { comboBoxFieldOptionMatcher } from '@kbn/field-utils'; import { EuiComboBox, EuiComboBoxOptionOption, EuiComboBoxProps } from '@elastic/eui'; import { FieldIcon } from '@kbn/field-utils/src/components/field_icon'; import { calculateWidthFromCharCount } from '@kbn/calculate-width-from-char-count'; @@ -91,6 +92,7 @@ export function FieldPicker( placeholder={i18n.translate('visualizationUiComponents.fieldPicker.fieldPlaceholder', { defaultMessage: 'Select a field', })} + optionMatcher={comboBoxFieldOptionMatcher} options={styledOptions} isInvalid={fieldIsInvalid} selectedOptions={selectedOption ? [selectedOption] : []} diff --git a/packages/serverless/settings/observability_project/index.ts b/packages/serverless/settings/observability_project/index.ts index b6cd0a21fb0f3..e9b5ceeee5eed 100644 --- a/packages/serverless/settings/observability_project/index.ts +++ b/packages/serverless/settings/observability_project/index.ts @@ -32,4 +32,5 @@ export const OBSERVABILITY_PROJECT_SETTINGS = [ settings.OBSERVABILITY_LOGS_EXPLORER_ALLOWED_DATA_VIEWS_ID, settings.OBSERVABILITY_APM_ENABLE_TABLE_SEARCH_BAR, settings.OBSERVABILITY_APM_ENABLE_SERVICE_INVENTORY_TABLE_SEARCH_BAR, + settings.OBSERVABILITY_APM_ENABLE_MULTI_SIGNAL, ]; diff --git a/packages/shared-ux/avatar/solution/package.json b/packages/shared-ux/avatar/solution/package.json index 84cd3fb6e597d..7ebb65ba7cd32 100644 --- a/packages/shared-ux/avatar/solution/package.json +++ b/packages/shared-ux/avatar/solution/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/packages/shared-ux/button/exit_full_screen/package.json b/packages/shared-ux/button/exit_full_screen/package.json index 0cbd7067a2465..338264b5ecbf5 100644 --- a/packages/shared-ux/button/exit_full_screen/package.json +++ b/packages/shared-ux/button/exit_full_screen/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/packages/shared-ux/chrome/navigation/package.json b/packages/shared-ux/chrome/navigation/package.json index 3409c5e815049..74a4a5b42a923 100644 --- a/packages/shared-ux/chrome/navigation/package.json +++ b/packages/shared-ux/chrome/navigation/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/packages/shared-ux/file/file_picker/impl/package.json b/packages/shared-ux/file/file_picker/impl/package.json index b2e7d0fb87403..1f6ae6648a081 100644 --- a/packages/shared-ux/file/file_picker/impl/package.json +++ b/packages/shared-ux/file/file_picker/impl/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } diff --git a/packages/shared-ux/page/solution_nav/package.json b/packages/shared-ux/page/solution_nav/package.json index f133dbd40daab..53a5979da78b1 100644 --- a/packages/shared-ux/page/solution_nav/package.json +++ b/packages/shared-ux/page/solution_nav/package.json @@ -3,5 +3,5 @@ "private": true, "version": "1.0.0", "license": "SSPL-1.0 OR Elastic License 2.0", - "sideEffects": false + "sideEffects": ["*.scss"] } \ No newline at end of file diff --git a/renovate.json b/renovate.json index 87cf0e3034773..9393a7b005225 100644 --- a/renovate.json +++ b/renovate.json @@ -157,6 +157,24 @@ ], "enabled": true }, + { + "groupName": "OpenAPI Spec", + "matchPackageNames": [ + "@redocly/cli" + ], + "reviewers": [ + "team:kibana-core" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "release_note:skip", + "Team:Core", + "backport:all-open" + ], + "enabled": true + }, { "groupName": "babel", "matchPackageNames": [ @@ -234,6 +252,24 @@ ], "enabled": true }, + { + "groupName": "CLI tooling", + "matchPackageNames": [ + "listr2" + ], + "reviewers": [ + "team:kibana-operations" + ], + "matchBaseBranches": [ + "main" + ], + "labels": [ + "Team:Operations", + "backport:all-open", + "release_note:skip" + ], + "enabled": true + }, { "groupName": "vega related modules", "matchPackageNames": [ diff --git a/src/core/server/docs/kib_core_logging.mdx b/src/core/server/docs/kib_core_logging.mdx index f117f0d54f718..f097192865a96 100644 --- a/src/core/server/docs/kib_core_logging.mdx +++ b/src/core/server/docs/kib_core_logging.mdx @@ -18,7 +18,8 @@ tags: ['kibana','dev', 'contributor', 'api docs'] - [Appenders](#appenders) - [Rolling File Appender](#rolling-file-appender) - [Triggering Policies](#triggering-policies) - - [Rolling strategies](#rolling-strategies) + - [Rolling Strategies](#rolling-strategies) + - [Retention Policies](#retention-policies) - [Configuration](#configuration) - [Usage](#usage) - [Logging config migration](#logging-config-migration) @@ -270,15 +271,13 @@ The default value is `true`. #### Rolling strategies -The rolling strategy determines how the rollover should occur: both the naming of the rolled files, -and their retention policy. +The rolling strategy determines how the naming of the rolled file should be performed. There is currently one strategy supported: `numeric`. ##### NumericRollingStrategy -This strategy will suffix the file with a given pattern when rolling, -and will retains a fixed amount of rolled files. +This strategy will suffix the file with a given pattern when rolling. ```yaml logging: @@ -291,7 +290,8 @@ logging: strategy: type: numeric pattern: '-%i' - max: 2 + retention: + maxFiles: 2 layout: type: pattern ``` @@ -323,6 +323,86 @@ The maximum number of files to keep. Once this number is reached, oldest files w The default value is `7` +**deprecated**: Please use a retention policy instead. + +#### Retention Policies + +The retention policy defines when the rolled files must be deleted. + +##### maxFiles + +Retention policy that will keep, at max, the defined number of files (ordered from the most recent to the oldest one) +and delete the others. + +This is the same behavior as what was previously achieved via the deprecated `strategy.max` field. + +**Example**: Appender configured to keep `5` rolled files: +```yaml +logging: + appenders: + rolling-file: + type: rolling-file + fileName: /var/logs/kibana.log + layout: + type: pattern + policy: + // ... + strategy: + // ... + retention: + maxFiles: 5 +``` + +##### maxAccumulatedFileSize + +Retention policy based on the size on disk used by the rolled files. Size count will be +performed from the most recent file to the oldest one, and will delete all files +(including the one breaching the threshold) over the limit. Only the size from the rolled files is taken into +account (the active file is ignored). + +*Note:* The field supports the following optional suffixes: `b`, `kb`, `mb`, `gb` and `tb` (case-insensitive). The default suffix is `b` + +**Example**: Appender configured to keep 5GB of rolled logs at maximum: +```yaml +logging: + appenders: + rolling-file: + type: rolling-file + fileName: /var/logs/kibana.log + layout: + type: pattern + policy: + // ... + strategy: + // ... + retention: + maxAccumulatedFileSize: "5GB" +``` + +##### removeOlderThan + +Retention policy based on the time (modification date - `mtime`) the files were rolled, and that will delete all files +that are older than the specified duration. + +*Note:* The field supports the following optional suffixes: `ms`, `s`, `m`, `h`, `d`, `w`, `M` and `Y`. The default suffix is `ms`. + +**Example**: Appender configured to delete rolled files after 30 days: +```yaml +logging: + appenders: + rolling-file: + type: rolling-file + fileName: /var/logs/kibana.log + layout: + type: pattern + policy: + // ... + strategy: + // ... + retention: + removeOlderThan: "30d" +``` + ### Rewrite Appender *This appender is currently considered experimental and is not intended diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index 46893ca263afc..2fa22873190e5 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -108,7 +108,7 @@ describe('checking migration metadata changes on all registered SO types', () => "infra-custom-dashboards": "1a5994f2e05bb8a1609825ddbf5012f77c5c67f3", "infrastructure-monitoring-log-view": "5f86709d3c27aed7a8379153b08ee5d3d90d77f5", "infrastructure-ui-source": "113182d6895764378dfe7fa9fa027244f3a457c4", - "ingest-agent-policies": "d2ee0bf36a512c2ac744b0def1c822b7880f1f83", + "ingest-agent-policies": "803dc27e106440c41e8f3c3d8ee8bbb0821bcde2", "ingest-download-sources": "279a68147e62e4d8858c09ad1cf03bd5551ce58d", "ingest-outputs": "daafff49255ab700e07491376fe89f04fc998b91", "ingest-package-policies": "d63e091b2b3cf2eecaa46ae2533bdd5214a983fc", diff --git a/src/core/server/integration_tests/logging/rolling_file_appender.test.ts b/src/core/server/integration_tests/logging/rolling_file_appender.test.ts index 65fe152bdc9b0..c5a0760a09b74 100644 --- a/src/core/server/integration_tests/logging/rolling_file_appender.test.ts +++ b/src/core/server/integration_tests/logging/rolling_file_appender.test.ts @@ -60,7 +60,7 @@ describe('RollingFileAppender', () => { const expectedFileContent = (indices: number[]) => indices.map(message).join('\n') + '\n'; describe('`size-limit` policy with `numeric` strategy', () => { - it('rolls the log file in the correct order', async () => { + it('supports the deprecated `strategy.max` field', async () => { root = createRoot({ type: 'rolling-file', fileName: logFile, @@ -106,7 +106,7 @@ describe('RollingFileAppender', () => { expect(await getFileContent('kibana.2.log')).toEqual(expectedFileContent([1, 2, 3])); }); - it('only keep the correct number of files', async () => { + it('maxFile retention: only keep the correct number of files', async () => { root = createRoot({ type: 'rolling-file', fileName: logFile, @@ -120,9 +120,11 @@ describe('RollingFileAppender', () => { }, strategy: { type: 'numeric', - max: 2, pattern: '-%i', }, + retention: { + maxFiles: 2, + }, }); await root.preboot(); await root.setup(); @@ -153,6 +155,107 @@ describe('RollingFileAppender', () => { expect(await getFileContent('kibana-1.log')).toEqual(expectedFileContent([5, 6])); expect(await getFileContent('kibana-2.log')).toEqual(expectedFileContent([3, 4])); }); + + it('maxAccumulatedFileSize retention: only keep the correct number of files', async () => { + root = createRoot({ + type: 'rolling-file', + fileName: logFile, + layout: { + type: 'pattern', + pattern: '%message', + }, + policy: { + type: 'size-limit', + size: '60b', + }, + strategy: { + type: 'numeric', + pattern: '-%i', + }, + retention: { + maxAccumulatedFileSize: '100b', + }, + }); + await root.preboot(); + await root.setup(); + + const logger = root.logger.get('test.rolling.file'); + + // size = 60b, message.length ~= 40b, should roll every 2 message + + // last file - 'kibana-3.log' (which will be removed during rolling) + logger.info(message(1)); + logger.info(message(2)); + // roll - 'kibana-2.log' (which will be removed during rolling) + logger.info(message(3)); + logger.info(message(4)); + // roll - 'kibana-1.log' + logger.info(message(5)); + logger.info(message(6)); + // roll - 'kibana.log' + logger.info(message(7)); + logger.info(message(8)); + + await flush(); + + const files = await readdir(testDir); + + expect(files.sort()).toEqual(['kibana-1.log', 'kibana.log']); + expect(await getFileContent('kibana.log')).toEqual(expectedFileContent([7, 8])); + expect(await getFileContent('kibana-1.log')).toEqual(expectedFileContent([5, 6])); + }); + + it('removeOlderThan retention: only keep the correct files', async () => { + root = createRoot({ + type: 'rolling-file', + fileName: logFile, + layout: { + type: 'pattern', + pattern: '%message', + }, + policy: { + type: 'size-limit', + size: '60b', + }, + strategy: { + type: 'numeric', + pattern: '-%i', + }, + retention: { + removeOlderThan: '2s', + }, + }); + await root.preboot(); + await root.setup(); + + const logger = root.logger.get('test.rolling.file'); + + // size = 60b, message.length ~= 40b, should roll every 2 message + + // last file - 'kibana-3.log' (which will be removed during rolling) + logger.info(message(1)); + logger.info(message(2)); + // roll - 'kibana-2.log' (which will be removed during rolling) + logger.info(message(3)); + logger.info(message(4)); + + await delay(2500); + + // roll - 'kibana-1.log' + logger.info(message(5)); + logger.info(message(6)); + // roll - 'kibana.log' + logger.info(message(7)); + logger.info(message(8)); + + await flush(); + + const files = await readdir(testDir); + + expect(files.sort()).toEqual(['kibana-1.log', 'kibana.log']); + expect(await getFileContent('kibana.log')).toEqual(expectedFileContent([7, 8])); + expect(await getFileContent('kibana-1.log')).toEqual(expectedFileContent([5, 6])); + }); }); describe('`time-interval` policy with `numeric` strategy', () => { diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile index 2284e504229a8..e42d2a7ec1dcd 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile @@ -25,21 +25,27 @@ RUN cd /tmp && \ https://{{publicArtifactSubdomain}}.elastic.co/downloads/kibana/{{artifactPrefix}}-$(arch).tar.gz && \ cd - {{/usePublicArtifact}} - {{^usePublicArtifact}} COPY {{artifactTarball}} /tmp/kibana.tar.gz {{/usePublicArtifact}} RUN mkdir /usr/share/kibana WORKDIR /usr/share/kibana -RUN tar --strip-components=1 -zxf /tmp/kibana.tar.gz +RUN tar \ +# Exclude serverless.yml disabled assets +{{#serverless}} + --exclude=screenshotting-plugin/chromium \ + --exclude=screenshotting-plugin/server/assets \ +{{/serverless}} + --strip-components=1 \ + -zxf /tmp/kibana.tar.gz # Ensure that group permissions are the same as user permissions. # This will help when relying on GID-0 to run Kibana, rather than UID-1000. # OpenShift does this, for example. # REF: https://docs.openshift.org/latest/creating_images/guidelines.html RUN chmod -R g=u /usr/share/kibana - {{#cloud}} + COPY {{filebeatTarball}} /tmp/filebeat.tar.gz COPY {{metricbeatTarball}} /tmp/metricbeat.tar.gz diff --git a/src/dev/i18n/tasks/check_compatibility.ts b/src/dev/i18n/tasks/check_compatibility.ts index b6b94a5aba666..10970dc92f551 100644 --- a/src/dev/i18n/tasks/check_compatibility.ts +++ b/src/dev/i18n/tasks/check_compatibility.ts @@ -8,6 +8,7 @@ import { ToolingLog } from '@kbn/tooling-log'; import { integrateLocaleFiles, I18nConfig } from '..'; +import { I18nCheckTaskContext } from '../types'; export interface I18nFlags { fix: boolean; @@ -20,7 +21,7 @@ export interface I18nFlags { export function checkCompatibility(config: I18nConfig, flags: I18nFlags, log: ToolingLog) { const { fix, ignoreIncompatible, ignoreUnused, ignoreMalformed, ignoreMissing } = flags; return config.translations.map((translationsPath) => ({ - task: async ({ messages }: { messages: Map }) => { + task: async ({ messages }: I18nCheckTaskContext) => { // If `fix` is set we should try apply all possible fixes and override translations file. await integrateLocaleFiles(messages, { dryRun: !fix, diff --git a/src/dev/i18n/tasks/check_configs.ts b/src/dev/i18n/tasks/check_configs.ts index 091f1fa806a14..66d5e8fd44500 100644 --- a/src/dev/i18n/tasks/check_configs.ts +++ b/src/dev/i18n/tasks/check_configs.ts @@ -8,7 +8,8 @@ import { resolve, join } from 'path'; import { I18N_RC } from '../constants'; -import { ErrorReporter, checkConfigNamespacePrefix, arrayify } from '..'; +import { checkConfigNamespacePrefix, arrayify } from '..'; +import { I18nCheckTaskContext } from '../types'; export function checkConfigs(additionalConfigPaths: string | string[] = []) { const root = join(__dirname, '../../../../'); @@ -18,7 +19,7 @@ export function checkConfigs(additionalConfigPaths: string | string[] = []) { const configPaths = [kibanaRC, xpackRC, ...arrayify(additionalConfigPaths)]; return configPaths.map((configPath) => ({ - task: async (context: { reporter: ErrorReporter }) => { + task: async (context: I18nCheckTaskContext) => { try { await checkConfigNamespacePrefix(configPath); } catch (err) { diff --git a/src/dev/i18n/tasks/extract_default_translations.ts b/src/dev/i18n/tasks/extract_default_translations.ts index 57de2148d5ff4..512c3bc91dbfb 100644 --- a/src/dev/i18n/tasks/extract_default_translations.ts +++ b/src/dev/i18n/tasks/extract_default_translations.ts @@ -8,7 +8,8 @@ import chalk from 'chalk'; import { createFailError } from '@kbn/dev-cli-errors'; -import { ErrorReporter, extractMessagesFromPathToMap, filterConfigPaths, I18nConfig } from '..'; +import { extractMessagesFromPathToMap, filterConfigPaths, I18nConfig } from '..'; +import { I18nCheckTaskContext } from '../types'; export function extractDefaultMessages(config: I18nConfig, inputPaths: string[]) { const filteredPaths = filterConfigPaths(inputPaths, config) as string[]; @@ -20,10 +21,7 @@ export function extractDefaultMessages(config: I18nConfig, inputPaths: string[]) ); } return filteredPaths.map((filteredPath) => ({ - task: async (context: { - messages: Map; - reporter: ErrorReporter; - }) => { + task: async (context: I18nCheckTaskContext) => { const { messages, reporter } = context; const initialErrorsNumber = reporter.errors.length; diff --git a/src/dev/i18n/tasks/extract_untracked_translations.ts b/src/dev/i18n/tasks/extract_untracked_translations.ts index e2ea89661d519..9bc4c27f4a4a0 100644 --- a/src/dev/i18n/tasks/extract_untracked_translations.ts +++ b/src/dev/i18n/tasks/extract_untracked_translations.ts @@ -10,6 +10,7 @@ import { createFailError } from '@kbn/dev-cli-errors'; import { matchEntriesWithExctractors } from '../extract_default_translations'; import { I18nConfig } from '../config'; import { normalizePath, readFileAsync, ErrorReporter } from '../utils'; +import { I18nCheckTaskContext } from '../types'; function filterEntries(entries: string[], exclude: string[]) { return entries.filter((entry: string) => @@ -24,7 +25,7 @@ export async function extractUntrackedMessagesTask({ }: { path?: string | string[]; config: I18nConfig; - reporter: any; + reporter: ErrorReporter; }) { const inputPaths = Array.isArray(path) ? path : [path || './']; const availablePaths = Object.values(config.paths).flat(); @@ -76,10 +77,14 @@ export async function extractUntrackedMessagesTask({ export function extractUntrackedMessages(inputPaths: string[]) { return inputPaths.map((inputPath) => ({ title: `Checking untracked messages in ${inputPath}`, - task: async (context: { reporter: ErrorReporter; config: I18nConfig }) => { + task: async (context: I18nCheckTaskContext) => { const { reporter, config } = context; const initialErrorsNumber = reporter.errors.length; - const result = await extractUntrackedMessagesTask({ path: inputPath, config, reporter }); + const result = await extractUntrackedMessagesTask({ + path: inputPath, + config: config as I18nConfig, + reporter, + }); if (reporter.errors.length === initialErrorsNumber) { return result; } diff --git a/src/dev/i18n/tasks/merge_configs.ts b/src/dev/i18n/tasks/merge_configs.ts index 89ce47dcbecf2..916980dc2cb4c 100644 --- a/src/dev/i18n/tasks/merge_configs.ts +++ b/src/dev/i18n/tasks/merge_configs.ts @@ -7,7 +7,8 @@ */ import { resolve, join } from 'path'; -import { ErrorReporter, I18nConfig, assignConfigFromPath, arrayify } from '..'; +import { assignConfigFromPath, arrayify } from '..'; +import { I18nCheckTaskContext } from '../types'; export function mergeConfigs(additionalConfigPaths: string | string[] = []) { const root = join(__dirname, '../../../../'); @@ -17,7 +18,7 @@ export function mergeConfigs(additionalConfigPaths: string | string[] = []) { const configPaths = [kibanaRC, xpackRC, ...arrayify(additionalConfigPaths)]; return configPaths.map((configPath) => ({ - task: async (context: { reporter: ErrorReporter; config?: I18nConfig }) => { + task: async (context: I18nCheckTaskContext) => { try { context.config = await assignConfigFromPath(context.config, configPath); } catch (err) { diff --git a/src/dev/i18n/types.ts b/src/dev/i18n/types.ts new file mode 100644 index 0000000000000..4b790051b294c --- /dev/null +++ b/src/dev/i18n/types.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { I18nConfig } from './config'; +import { ErrorReporter } from './utils'; + +export interface I18nCheckTaskContext { + config?: I18nConfig; + reporter: ErrorReporter; + messages: Map; +} diff --git a/src/dev/run_i18n_check.ts b/src/dev/run_i18n_check.ts index 2d04e7c9ca3a5..eed82a1f08783 100644 --- a/src/dev/run_i18n_check.ts +++ b/src/dev/run_i18n_check.ts @@ -7,13 +7,13 @@ */ import chalk from 'chalk'; -import Listr from 'listr'; +import { Listr } from 'listr2'; import { createFailError } from '@kbn/dev-cli-errors'; import { run } from '@kbn/dev-cli-runner'; import { ToolingLog } from '@kbn/tooling-log'; import { getTimeReporter } from '@kbn/ci-stats-reporter'; -import { ErrorReporter, I18nConfig } from './i18n'; +import { ErrorReporter } from './i18n'; import { extractDefaultMessages, extractUntrackedMessages, @@ -21,6 +21,7 @@ import { checkConfigs, mergeConfigs, } from './i18n/tasks'; +import { I18nCheckTaskContext } from './i18n/types'; const toolingLog = new ToolingLog({ level: 'info', @@ -30,8 +31,8 @@ const toolingLog = new ToolingLog({ const runStartTime = Date.now(); const reportTime = getTimeReporter(toolingLog, 'scripts/i18n_check'); -const skipOnNoTranslations = ({ config }: { config: I18nConfig }) => - !config.translations.length && 'No translations found.'; +const skipOnNoTranslations = ({ config }: I18nCheckTaskContext) => + !config?.translations.length && 'No translations found.'; run( async ({ @@ -74,36 +75,38 @@ run( const srcPaths = Array().concat(path || ['./src', './packages', './x-pack']); - const list = new Listr( + const list = new Listr( [ { title: 'Checking .i18nrc.json files', - task: () => new Listr(checkConfigs(includeConfig), { exitOnError: true }), + task: (context, task) => + task.newListr(checkConfigs(includeConfig), { exitOnError: true }), }, { title: 'Merging .i18nrc.json files', - task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), + task: (context, task) => + task.newListr(mergeConfigs(includeConfig), { exitOnError: true }), }, { title: 'Checking For Untracked Messages based on .i18nrc.json', enabled: (_) => !ignoreUntracked, skip: skipOnNoTranslations, - task: ({ config }) => - new Listr(extractUntrackedMessages(srcPaths), { exitOnError: true }), + task: (context, task) => + task.newListr(extractUntrackedMessages(srcPaths), { exitOnError: true }), }, { title: 'Validating Default Messages', skip: skipOnNoTranslations, - task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), + task: (context, task) => + task.newListr(extractDefaultMessages(context.config!, srcPaths), { exitOnError: true }), }, { title: 'Compatibility Checks', skip: skipOnNoTranslations, - task: ({ config }) => - new Listr( + task: (context, task) => + task.newListr( checkCompatibility( - config, + context.config!, { ignoreMalformed: !!ignoreMalformed, ignoreIncompatible: !!ignoreIncompatible, @@ -120,7 +123,7 @@ run( { concurrent: false, exitOnError: true, - renderer: process.env.CI ? 'verbose' : 'default', + renderer: process.env.CI ? 'verbose' : ('default' as any), } ); diff --git a/src/dev/run_i18n_extract.ts b/src/dev/run_i18n_extract.ts index 2c1f39e929a36..cc356a0cdb5d7 100644 --- a/src/dev/run_i18n_extract.ts +++ b/src/dev/run_i18n_extract.ts @@ -7,13 +7,14 @@ */ import chalk from 'chalk'; -import Listr from 'listr'; +import { Listr } from 'listr2'; import { resolve } from 'path'; import { createFailError } from '@kbn/dev-cli-errors'; import { run } from '@kbn/dev-cli-runner'; import { ErrorReporter, serializeToJson, serializeToJson5, writeFileAsync } from './i18n'; import { extractDefaultMessages, mergeConfigs } from './i18n/tasks'; +import { I18nCheckTaskContext } from './i18n/types'; run( async ({ @@ -38,22 +39,23 @@ run( } const srcPaths = Array().concat(path || ['./src', './packages', './x-pack']); - const list = new Listr( + const list = new Listr( [ { title: 'Merging .i18nrc.json files', - task: () => new Listr(mergeConfigs(includeConfig), { exitOnError: true }), + task: (context, task) => + task.newListr(mergeConfigs(includeConfig), { exitOnError: true }), }, { title: 'Extracting Default Messages', - task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), + task: (context, task) => + task.newListr(extractDefaultMessages(context.config!, srcPaths), { exitOnError: true }), }, { title: 'Writing to file', - enabled: (ctx) => outputDir && ctx.messages.size, - task: async (ctx) => { - const sortedMessages = [...ctx.messages].sort(([key1], [key2]) => + enabled: (ctx) => Boolean(outputDir && ctx.messages.size > 0), + task: async (context) => { + const sortedMessages = [...context.messages].sort(([key1], [key2]) => key1.localeCompare(key2) ); await writeFileAsync( @@ -66,7 +68,7 @@ run( }, ], { - renderer: process.env.CI ? 'verbose' : 'default', + renderer: process.env.CI ? 'verbose' : ('default' as any), } ); diff --git a/src/dev/run_i18n_integrate.ts b/src/dev/run_i18n_integrate.ts index 80e2f8cb1f33b..4788036320ca4 100644 --- a/src/dev/run_i18n_integrate.ts +++ b/src/dev/run_i18n_integrate.ts @@ -7,12 +7,13 @@ */ import chalk from 'chalk'; -import Listr from 'listr'; +import { Listr } from 'listr2'; import { createFailError } from '@kbn/dev-cli-errors'; import { run } from '@kbn/dev-cli-runner'; import { ErrorReporter, integrateLocaleFiles } from './i18n'; import { extractDefaultMessages, mergeConfigs } from './i18n/tasks'; +import { I18nCheckTaskContext } from './i18n/types'; run( async ({ @@ -69,7 +70,7 @@ run( const srcPaths = Array().concat(path || ['./src', './packages', './x-pack']); - const list = new Listr( + const list = new Listr( [ { title: 'Merging .i18nrc.json files', @@ -77,13 +78,13 @@ run( }, { title: 'Extracting Default Messages', - task: ({ config }) => - new Listr(extractDefaultMessages(config, srcPaths), { exitOnError: true }), + task: (context) => + new Listr(extractDefaultMessages(context.config!, srcPaths), { exitOnError: true }), }, { title: 'Integrating Locale File', - task: async ({ messages, config }) => { - await integrateLocaleFiles(messages, { + task: async (context) => { + await integrateLocaleFiles(context.messages, { sourceFileName: source, targetFileName: target, dryRun, @@ -91,14 +92,14 @@ run( ignoreUnused, ignoreMissing, ignoreMalformed, - config, + config: context.config!, log, }); }, }, ], { - renderer: process.env.CI ? 'verbose' : 'default', + renderer: process.env.CI ? 'verbose' : ('default' as any), } ); diff --git a/src/plugins/console/kibana.jsonc b/src/plugins/console/kibana.jsonc index 2dc047ebb661d..ae0cac514b67d 100644 --- a/src/plugins/console/kibana.jsonc +++ b/src/plugins/console/kibana.jsonc @@ -20,7 +20,6 @@ ], "requiredBundles": [ "esUiShared", - "kibanaReact", "kibanaUtils" ] } diff --git a/src/plugins/console/public/application/containers/embeddable/console_wrapper.tsx b/src/plugins/console/public/application/containers/embeddable/console_wrapper.tsx index 53c75706b9da0..db3624db41f68 100644 --- a/src/plugins/console/public/application/containers/embeddable/console_wrapper.tsx +++ b/src/plugins/console/public/application/containers/embeddable/console_wrapper.tsx @@ -112,6 +112,8 @@ interface ConsoleWrapperProps export const ConsoleWrapper = (props: ConsoleWrapperProps) => { const [dependencies, setDependencies] = useState(null); const { core, usageCollection, onKeyDown, isMonacoEnabled } = props; + const { analytics, i18n, theme } = core; + const startServices = { analytics, i18n, theme }; useEffect(() => { if (dependencies === null) { @@ -142,7 +144,6 @@ export const ConsoleWrapper = (props: ConsoleWrapperProps) => { objectStorageClient, settings, storage, - theme$, trackUiMetric, } = dependencies; return ( @@ -162,10 +163,10 @@ export const ConsoleWrapper = (props: ConsoleWrapperProps) => { http, autocompleteInfo, }, - theme$, config: { isMonacoEnabled, }, + startServices, }} > diff --git a/src/plugins/console/public/application/contexts/services_context.mock.ts b/src/plugins/console/public/application/contexts/services_context.mock.ts index f02a6df5ff996..fc22676b9f72d 100644 --- a/src/plugins/console/public/application/contexts/services_context.mock.ts +++ b/src/plugins/console/public/application/contexts/services_context.mock.ts @@ -7,9 +7,9 @@ */ import { + coreMock, notificationServiceMock, httpServiceMock, - themeServiceMock, docLinksServiceMock, } from '@kbn/core/public/mocks'; @@ -22,6 +22,8 @@ import { createApi, createEsHostService } from '../lib'; import { ContextValue } from './services_context'; +const coreStart = coreMock.createStart(); + export const serviceContextMock = { create: (): ContextValue => { const storage = new StorageMock({} as unknown as Storage, 'test'); @@ -42,11 +44,11 @@ export const serviceContextMock = { autocompleteInfo: new AutocompleteInfoMock(), }, docLinkVersion: 'NA', - theme$: themeServiceMock.create().start().theme$, docLinks: docLinksServiceMock.createStartContract().links, config: { isMonacoEnabled: false, }, + startServices: coreStart, }; }, }; diff --git a/src/plugins/console/public/application/contexts/services_context.tsx b/src/plugins/console/public/application/contexts/services_context.tsx index d2c91e7c73604..49bc4d4afec9b 100644 --- a/src/plugins/console/public/application/contexts/services_context.tsx +++ b/src/plugins/console/public/application/contexts/services_context.tsx @@ -7,12 +7,11 @@ */ import React, { createContext, useContext, useEffect } from 'react'; -import { Observable } from 'rxjs'; -import type { NotificationsSetup, CoreTheme, DocLinksStart, HttpSetup } from '@kbn/core/public'; +import type { NotificationsSetup, DocLinksStart, HttpSetup } from '@kbn/core/public'; import type { AutocompleteInfo, History, Settings, Storage } from '../../services'; import { ObjectStorageClient } from '../../../common/types'; -import { MetricsTracker } from '../../types'; +import { ConsoleStartServices, MetricsTracker } from '../../types'; import { EsHostService } from '../lib'; interface ContextServices { @@ -30,11 +29,11 @@ interface ContextServices { export interface ContextValue { services: ContextServices; docLinkVersion: string; - theme$: Observable; docLinks: DocLinksStart['links']; config?: { isMonacoEnabled: boolean; }; + startServices: ConsoleStartServices; } interface ContextProps { diff --git a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts index 28d875c246ca3..69f9042edd76d 100644 --- a/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts +++ b/src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts @@ -23,7 +23,7 @@ import { DEFAULT_VARIABLES } from '../../../../common/constants'; export const useSendCurrentRequest = () => { const { services: { history, settings, notifications, trackUiMetric, http, autocompleteInfo, storage }, - theme$, + startServices, } = useServicesContext(); const dispatch = useRequestActionContext(); @@ -88,7 +88,7 @@ export const useSendCurrentRequest = () => { notifications.toasts.remove(toast); }, }), - { theme$ } + startServices ), }); } else { @@ -140,7 +140,7 @@ export const useSendCurrentRequest = () => { notifications.toasts, trackUiMetric, history, - theme$, autocompleteInfo, + startServices, ]); }; diff --git a/src/plugins/console/public/application/index.tsx b/src/plugins/console/public/application/index.tsx index e211e1557476a..a2d8cfb0cab18 100644 --- a/src/plugins/console/public/application/index.tsx +++ b/src/plugins/console/public/application/index.tsx @@ -8,17 +8,10 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { Observable } from 'rxjs'; -import { - HttpSetup, - NotificationsSetup, - I18nStart, - CoreTheme, - DocLinksStart, -} from '@kbn/core/public'; -import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { HttpSetup, NotificationsSetup, DocLinksStart } from '@kbn/core/public'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { createStorage, createHistory, @@ -32,31 +25,30 @@ import * as localStorageObjectClient from '../lib/local_storage_object_client'; import { Main } from './containers'; import { ServicesContextProvider, EditorContextProvider, RequestContextProvider } from './contexts'; import { createApi, createEsHostService } from './lib'; +import { ConsoleStartServices } from '../types'; export interface BootDependencies { http: HttpSetup; docLinkVersion: string; - I18nContext: I18nStart['Context']; notifications: NotificationsSetup; usageCollection?: UsageCollectionSetup; element: HTMLElement; - theme$: Observable; docLinks: DocLinksStart['links']; autocompleteInfo: AutocompleteInfo; isMonacoEnabled: boolean; + startServices: ConsoleStartServices; } export async function renderApp({ - I18nContext, notifications, docLinkVersion, usageCollection, element, http, - theme$, docLinks, autocompleteInfo, isMonacoEnabled, + startServices, }: BootDependencies) { const trackUiMetric = createUsageTracker(usageCollection); trackUiMetric.load('opened_app'); @@ -76,37 +68,35 @@ export async function renderApp({ autocompleteInfo.mapping.setup(http, settings); render( - - - - - -
- - - - - , + + + + +
+ + + + , element ); diff --git a/src/plugins/console/public/plugin.ts b/src/plugins/console/public/plugin.ts index 54d8d1db97bc7..f1cae7206ea4d 100644 --- a/src/plugins/console/public/plugin.ts +++ b/src/plugins/console/public/plugin.ts @@ -79,12 +79,12 @@ export class ConsoleUIPlugin defaultMessage: 'Console', }), enableRouting: false, - mount: async ({ element, theme$ }) => { + mount: async ({ element }) => { const [core] = await getStartServices(); const { - i18n: { Context: I18nContext }, docLinks: { DOC_LINK_VERSION, links }, + ...startServices } = core; const { renderApp } = await import('./application'); @@ -93,13 +93,12 @@ export class ConsoleUIPlugin http, docLinkVersion: DOC_LINK_VERSION, docLinks: links, - I18nContext, notifications, usageCollection, element, - theme$, autocompleteInfo: this.autocompleteInfo, isMonacoEnabled, + startServices, }); }, }); diff --git a/src/plugins/console/public/shared_imports.ts b/src/plugins/console/public/shared_imports.ts index 95b96b565e27f..779a2b9ee1c0a 100644 --- a/src/plugins/console/public/shared_imports.ts +++ b/src/plugins/console/public/shared_imports.ts @@ -12,4 +12,6 @@ const { collapseLiteralStrings, expandLiteralStrings } = XJson; export { sendRequest, collapseLiteralStrings, expandLiteralStrings }; -export { KibanaThemeProvider, toMountPoint } from '@kbn/kibana-react-plugin/public'; +export { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; + +export { toMountPoint } from '@kbn/react-kibana-mount'; diff --git a/src/plugins/console/public/types/plugin_dependencies.ts b/src/plugins/console/public/types/plugin_dependencies.ts index 63446135e7f3c..39b82939619ec 100644 --- a/src/plugins/console/public/types/plugin_dependencies.ts +++ b/src/plugins/console/public/types/plugin_dependencies.ts @@ -7,6 +7,7 @@ */ import type { FC } from 'react'; +import type { AnalyticsServiceStart, I18nStart, ThemeServiceStart } from '@kbn/core/public'; import { HomePublicPluginSetup, HomePublicPluginStart } from '@kbn/home-plugin/public'; import { DevToolsSetup } from '@kbn/dev-tools-plugin/public'; import { UsageCollectionSetup, UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; @@ -15,6 +16,12 @@ import { SharePluginSetup, SharePluginStart, LocatorPublic } from '@kbn/share-pl import { ConsoleUILocatorParams } from './locator'; import { EmbeddedConsoleView } from './embeddable_console'; +export interface ConsoleStartServices { + analytics: Pick; + i18n: I18nStart; + theme: Pick; +} + export interface AppSetupUIPluginDependencies { home?: HomePublicPluginSetup; devTools: DevToolsSetup; diff --git a/src/plugins/console/tsconfig.json b/src/plugins/console/tsconfig.json index 06adc91f994db..88b6216cbde66 100644 --- a/src/plugins/console/tsconfig.json +++ b/src/plugins/console/tsconfig.json @@ -9,7 +9,6 @@ "@kbn/dev-tools-plugin", "@kbn/es-ui-shared-plugin", "@kbn/home-plugin", - "@kbn/kibana-react-plugin", "@kbn/kibana-utils-plugin", "@kbn/share-plugin", "@kbn/usage-collection-plugin", @@ -31,7 +30,8 @@ "@kbn/monaco", "@kbn/cloud-plugin", "@kbn/core-notifications-browser", - "@kbn/react-kibana-context-render" + "@kbn/react-kibana-context-render", + "@kbn/react-kibana-mount" ], "exclude": [ "target/**/*", diff --git a/src/plugins/dev_tools/kibana.jsonc b/src/plugins/dev_tools/kibana.jsonc index 9665ca223ca1d..c269b74918619 100644 --- a/src/plugins/dev_tools/kibana.jsonc +++ b/src/plugins/dev_tools/kibana.jsonc @@ -9,8 +9,6 @@ "requiredPlugins": [ "urlForwarding" ], - "requiredBundles": [ - "kibanaReact" - ] + "requiredBundles": [] } } diff --git a/src/plugins/dev_tools/public/application.tsx b/src/plugins/dev_tools/public/application.tsx index 3beb133ab3f5d..840a99c06cf19 100644 --- a/src/plugins/dev_tools/public/application.tsx +++ b/src/plugins/dev_tools/public/application.tsx @@ -7,12 +7,10 @@ */ import React, { useEffect, useRef } from 'react'; -import { Observable } from 'rxjs'; import ReactDOM from 'react-dom'; import { Redirect, RouteComponentProps } from 'react-router-dom'; import { HashRouter as Router, Routes, Route } from '@kbn/shared-ux-router'; import { EuiTab, EuiTabs, EuiToolTip, EuiBetaBadge } from '@elastic/eui'; -import { I18nProvider } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { euiThemeVars } from '@kbn/ui-theme'; @@ -20,13 +18,13 @@ import type { ApplicationStart, ChromeStart, ScopedHistory, - CoreTheme, ExecutionContextStart, } from '@kbn/core/public'; -import { KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import type { DocTitleService, BreadcrumbService } from './services'; import { DevToolApp } from './dev_tool'; +import { DevToolsStartServices } from './types'; export interface AppServices { docTitleService: DocTitleService; @@ -38,9 +36,9 @@ interface DevToolsWrapperProps { devTools: readonly DevToolApp[]; activeDevTool: DevToolApp; updateRoute: (newRoute: string) => void; - theme$: Observable; appServices: AppServices; location: RouteComponentProps['location']; + startServices: DevToolsStartServices; } interface MountedDevToolDescriptor { @@ -53,9 +51,9 @@ function DevToolsWrapper({ devTools, activeDevTool, updateRoute, - theme$, appServices, location, + startServices, }: DevToolsWrapperProps) { const { docTitleService, breadcrumbService } = appServices; const mountedTool = useRef(null); @@ -123,7 +121,7 @@ function DevToolsWrapper({ const params = { element, location, - theme$, + ...startServices, }; const unmountHandler = await activeDevTool.mount(params); @@ -169,9 +167,9 @@ export function renderApp( application: ApplicationStart, chrome: ChromeStart, history: ScopedHistory, - theme$: Observable, devTools: readonly DevToolApp[], - appServices: AppServices + appServices: AppServices, + startServices: DevToolsStartServices ) { if (redirectOnMissingCapabilities(application)) { return () => {}; @@ -180,37 +178,35 @@ export function renderApp( setBadge(application, chrome); ReactDOM.render( - - - - - {devTools - // Only create routes for devtools that are not disabled - .filter((devTool) => !devTool.isDisabled()) - .map((devTool) => ( - ( - - )} - /> - ))} - - - - - - - , + + + + {devTools + // Only create routes for devtools that are not disabled + .filter((devTool) => !devTool.isDisabled()) + .map((devTool) => ( + ( + + )} + /> + ))} + + + + + + , element ); diff --git a/src/plugins/dev_tools/public/dev_tool.ts b/src/plugins/dev_tools/public/dev_tool.ts index 53f79ad686c43..4a33092f43334 100644 --- a/src/plugins/dev_tools/public/dev_tool.ts +++ b/src/plugins/dev_tools/public/dev_tool.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -import { Observable } from 'rxjs'; import { RouteComponentProps } from 'react-router-dom'; -import { AppUnmount, CoreTheme } from '@kbn/core/public'; +import { AppUnmount } from '@kbn/core/public'; +import { DevToolsStartServices } from './types'; /** * Descriptor for a dev tool. A dev tool works similar to an application @@ -19,10 +19,9 @@ export type CreateDevToolArgs = Omit; } export class DevToolApp { diff --git a/src/plugins/dev_tools/public/plugin.ts b/src/plugins/dev_tools/public/plugin.ts index 8b50538af2d4f..de007e570be6a 100644 --- a/src/plugins/dev_tools/public/plugin.ts +++ b/src/plugins/dev_tools/public/plugin.ts @@ -60,11 +60,13 @@ export class DevToolsPlugin implements Plugin { order: 9010, category: DEFAULT_APP_CATEGORIES.management, mount: async (params: AppMountParameters) => { - const { element, history, theme$ } = params; + const { element, history } = params; element.classList.add('devAppWrapper'); const [core] = await getStartServices(); const { application, chrome, executionContext } = core; + const { analytics, i18n: i18nStart, theme } = core; + const startServices = { analytics, i18n: i18nStart, theme }; this.docTitleService.setup(chrome.docTitle.change); this.breadcrumbService.setup(chrome.setBreadcrumbs); @@ -81,9 +83,9 @@ export class DevToolsPlugin implements Plugin { application, chrome, history, - theme$, this.getSortedDevTools(), - appServices + appServices, + startServices ); }, }); diff --git a/src/plugins/dev_tools/public/types.ts b/src/plugins/dev_tools/public/types.ts index 972afe5763205..7432b8fb5dc49 100644 --- a/src/plugins/dev_tools/public/types.ts +++ b/src/plugins/dev_tools/public/types.ts @@ -6,8 +6,16 @@ * Side Public License, v 1. */ +import { AnalyticsServiceStart, I18nStart, ThemeServiceStart } from '@kbn/core/public'; + export interface ConfigSchema { deeplinks: { navLinkStatus: 'default' | 'visible'; }; } + +export interface DevToolsStartServices { + analytics: Pick; + i18n: I18nStart; + theme: Pick; +} diff --git a/src/plugins/dev_tools/tsconfig.json b/src/plugins/dev_tools/tsconfig.json index 13e30f92c8d6e..102e44488a7eb 100644 --- a/src/plugins/dev_tools/tsconfig.json +++ b/src/plugins/dev_tools/tsconfig.json @@ -8,14 +8,13 @@ "@kbn/core", "@kbn/url-forwarding-plugin", "@kbn/management-plugin", - "@kbn/i18n-react", "@kbn/i18n", "@kbn/ui-theme", - "@kbn/kibana-react-plugin", "@kbn/shared-ux-router", "@kbn/deeplinks-devtools", "@kbn/config-schema", "@kbn/core-plugins-server", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts b/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts index 8d5f0db7a669d..e8a6050b9ce59 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/core/core_usage_collector.ts @@ -342,6 +342,20 @@ export function getCoreUsageCollector( }, environment: { memory: { + arrayBuffersBytes: { + type: 'long', + _meta: { + description: + 'Memory allocated for array buffers. This is also included in the external value.', + }, + }, + externalBytes: { + type: 'long', + _meta: { + description: 'Memory usage of C++ objects bound to JavaScript objects managed by V8.', + }, + }, + residentSetSizeBytes: { type: 'long', _meta: { description: 'Node RSS.' } }, heapSizeLimit: { type: 'long', _meta: { description: 'Host memory heap size limit.' } }, heapTotalBytes: { type: 'long', diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts index 1cf68fdf92f36..fc4786dd5ca3f 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/schema.ts @@ -468,6 +468,10 @@ export const stackManagementSchema: MakeSchemaFrom = { type: 'boolean', _meta: { description: 'Non-default value of setting.' }, }, + 'observability:apmEnableMultiSignal': { + type: 'boolean', + _meta: { description: 'Non-default value of setting.' }, + }, 'observability:apmAWSLambdaPriceFactor': { type: 'text', _meta: { description: 'Non-default value of setting.' }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts index 8464207aaa1d6..bc1c315edae29 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/management/types.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/management/types.ts @@ -161,6 +161,7 @@ export interface UsageStats { 'observability:apmTraceExplorerTab': boolean; 'observability:apmEnableCriticalPath': boolean; 'observability:apmEnableProfilingIntegration': boolean; + 'observability:apmEnableMultiSignal': boolean; 'observability:profilingShowErrorFrames': boolean; 'securitySolution:enableGroupedNav': boolean; 'securitySolution:showRelatedIntegrations': boolean; diff --git a/src/plugins/navigation/public/plugin.test.ts b/src/plugins/navigation/public/plugin.test.ts index 1aad72a3344f3..07de4ff3483a5 100644 --- a/src/plugins/navigation/public/plugin.test.ts +++ b/src/plugins/navigation/public/plugin.test.ts @@ -160,8 +160,7 @@ describe('Navigation Plugin', () => { expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); expect(coreStart.chrome.project.changeActiveSolutionNavigation).toHaveBeenCalledWith( - 'security', - { onlyIfNotSet: true } + 'security' ); }); diff --git a/src/plugins/navigation/public/plugin.tsx b/src/plugins/navigation/public/plugin.tsx index 79f7a032daf72..e62eb5c2c104f 100644 --- a/src/plugins/navigation/public/plugin.tsx +++ b/src/plugins/navigation/public/plugin.tsx @@ -10,6 +10,7 @@ import { combineLatest, debounceTime, distinctUntilChanged, + firstValueFrom, from, map, Observable, @@ -139,9 +140,11 @@ export class NavigationPublicPlugin isSolutionNavExperiementEnabled$ = !onCloud || isServerless ? of(false) - : from(cloudExperiments.getVariation(SOLUTION_NAV_FEATURE_FLAG_NAME, false)).pipe( - shareReplay(1) - ); + : from( + cloudExperiments + .getVariation(SOLUTION_NAV_FEATURE_FLAG_NAME, false) + .catch(() => false) + ).pipe(shareReplay(1)); this.isSolutionNavEnabled$ = isSolutionNavExperiementEnabled$.pipe( switchMap((isFeatureEnabled) => { @@ -171,22 +174,14 @@ export class NavigationPublicPlugin }); // Initialize the solution navigation if it is enabled - isSolutionNavExperiementEnabled$.pipe(take(1)).subscribe((isFeatureEnabled) => { - if (!isFeatureEnabled) return; + isSolutionNavExperiementEnabled$.pipe(take(1)).subscribe((isEnabled) => { + if (!isEnabled) return; chrome.project.setCloudUrls(cloud!); this.addDefaultSolutionNavigation({ chrome }); this.susbcribeToSolutionNavUiSettings({ core, security, defaultSolution }); }); - // Keep track of the solution navigation enabled state - let isSolutionNavEnabled = false; - isSolutionNavExperiementEnabled$ - .pipe(takeUntil(this.stop$)) - .subscribe((_isSolutionNavEnabled) => { - isSolutionNavEnabled = _isSolutionNavEnabled; - }); - return { ui: { TopNavMenu: createTopNav(unifiedSearch, extensions), @@ -194,8 +189,10 @@ export class NavigationPublicPlugin createTopNavWithCustomContext: createCustomTopNav, }, addSolutionNavigation: (solutionNavigation) => { - if (!isSolutionNavEnabled) return; - return this.addSolutionNavigation(solutionNavigation); + firstValueFrom(isSolutionNavExperiementEnabled$).then((isEnabled) => { + if (!isEnabled) return; + this.addSolutionNavigation(solutionNavigation); + }); }, isSolutionNavEnabled$: this.isSolutionNavEnabled$, }; @@ -234,7 +231,7 @@ export class NavigationPublicPlugin chrome.project.changeActiveSolutionNavigation(null); chrome.setChromeStyle('classic'); } else { - chrome.project.changeActiveSolutionNavigation(defaultSolution, { onlyIfNotSet: true }); + chrome.project.changeActiveSolutionNavigation(defaultSolution); } }); } diff --git a/src/plugins/navigation/server/plugin.ts b/src/plugins/navigation/server/plugin.ts index 6724ed8c20c53..979a2285a42ed 100644 --- a/src/plugins/navigation/server/plugin.ts +++ b/src/plugins/navigation/server/plugin.ts @@ -33,15 +33,21 @@ export class NavigationServerPlugin core: CoreSetup, plugins: NavigationServerSetupDependencies ) { - if (plugins.cloud?.isCloudEnabled && !this.isServerless()) { - const config = this.initializerContext.config.get(); + const config = this.initializerContext.config.get(); + const isSolutionNavExperiementEnabled = + Boolean(plugins.cloud?.isCloudEnabled) && !this.isServerless(); - void core.getStartServices().then(async ([coreStart, deps]) => { - if (await deps.cloudExperiments?.getVariation(SOLUTION_NAV_FEATURE_FLAG_NAME, false)) { - core.uiSettings.registerGlobal(getUiSettings(config)); - } else { - await this.removeUiSettings(coreStart, getUiSettings(config)); - } + if (isSolutionNavExperiementEnabled) { + void core.getStartServices().then(([coreStart, deps]) => { + return deps.cloudExperiments + ?.getVariation(SOLUTION_NAV_FEATURE_FLAG_NAME, false) + .then(async (enabled) => { + if (enabled) { + core.uiSettings.registerGlobal(getUiSettings(config)); + } else { + await this.removeUiSettings(coreStart, getUiSettings(config)); + } + }); }); } diff --git a/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx b/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx index ef14a6c88dcb7..c65b6be13674e 100644 --- a/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx +++ b/src/plugins/presentation_util/public/components/field_picker/field_picker.tsx @@ -8,6 +8,7 @@ import classNames from 'classnames'; import { sortBy, uniq } from 'lodash'; +import { comboBoxFieldOptionMatcher } from '@kbn/field-utils'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { i18n } from '@kbn/i18n'; @@ -63,6 +64,7 @@ export const FieldPicker = ({ const options: EuiSelectableOption[] = (availableFields ?? []).map((field) => { return { key: field.name, + name: field.name, label: field.displayName ?? field.name, className: 'presFieldPicker__fieldButton', checked: field.name === selectedFieldName ? 'on' : undefined, @@ -129,6 +131,7 @@ export const FieldPicker = ({ const field = dataView.getFieldByName(changedOption.key); if (field) onSelectField?.(field); }} + optionMatcher={comboBoxFieldOptionMatcher} searchProps={{ 'data-test-subj': 'field-search-input', placeholder: i18n.translate('presentationUtil.fieldSearch.searchPlaceHolder', { diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index f5eb21f859bca..717e5ebabbe1b 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -8017,6 +8017,24 @@ "properties": { "memory": { "properties": { + "arrayBuffersBytes": { + "type": "long", + "_meta": { + "description": "Memory allocated for array buffers. This is also included in the external value." + } + }, + "externalBytes": { + "type": "long", + "_meta": { + "description": "Memory usage of C++ objects bound to JavaScript objects managed by V8." + } + }, + "residentSetSizeBytes": { + "type": "long", + "_meta": { + "description": "Node RSS." + } + }, "heapSizeLimit": { "type": "long", "_meta": { @@ -10149,6 +10167,12 @@ "description": "Non-default value of setting." } }, + "observability:apmEnableMultiSignal": { + "type": "boolean", + "_meta": { + "description": "Non-default value of setting." + } + }, "observability:apmAWSLambdaPriceFactor": { "type": "text", "_meta": { @@ -10161,15 +10185,6 @@ "description": "Non-default value of setting." } }, - "observability:logsExplorer:allowedDataViews": { - "type": "array", - "items": { - "type": "keyword", - "_meta": { - "description": "Non-default value of setting." - } - } - }, "observability:aiAssistantLogsIndexPattern": { "type": "keyword", "_meta": { @@ -10188,6 +10203,15 @@ "description": "Non-default value of setting." } }, + "observability:logsExplorer:allowedDataViews": { + "type": "array", + "items": { + "type": "keyword", + "_meta": { + "description": "Non-default value of setting." + } + } + }, "banners:placement": { "type": "keyword", "_meta": { @@ -11893,4 +11917,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/plugins/telemetry_collection_manager/server/plugin.test.ts b/src/plugins/telemetry_collection_manager/server/plugin.test.ts index adfe2c64a4916..a19f203c154fd 100644 --- a/src/plugins/telemetry_collection_manager/server/plugin.test.ts +++ b/src/plugins/telemetry_collection_manager/server/plugin.test.ts @@ -94,9 +94,7 @@ describe('Telemetry Collection Manager', () => { cluster_uuid: 'clusterUuid', cluster_name: 'clusterName', timestamp: new Date().toISOString(), - cluster_stats: { - cluster_uuid: 'clusterUuid', - }, + cluster_stats: {}, stack_stats: {}, version: 'version', }; diff --git a/src/plugins/telemetry_collection_manager/server/plugin.ts b/src/plugins/telemetry_collection_manager/server/plugin.ts index f4685576c1ef8..958d7439b5936 100644 --- a/src/plugins/telemetry_collection_manager/server/plugin.ts +++ b/src/plugins/telemetry_collection_manager/server/plugin.ts @@ -285,10 +285,7 @@ export class TelemetryCollectionManagerPlugin retrieveSnapshotTelemetryTransaction.startSpan('Prepare response'); const results = await Promise.all( usageData.map(async (clusterStats) => { - const { cluster_uuid: clusterUuid } = clusterStats.cluster_stats as Record< - string, - string - >; + const { cluster_uuid: clusterUuid } = clusterStats; return { clusterUuid, diff --git a/src/plugins/unified_histogram/public/chart/breakdown_field_selector.tsx b/src/plugins/unified_histogram/public/chart/breakdown_field_selector.tsx index b52ba919ecff1..06ee853ee89eb 100644 --- a/src/plugins/unified_histogram/public/chart/breakdown_field_selector.tsx +++ b/src/plugins/unified_histogram/public/chart/breakdown_field_selector.tsx @@ -8,7 +8,7 @@ import React, { useCallback, useMemo } from 'react'; import { EuiSelectableOption } from '@elastic/eui'; -import { FieldIcon, getFieldIconProps } from '@kbn/field-utils'; +import { FieldIcon, getFieldIconProps, comboBoxFieldOptionMatcher } from '@kbn/field-utils'; import { css } from '@emotion/react'; import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; @@ -37,6 +37,7 @@ export const BreakdownFieldSelector = ({ .filter(fieldSupportsBreakdown) .map((field) => ({ key: field.name, + name: field.name, label: field.displayName, value: field.name, checked: @@ -102,6 +103,7 @@ export const BreakdownFieldSelector = ({ defaultMessage: 'Select breakdown field', } )} + optionMatcher={comboBoxFieldOptionMatcher} options={fieldOptions} onChange={onChange} /> diff --git a/src/plugins/unified_histogram/public/chart/toolbar_selector.tsx b/src/plugins/unified_histogram/public/chart/toolbar_selector.tsx index 025e599c0dfad..b9115847b7b03 100644 --- a/src/plugins/unified_histogram/public/chart/toolbar_selector.tsx +++ b/src/plugins/unified_histogram/public/chart/toolbar_selector.tsx @@ -35,6 +35,7 @@ export interface ToolbarSelectorProps { options: SelectableEntry[]; searchable: boolean; onChange?: (chosenOption: SelectableEntry | undefined) => void; + optionMatcher?: EuiSelectableProps['optionMatcher']; } export const ToolbarSelector: React.FC = ({ @@ -45,6 +46,7 @@ export const ToolbarSelector: React.FC = ({ options, searchable, onChange, + optionMatcher, }) => { const { euiTheme } = useEuiTheme(); const [isOpen, setIsOpen] = useState(false); @@ -144,6 +146,7 @@ export const ToolbarSelector: React.FC = ({ data-test-subj={`${dataTestSubj}Selectable`} options={options} onChange={onSelectionChange} + optionMatcher={optionMatcher} listProps={{ truncationProps: { truncation: 'middle' }, isVirtualized: searchable, diff --git a/src/plugins/unified_search/public/filters_builder/filter_item/field_input.tsx b/src/plugins/unified_search/public/filters_builder/filter_item/field_input.tsx index cc87c3de78936..15437b24ab480 100644 --- a/src/plugins/unified_search/public/filters_builder/filter_item/field_input.tsx +++ b/src/plugins/unified_search/public/filters_builder/filter_item/field_input.tsx @@ -8,6 +8,7 @@ import React, { useCallback, useContext, useRef } from 'react'; import { i18n } from '@kbn/i18n'; +import { comboBoxFieldOptionMatcher } from '@kbn/field-utils'; import { FieldIcon } from '@kbn/react-field'; import { KBN_FIELD_TYPES } from '@kbn/field-types'; import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; @@ -54,6 +55,7 @@ export function FieldInput({ field, dataView, onHandleField }: FieldInputProps) } return { label, + name: dataViewField.name, value: dataViewField.type as KBN_FIELD_TYPES, prepend: , }; @@ -82,6 +84,7 @@ export function FieldInput({ field, dataView, onHandleField }: FieldInputProps) inputRef={(ref) => { inputRef.current = ref; }} + optionMatcher={comboBoxFieldOptionMatcher} options={euiOptions} selectedOptions={selectedEuiOptions} onChange={onComboBoxChange} diff --git a/src/plugins/unified_search/tsconfig.json b/src/plugins/unified_search/tsconfig.json index d3dfaff1ef6bb..82df1ffe507cf 100644 --- a/src/plugins/unified_search/tsconfig.json +++ b/src/plugins/unified_search/tsconfig.json @@ -47,7 +47,8 @@ "@kbn/react-kibana-context-render", "@kbn/data-view-utils", "@kbn/esql-utils", - "@kbn/react-kibana-mount" + "@kbn/react-kibana-mount", + "@kbn/field-utils" ], "exclude": [ "target/**/*", diff --git a/tsconfig.base.json b/tsconfig.base.json index 9dddb7c5d67d5..c034da408f82f 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1058,6 +1058,8 @@ "@kbn/logging/*": ["packages/kbn-logging/*"], "@kbn/logging-mocks": ["packages/kbn-logging-mocks"], "@kbn/logging-mocks/*": ["packages/kbn-logging-mocks/*"], + "@kbn/logs-data-access-plugin": ["x-pack/plugins/observability_solution/logs_data_access"], + "@kbn/logs-data-access-plugin/*": ["x-pack/plugins/observability_solution/logs_data_access/*"], "@kbn/logs-explorer-plugin": ["x-pack/plugins/observability_solution/logs_explorer"], "@kbn/logs-explorer-plugin/*": ["x-pack/plugins/observability_solution/logs_explorer/*"], "@kbn/logs-shared-plugin": ["x-pack/plugins/observability_solution/logs_shared"], diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index 07f3598101709..b589cd5626a87 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -894,7 +894,7 @@ const AssistantComponent: React.FC = ({ selectedConversation={currentConversation} defaultConnector={defaultConnector} docLinks={docLinks} - isDisabled={isDisabled} + isDisabled={isDisabled || isLoadingChatSend} isSettingsModalVisible={isSettingsModalVisible} onToggleShowAnonymizedValues={onToggleShowAnonymizedValues} setIsSettingsModalVisible={setIsSettingsModalVisible} diff --git a/x-pack/packages/observability/alert_details/src/components/alert_active_time_range_annotation.tsx b/x-pack/packages/observability/alert_details/src/components/alert_active_time_range_annotation.tsx index 9f1beb3c77669..e35e38b6d7db3 100644 --- a/x-pack/packages/observability/alert_details/src/components/alert_active_time_range_annotation.tsx +++ b/x-pack/packages/observability/alert_details/src/components/alert_active_time_range_annotation.tsx @@ -37,7 +37,7 @@ export function AlertActiveTimeRangeAnnotation({ alertStart, alertEnd, color, id details: RECT_ANNOTATION_TITLE, }, ]} - style={{ fill: color, opacity: 0.1 }} + style={{ fill: color, opacity: 1 }} /> ); } diff --git a/x-pack/packages/observability/alert_details/src/components/alert_threshold_time_range_rect.tsx b/x-pack/packages/observability/alert_details/src/components/alert_threshold_time_range_rect.tsx index 52c2a803afae1..8294c4ee04098 100644 --- a/x-pack/packages/observability/alert_details/src/components/alert_threshold_time_range_rect.tsx +++ b/x-pack/packages/observability/alert_details/src/components/alert_threshold_time_range_rect.tsx @@ -10,7 +10,6 @@ import { RectAnnotation } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; interface Props { - alertStarted: number; color: string; id: string; threshold: number; @@ -23,7 +22,7 @@ const RECT_ANNOTATION_TITLE = i18n.translate( } ); -export function AlertThresholdTimeRangeRect({ alertStarted, color, id, threshold }: Props) { +export function AlertThresholdTimeRangeRect({ color, id, threshold }: Props) { return ( { await page.goto(kbnUrl.get(`/app/management/kibana/tags`)); diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index e16eb6d24a12e..b41e9ef70df78 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -52,6 +52,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -167,6 +170,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -287,6 +293,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -471,6 +480,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -759,6 +771,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -3076,6 +3093,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -3719,6 +3741,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -4187,6 +4214,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -4234,6 +4266,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -5744,6 +5781,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, diff --git a/x-pack/plugins/alerting/common/constants/backfill.ts b/x-pack/plugins/alerting/common/constants/backfill.ts index 0a8281cba8186..b78d18f5550b6 100644 --- a/x-pack/plugins/alerting/common/constants/backfill.ts +++ b/x-pack/plugins/alerting/common/constants/backfill.ts @@ -6,3 +6,7 @@ */ export const MAX_SCHEDULE_BACKFILL_BULK_SIZE = 100; +// Only allow scheduling backfills up to 90 days in the past +export const MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_DAYS = 90; +export const MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_MS = + MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_DAYS * 24 * 60 * 60 * 1000; diff --git a/x-pack/plugins/alerting/common/constants/index.ts b/x-pack/plugins/alerting/common/constants/index.ts index 5dc50b91a4163..0acc25785d194 100644 --- a/x-pack/plugins/alerting/common/constants/index.ts +++ b/x-pack/plugins/alerting/common/constants/index.ts @@ -7,5 +7,9 @@ export type { AdHocRunStatus } from './ad_hoc_run_status'; export { adHocRunStatus } from './ad_hoc_run_status'; -export { MAX_SCHEDULE_BACKFILL_BULK_SIZE } from './backfill'; +export { + MAX_SCHEDULE_BACKFILL_BULK_SIZE, + MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_DAYS, + MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_MS, +} from './backfill'; export { PLUGIN } from './plugin'; diff --git a/x-pack/plugins/alerting/common/index.ts b/x-pack/plugins/alerting/common/index.ts index 2c71a3a17379f..320a5b29f6956 100644 --- a/x-pack/plugins/alerting/common/index.ts +++ b/x-pack/plugins/alerting/common/index.ts @@ -13,6 +13,7 @@ import { AlertsHealth } from './rule'; export * from './rule'; export * from './rules_settings'; export * from './rule_type'; +export * from './lib'; export type { ThrottledActions, LastScheduledActions, diff --git a/x-pack/plugins/ml/public/application/components/ml_embedded_map/index.ts b/x-pack/plugins/alerting/common/lib/index.ts similarity index 77% rename from x-pack/plugins/ml/public/application/components/ml_embedded_map/index.ts rename to x-pack/plugins/alerting/common/lib/index.ts index 3829e98450d73..35888ab08952d 100644 --- a/x-pack/plugins/ml/public/application/components/ml_embedded_map/index.ts +++ b/x-pack/plugins/alerting/common/lib/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export { MlEmbeddedMapComponent } from './ml_embedded_map'; +export { validateBackfillSchedule } from './validate_backfill_schedule'; diff --git a/x-pack/plugins/alerting/common/lib/validate_backfill_schedule.test.ts b/x-pack/plugins/alerting/common/lib/validate_backfill_schedule.test.ts new file mode 100644 index 0000000000000..fa512c1635afb --- /dev/null +++ b/x-pack/plugins/alerting/common/lib/validate_backfill_schedule.test.ts @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { validateBackfillSchedule } from './validate_backfill_schedule'; + +describe('validateBackfillSchedule', () => { + beforeAll(() => { + jest.useFakeTimers(); + jest.setSystemTime(new Date('2023-11-16T08:00:00.000Z')); + }); + afterAll(() => jest.useRealTimers()); + + test('validates valid start date', () => { + expect(validateBackfillSchedule('2023-10-16T08:00:00.000Z')).toBeUndefined(); + }); + + test('validates valid end date', () => { + expect( + validateBackfillSchedule('2023-10-16T08:00:00.000Z', '2023-10-17T08:00:00.000Z') + ).toBeUndefined(); + }); + + test('returns error if start date is not a valid date', () => { + expect(validateBackfillSchedule('foo')).toMatchInlineSnapshot( + `"Backfill start must be valid date"` + ); + }); + + test('returns error if end date is not a valid date', () => { + expect(validateBackfillSchedule('2023-10-16T08:00:00.000Z', 'foo')).toMatchInlineSnapshot( + `"Backfill end must be valid date"` + ); + }); + + test('returns error if start date is too far in the past', () => { + expect(validateBackfillSchedule('2023-08-18T07:59:59.999Z')).toMatchInlineSnapshot( + `"Backfill cannot look back more than 90 days"` + ); + }); + + test('returns error if end date is less than or equal to start date', () => { + expect( + validateBackfillSchedule('2023-10-16T08:00:00.000Z', '2023-10-16T08:00:00.000Z') + ).toMatchInlineSnapshot(`"Backfill end must be greater than backfill start"`); + expect( + validateBackfillSchedule('2023-10-16T08:00:00.000Z', '2023-10-15T08:00:00.000Z') + ).toMatchInlineSnapshot(`"Backfill end must be greater than backfill start"`); + }); + + test('returns error if start date is greater than current date', () => { + expect(validateBackfillSchedule('2023-11-16T08:00:00.001Z')).toMatchInlineSnapshot( + `"Backfill cannot be scheduled for the future"` + ); + }); + + test('returns error if end date is greater than current date', () => { + expect( + validateBackfillSchedule('2023-10-16T08:00:00.000Z', '2023-11-16T08:00:00.001Z') + ).toMatchInlineSnapshot(`"Backfill cannot be scheduled for the future"`); + }); +}); diff --git a/x-pack/plugins/alerting/common/lib/validate_backfill_schedule.ts b/x-pack/plugins/alerting/common/lib/validate_backfill_schedule.ts new file mode 100644 index 0000000000000..c8bc1467296e4 --- /dev/null +++ b/x-pack/plugins/alerting/common/lib/validate_backfill_schedule.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_DAYS, + MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_MS, +} from '../constants'; + +export function validateBackfillSchedule(start: string, end?: string): string | void { + try { + const now = new Date().valueOf(); + + const parsedStart = Date.parse(start); + if (isNaN(parsedStart)) { + return `Backfill start must be valid date`; + } + + if (now - parsedStart > MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_MS) { + return `Backfill cannot look back more than ${MAX_SCHEDULE_BACKFILL_LOOKBACK_WINDOW_DAYS} days`; + } + + if (now < parsedStart) { + return `Backfill cannot be scheduled for the future`; + } + + if (end) { + const parsedEnd = Date.parse(end); + if (isNaN(parsedEnd)) { + return `Backfill end must be valid date`; + } + const startMs = new Date(start).valueOf(); + const endMs = new Date(end).valueOf(); + if (endMs <= startMs) { + return `Backfill end must be greater than backfill start`; + } + + if (now < parsedEnd) { + return `Backfill cannot be scheduled for the future`; + } + } + } catch (err) { + return `Error validating backfill schedule - ${err.message}`; + } +} diff --git a/x-pack/plugins/alerting/common/routes/backfill/apis/schedule/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/backfill/apis/schedule/schemas/v1.ts index 791a5cce9ac38..527134a2b5138 100644 --- a/x-pack/plugins/alerting/common/routes/backfill/apis/schedule/schemas/v1.ts +++ b/x-pack/plugins/alerting/common/routes/backfill/apis/schedule/schemas/v1.ts @@ -5,6 +5,7 @@ * 2.0. */ import { schema } from '@kbn/config-schema'; +import { validateBackfillSchedule } from '../../../../..'; import { MAX_SCHEDULE_BACKFILL_BULK_SIZE } from '../../../../../constants'; import { backfillResponseSchemaV1, errorResponseSchemaV1 } from '../../../response'; @@ -17,22 +18,7 @@ export const scheduleBodySchema = schema.arrayOf( }, { validate({ start, end }) { - const parsedStart = Date.parse(start); - if (isNaN(parsedStart)) { - return `Backfill start must be valid date`; - } - - if (end) { - const parsedEnd = Date.parse(end); - if (isNaN(parsedEnd)) { - return `Backfill end must be valid date`; - } - const startMs = new Date(start).valueOf(); - const endMs = new Date(end).valueOf(); - if (endMs <= startMs) { - return `Backfill end must be greater than backfill start`; - } - } + return validateBackfillSchedule(start, end); }, } ), diff --git a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts index 4767a344f5153..7edcb26b9718e 100644 --- a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts +++ b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schedule_backfill.test.ts @@ -185,6 +185,10 @@ function getMockData(overwrites: Record = {}): ScheduleBackfill describe('scheduleBackfill()', () => { let rulesClient: RulesClient; + beforeAll(() => { + jest.useFakeTimers(); + jest.setSystemTime(new Date('2023-12-16T08:00:00.000Z')); + }); beforeEach(async () => { jest.resetAllMocks(); rulesClient = new RulesClient(rulesClientParams); @@ -239,6 +243,7 @@ describe('scheduleBackfill()', () => { }); backfillClient.bulkQueue.mockResolvedValue(mockBulkQueueResult); }); + afterAll(() => jest.useRealTimers()); test('should successfully schedule backfill', async () => { const mockData = [getMockData(), getMockData({ ruleId: '2', end: '2023-11-17T08:00:00.000Z' })]; diff --git a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schemas/schedule_backfill_params_schema.ts b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schemas/schedule_backfill_params_schema.ts index 0082181e759a6..c4a469da1b5db 100644 --- a/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schemas/schedule_backfill_params_schema.ts +++ b/x-pack/plugins/alerting/server/application/backfill/methods/schedule/schemas/schedule_backfill_params_schema.ts @@ -6,6 +6,7 @@ */ import { schema } from '@kbn/config-schema'; +import { validateBackfillSchedule } from '../../../../../../common'; import { MAX_SCHEDULE_BACKFILL_BULK_SIZE } from '../../../../../../common/constants'; export const scheduleBackfillParamSchema = schema.object( @@ -16,22 +17,7 @@ export const scheduleBackfillParamSchema = schema.object( }, { validate({ start, end }) { - const parsedStart = Date.parse(start); - if (isNaN(parsedStart)) { - return `Backfill start must be valid date`; - } - - if (end) { - const parsedEnd = Date.parse(end); - if (isNaN(parsedEnd)) { - return `Backfill end must be valid date`; - } - const startMs = new Date(start).valueOf(); - const endMs = new Date(end).valueOf(); - if (endMs <= startMs) { - return `Backfill end must be greater than backfill start`; - } - } + return validateBackfillSchedule(start, end); }, } ); diff --git a/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap b/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap index 7de7801c9fc9b..518c2b406db74 100644 --- a/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap +++ b/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap @@ -898,6 +898,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -1116,6 +1119,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -1944,6 +1950,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -2227,6 +2238,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -2508,6 +2524,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -3452,6 +3473,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -3495,6 +3521,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-any-type": true, + }, + ], "type": "any", }, }, @@ -3762,6 +3793,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -3972,6 +4006,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -4132,6 +4169,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -4443,6 +4483,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -5052,6 +5095,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, @@ -5363,6 +5409,9 @@ Object { "presence": "optional", }, "metas": Array [ + Object { + "x-oas-any-type": true, + }, Object { "x-oas-optional": true, }, diff --git a/x-pack/plugins/cloud_security_posture/public/components/detection_rule_counter.tsx b/x-pack/plugins/cloud_security_posture/public/components/detection_rule_counter.tsx index f0d5d64edab67..4cf8c5983cb86 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/detection_rule_counter.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/detection_rule_counter.tsx @@ -36,14 +36,14 @@ export const DetectionRuleCounter = ({ tags, createRuleFn }: DetectionRuleCounte const [isCreateRuleLoading, setIsCreateRuleLoading] = useState(false); const queryClient = useQueryClient(); - const { http, notifications } = useKibana().services; + const { http, notifications, analytics, i18n, theme } = useKibana().services; const history = useHistory(); const [, setRulesTable] = useSessionStorage(RULES_TABLE_SESSION_STORAGE_KEY); const rulePageNavigation = useCallback(async () => { - await setRulesTable({ + setRulesTable({ tags, }); history.push({ @@ -58,14 +58,15 @@ export const DetectionRuleCounter = ({ tags, createRuleFn }: DetectionRuleCounte }, [history]); const createDetectionRuleOnClick = useCallback(async () => { + const startServices = { analytics, notifications, i18n, theme }; setIsCreateRuleLoading(true); const ruleResponse = await createRuleFn(http); setIsCreateRuleLoading(false); - showCreateDetectionRuleSuccessToast(notifications, http, ruleResponse); + showCreateDetectionRuleSuccessToast(startServices, http, ruleResponse); // Triggering a refetch of rules and alerts to update the UI queryClient.invalidateQueries([DETECTION_ENGINE_RULES_KEY]); queryClient.invalidateQueries([DETECTION_ENGINE_ALERTS_KEY]); - }, [createRuleFn, http, notifications, queryClient]); + }, [createRuleFn, http, analytics, notifications, i18n, theme, queryClient]); return ( { + const { notifications, analytics, i18n, theme } = cloudSecurityStartServices; + const startServices = { analytics, i18n, theme }; + return notifications.toasts.addSuccess({ toastLifeTimeMs: 10000, color: 'success', @@ -60,7 +64,8 @@ export const showCreateDetectionRuleSuccessToast = ( defaultMessage="Add rule actions to get notified when alerts are generated." /> - + , + startServices ), text: toMountPoint(
@@ -78,19 +83,23 @@ export const showCreateDetectionRuleSuccessToast = ( -
+ , + startServices ), }); }; export const showChangeBenchmarkRuleStatesSuccessToast = ( - notifications: NotificationsStart, + cloudSecurityStartServices: CloudSecurityPostureStartServices, isBenchmarkRuleMuted: boolean, data: { numberOfRules: number; numberOfDetectionRules: number; } ) => { + const { notifications, analytics, i18n, theme } = cloudSecurityStartServices; + const startServices = { analytics, i18n, theme }; + return notifications.toasts.addSuccess({ toastLifeTimeMs: 10000, color: 'success', @@ -111,7 +120,8 @@ export const showChangeBenchmarkRuleStatesSuccessToast = ( /> )} - + , + startServices ), text: toMountPoint(
@@ -145,7 +155,8 @@ export const showChangeBenchmarkRuleStatesSuccessToast = ( )} )} -
+ , + startServices ), }); }; @@ -171,8 +182,6 @@ export const TakeAction = ({ prefix: 'smallContextMenuPopover', }); - const { http, notifications } = useKibana().services; - const button = ( @@ -206,9 +213,6 @@ export const TakeAction = ({ enableBenchmarkRuleFn={enableBenchmarkRuleFn} setIsLoading={setIsLoading} closePopover={closePopover} - notifications={notifications} - http={http} - queryClient={queryClient} /> ); if (disableBenchmarkRuleFn) @@ -218,9 +222,6 @@ export const TakeAction = ({ disableBenchmarkRuleFn={disableBenchmarkRuleFn} setIsLoading={setIsLoading} closePopover={closePopover} - notifications={notifications} - http={http} - queryClient={queryClient} /> ); @@ -243,19 +244,17 @@ const CreateDetectionRule = ({ createRuleFn, setIsLoading, closePopover, - notifications, - http, queryClient, isCreateDetectionRuleDisabled = false, }: { createRuleFn: (http: HttpSetup) => Promise; setIsLoading: (isLoading: boolean) => void; closePopover: () => void; - notifications: NotificationsStart; - http: HttpSetup; queryClient: QueryClient; isCreateDetectionRuleDisabled: boolean; }) => { + const { http, ...startServices } = useKibana().services; + return ( Promise; setIsLoading: (isLoading: boolean) => void; closePopover: () => void; - notifications: NotificationsStart; - http: HttpSetup; - queryClient: QueryClient; }) => { return ( Promise; setIsLoading: (isLoading: boolean) => void; closePopover: () => void; - notifications: NotificationsStart; - http: HttpSetup; - queryClient: QueryClient; }) => { return ( { if (rule.metadata.benchmark.rule_number) { const rulesObjectRequest = { @@ -83,8 +85,8 @@ export const RuleFlyout = ({ onClose, rule, refetchRulesStates }: RuleFlyoutProp }; const nextRuleStates = isRuleMuted ? 'unmute' : 'mute'; await postRequestChangeRulesStates(nextRuleStates, [rulesObjectRequest]); - await refetchRulesStates(); - await showChangeBenchmarkRuleStatesSuccessToast(notifications, isRuleMuted, { + refetchRulesStates(); + showChangeBenchmarkRuleStatesSuccessToast(startServices, isRuleMuted, { numberOfRules: 1, numberOfDetectionRules: rulesData?.total || 0, }); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx index 586f0b9dee0cf..a9e4b0501cfdf 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table.tsx @@ -20,8 +20,9 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { uniqBy } from 'lodash'; -import { CoreStart, HttpSetup, NotificationsStart } from '@kbn/core/public'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { HttpSetup } from '@kbn/core/public'; +import { CloudSecurityPostureStartServices } from '../../types'; +import { useKibana } from '../../common/hooks/use_kibana'; import { getFindingsDetectionRuleSearchTags } from '../../../common/utils/detection_rules'; import { ColumnNameWithTooltip } from '../../components/column_name_with_tooltip'; import type { CspBenchmarkRulesWithStates, RulesState } from './rules_container'; @@ -61,8 +62,8 @@ type GetColumnProps = Pick< currentPageRulesArray: CspBenchmarkRulesWithStates[], selectedRulesArray: CspBenchmarkRulesWithStates[] ) => boolean; - notifications: NotificationsStart; http: HttpSetup; + startServices: CloudSecurityPostureStartServices; }; export const RulesTable = ({ @@ -132,40 +133,42 @@ export const RulesTable = ({ return true; }; - const { http, notifications } = useKibana().services; + const { http, notifications, analytics, i18n: i18nStart, theme } = useKibana().services; useEffect(() => { if (selectedRules.length >= items.length && items.length > 0 && selectedRules.length > 0) setIsAllRulesSelectedThisPage(true); else setIsAllRulesSelectedThisPage(false); }, [items.length, selectedRules.length]); - const columns = useMemo( - () => - getColumns({ - refetchRulesStates, - postRequestChangeRulesStates, - selectedRules, - setSelectedRules, - items, - setIsAllRulesSelectedThisPage, - isAllRulesSelectedThisPage, - isCurrentPageRulesASubset, - onRuleClick, - notifications, - http, - }), - [ + const columns = useMemo(() => { + const startServices = { notifications, analytics, i18n: i18nStart, theme }; + return getColumns({ refetchRulesStates, postRequestChangeRulesStates, selectedRules, setSelectedRules, items, + setIsAllRulesSelectedThisPage, isAllRulesSelectedThisPage, + isCurrentPageRulesASubset, onRuleClick, - notifications, http, - ] - ); + startServices, + }); + }, [ + refetchRulesStates, + postRequestChangeRulesStates, + selectedRules, + setSelectedRules, + items, + isAllRulesSelectedThisPage, + onRuleClick, + notifications, + http, + analytics, + i18nStart, + theme, + ]); return ( <> @@ -194,8 +197,8 @@ const getColumns = ({ isAllRulesSelectedThisPage, isCurrentPageRulesASubset, onRuleClick, - notifications, http, + startServices, }: GetColumnProps): Array> => [ { field: 'action', @@ -203,7 +206,7 @@ const getColumns = ({ { + onChange={() => { const uniqueSelectedRules = uniqBy([...selectedRules, ...items], 'metadata.id'); const onChangeSelectAllThisPageFn = () => { setSelectedRules(uniqueSelectedRules); @@ -227,7 +230,7 @@ const getColumns = ({ ), width: '40px', sortable: false, - render: (rules, item: CspBenchmarkRulesWithStates) => { + render: (_rules, item: CspBenchmarkRulesWithStates) => { return ( { + render: (_name, rule: CspBenchmarkRulesWithStates) => { const rulesObjectRequest = { benchmark_id: rule?.metadata.benchmark.id, benchmark_version: rule?.metadata.benchmark.version, @@ -320,9 +323,9 @@ const getColumns = ({ http ) ).total; - await postRequestChangeRulesStates(nextRuleState, [rulesObjectRequest]); - await refetchRulesStates(); - await showChangeBenchmarkRuleStatesSuccessToast(notifications, isRuleMuted, { + postRequestChangeRulesStates(nextRuleState, [rulesObjectRequest]); + refetchRulesStates(); + showChangeBenchmarkRuleStatesSuccessToast(startServices, isRuleMuted, { numberOfRules: 1, numberOfDetectionRules: detectionRuleCount || 0, }); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx index 5ef77f70be82a..58a4ad46986eb 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/rules/rules_table_header.tsx @@ -254,7 +254,8 @@ const CurrentPageOfTotal = ({ { match: 'any' } ); - const { notifications } = useKibana().services; + const { notifications, analytics, i18n: i18nStart, theme } = useKibana().services; + const startServices = { notifications, analytics, i18n: i18nStart, theme }; const postRequestChangeRulesState = useChangeCspRuleState(); const changeRulesState = async (state: 'mute' | 'unmute') => { @@ -269,9 +270,9 @@ const CurrentPageOfTotal = ({ // Only do the API Call IF there are no undefined value for rule number in the selected rules if (!bulkSelectedRules.some((rule) => rule.rule_number === undefined)) { await postRequestChangeRulesState(state, bulkSelectedRules); - await refetchRulesStates(); - await setIsPopoverOpen(false); - await showChangeBenchmarkRuleStatesSuccessToast(notifications, state !== 'mute', { + refetchRulesStates(); + setIsPopoverOpen(false); + showChangeBenchmarkRuleStatesSuccessToast(startServices, state !== 'mute', { numberOfRules: bulkSelectedRules.length, numberOfDetectionRules: rulesData?.total || 0, }); diff --git a/x-pack/plugins/cloud_security_posture/public/plugin.tsx b/x-pack/plugins/cloud_security_posture/public/plugin.tsx index f215841b30cea..bf014f83c1b0d 100755 --- a/x-pack/plugins/cloud_security_posture/public/plugin.tsx +++ b/x-pack/plugins/cloud_security_posture/public/plugin.tsx @@ -47,7 +47,7 @@ export class CspPlugin private isCloudEnabled?: boolean; public setup( - core: CoreSetup, + _core: CoreSetup, plugins: CspClientPluginSetupDeps ): CspClientPluginSetup { this.isCloudEnabled = plugins.cloud.isCloudEnabled; diff --git a/x-pack/plugins/cloud_security_posture/public/types.ts b/x-pack/plugins/cloud_security_posture/public/types.ts index 6766067df67e0..4b8499fdd82a0 100755 --- a/x-pack/plugins/cloud_security_posture/public/types.ts +++ b/x-pack/plugins/cloud_security_posture/public/types.ts @@ -14,7 +14,7 @@ import { UiActionsSetup, UiActionsStart } from '@kbn/ui-actions-plugin/public'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { IndexPatternFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public'; import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { ToastsStart } from '@kbn/core/public'; +import { CoreStart, ToastsStart } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; @@ -84,3 +84,8 @@ export interface CspSecuritySolutionContext { state?: Record; }>; } + +export type CloudSecurityPostureStartServices = Pick< + CoreStart, + 'notifications' | 'analytics' | 'i18n' | 'theme' +>; diff --git a/x-pack/plugins/cloud_security_posture/tsconfig.json b/x-pack/plugins/cloud_security_posture/tsconfig.json index 91d6b3711a245..907ff68fc3897 100755 --- a/x-pack/plugins/cloud_security_posture/tsconfig.json +++ b/x-pack/plugins/cloud_security_posture/tsconfig.json @@ -63,7 +63,8 @@ "@kbn/alerting-plugin", "@kbn/code-editor", "@kbn/code-editor-mock", - "@kbn/search-types" + "@kbn/search-types", + "@kbn/react-kibana-mount" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/cross_cluster_replication/public/shared_imports.ts b/x-pack/plugins/cross_cluster_replication/public/shared_imports.ts index 6a6f968627a65..f96a1d4804746 100644 --- a/x-pack/plugins/cross_cluster_replication/public/shared_imports.ts +++ b/x-pack/plugins/cross_cluster_replication/public/shared_imports.ts @@ -13,7 +13,7 @@ export { PageLoading, } from '@kbn/es-ui-shared-plugin/public'; -export { KibanaThemeProvider, useExecutionContext } from '@kbn/kibana-react-plugin/public'; +export { useExecutionContext } from '@kbn/kibana-react-plugin/public'; export { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx index 0d114f7cd4191..3f2c7e2978985 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_configuration.tsx @@ -133,7 +133,7 @@ export const ConnectorConfiguration: React.FC = () => { >( subfeaturePrivileges: false, enablePackagesStateMachine: true, advancedPolicySettings: true, + useSpaceAwareness: false, }); type ExperimentalConfigKeys = Array; diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 1e8a9ba75b0e8..38647d8218941 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -7602,6 +7602,10 @@ "type": "object", "description": "Advanced settings stored in the agent policy, e.g. agent_limits_go_max_procs", "nullable": true + }, + "supports_agentless": { + "type": "boolean", + "description": "Indicates whether the agent policy supports agentless integrations. Only allowed in a serverless environment." } }, "required": [ diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index 4f48786da4fbf..5b1cb40243649 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -4894,6 +4894,11 @@ components: Advanced settings stored in the agent policy, e.g. agent_limits_go_max_procs nullable: true + supports_agentless: + type: boolean + description: >- + Indicates whether the agent policy supports agentless integrations. + Only allowed in a serverless environment. required: - id - status diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml index 070d72a5ec353..633e4e4ba89b8 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml @@ -73,6 +73,9 @@ properties: type: object description: Advanced settings stored in the agent policy, e.g. agent_limits_go_max_procs nullable: true + supports_agentless: + type: boolean + description: Indicates whether the agent policy supports agentless integrations. Only allowed in a serverless environment. required: - id - status diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts index 1bff10bcdf564..a67293ebdecaa 100644 --- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts @@ -41,6 +41,7 @@ export interface NewAgentPolicy { overrides?: { [key: string]: any } | null; advanced_settings?: { [key: string]: any } | null; keep_monitoring_alive?: boolean | null; + supports_agentless?: boolean | null; } // SO definition for this type is declared in server/types/interfaces diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx index 83453496507b0..b256349f5d6b9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/form.tsx @@ -272,7 +272,8 @@ export function useOnSubmit({ setFormState('LOADING'); if ((withSysMonitoring || newAgentPolicy.monitoring_enabled?.length) ?? 0 > 0) { const packagesToPreinstall: Array = []; - if (packageInfo) { + // skip preinstall of input package, to be able to rollback when package policy creation fails + if (packageInfo && packageInfo.type !== 'input') { packagesToPreinstall.push({ name: packageInfo.name, version: packageInfo.version }); } if (withSysMonitoring) { diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx index 8e594f6c8d7d9..c688da76819d4 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.tsx @@ -137,6 +137,7 @@ export function Detail() { const prerelease = useMemo(() => Boolean(queryParams.get('prerelease')), [queryParams]); const authz = useAuthz(); + const canAddAgent = authz.fleet.addAgents; const canInstallPackages = authz.integrations.installPackages; const canReadPackageSettings = authz.integrations.readPackageSettings; const canReadIntegrationPolicies = authz.integrations.readIntegrationPolicies; @@ -268,7 +269,8 @@ export function Detail() { useUIExtension(packageInfoData?.item?.name ?? '', 'package-detail-custom') !== undefined; // Only show config tab if package has `inputs` - const showConfigTab = packageInfo ? packageToPackagePolicyInputs(packageInfo).length > 0 : false; + const showConfigTab = + canAddAgent && (packageInfo ? packageToPackagePolicyInputs(packageInfo).length > 0 : false); // Only show API references tab if it is allowed & has documentation to show const showDocumentationTab = diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/settings/settings.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/settings/settings.tsx index 5c7d73f3e6794..aa722b5eb8d48 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/settings/settings.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/settings/settings.tsx @@ -81,20 +81,21 @@ const UpdatesAvailableMsg = ({ defaultMessage: 'New version available', })} > - - - - - -

- {'View changelog.'} -

-
-
+ + + + ), + }} + /> ); diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index c24f7859b1189..02e6d7baf9577 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -288,10 +288,13 @@ export class FleetPlugin core.status.set(this.fleetStatus$.asObservable()); - registerSavedObjects(core.savedObjects); + const experimentalFeatures = parseExperimentalConfigValue(config.enableExperimental ?? []); + + registerSavedObjects(core.savedObjects, { + useSpaceAwareness: experimentalFeatures.useSpaceAwareness, + }); registerEncryptedSavedObjects(deps.encryptedSavedObjects); - const experimentalFeatures = parseExperimentalConfigValue(config.enableExperimental ?? []); // Register feature if (deps.features) { deps.features.registerKibanaFeature({ diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index 7d2a756ffd6de..9108ab1df32df 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -192,7 +192,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { .put({ path: EPM_API_ROUTES.INFO_PATTERN, fleetAuthz: { - integrations: { upgradePackages: true, writePackageSettings: true }, + integrations: { writePackageSettings: true }, }, }) .addVersion( @@ -359,7 +359,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED, fleetAuthz: { - integrations: { upgradePackages: true, writePackageSettings: true }, + integrations: { writePackageSettings: true }, }, }) .addVersion( diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts index 7631e38f8df31..86d9be70435a5 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts @@ -48,7 +48,12 @@ import { PackagePolicyNotFoundError, PackagePolicyRequestError, } from '../../errors'; -import { getInstallations, getPackageInfo } from '../../services/epm/packages'; +import { + getInstallation, + getInstallations, + getPackageInfo, + removeInstallation, +} from '../../services/epm/packages'; import { PACKAGES_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../constants'; import { simplifiedPackagePolicytoNewPackagePolicy, @@ -229,6 +234,7 @@ export const createPackagePolicyHandler: FleetRequestHandler< const user = appContextService.getSecurity()?.authc.getCurrentUser(request) || undefined; const { force, id, package: pkg, ...newPolicy } = request.body; const authorizationHeader = HTTPAuthorizationHeader.parseFromRequest(request, user?.username); + let wasPackageAlreadyInstalled = false; if ('output_id' in newPolicy) { // TODO Remove deprecated APIs https://github.com/elastic/kibana/issues/121485 @@ -258,6 +264,12 @@ export const createPackagePolicyHandler: FleetRequestHandler< } as NewPackagePolicy); } + const installation = await getInstallation({ + savedObjectsClient: soClient, + pkgName: pkg!.name, + }); + wasPackageAlreadyInstalled = installation?.install_status === 'installed'; + // Create package policy const packagePolicy = await fleetContext.packagePolicyService.asCurrentUser.create( soClient, @@ -282,6 +294,27 @@ export const createPackagePolicyHandler: FleetRequestHandler< }, }); } catch (error) { + appContextService + .getLogger() + .error(`Error while creating package policy due to error: ${error.message}`); + if (!wasPackageAlreadyInstalled) { + const installation = await getInstallation({ + savedObjectsClient: soClient, + pkgName: pkg!.name, + }); + if (installation) { + appContextService + .getLogger() + .info(`rollback ${pkg!.name}-${pkg!.version} package installation after error`); + await removeInstallation({ + savedObjectsClient: soClient, + pkgName: pkg!.name, + pkgVersion: pkg!.version, + esClient, + }); + } + } + if (error.statusCode) { return response.customError({ statusCode: error.statusCode, diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index d1ed80cce4e43..22b5aa3f5fddb 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -92,259 +92,216 @@ import { settingsV1 } from './model_versions/v1'; * Please update typings in `/common/types` as well as * schemas in `/server/types` if mappings are updated. */ -export const getSavedObjectTypes = (): { [key: string]: SavedObjectsType } => ({ - // Deprecated - [GLOBAL_SETTINGS_SAVED_OBJECT_TYPE]: { - name: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - fleet_server_hosts: { type: 'keyword' }, - has_seen_add_data_notice: { type: 'boolean', index: false }, - prerelease_integrations_enabled: { type: 'boolean' }, - secret_storage_requirements_met: { type: 'boolean' }, - output_secret_storage_requirements_met: { type: 'boolean' }, +export const getSavedObjectTypes = ( + options = { useSpaceAwareness: false } +): { [key: string]: SavedObjectsType } => { + const { useSpaceAwareness } = options; + + return { + // Deprecated + [GLOBAL_SETTINGS_SAVED_OBJECT_TYPE]: { + name: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'agnostic', + management: { + importableAndExportable: false, }, - }, - migrations: { - '7.10.0': migrateSettingsToV7100, - '7.13.0': migrateSettingsToV7130, - '8.6.0': migrateSettingsToV860, - }, - modelVersions: { - 1: settingsV1, - }, - }, - [AGENT_POLICY_SAVED_OBJECT_TYPE]: { - name: AGENT_POLICY_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - name: { type: 'keyword' }, - schema_version: { type: 'version' }, - description: { type: 'text' }, - namespace: { type: 'keyword' }, - is_managed: { type: 'boolean' }, - is_default: { type: 'boolean' }, - is_default_fleet_server: { type: 'boolean' }, - status: { type: 'keyword' }, - unenroll_timeout: { type: 'integer' }, - inactivity_timeout: { type: 'integer' }, - updated_at: { type: 'date' }, - updated_by: { type: 'keyword' }, - revision: { type: 'integer' }, - monitoring_enabled: { type: 'keyword', index: false }, - is_preconfigured: { type: 'keyword' }, - data_output_id: { type: 'keyword' }, - monitoring_output_id: { type: 'keyword' }, - download_source_id: { type: 'keyword' }, - fleet_server_host_id: { type: 'keyword' }, - agent_features: { - properties: { - name: { type: 'keyword' }, - enabled: { type: 'boolean' }, - }, + mappings: { + properties: { + fleet_server_hosts: { type: 'keyword' }, + has_seen_add_data_notice: { type: 'boolean', index: false }, + prerelease_integrations_enabled: { type: 'boolean' }, + secret_storage_requirements_met: { type: 'boolean' }, + output_secret_storage_requirements_met: { type: 'boolean' }, }, - is_protected: { type: 'boolean' }, - overrides: { type: 'flattened', index: false }, - keep_monitoring_alive: { type: 'boolean' }, - advanced_settings: { type: 'flattened', index: false }, }, - }, - migrations: { - '7.10.0': migrateAgentPolicyToV7100, - '7.12.0': migrateAgentPolicyToV7120, - '8.4.0': migrateAgentPolicyToV840, - '8.5.0': migrateAgentPolicyToV850, - '8.9.0': migrateAgentPolicyToV890, - }, - modelVersions: { - '1': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - advanced_settings: { type: 'flattened', index: false }, - }, - }, - ], + migrations: { + '7.10.0': migrateSettingsToV7100, + '7.13.0': migrateSettingsToV7130, + '8.6.0': migrateSettingsToV860, + }, + modelVersions: { + 1: settingsV1, }, }, - }, - [OUTPUT_SAVED_OBJECT_TYPE]: { - name: OUTPUT_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - output_id: { type: 'keyword', index: false }, - name: { type: 'keyword' }, - type: { type: 'keyword' }, - is_default: { type: 'boolean' }, - is_default_monitoring: { type: 'boolean' }, - hosts: { type: 'keyword' }, - ca_sha256: { type: 'keyword', index: false }, - ca_trusted_fingerprint: { type: 'keyword', index: false }, - service_token: { type: 'keyword', index: false }, - config: { type: 'flattened' }, - config_yaml: { type: 'text' }, - is_preconfigured: { type: 'boolean', index: false }, - is_internal: { type: 'boolean', index: false }, - ssl: { type: 'binary' }, - proxy_id: { type: 'keyword' }, - shipper: { - dynamic: false, // we aren't querying or aggregating over this data, so we don't need to specify any fields - properties: {}, - }, - allow_edit: { enabled: false }, - version: { type: 'keyword' }, - key: { type: 'keyword' }, - compression: { type: 'keyword' }, - compression_level: { type: 'integer' }, - client_id: { type: 'keyword' }, - auth_type: { type: 'keyword' }, - connection_type: { type: 'keyword' }, - username: { type: 'keyword' }, - password: { type: 'text', index: false }, - sasl: { - dynamic: false, - properties: { - mechanism: { type: 'text' }, + [AGENT_POLICY_SAVED_OBJECT_TYPE]: { + name: AGENT_POLICY_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + name: { type: 'keyword' }, + schema_version: { type: 'version' }, + description: { type: 'text' }, + namespace: { type: 'keyword' }, + is_managed: { type: 'boolean' }, + is_default: { type: 'boolean' }, + is_default_fleet_server: { type: 'boolean' }, + status: { type: 'keyword' }, + unenroll_timeout: { type: 'integer' }, + inactivity_timeout: { type: 'integer' }, + updated_at: { type: 'date' }, + updated_by: { type: 'keyword' }, + revision: { type: 'integer' }, + monitoring_enabled: { type: 'keyword', index: false }, + is_preconfigured: { type: 'keyword' }, + data_output_id: { type: 'keyword' }, + monitoring_output_id: { type: 'keyword' }, + download_source_id: { type: 'keyword' }, + fleet_server_host_id: { type: 'keyword' }, + agent_features: { + properties: { + name: { type: 'keyword' }, + enabled: { type: 'boolean' }, + }, }, + is_protected: { type: 'boolean' }, + overrides: { type: 'flattened', index: false }, + keep_monitoring_alive: { type: 'boolean' }, + advanced_settings: { type: 'flattened', index: false }, + supports_agentless: { type: 'boolean' }, }, - partition: { type: 'keyword' }, - random: { - dynamic: false, - properties: { - group_events: { type: 'integer' }, - }, + }, + migrations: { + '7.10.0': migrateAgentPolicyToV7100, + '7.12.0': migrateAgentPolicyToV7120, + '8.4.0': migrateAgentPolicyToV840, + '8.5.0': migrateAgentPolicyToV850, + '8.9.0': migrateAgentPolicyToV890, + }, + modelVersions: { + '1': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + advanced_settings: { type: 'flattened', index: false }, + }, + }, + ], }, - round_robin: { - dynamic: false, - properties: { - group_events: { type: 'integer' }, - }, + '2': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + supports_agentless: { type: 'boolean' }, + }, + }, + ], }, - hash: { - dynamic: false, - properties: { - hash: { type: 'text' }, - random: { type: 'boolean' }, + }, + }, + [OUTPUT_SAVED_OBJECT_TYPE]: { + name: OUTPUT_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + output_id: { type: 'keyword', index: false }, + name: { type: 'keyword' }, + type: { type: 'keyword' }, + is_default: { type: 'boolean' }, + is_default_monitoring: { type: 'boolean' }, + hosts: { type: 'keyword' }, + ca_sha256: { type: 'keyword', index: false }, + ca_trusted_fingerprint: { type: 'keyword', index: false }, + service_token: { type: 'keyword', index: false }, + config: { type: 'flattened' }, + config_yaml: { type: 'text' }, + is_preconfigured: { type: 'boolean', index: false }, + is_internal: { type: 'boolean', index: false }, + ssl: { type: 'binary' }, + proxy_id: { type: 'keyword' }, + shipper: { + dynamic: false, // we aren't querying or aggregating over this data, so we don't need to specify any fields + properties: {}, + }, + allow_edit: { enabled: false }, + version: { type: 'keyword' }, + key: { type: 'keyword' }, + compression: { type: 'keyword' }, + compression_level: { type: 'integer' }, + client_id: { type: 'keyword' }, + auth_type: { type: 'keyword' }, + connection_type: { type: 'keyword' }, + username: { type: 'keyword' }, + password: { type: 'text', index: false }, + sasl: { + dynamic: false, + properties: { + mechanism: { type: 'text' }, + }, }, - }, - topic: { type: 'text', index: false }, - topics: { - dynamic: false, - properties: { - topic: { type: 'keyword' }, - when: { - dynamic: false, - properties: { - type: { type: 'text' }, - condition: { type: 'text' }, - }, + partition: { type: 'keyword' }, + random: { + dynamic: false, + properties: { + group_events: { type: 'integer' }, }, }, - }, - headers: { - dynamic: false, - properties: { - key: { type: 'text' }, - value: { type: 'text' }, + round_robin: { + dynamic: false, + properties: { + group_events: { type: 'integer' }, + }, }, - }, - timeout: { type: 'integer' }, - broker_timeout: { type: 'integer' }, - broker_ack_reliability: { type: 'text' }, - broker_buffer_size: { type: 'integer' }, - required_acks: { type: 'integer' }, - channel_buffer_size: { type: 'integer' }, - secrets: { - dynamic: false, - properties: { - password: { - dynamic: false, - properties: { - id: { type: 'keyword' }, - }, + hash: { + dynamic: false, + properties: { + hash: { type: 'text' }, + random: { type: 'boolean' }, }, - ssl: { - dynamic: false, - properties: { - key: { - dynamic: false, - properties: { - id: { type: 'keyword' }, - }, + }, + topic: { type: 'text', index: false }, + topics: { + dynamic: false, + properties: { + topic: { type: 'keyword' }, + when: { + dynamic: false, + properties: { + type: { type: 'text' }, + condition: { type: 'text' }, }, }, }, - service_token: { - dynamic: false, - properties: { - id: { type: 'keyword' }, - }, - }, - }, - }, - preset: { - type: 'keyword', - index: false, - }, - }, - }, - modelVersions: { - '1': { - changes: [ - { - type: 'mappings_deprecation', - deprecatedMappings: [ - 'broker_ack_reliability', - 'broker_buffer_size', - 'channel_buffer_size', - ], - }, - { - type: 'data_backfill', - backfillFn: migrateOutputToV8100, }, - ], - schemas: { - forwardCompatibility: migrateOutputEvictionsFromV8100, - }, - }, - '2': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - service_token: { type: 'keyword', index: false }, + headers: { + dynamic: false, + properties: { + key: { type: 'text' }, + value: { type: 'text' }, }, }, - ], - }, - '3': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - secrets: { + timeout: { type: 'integer' }, + broker_timeout: { type: 'integer' }, + broker_ack_reliability: { type: 'text' }, + broker_buffer_size: { type: 'integer' }, + required_acks: { type: 'integer' }, + channel_buffer_size: { type: 'integer' }, + secrets: { + dynamic: false, + properties: { + password: { + dynamic: false, properties: { - service_token: { + id: { type: 'keyword' }, + }, + }, + ssl: { + dynamic: false, + properties: { + key: { dynamic: false, properties: { id: { type: 'keyword' }, @@ -352,425 +309,488 @@ export const getSavedObjectTypes = (): { [key: string]: SavedObjectsType } => ({ }, }, }, - }, - }, - ], - }, - '4': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - preset: { - type: 'keyword', - index: false, + service_token: { + dynamic: false, + properties: { + id: { type: 'keyword' }, + }, }, }, }, - ], - }, - '5': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - is_internal: { type: 'boolean', index: false }, - }, + preset: { + type: 'keyword', + index: false, }, - ], + }, }, - '6': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - topic: { type: 'text', index: false }, + modelVersions: { + '1': { + changes: [ + { + type: 'mappings_deprecation', + deprecatedMappings: [ + 'broker_ack_reliability', + 'broker_buffer_size', + 'channel_buffer_size', + ], }, - }, - ], - }, - }, - migrations: { - '7.13.0': migrateOutputToV7130, - '8.0.0': migrateOutputToV800, - }, - }, - [PACKAGE_POLICY_SAVED_OBJECT_TYPE]: { - name: PACKAGE_POLICY_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - name: { type: 'keyword' }, - description: { type: 'text' }, - namespace: { type: 'keyword' }, - enabled: { type: 'boolean' }, - is_managed: { type: 'boolean' }, - policy_id: { type: 'keyword' }, - package: { - properties: { - name: { type: 'keyword' }, - title: { type: 'keyword' }, - version: { type: 'keyword' }, + { + type: 'data_backfill', + backfillFn: migrateOutputToV8100, + }, + ], + schemas: { + forwardCompatibility: migrateOutputEvictionsFromV8100, }, }, - elasticsearch: { - dynamic: false, - properties: {}, + '2': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + service_token: { type: 'keyword', index: false }, + }, + }, + ], }, - vars: { type: 'flattened' }, - inputs: { - dynamic: false, - properties: {}, + '3': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + secrets: { + properties: { + service_token: { + dynamic: false, + properties: { + id: { type: 'keyword' }, + }, + }, + }, + }, + }, + }, + ], }, - secret_references: { properties: { id: { type: 'keyword' } } }, - overrides: { type: 'flattened', index: false }, - revision: { type: 'integer' }, - updated_at: { type: 'date' }, - updated_by: { type: 'keyword' }, - created_at: { type: 'date' }, - created_by: { type: 'keyword' }, - }, - }, - modelVersions: { - '1': { - changes: [ - { - type: 'data_backfill', - backfillFn: migratePackagePolicyToV8100, - }, - { - type: 'data_backfill', - backfillFn: migrateSyntheticsPackagePolicyToV8100, - }, - ], - schemas: { - forwardCompatibility: migratePackagePolicyEvictionsFromV8100, + '4': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + preset: { + type: 'keyword', + index: false, + }, + }, + }, + ], }, - }, - '2': { - changes: [ - { - type: 'data_backfill', - backfillFn: migratePackagePolicyToV8110, - }, - ], - schemas: { - forwardCompatibility: migratePackagePolicyEvictionsFromV8110, + '5': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + is_internal: { type: 'boolean', index: false }, + }, + }, + ], }, - }, - '3': { - changes: [ - { - type: 'data_backfill', - backfillFn: migratePackagePolicyToV81102, - }, - ], - schemas: { - forwardCompatibility: migratePackagePolicyEvictionsFromV81102, + '6': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + topic: { type: 'text', index: false }, + }, + }, + ], }, }, - '4': { - changes: [ - { - type: 'data_backfill', - backfillFn: migrateCspPackagePolicyToV8110, - }, - ], - }, - '5': { - changes: [ - { - type: 'data_backfill', - backfillFn: migrateSyntheticsPackagePolicyToV8120, - }, - ], + migrations: { + '7.13.0': migrateOutputToV7130, + '8.0.0': migrateOutputToV800, }, - '6': { - changes: [ - { - type: 'data_backfill', - backfillFn: migratePackagePolicyToV8140, - }, - ], + }, + [PACKAGE_POLICY_SAVED_OBJECT_TYPE]: { + name: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, }, - '7': { - changes: [ - { - type: 'data_backfill', - backfillFn: migratePackagePolicyEnableCapsToV8140, + mappings: { + properties: { + name: { type: 'keyword' }, + description: { type: 'text' }, + namespace: { type: 'keyword' }, + enabled: { type: 'boolean' }, + is_managed: { type: 'boolean' }, + policy_id: { type: 'keyword' }, + package: { + properties: { + name: { type: 'keyword' }, + title: { type: 'keyword' }, + version: { type: 'keyword' }, + }, }, - ], + elasticsearch: { + dynamic: false, + properties: {}, + }, + vars: { type: 'flattened' }, + inputs: { + dynamic: false, + properties: {}, + }, + secret_references: { properties: { id: { type: 'keyword' } } }, + overrides: { type: 'flattened', index: false }, + revision: { type: 'integer' }, + updated_at: { type: 'date' }, + updated_by: { type: 'keyword' }, + created_at: { type: 'date' }, + created_by: { type: 'keyword' }, + }, }, - '8': { - changes: [ - { - type: 'data_backfill', - backfillFn: migratePackagePolicyAddAntivirusRegistrationModeToV8140, + modelVersions: { + '1': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyToV8100, + }, + { + type: 'data_backfill', + backfillFn: migrateSyntheticsPackagePolicyToV8100, + }, + ], + schemas: { + forwardCompatibility: migratePackagePolicyEvictionsFromV8100, }, - ], - }, - '9': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - overrides: { type: 'flattened', index: false }, + }, + '2': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyToV8110, }, + ], + schemas: { + forwardCompatibility: migratePackagePolicyEvictionsFromV8110, }, - ], - }, - }, - migrations: { - '7.10.0': migratePackagePolicyToV7100, - '7.11.0': migratePackagePolicyToV7110, - '7.12.0': migratePackagePolicyToV7120, - '7.13.0': migratePackagePolicyToV7130, - '7.14.0': migratePackagePolicyToV7140, - '7.15.0': migratePackagePolicyToV7150, - '7.16.0': migratePackagePolicyToV7160, - '8.2.0': migratePackagePolicyToV820, - '8.3.0': migratePackagePolicyToV830, - '8.4.0': migratePackagePolicyToV840, - '8.5.0': migratePackagePolicyToV850, - '8.6.0': migratePackagePolicyToV860, - '8.7.0': migratePackagePolicyToV870, - '8.8.0': migratePackagePolicyToV880, - }, - }, - [PACKAGES_SAVED_OBJECT_TYPE]: { - name: PACKAGES_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - name: { type: 'keyword' }, - version: { type: 'keyword' }, - internal: { type: 'boolean' }, - keep_policies_up_to_date: { type: 'boolean', index: false }, - es_index_patterns: { - dynamic: false, - properties: {}, }, - verification_status: { type: 'keyword' }, - verification_key_id: { type: 'keyword' }, - installed_es: { - type: 'nested', - properties: { - id: { type: 'keyword' }, - type: { type: 'keyword' }, - version: { type: 'keyword' }, - deferred: { type: 'boolean' }, + '3': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyToV81102, + }, + ], + schemas: { + forwardCompatibility: migratePackagePolicyEvictionsFromV81102, }, }, - latest_install_failed_attempts: { type: 'object', enabled: false }, - latest_executed_state: { type: 'object', enabled: false }, - installed_kibana: { - dynamic: false, - properties: {}, + '4': { + changes: [ + { + type: 'data_backfill', + backfillFn: migrateCspPackagePolicyToV8110, + }, + ], }, - installed_kibana_space_id: { type: 'keyword' }, - package_assets: { - dynamic: false, - properties: {}, + '5': { + changes: [ + { + type: 'data_backfill', + backfillFn: migrateSyntheticsPackagePolicyToV8120, + }, + ], + }, + '6': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyToV8140, + }, + ], }, - install_started_at: { type: 'date' }, - install_version: { type: 'keyword' }, - install_status: { type: 'keyword' }, - install_source: { type: 'keyword' }, - install_format_schema_version: { type: 'version' }, - experimental_data_stream_features: { - type: 'nested', - properties: { - data_stream: { type: 'keyword' }, - features: { - type: 'nested', - dynamic: false, - properties: { - synthetic_source: { type: 'boolean' }, - tsdb: { type: 'boolean' }, + '7': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyEnableCapsToV8140, + }, + ], + }, + '8': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyAddAntivirusRegistrationModeToV8140, + }, + ], + }, + '9': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + overrides: { type: 'flattened', index: false }, }, }, - }, + ], }, }, + migrations: { + '7.10.0': migratePackagePolicyToV7100, + '7.11.0': migratePackagePolicyToV7110, + '7.12.0': migratePackagePolicyToV7120, + '7.13.0': migratePackagePolicyToV7130, + '7.14.0': migratePackagePolicyToV7140, + '7.15.0': migratePackagePolicyToV7150, + '7.16.0': migratePackagePolicyToV7160, + '8.2.0': migratePackagePolicyToV820, + '8.3.0': migratePackagePolicyToV830, + '8.4.0': migratePackagePolicyToV840, + '8.5.0': migratePackagePolicyToV850, + '8.6.0': migratePackagePolicyToV860, + '8.7.0': migratePackagePolicyToV870, + '8.8.0': migratePackagePolicyToV880, + }, }, - modelVersions: { - '1': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - latest_install_failed_attempts: { type: 'object', enabled: false }, + [PACKAGES_SAVED_OBJECT_TYPE]: { + name: PACKAGES_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + name: { type: 'keyword' }, + version: { type: 'keyword' }, + internal: { type: 'boolean' }, + keep_policies_up_to_date: { type: 'boolean', index: false }, + es_index_patterns: { + dynamic: false, + properties: {}, + }, + verification_status: { type: 'keyword' }, + verification_key_id: { type: 'keyword' }, + installed_es: { + type: 'nested', + properties: { + id: { type: 'keyword' }, + type: { type: 'keyword' }, + version: { type: 'keyword' }, + deferred: { type: 'boolean' }, }, }, - ], - }, - '2': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - latest_executed_state: { type: 'object', enabled: false }, + latest_install_failed_attempts: { type: 'object', enabled: false }, + latest_executed_state: { type: 'object', enabled: false }, + installed_kibana: { + dynamic: false, + properties: {}, + }, + installed_kibana_space_id: { type: 'keyword' }, + package_assets: { + dynamic: false, + properties: {}, + }, + install_started_at: { type: 'date' }, + install_version: { type: 'keyword' }, + install_status: { type: 'keyword' }, + install_source: { type: 'keyword' }, + install_format_schema_version: { type: 'version' }, + experimental_data_stream_features: { + type: 'nested', + properties: { + data_stream: { type: 'keyword' }, + features: { + type: 'nested', + dynamic: false, + properties: { + synthetic_source: { type: 'boolean' }, + tsdb: { type: 'boolean' }, + }, + }, }, }, - ], + }, }, - }, - migrations: { - '7.14.0': migrateInstallationToV7140, - '7.14.1': migrateInstallationToV7140, - '7.16.0': migrateInstallationToV7160, - '8.0.0': migrateInstallationToV800, - '8.3.0': migrateInstallationToV830, - '8.4.0': migrateInstallationToV840, - '8.6.0': migrateInstallationToV860, - }, - }, - [ASSETS_SAVED_OBJECT_TYPE]: { - name: ASSETS_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - package_name: { type: 'keyword' }, - package_version: { type: 'keyword' }, - install_source: { type: 'keyword' }, - asset_path: { type: 'keyword' }, - media_type: { type: 'keyword' }, - data_utf8: { type: 'text', index: false }, - data_base64: { type: 'binary' }, + modelVersions: { + '1': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + latest_install_failed_attempts: { type: 'object', enabled: false }, + }, + }, + ], + }, + '2': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + latest_executed_state: { type: 'object', enabled: false }, + }, + }, + ], + }, }, - }, - }, - [PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE]: { - name: PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - id: { type: 'keyword' }, + migrations: { + '7.14.0': migrateInstallationToV7140, + '7.14.1': migrateInstallationToV7140, + '7.16.0': migrateInstallationToV7160, + '8.0.0': migrateInstallationToV800, + '8.3.0': migrateInstallationToV830, + '8.4.0': migrateInstallationToV840, + '8.6.0': migrateInstallationToV860, }, }, - }, - [DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE]: { - name: DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - source_id: { type: 'keyword', index: false }, - name: { type: 'keyword' }, - is_default: { type: 'boolean' }, - host: { type: 'keyword' }, - proxy_id: { type: 'keyword' }, + [ASSETS_SAVED_OBJECT_TYPE]: { + name: ASSETS_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + package_name: { type: 'keyword' }, + package_version: { type: 'keyword' }, + install_source: { type: 'keyword' }, + asset_path: { type: 'keyword' }, + media_type: { type: 'keyword' }, + data_utf8: { type: 'text', index: false }, + data_base64: { type: 'binary' }, + }, }, }, - }, - [FLEET_SERVER_HOST_SAVED_OBJECT_TYPE]: { - name: FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, + [PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE]: { + name: PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + id: { type: 'keyword' }, + }, + }, }, - mappings: { - properties: { - name: { type: 'keyword' }, - is_default: { type: 'boolean' }, - is_internal: { type: 'boolean', index: false }, - host_urls: { type: 'keyword', index: false }, - is_preconfigured: { type: 'boolean' }, - proxy_id: { type: 'keyword' }, + [DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE]: { + name: DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + source_id: { type: 'keyword', index: false }, + name: { type: 'keyword' }, + is_default: { type: 'boolean' }, + host: { type: 'keyword' }, + proxy_id: { type: 'keyword' }, + }, }, }, - modelVersions: { - '1': { - changes: [ - { - type: 'mappings_addition', - addedMappings: { - is_internal: { type: 'boolean', index: false }, + [FLEET_SERVER_HOST_SAVED_OBJECT_TYPE]: { + name: FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + name: { type: 'keyword' }, + is_default: { type: 'boolean' }, + is_internal: { type: 'boolean', index: false }, + host_urls: { type: 'keyword', index: false }, + is_preconfigured: { type: 'boolean' }, + proxy_id: { type: 'keyword' }, + }, + }, + modelVersions: { + '1': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + is_internal: { type: 'boolean', index: false }, + }, }, - }, - ], + ], + }, }, }, - }, - [FLEET_PROXY_SAVED_OBJECT_TYPE]: { - name: FLEET_PROXY_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: false, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - properties: { - name: { type: 'keyword' }, - url: { type: 'keyword', index: false }, - proxy_headers: { type: 'text', index: false }, - certificate_authorities: { type: 'keyword', index: false }, - certificate: { type: 'keyword', index: false }, - certificate_key: { type: 'keyword', index: false }, - is_preconfigured: { type: 'boolean' }, + [FLEET_PROXY_SAVED_OBJECT_TYPE]: { + name: FLEET_PROXY_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + name: { type: 'keyword' }, + url: { type: 'keyword', index: false }, + proxy_headers: { type: 'text', index: false }, + certificate_authorities: { type: 'keyword', index: false }, + certificate: { type: 'keyword', index: false }, + certificate_key: { type: 'keyword', index: false }, + is_preconfigured: { type: 'boolean' }, + }, }, }, - }, - [MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE]: { - name: MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: true, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, - }, - mappings: { - dynamic: false, - properties: {}, - }, - }, - [UNINSTALL_TOKENS_SAVED_OBJECT_TYPE]: { - name: UNINSTALL_TOKENS_SAVED_OBJECT_TYPE, - indexPattern: INGEST_SAVED_OBJECT_INDEX, - hidden: true, - namespaceType: 'agnostic', - management: { - importableAndExportable: false, + [MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE]: { + name: MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: true, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + dynamic: false, + properties: {}, + }, }, - mappings: { - dynamic: false, - properties: { - policy_id: { type: 'keyword' }, - token_plain: { type: 'keyword' }, + [UNINSTALL_TOKENS_SAVED_OBJECT_TYPE]: { + name: UNINSTALL_TOKENS_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: true, + namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + management: { + importableAndExportable: false, + }, + mappings: { + dynamic: false, + properties: { + policy_id: { type: 'keyword' }, + token_plain: { type: 'keyword' }, + }, }, }, - }, -}); + }; +}; -export function registerSavedObjects(savedObjects: SavedObjectsServiceSetup) { - const savedObjectTypes = getSavedObjectTypes(); +export function registerSavedObjects( + savedObjects: SavedObjectsServiceSetup, + options = { useSpaceAwareness: false } +) { + const savedObjectTypes = getSavedObjectTypes({ useSpaceAwareness: options.useSpaceAwareness }); Object.values(savedObjectTypes).forEach((type) => { savedObjects.registerType(type); }); diff --git a/x-pack/plugins/fleet/server/services/agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policy.test.ts index f844fce46c83e..1f6ae15606c46 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.test.ts @@ -17,6 +17,7 @@ import { PackagePolicyRestrictionRelatedError, FleetUnauthorizedError, HostedAgentPolicyRestrictionRelatedError, + AgentPolicyInvalidError, } from '../errors'; import type { AgentPolicy, @@ -114,7 +115,7 @@ function getAgentPolicyCreateMock() { return soClient; } let mockedLogger: jest.Mocked; -describe('agent policy', () => { +describe('Agent policy', () => { beforeEach(() => { mockedLogger = loggerMock.create(); mockedAppContextService.getLogger.mockReturnValue(mockedLogger); @@ -228,6 +229,74 @@ describe('agent policy', () => { new FleetUnauthorizedError('Tamper protection requires Platinum license') ); }); + + it('should throw AgentPolicyInvalidError if support_agentless is defined in stateful', async () => { + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ agentless: false } as any); + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: false } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await expect( + agentPolicyService.create(soClient, esClient, { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).rejects.toThrowError( + new AgentPolicyInvalidError( + 'supports_agentless is only allowed in serverless environments that support the agentless feature' + ) + ); + }); + + it('should throw AgentPolicyInvalidError if agentless feature flag is disabled in serverless', async () => { + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ agentless: false } as any); + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: true } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await expect( + agentPolicyService.create(soClient, esClient, { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).rejects.toThrowError( + new AgentPolicyInvalidError( + 'supports_agentless is only allowed in serverless environments that support the agentless feature' + ) + ); + }); + + it('should not throw error if support_agentless is set if agentless feature flag is set in serverless', async () => { + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ agentless: true } as any); + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: true } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await expect( + agentPolicyService.create(soClient, esClient, { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).resolves.not.toThrow(); + }); }); // TODO: Add more test coverage to `get` service method @@ -781,6 +850,93 @@ describe('agent policy', () => { }) ).rejects.toThrowError(new Error('Cannot enable Agent Tamper Protection: reason')); }); + + it('should throw AgentPolicyInvalidError if support_agentless is defined in stateful', async () => { + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ agentless: false } as any); + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: false } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + soClient.get.mockResolvedValue({ + attributes: {}, + id: 'test-id', + type: 'mocked', + references: [], + }); + + await expect( + agentPolicyService.update(soClient, esClient, 'test-id', { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).rejects.toThrowError( + new AgentPolicyInvalidError( + 'supports_agentless is only allowed in serverless environments that support the agentless feature' + ) + ); + }); + + it('should throw AgentPolicyInvalidError if agentless flag is disabled in serverless', async () => { + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ agentless: false } as any); + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: true } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + soClient.get.mockResolvedValue({ + attributes: {}, + id: 'test-id', + type: 'mocked', + references: [], + }); + + await expect( + agentPolicyService.update(soClient, esClient, 'test-id', { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).rejects.toThrowError( + new AgentPolicyInvalidError( + 'supports_agentless is only allowed in serverless environments that support the agentless feature' + ) + ); + }); + + it('should not throw in serverless if support_agentless is set and agentless feature flag is set', async () => { + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ agentless: true } as any); + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: true } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + soClient.get.mockResolvedValue({ + attributes: {}, + id: 'test-id', + type: 'mocked', + references: [], + }); + + await expect( + agentPolicyService.update(soClient, esClient, 'test-id', { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).resolves.not.toThrow(); + }); }); describe('deployPolicy', () => { diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index 51b3e0d7972c1..a75028be59548 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -71,13 +71,12 @@ import type { FetchAllAgentPoliciesOptions, FetchAllAgentPolicyIdsOptions, FleetServerPolicy, - Installation, - Output, PackageInfo, } from '../../common/types'; import { AgentPolicyNameExistsError, AgentPolicyNotFoundError, + AgentPolicyInvalidError, FleetError, FleetUnauthorizedError, HostedAgentPolicyRestrictionRelatedError, @@ -88,6 +87,8 @@ import type { FullAgentConfigMap } from '../../common/types/models/agent_cm'; import { fullAgentConfigMapToYaml } from '../../common/services/agent_cm_to_yaml'; +import { appContextService } from '.'; + import { mapAgentPolicySavedObjectToAgentPolicy } from './agent_policies/utils'; import { @@ -102,7 +103,6 @@ import { incrementPackagePolicyCopyName } from './package_policies'; import { outputService } from './output'; import { agentPolicyUpdateEventHandler } from './agent_policy_update'; import { escapeSearchQueryPhrase, normalizeKuery } from './saved_object'; -import { appContextService } from './app_context'; import { getFullAgentPolicy, validateOutputForPolicy } from './agent_policies'; import { auditLoggingService } from './audit_logging'; import { licenseService } from './license'; @@ -317,6 +317,8 @@ class AgentPolicyService { ); } + this.checkAgentless(agentPolicy); + await this.requireUniqueName(soClient, agentPolicy); await validateOutputForPolicy(soClient, agentPolicy); @@ -581,6 +583,7 @@ class AgentPolicyService { } } this.checkTamperProtectionLicense(agentPolicy); + this.checkAgentless(agentPolicy); await this.checkForValidUninstallToken(agentPolicy, id); if (agentPolicy?.is_protected && !policyHasEndpointSecurity(existingAgentPolicy)) { @@ -653,6 +656,7 @@ class AgentPolicyService { 'monitoring_output_id', 'download_source_id', 'fleet_server_host_id', + 'supports_agentless', ]), ...newAgentPolicyProps, }, @@ -1474,17 +1478,26 @@ class AgentPolicyService { } } } + private checkAgentless(agentPolicy: Partial) { + const cloudSetup = appContextService.getCloud(); + if ( + (!cloudSetup?.isServerlessEnabled || + !appContextService.getExperimentalFeatures().agentless) && + agentPolicy?.supports_agentless !== undefined + ) { + throw new AgentPolicyInvalidError( + 'supports_agentless is only allowed in serverless environments that support the agentless feature' + ); + } + } } export const agentPolicyService = new AgentPolicyService(); -// TODO: remove unused parameters export async function addPackageToAgentPolicy( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, - packageToInstall: Installation, agentPolicy: AgentPolicy, - defaultOutput: Output, packageInfo: PackageInfo, packagePolicyName?: string, packagePolicyId?: string | number, diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_index_template_pipeline.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_index_template_pipeline.ts index 8092a133490af..ad738d1710fcc 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_index_template_pipeline.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_index_template_pipeline.ts @@ -68,16 +68,7 @@ export async function installIndexTemplatesAndPipelines({ // cleanup in the case that a single asset fails to install. let newEsReferences: EsAssetReference[] = []; - if (onlyForDataStreams) { - // if onlyForDataStreams is present that means we are in create package policy flow - // not install flow, meaning we do not have a lock on the installation SO - // so we need to use optimistic concurrency control - newEsReferences = await optimisticallyAddEsAssetReferences( - savedObjectsClient, - packageInstallContext.packageInfo.name, - [...preparedIngestPipelines.assetsToAdd, ...preparedIndexTemplates.assetsToAdd] - ); - } else { + if (!onlyForDataStreams) { newEsReferences = await updateEsAssetReferences( savedObjectsClient, packageInstallContext.packageInfo.name, @@ -103,6 +94,18 @@ export async function installIndexTemplatesAndPipelines({ ), ]); + // only add ES references if templates and pipelines were installed successfully, to prevent upgrade issues for referencing invalid template name + if (onlyForDataStreams) { + // if onlyForDataStreams is present that means we are in create package policy flow + // not install flow, meaning we do not have a lock on the installation SO + // so we need to use optimistic concurrency control + newEsReferences = await optimisticallyAddEsAssetReferences( + savedObjectsClient, + packageInstallContext.packageInfo.name, + [...preparedIngestPipelines.assetsToAdd, ...preparedIndexTemplates.assetsToAdd] + ); + } + return { esReferences: newEsReferences, installedTemplates, diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts index fd5dfad737241..004d4b83a460a 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts @@ -22,6 +22,8 @@ import type { AgentPolicy, NewPackagePolicy, Output, DownloadSource } from '../t import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../constants'; +import { appContextService } from './app_context'; + import * as agentPolicy from './agent_policy'; import { @@ -300,6 +302,10 @@ jest.mock('./app_context', () => ({ generateTokenForPolicyId: jest.fn(), }), getExternalCallbacks: jest.fn(), + getCloud: jest.fn(), + getExperimentalFeatures: jest.fn().mockReturnValue({ + agentless: false, + }), }, })); @@ -461,7 +467,7 @@ describe('policy preconfiguration', () => { ); }); - it('should install prelease packages if needed', async () => { + it('should install prerelease packages if needed', async () => { const soClient = getPutPreconfiguredPackagesMock(); const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; @@ -845,6 +851,7 @@ describe('policy preconfiguration', () => { it('should not create a policy and throw an error if package is not installed for an unknown reason', async () => { const soClient = getPutPreconfiguredPackagesMock(); const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const policies: PreconfiguredAgentPolicy[] = [ { name: 'Test policy', @@ -875,6 +882,113 @@ describe('policy preconfiguration', () => { ); }); + it('should return a non fatal error if support_agentless is defined in stateful', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + jest.mocked(appContextService.getExperimentalFeatures).mockReturnValue({ + agentless: true, + } as any); + + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: false } as any); + + const policies: PreconfiguredAgentPolicy[] = [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + supports_agentless: true, + package_policies: [], + }, + ]; + + const { nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + policies, + [{ name: 'CANNOT_MATCH', version: 'x.y.z' }], + mockDefaultOutput, + mockDefaultDownloadService, + DEFAULT_SPACE_ID + ); + // @ts-ignore-next-line + expect(nonFatalErrors[0].error.toString()).toEqual( + 'FleetError: `supports_agentless` is only allowed in serverless environments that support the agentless feature' + ); + }); + + it('should not return an error if support_agentless is defined in serverless and agentless is enabled', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + jest.mocked(appContextService.getExperimentalFeatures).mockReturnValue({ + agentless: true, + } as any); + + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: true } as any); + + const policies: PreconfiguredAgentPolicy[] = [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + supports_agentless: true, + package_policies: [], + }, + ]; + + const { policies: resPolicies, nonFatalErrors } = + await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + policies, + [{ name: 'CANNOT_MATCH', version: 'x.y.z' }], + mockDefaultOutput, + mockDefaultDownloadService, + DEFAULT_SPACE_ID + ); + expect(nonFatalErrors.length).toBe(0); + expect(resPolicies[0].id).toEqual('test-id'); + }); + + it('should return an error if agentless feature flag is disabled on serverless', async () => { + const soClient = getPutPreconfiguredPackagesMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + jest.mocked(appContextService.getExperimentalFeatures).mockReturnValue({ + agentless: false, + } as any); + + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isServerlessEnabled: true } as any); + + const policies: PreconfiguredAgentPolicy[] = [ + { + name: 'Test policy', + namespace: 'default', + id: 'test-id', + supports_agentless: true, + package_policies: [], + }, + ]; + + const { nonFatalErrors } = await ensurePreconfiguredPackagesAndPolicies( + soClient, + esClient, + policies, + [{ name: 'CANNOT_MATCH', version: 'x.y.z' }], + mockDefaultOutput, + mockDefaultDownloadService, + DEFAULT_SPACE_ID + ); + // @ts-ignore-next-line + expect(nonFatalErrors[0].error.toString()).toEqual( + 'FleetError: `supports_agentless` is only allowed in serverless environments that support the agentless feature' + ); + }); + it('should not attempt to recreate or modify an agent policy if its ID is unchanged', async () => { const soClient = getPutPreconfiguredPackagesMock(); const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.ts b/x-pack/plugins/fleet/server/services/preconfiguration.ts index 877fb343b6507..26f633cc8f021 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.ts @@ -59,6 +59,7 @@ export async function ensurePreconfiguredPackagesAndPolicies( spaceId: string ): Promise { const logger = appContextService.getLogger(); + const cloudSetup = appContextService.getCloud(); // Validate configured packages to ensure there are no version conflicts const packageNames = groupBy(packages, (pkg) => pkg.name); @@ -160,6 +161,19 @@ export async function ensurePreconfiguredPackagesAndPolicies( ); } + if ( + (!cloudSetup?.isServerlessEnabled || + !appContextService.getExperimentalFeatures().agentless) && + preconfiguredAgentPolicy?.supports_agentless !== undefined + ) { + throw new FleetError( + i18n.translate('xpack.fleet.preconfiguration.support_agentless', { + defaultMessage: + '`supports_agentless` is only allowed in serverless environments that support the agentless feature', + }) + ); + } + const { created, policy } = await agentPolicyService.ensurePreconfiguredAgentPolicy( soClient, esClient, @@ -372,9 +386,7 @@ async function addPreconfiguredPolicyPackages( await addPackageToAgentPolicy( soClient, esClient, - installedPackage, agentPolicy, - defaultOutput, packageInfo, name, id, diff --git a/x-pack/plugins/fleet/server/types/models/agent_policy.ts b/x-pack/plugins/fleet/server/types/models/agent_policy.ts index 748a5c81c1bfb..ed2a50854c58b 100644 --- a/x-pack/plugins/fleet/server/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/agent_policy.ts @@ -83,6 +83,7 @@ export const AgentPolicyBaseSchema = { ) ), ...getSettingsAPISchema('AGENT_POLICY_ADVANCED_SETTINGS'), + supports_agentless: schema.maybe(schema.boolean({ defaultValue: false })), }; export const NewAgentPolicySchema = schema.object({ diff --git a/x-pack/plugins/grokdebugger/public/render_app.js b/x-pack/plugins/grokdebugger/public/render_app.js index bcb2560a3c0b7..43af7b9e6213a 100644 --- a/x-pack/plugins/grokdebugger/public/render_app.js +++ b/x-pack/plugins/grokdebugger/public/render_app.js @@ -7,28 +7,23 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { I18nProvider } from '@kbn/i18n-react'; -import { KibanaContextProvider, KibanaThemeProvider } from './shared_imports'; +import { KibanaContextProvider, KibanaRenderContextProvider } from './shared_imports'; import { GrokDebugger } from './components/grok_debugger'; import { GrokdebuggerService } from './services/grokdebugger/grokdebugger_service'; import { InactiveLicenseSlate } from './components/inactive_license'; export function renderApp(license, element, coreStart, theme$) { const content = license.isActive ? ( - - - - - - - + + + + + ) : ( - - - - - + + + ); render(content, element); diff --git a/x-pack/plugins/grokdebugger/public/shared_imports.ts b/x-pack/plugins/grokdebugger/public/shared_imports.ts index 0bfbb3e05f933..7496817e21ed6 100644 --- a/x-pack/plugins/grokdebugger/public/shared_imports.ts +++ b/x-pack/plugins/grokdebugger/public/shared_imports.ts @@ -5,4 +5,6 @@ * 2.0. */ -export { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +export { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; + +export { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; diff --git a/x-pack/plugins/grokdebugger/tsconfig.json b/x-pack/plugins/grokdebugger/tsconfig.json index b80579da2cea7..f2df02467d71c 100644 --- a/x-pack/plugins/grokdebugger/tsconfig.json +++ b/x-pack/plugins/grokdebugger/tsconfig.json @@ -19,6 +19,7 @@ "@kbn/i18n-react", "@kbn/config-schema", "@kbn/code-editor", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx index 826ef0b103447..ee3c359a8195a 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/__jest__/client_integration/helpers/setup_environment.tsx @@ -29,16 +29,20 @@ const appDependencies = { plugins: { ml: {} as any }, } as any; -export const componentTemplatesDependencies = (httpSetup: HttpSetup, coreStart?: CoreStart) => ({ - overlays: coreStart?.overlays ?? coreMock.createStart().overlays, - httpClient: httpSetup, - apiBasePath: API_BASE_PATH, - trackMetric: () => {}, - docLinks: docLinksServiceMock.createStartContract(), - toasts: notificationServiceMock.createSetupContract().toasts, - getUrlForApp: applicationServiceMock.createStartContract().getUrlForApp, - executionContext: executionContextServiceMock.createInternalStartContract(), -}); +export const componentTemplatesDependencies = (httpSetup: HttpSetup, coreStart?: CoreStart) => { + const coreMockStart = coreMock.createStart(); + return { + overlays: coreStart?.overlays ?? coreMockStart.overlays, + httpClient: httpSetup, + apiBasePath: API_BASE_PATH, + trackMetric: () => {}, + docLinks: docLinksServiceMock.createStartContract(), + toasts: notificationServiceMock.createSetupContract().toasts, + getUrlForApp: applicationServiceMock.createStartContract().getUrlForApp, + executionContext: executionContextServiceMock.createInternalStartContract(), + startServices: coreStart ?? coreMockStart, + }; +}; export const setupEnvironment = () => { breadcrumbService.setup(() => undefined); diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.test.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.test.tsx index 5a16c8837dc3f..903a9187a7335 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.test.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.test.tsx @@ -20,7 +20,9 @@ describe('useStepFromQueryString', () => { getComponentTemplateDatastreams: jest.fn(), postDataStreamMappingsFromTemplate: jest.fn(), }, - overlays: { openModal: jest.fn() } as any, + startServices: { + overlays: { openModal: jest.fn() }, + }, } as any); }); it('should do nothing if there no impacted data_streams', async () => { @@ -38,7 +40,7 @@ describe('useStepFromQueryString', () => { }); it('should try to update mappings if there is impacted data_streams', async () => { - const { api, overlays } = jest.mocked(useComponentTemplatesContext()); + const { api, startServices } = jest.mocked(useComponentTemplatesContext()); api.getComponentTemplateDatastreams.mockResolvedValue({ data: { data_streams: ['logs-test.data-default'] }, @@ -51,7 +53,7 @@ describe('useStepFromQueryString', () => { }); jest - .mocked(useComponentTemplatesContext().overlays.openModal) + .mocked(useComponentTemplatesContext().startServices.overlays.openModal) .mockReturnValue({ onClose: jest.fn() } as any); const { @@ -63,11 +65,11 @@ describe('useStepFromQueryString', () => { await showDatastreamRolloverModal('logs-test.data@custom'); expect(api.postDataStreamMappingsFromTemplate).toBeCalledTimes(1); - expect(overlays.openModal).not.toBeCalled(); + expect(startServices.overlays.openModal).not.toBeCalled(); }); it('should show datastream rollover modal if there is an error when updating mappings', async () => { - const { api, overlays } = jest.mocked(useComponentTemplatesContext()); + const { api, startServices } = jest.mocked(useComponentTemplatesContext()); api.getComponentTemplateDatastreams.mockResolvedValue({ data: { data_streams: ['logs-test.data-default'] }, @@ -80,7 +82,7 @@ describe('useStepFromQueryString', () => { }); jest - .mocked(useComponentTemplatesContext().overlays.openModal) + .mocked(useComponentTemplatesContext().startServices.overlays.openModal) .mockReturnValue({ onClose: jest.fn() } as any); const { @@ -90,6 +92,6 @@ describe('useStepFromQueryString', () => { } = renderHook(() => useDatastreamsRollover()); await showDatastreamRolloverModal('logs-test.data@custom'); - expect(overlays.openModal).toBeCalled(); + expect(startServices.overlays.openModal).toBeCalled(); }); }); diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx index ebb85f2bfa3f2..6ea2e7c1b114d 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx @@ -6,7 +6,7 @@ */ import React, { useCallback } from 'react'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { useComponentTemplatesContext } from '../../component_templates_context'; import { MappingsDatastreamRolloverModal } from './mappings_datastreams_rollover_modal'; @@ -14,7 +14,7 @@ import { MappingsDatastreamRolloverModal } from './mappings_datastreams_rollover export const test = {}; export function useDatastreamsRollover() { - const { api, overlays } = useComponentTemplatesContext(); + const { api, startServices } = useComponentTemplatesContext(); const showDatastreamRolloverModal = useCallback( async (componentTemplateName: string) => { @@ -38,6 +38,7 @@ export function useDatastreamsRollover() { } if (dataStreamsToRollover.length) { + const { overlays, ...mountServices } = startServices; const ref = overlays.openModal( toMountPoint( { ref.close(); }} - /> + />, + mountServices ) ); await ref.onClose; } }, - [api, overlays] + [api, startServices] ); return { diff --git a/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx b/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx index ade11c3a1b600..bf42735068db5 100644 --- a/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx +++ b/x-pack/plugins/index_management/public/application/components/component_templates/component_templates_context.tsx @@ -15,6 +15,7 @@ import { CoreStart, ExecutionContextStart, } from '@kbn/core/public'; +import { IndexManagementStartServices } from '../../../types'; import { getApi, getUseRequest, getSendRequest, getDocumentation } from './lib'; const ComponentTemplatesContext = createContext(undefined); @@ -27,7 +28,7 @@ interface Props { toasts: NotificationsSetup['toasts']; getUrlForApp: CoreStart['application']['getUrlForApp']; executionContext: ExecutionContextStart; - overlays: CoreStart['overlays']; + startServices: IndexManagementStartServices; } interface Context { @@ -37,9 +38,9 @@ interface Context { documentation: ReturnType; trackMetric: (type: UiCounterMetricType, eventName: string) => void; toasts: NotificationsSetup['toasts']; - overlays: CoreStart['overlays']; getUrlForApp: CoreStart['application']['getUrlForApp']; executionContext: ExecutionContextStart; + startServices: IndexManagementStartServices; } export const ComponentTemplatesProvider = ({ @@ -50,7 +51,6 @@ export const ComponentTemplatesProvider = ({ children: React.ReactNode; }) => { const { - overlays, httpClient, apiBasePath, trackMetric, @@ -58,6 +58,7 @@ export const ComponentTemplatesProvider = ({ toasts, getUrlForApp, executionContext, + startServices, } = value; const useRequest = getUseRequest(httpClient); @@ -69,7 +70,6 @@ export const ComponentTemplatesProvider = ({ return ( {children} diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts index 349c13fe805c0..062c0b93c303e 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.test.ts @@ -13,10 +13,15 @@ import { act } from 'react-dom/test-utils'; const mlMock: any = { mlApi: { inferenceModels: { - createInferenceEndpoint: jest.fn(), + createInferenceEndpoint: jest.fn().mockResolvedValue({}), }, trainedModels: { - startModelAllocation: jest.fn(), + startModelAllocation: jest.fn().mockResolvedValue({}), + getTrainedModels: jest.fn().mockResolvedValue([ + { + fully_defined: true, + }, + ]), }, }, }; @@ -93,6 +98,11 @@ describe('useSemanticText', () => { result.current.handleSemanticText(mockFieldData); }); + expect(mlMock.mlApi.trainedModels.startModelAllocation).toHaveBeenCalledWith('.elser_model_2'); + expect(mockDispatch).toHaveBeenCalledWith({ + type: 'field.addSemanticText', + value: mockFieldData, + }); expect(mlMock.mlApi.inferenceModels.createInferenceEndpoint).toHaveBeenCalledWith( 'elser_model_2', 'text_embedding', @@ -105,16 +115,58 @@ describe('useSemanticText', () => { }, } ); - expect(mlMock.mlApi.trainedModels.startModelAllocation).toHaveBeenCalledWith('.elser_model_2'); - expect(mockDispatch).toHaveBeenCalledWith({ - type: 'field.addSemanticText', - value: mockFieldData, + }); + + it('should invoke the download api if the model does not exist', async () => { + const mlMockWithModelNotDownloaded: any = { + mlApi: { + inferenceModels: { + createInferenceEndpoint: jest.fn(), + }, + trainedModels: { + startModelAllocation: jest.fn(), + getTrainedModels: jest.fn().mockResolvedValue([ + { + fully_defined: false, + }, + ]), + installElasticTrainedModelConfig: jest.fn().mockResolvedValue({}), + }, + }, + }; + const { result } = renderHook(() => + useSemanticText({ + form, + setErrorsInTrainedModelDeployment: jest.fn(), + ml: mlMockWithModelNotDownloaded, + }) + ); + + await act(async () => { + result.current.handleSemanticText(mockFieldData); + }); + + expect( + mlMockWithModelNotDownloaded.mlApi.trainedModels.installElasticTrainedModelConfig + ).toHaveBeenCalledWith('.elser_model_2'); + expect( + mlMockWithModelNotDownloaded.mlApi.trainedModels.startModelAllocation + ).toHaveBeenCalledWith('.elser_model_2'); + expect( + mlMockWithModelNotDownloaded.mlApi.inferenceModels.createInferenceEndpoint + ).toHaveBeenCalledWith('elser_model_2', 'text_embedding', { + service: 'elasticsearch', + service_settings: { + num_allocations: 1, + num_threads: 1, + model_id: '.elser_model_2', + }, }); }); it('handles errors correctly', async () => { const mockError = new Error('Test error'); - mlMock.mlApi.inferenceModels.createInferenceEndpoint.mockImplementationOnce(() => { + mlMock.mlApi?.trainedModels.startModelAllocation.mockImplementationOnce(() => { throw mockError; }); diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts index 9fe8e2a114645..dda1bfe794c97 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/fields/create_field/semantic_text/use_semantic_text.ts @@ -6,7 +6,8 @@ */ import { i18n } from '@kbn/i18n'; -import { MlPluginStart } from '@kbn/ml-plugin/public'; +import { useCallback } from 'react'; +import { MlPluginStart, TrainedModelConfigResponse } from '@kbn/ml-plugin/public'; import React, { useEffect, useState } from 'react'; import { useComponentTemplatesContext } from '../../../../../../component_templates/component_templates_context'; import { useDispatch, useMappingsState } from '../../../../../mappings_state_context'; @@ -64,20 +65,37 @@ export function useSemanticText(props: UseSemanticTextProps) { } }, [form, inferenceId, inferenceToModelIdMap]); - const handleSemanticText = (data: Field) => { - data.inferenceId = inferenceValue; + const isModelDownloaded = useCallback( + async (modelId: string) => { + try { + const response: TrainedModelConfigResponse[] | undefined = + await ml?.mlApi?.trainedModels.getTrainedModels(modelId, { + include: 'definition_status', + }); + return !!response?.[0]?.fully_defined; + } catch (error) { + if (error.body.statusCode !== 404) { + throw error; + } + } + return false; + }, + [ml?.mlApi?.trainedModels] + ); + + const createInferenceEndpoint = ( + trainedModelId: string, + defaultInferenceEndpoint: boolean, + data: Field + ) => { if (data.inferenceId === undefined) { - return; - } - - const inferenceData = inferenceToModelIdMap?.[data.inferenceId]; - - if (!inferenceData) { - return; + throw new Error( + i18n.translate('xpack.idxMgmt.mappingsEditor.createField.undefinedInferenceIdError', { + defaultMessage: 'InferenceId is undefined while creating the inference endpoint.', + }) + ); } - const { trainedModelId, defaultInferenceEndpoint, isDeployed, isDeployable } = inferenceData; - if (trainedModelId && defaultInferenceEndpoint) { const modelConfig = { service: 'elasticsearch', @@ -87,28 +105,45 @@ export function useSemanticText(props: UseSemanticTextProps) { model_id: trainedModelId, }, }; - try { - ml?.mlApi?.inferenceModels?.createInferenceEndpoint( - data.inferenceId, - 'text_embedding', - modelConfig - ); - } catch (error) { - setErrorsInTrainedModelDeployment?.((prevItems) => [...prevItems, trainedModelId]); - toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { - title: i18n.translate( - 'xpack.idxMgmt.mappingsEditor.createField.inferenceEndpointCreationErrorTitle', - { - defaultMessage: 'Inference endpoint creation failed', - } - ), - }); - } + + ml?.mlApi?.inferenceModels?.createInferenceEndpoint( + data.inferenceId, + 'text_embedding', + modelConfig + ); } + }; + + const handleSemanticText = async (data: Field) => { + data.inferenceId = inferenceValue; + if (data.inferenceId === undefined) { + return; + } + + const inferenceData = inferenceToModelIdMap?.[data.inferenceId]; + + if (!inferenceData) { + return; + } + + const { trainedModelId, defaultInferenceEndpoint, isDeployed, isDeployable } = inferenceData; - if (isDeployable && trainedModelId && !isDeployed) { + if (isDeployable && trainedModelId) { try { - ml?.mlApi?.trainedModels.startModelAllocation(trainedModelId); + const modelDownloaded: boolean = await isModelDownloaded(trainedModelId); + + if (isDeployed) { + createInferenceEndpoint(trainedModelId, defaultInferenceEndpoint, data); + } else if (modelDownloaded) { + ml?.mlApi?.trainedModels + .startModelAllocation(trainedModelId) + .then(() => createInferenceEndpoint(trainedModelId, defaultInferenceEndpoint, data)); + } else { + ml?.mlApi?.trainedModels + .installElasticTrainedModelConfig(trainedModelId) + .then(() => ml?.mlApi?.trainedModels.startModelAllocation(trainedModelId)) + .then(() => createInferenceEndpoint(trainedModelId, defaultInferenceEndpoint, data)); + } toasts?.addSuccess({ title: i18n.translate( 'xpack.idxMgmt.mappingsEditor.createField.modelDeploymentStartedNotification', diff --git a/x-pack/plugins/index_management/public/application/index.tsx b/x-pack/plugins/index_management/public/application/index.tsx index 43dd90e5bc1e8..48a19f58bbfa5 100644 --- a/x-pack/plugins/index_management/public/application/index.tsx +++ b/x-pack/plugins/index_management/public/application/index.tsx @@ -38,7 +38,17 @@ export const IndexManagementAppContext: React.FC core, dependencies, }) => { - const { docLinks, notifications, application, executionContext, overlays, theme } = core; + const { + docLinks, + notifications, + application, + executionContext, + overlays, + analytics, + i18n, + theme, + } = core; + const startServices = { analytics, i18n, overlays, theme }; const { services, setBreadcrumbs, uiSettings, settings, kibanaVersion } = dependencies; // theme is required by the CodeEditor component used to edit runtime field Painless scripts. @@ -63,6 +73,7 @@ export const IndexManagementAppContext: React.FC setBreadcrumbs, getUrlForApp: application.getUrlForApp, executionContext, + startServices, }; return ( diff --git a/x-pack/plugins/index_management/public/types.ts b/x-pack/plugins/index_management/public/types.ts index 6cbca148c4795..e6a3b9a611026 100644 --- a/x-pack/plugins/index_management/public/types.ts +++ b/x-pack/plugins/index_management/public/types.ts @@ -5,6 +5,12 @@ * 2.0. */ +import { + AnalyticsServiceStart, + I18nStart, + OverlayStart, + ThemeServiceStart, +} from '@kbn/core/public'; import { CloudSetup } from '@kbn/cloud-plugin/public'; import { ConsolePluginStart } from '@kbn/console-plugin/public'; import { ManagementSetup } from '@kbn/management-plugin/public'; @@ -12,6 +18,13 @@ import { MlPluginStart } from '@kbn/ml-plugin/public'; import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; +export interface IndexManagementStartServices { + analytics: Pick; + i18n: I18nStart; + overlays: OverlayStart; + theme: Pick; +} + export interface SetupDependencies { fleet?: unknown; usageCollection: UsageCollectionSetup; diff --git a/x-pack/plugins/index_management/tsconfig.json b/x-pack/plugins/index_management/tsconfig.json index 0707ea02a0fe8..202a755a8b21d 100644 --- a/x-pack/plugins/index_management/tsconfig.json +++ b/x-pack/plugins/index_management/tsconfig.json @@ -50,7 +50,8 @@ "@kbn/inference_integration_flyout", "@kbn/ml-plugin", "@kbn/ml-error-utils", - "@kbn/react-kibana-context-render" + "@kbn/react-kibana-context-render", + "@kbn/react-kibana-mount" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/ingest_pipelines/public/shared_imports.ts b/x-pack/plugins/ingest_pipelines/public/shared_imports.ts index 5880bff1d3dae..420da38be6c54 100644 --- a/x-pack/plugins/ingest_pipelines/public/shared_imports.ts +++ b/x-pack/plugins/ingest_pipelines/public/shared_imports.ts @@ -82,11 +82,8 @@ export { export { isJSON, isEmptyString } from '@kbn/es-ui-shared-plugin/static/validators/string'; -export { - KibanaContextProvider, - KibanaThemeProvider, - useExecutionContext, -} from '@kbn/kibana-react-plugin/public'; +export { KibanaContextProvider, useExecutionContext } from '@kbn/kibana-react-plugin/public'; +export { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; export { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; diff --git a/x-pack/plugins/ingest_pipelines/tsconfig.json b/x-pack/plugins/ingest_pipelines/tsconfig.json index 71f0cb792a92c..8d14d5f11412d 100644 --- a/x-pack/plugins/ingest_pipelines/tsconfig.json +++ b/x-pack/plugins/ingest_pipelines/tsconfig.json @@ -32,7 +32,8 @@ "@kbn/core-ui-settings-browser", "@kbn/code-editor", "@kbn/react-kibana-context-render", - "@kbn/console-plugin" + "@kbn/console-plugin", + "@kbn/react-kibana-context-theme" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/maps/kibana.jsonc b/x-pack/plugins/maps/kibana.jsonc index fb0472100e1c2..97b8d1b9cddc2 100644 --- a/x-pack/plugins/maps/kibana.jsonc +++ b/x-pack/plugins/maps/kibana.jsonc @@ -24,7 +24,6 @@ "navigation", "expressions", "visualizations", - "dashboard", "embeddable", "mapsEms", "share", diff --git a/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx b/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx index a2c5f69e55e68..72e55b2564e35 100644 --- a/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx +++ b/x-pack/plugins/maps/public/classes/styles/vector/components/field_select.tsx @@ -10,6 +10,7 @@ import { calculateWidthFromEntries } from '@kbn/calculate-width-from-char-count' import { EuiComboBox, EuiComboBoxProps, EuiComboBoxOptionOption } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FieldIcon } from '@kbn/react-field'; +import { comboBoxFieldOptionMatcher } from '@kbn/field-utils'; import { FIELD_ORIGIN, MIDDLE_TRUNCATION_PROPS, @@ -35,6 +36,7 @@ function groupFieldsByOrigin(fields: StyleField[]) { .map((field) => { return { value: field, + name: field.name, label: field.label, disabled: field.isUnsupported, title: field.unsupportedMsg, @@ -132,6 +134,7 @@ export function FieldSelect({ fields, selectedFieldName, onChange, styleName, .. singleSelection={SINGLE_SELECTION_AS_TEXT_PROPS} truncationProps={MIDDLE_TRUNCATION_PROPS} inputPopoverProps={{ panelMinWidth }} + optionMatcher={comboBoxFieldOptionMatcher} {...rest} /> ); diff --git a/x-pack/plugins/maps/public/components/single_field_select.tsx b/x-pack/plugins/maps/public/components/single_field_select.tsx index 5a2a8f35755aa..325779cd50d0f 100644 --- a/x-pack/plugins/maps/public/components/single_field_select.tsx +++ b/x-pack/plugins/maps/public/components/single_field_select.tsx @@ -12,6 +12,7 @@ import { EuiComboBox, EuiComboBoxProps, EuiComboBoxOptionOption, EuiToolTip } fr import { FieldIcon } from '@kbn/react-field'; import { DataViewField } from '@kbn/data-views-plugin/public'; import { calculateWidthFromEntries } from '@kbn/calculate-width-from-char-count'; +import { comboBoxFieldOptionMatcher } from '@kbn/field-utils'; import { MIDDLE_TRUNCATION_PROPS } from '../../common/constants'; function fieldsToOptions( @@ -32,6 +33,7 @@ function fieldsToOptions( value: field, label: field.displayName ? field.displayName : field.name, prepend: FieldTypeIcon, + name: field.name, }; if (isFieldDisabled && isFieldDisabled(field)) { option.disabled = true; @@ -119,6 +121,7 @@ export function SingleFieldSelect({ isDisabled={!fields || fields.length === 0} truncationProps={MIDDLE_TRUNCATION_PROPS} inputPopoverProps={{ panelMinWidth }} + optionMatcher={comboBoxFieldOptionMatcher} {...rest} /> ); diff --git a/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap b/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap index 6592d6d4ef1fe..02152efb6ac83 100644 --- a/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap +++ b/x-pack/plugins/maps/public/components/tooltip_selector/__snapshots__/add_tooltip_field_popover.test.tsx.snap @@ -34,6 +34,7 @@ exports[`Should remove selected fields from selectable 1`] = ` Array [ Object { "label": "@timestamp-label", + "name": "@timestamp", "prepend": { return { value: field.name, + name: field.name, prepend: 'type' in field ? ( @@ -161,6 +163,7 @@ export class AddTooltipFieldPopover extends Component { searchProps={{ compressed: true }} options={this.state.options} onChange={this._onSelect} + optionMatcher={comboBoxFieldOptionMatcher} > {(list, search) => (
diff --git a/x-pack/plugins/maps/public/index.ts b/x-pack/plugins/maps/public/index.ts index d0281537e7a02..4f8a1090436fe 100644 --- a/x-pack/plugins/maps/public/index.ts +++ b/x-pack/plugins/maps/public/index.ts @@ -26,6 +26,7 @@ export type { } from './classes/tooltips/tooltip_property'; export type { MapsSetupApi, MapsStartApi } from './api'; +export type { CreateLayerDescriptorParams } from './classes/sources/es_search_source/create_layer_descriptor'; export type { MapEmbeddable, MapEmbeddableInput, MapEmbeddableOutput } from './embeddable'; export { type MapApi, isMapApi } from './embeddable/map_api'; diff --git a/x-pack/plugins/maps/public/kibana_services.ts b/x-pack/plugins/maps/public/kibana_services.ts index 398ff8630f8be..6212c28c60f66 100644 --- a/x-pack/plugins/maps/public/kibana_services.ts +++ b/x-pack/plugins/maps/public/kibana_services.ts @@ -104,6 +104,3 @@ export const getEMSSettings: () => EMSSettings = () => { export const getEmsTileLayerId = () => mapsEms.config.emsTileLayerId; export const getShareService = () => pluginsStart.share; - -export const getIsAllowByValueEmbeddables = () => - pluginsStart.dashboard.dashboardFeatureFlagConfig.allowByValueEmbeddables; diff --git a/x-pack/plugins/maps/public/plugin.ts b/x-pack/plugins/maps/public/plugin.ts index 2eaabaa00aaf6..19ff39b76dd0b 100644 --- a/x-pack/plugins/maps/public/plugin.ts +++ b/x-pack/plugins/maps/public/plugin.ts @@ -10,7 +10,6 @@ import type { Setup as InspectorSetupContract } from '@kbn/inspector-plugin/publ import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; import type { Start as InspectorStartContract } from '@kbn/inspector-plugin/public'; -import type { DashboardStart } from '@kbn/dashboard-plugin/public'; import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { @@ -125,7 +124,6 @@ export interface MapsPluginStartDependencies { uiActions: UiActionsStart; share: SharePluginStart; visualizations: VisualizationsStart; - dashboard: DashboardStart; savedObjectsTagging?: SavedObjectTaggingPluginStart; presentationUtil: PresentationUtilPluginStart; security?: SecurityPluginStart; diff --git a/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts b/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts index b1118fcbf00e8..4d7273c3fd4b2 100644 --- a/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts +++ b/x-pack/plugins/maps/public/routes/map_page/saved_map/saved_map.ts @@ -41,7 +41,6 @@ import { getCoreChrome, getIndexPatternService, getToasts, - getIsAllowByValueEmbeddables, getSavedObjectsTagging, getTimeFilter, getUsageCollection, @@ -386,8 +385,7 @@ export class SavedMap { public hasSaveAndReturnConfig() { const hasOriginatingApp = this.hasOriginatingApp(); - const isNewMap = !this.getSavedObjectId(); - return getIsAllowByValueEmbeddables() ? hasOriginatingApp : !isNewMap && hasOriginatingApp; + return hasOriginatingApp; } public getTitle(): string { @@ -439,7 +437,7 @@ export class SavedMap { public isByValue(): boolean { const hasSavedObjectId = !!this.getSavedObjectId(); - return getIsAllowByValueEmbeddables() && !!this._originatingApp && !hasSavedObjectId; + return !!this._originatingApp && !hasSavedObjectId; } public async save({ diff --git a/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx b/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx index 0aabdf877cd42..221d90ac4f2ca 100644 --- a/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx +++ b/x-pack/plugins/maps/public/routes/map_page/top_nav_config.tsx @@ -21,7 +21,6 @@ import { ScopedHistory } from '@kbn/core/public'; import { getNavigateToApp, getMapsCapabilities, - getIsAllowByValueEmbeddables, getInspector, getCoreOverlays, getSavedObjectsTagging, @@ -215,7 +214,7 @@ export function getTopNavConfig({ let saveModal; - if (savedMap.hasOriginatingApp() || !getIsAllowByValueEmbeddables()) { + if (savedMap.hasOriginatingApp()) { saveModal = ( = React.memo(({ value, onChange }) => { + const topNBucketsValidationErrors = useMemo(() => { + if (!isDefined(value.topNBuckets)) { + return null; + } + return validateTopNBucket(value.topNBuckets); + }, [value.topNBuckets]); + return ( = React.memo(({ value, defaultMessage="Number of latest buckets" /> } + isInvalid={topNBucketsValidationErrors !== null} + data-test-subj={'mlAnomalyAlertTopNBucketsFormRow'} > = React.memo(({ value, onChange({ topNBuckets: Number(e.target.value) }); }} data-test-subj={'mlAnomalyAlertTopNBuckets'} + isInvalid={topNBucketsValidationErrors !== null} /> diff --git a/x-pack/plugins/ml/public/alerting/job_selector.tsx b/x-pack/plugins/ml/public/alerting/job_selector.tsx index bd28a15800cb3..5e1835ebfdfe1 100644 --- a/x-pack/plugins/ml/public/alerting/job_selector.tsx +++ b/x-pack/plugins/ml/public/alerting/job_selector.tsx @@ -29,7 +29,7 @@ export interface JobSelectorControlProps { /** * Validation is handled by alerting framework */ - errors: string[]; + errors?: string[]; /** Enables multiple selection of jobs and groups */ multiSelect?: boolean; label?: ReactNode; diff --git a/x-pack/plugins/ml/public/alerting/time_interval_control.tsx b/x-pack/plugins/ml/public/alerting/time_interval_control.tsx index 5e664294963fa..43eafe7acaedc 100644 --- a/x-pack/plugins/ml/public/alerting/time_interval_control.tsx +++ b/x-pack/plugins/ml/public/alerting/time_interval_control.tsx @@ -37,6 +37,7 @@ export const TimeIntervalControl: FC = ({ label={label} isInvalid={isInvalid} error={invalidTimeIntervalMessage(value ?? undefined)} + data-test-subj={'mlAnomalyAlertAdvancedSettingsLookbackInterval'} > JSX.Element; -}) { - const [embeddable, setEmbeddable] = useState(); - - const embeddableRoot: React.RefObject = useRef(null); - const baseLayers = useRef(); - - const { - services: { embeddable: embeddablePlugin, maps: mapsPlugin }, - } = useMlKibana(); - - const factory: - | EmbeddableFactory - | undefined = embeddablePlugin - ? embeddablePlugin.getEmbeddableFactory(MAP_SAVED_OBJECT_TYPE) - : undefined; - - // Update the layer list with updated geo points upon refresh - useEffect(() => { - async function updateIndexPatternSearchLayer() { - if ( - embeddable && - !isErrorEmbeddable(embeddable) && - Array.isArray(layerList) && - Array.isArray(baseLayers.current) - ) { - embeddable.setLayerList([...baseLayers.current, ...layerList]); - } - } - updateIndexPatternSearchLayer(); - }, [embeddable, layerList]); - - useEffect(() => { - async function setupEmbeddable() { - if (!factory) { - // eslint-disable-next-line no-console - console.error('Map embeddable not found.'); - return; - } - const input: MapEmbeddableInput = { - id: htmlIdGenerator()(), - attributes: { title: '' }, - filters: [], - hidePanelTitles: true, - viewMode: ViewMode.VIEW, - isLayerTOCOpen: false, - hideFilterActions: true, - // can use mapSettings to center map on anomalies - mapSettings: { - disableInteractive: false, - hideToolbarOverlay: false, - hideLayerControl: false, - hideViewControl: false, - initialLocation: INITIAL_LOCATION.AUTO_FIT_TO_BOUNDS, // this will startup based on data-extent - autoFitToDataBounds: true, // this will auto-fit when there are changes to the filter and/or query - }, - }; - - const embeddableObject = await factory.create(input); - - if (embeddableObject && !isErrorEmbeddable(embeddableObject)) { - const basemapLayerDescriptor = mapsPlugin - ? await mapsPlugin.createLayerDescriptors.createBasemapLayerDescriptor() - : null; - - if (basemapLayerDescriptor) { - baseLayers.current = [basemapLayerDescriptor]; - await embeddableObject.setLayerList(baseLayers.current); - } - } - - setEmbeddable(embeddableObject); - } - - setupEmbeddable(); - // we want this effect to execute exactly once after the component mounts - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - useEffect(() => { - if (embeddable && !isErrorEmbeddable(embeddable) && mapEmbeddableInput !== undefined) { - embeddable.updateInput(mapEmbeddableInput); - } - }, [embeddable, mapEmbeddableInput]); - - useEffect(() => { - if (embeddable && !isErrorEmbeddable(embeddable) && renderTooltipContent !== undefined) { - embeddable.setRenderTooltipContent(renderTooltipContent); - } - }, [embeddable, renderTooltipContent]); - - // We can only render after embeddable has already initialized - useEffect(() => { - if (embeddableRoot.current && embeddable) { - embeddable.render(embeddableRoot.current); - } - }, [embeddable, embeddableRoot]); - - if (!embeddablePlugin) { - // eslint-disable-next-line no-console - console.error('Embeddable start plugin not found'); - return null; - } - if (!mapsPlugin) { - // eslint-disable-next-line no-console - console.error('Maps start plugin not found'); - return null; - } - - return ( -
- ); -} diff --git a/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx b/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx index 60dbe1f6e845f..74da9e66ca6fa 100644 --- a/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx +++ b/x-pack/plugins/ml/public/application/explorer/anomalies_map.tsx @@ -18,6 +18,7 @@ import { htmlIdGenerator, } from '@elastic/eui'; import type { VectorLayerDescriptor } from '@kbn/maps-plugin/common'; +import { INITIAL_LOCATION } from '@kbn/maps-plugin/common'; import { FIELD_ORIGIN, LAYER_TYPE, @@ -29,7 +30,6 @@ import type { EMSTermJoinConfig } from '@kbn/maps-plugin/public'; import { isDefined } from '@kbn/ml-is-defined'; import type { MlAnomaliesTableRecord } from '@kbn/ml-anomaly-utils'; import { useMlKibana } from '../contexts/kibana'; -import { MlEmbeddedMapComponent } from '../components/ml_embedded_map'; const MAX_ENTITY_VALUES = 3; @@ -253,7 +253,16 @@ export const AnomaliesMap: FC = ({ anomalies, jobIds }) => { data-test-subj="mlAnomalyExplorerAnomaliesMap" style={{ width: '100%', height: 300 }} > - + {mapsPlugin && ( + + )}
diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_embedded_map.tsx b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_embedded_map.tsx index 5d2946358eb74..ac8b080fb8d8c 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_embedded_map.tsx +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/explorer_chart_embedded_map.tsx @@ -7,14 +7,19 @@ import React, { useState, useEffect } from 'react'; import type { LayerDescriptor } from '@kbn/maps-plugin/common'; +import { INITIAL_LOCATION } from '@kbn/maps-plugin/common'; import type { Dictionary } from '../../../../common/types/common'; import { getMLAnomaliesActualLayer, getMLAnomaliesTypicalLayer } from './map_config'; -import { MlEmbeddedMapComponent } from '../../components/ml_embedded_map'; +import { useMlKibana } from '../../contexts/kibana'; interface Props { seriesConfig: Dictionary; } export function EmbeddedMapComponentWrapper({ seriesConfig }: Props) { + const { + services: { maps: mapsPlugin }, + } = useMlKibana(); + const [layerList, setLayerList] = useState([]); useEffect(() => { @@ -26,9 +31,16 @@ export function EmbeddedMapComponentWrapper({ seriesConfig }: Props) { } }, [seriesConfig]); - return ( + return mapsPlugin ? (
- +
- ); + ) : null; } diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/common/map_loader/map_loader.ts b/x-pack/plugins/ml/public/application/jobs/new_job/common/map_loader/map_loader.ts index aefedb6a11f22..242ce9d472495 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/common/map_loader/map_loader.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/common/map_loader/map_loader.ts @@ -9,7 +9,7 @@ import memoizeOne from 'memoize-one'; import { isEqual } from 'lodash'; import type { DataView } from '@kbn/data-views-plugin/common'; import type { ES_GEO_FIELD_TYPE, LayerDescriptor } from '@kbn/maps-plugin/common'; -import type { MapsStartApi } from '@kbn/maps-plugin/public'; +import type { CreateLayerDescriptorParams, MapsStartApi } from '@kbn/maps-plugin/public'; import type { Query } from '@kbn/es-query'; import type { Field, SplitField } from '@kbn/ml-anomaly-utils'; import { ChartLoader } from '../chart_loader'; @@ -30,7 +30,6 @@ export class MapLoader extends ChartLoader { geoField: Field, splitField: SplitField, fieldValues: string[], - filters?: any[], savedSearchQuery?: Query ) { const layerList: LayerDescriptor[] = []; @@ -41,11 +40,10 @@ export class MapLoader extends ChartLoader { ? `${splitField.name}:${fieldValues[0]} ${query ? `and ${query}` : ''}` : `${query ? query : ''}`; - const params: any = { + const params: CreateLayerDescriptorParams = { indexPatternId: this._dataView.id, geoFieldName: geoField.name, geoFieldType: geoField.type as unknown as ES_GEO_FIELD_TYPE, - filters: filters ?? [], query: { query: queryString, language: 'kuery' }, }; diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/geo_map_examples.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/geo_map_examples.tsx index 4e2722e46e41b..da95646665ffc 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/geo_map_examples.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/geo_map_examples.tsx @@ -9,9 +9,10 @@ import type { FC } from 'react'; import React from 'react'; import { EuiFlexGrid, EuiFlexItem, EuiSpacer } from '@elastic/eui'; import type { LayerDescriptor } from '@kbn/maps-plugin/common'; +import { INITIAL_LOCATION } from '@kbn/maps-plugin/common'; import type { Aggregation, Field, SplitField } from '@kbn/ml-anomaly-utils'; import { SplitCards, useAnimateSplit } from '../split_cards'; -import { MlEmbeddedMapComponent } from '../../../../../../../components/ml_embedded_map'; +import { useMlKibana } from '../../../../../../../contexts/kibana'; import { JOB_TYPE } from '../../../../../../../../../common/constants/new_job'; import { DetectorTitle } from '../detector_title'; @@ -31,6 +32,10 @@ export const GeoMapExamples: FC = ({ geoAgg, layerList, }) => { + const { + services: { maps: mapsPlugin }, + } = useMlKibana(); + const animateSplit = useAnimateSplit(); return ( @@ -46,9 +51,18 @@ export const GeoMapExamples: FC = ({ <> {geoAgg && geoField ? : null} - - - + {mapsPlugin && ( + + + + )} diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection.tsx index 1938eefc99611..9d8a6edabe583 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection.tsx @@ -29,7 +29,7 @@ export const GeoDetector: FC = ({ setIsValid }) => { const [layerList, setLayerList] = useState([]); const { - services: { data, notifications: toasts }, + services: { notifications: toasts }, } = useMlKibana(); const { mapLoader } = useContext(JobCreatorContext); @@ -72,14 +72,12 @@ export const GeoDetector: FC = ({ setIsValid }) => { useEffect(() => { async function getMapLayersForGeoJob() { if (jobCreator.geoField) { - const { filter, query } = jobCreator.savedSearchQuery ?? {}; - const filters = [...data.query.filterManager.getFilters(), ...(filter ?? [])]; + const { query } = jobCreator.savedSearchQuery ?? {}; const layers = await mapLoader.getMapLayersForGeoJob( jobCreator.geoField, jobCreator.splitField, fieldValues, - filters, query ); setLayerList(layers); diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection_summary.tsx b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection_summary.tsx index 7845a62496d8c..58ff259897381 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection_summary.tsx +++ b/x-pack/plugins/ml/public/application/jobs/new_job/pages/components/pick_fields_step/components/geo_view/metric_selection_summary.tsx @@ -24,7 +24,7 @@ export const GeoDetectorsSummary: FC = () => { const splitField = jobCreator.splitField; const { - services: { data, notifications }, + services: { notifications }, } = useMlKibana(); // Load example field values for summary view @@ -56,14 +56,12 @@ export const GeoDetectorsSummary: FC = () => { useEffect(() => { async function getMapLayersForGeoJob() { if (geoField) { - const { filter, query } = jobCreator.savedSearchQuery ?? {}; - const filters = [...data.query.filterManager.getFilters(), ...(filter ?? [])]; + const { query } = jobCreator.savedSearchQuery ?? {}; const layers = await mapLoader.getMapLayersForGeoJob( geoField, splitField, fieldValues, - filters, query ); setLayerList(layers); diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx index 7306085b8d413..4b7e066d9416f 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable_factory.tsx @@ -10,6 +10,7 @@ import { css } from '@emotion/react'; import type { StartServicesAccessor } from '@kbn/core/public'; import type { ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import type { TimeRange } from '@kbn/es-query'; +import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { useTimeBuckets } from '@kbn/ml-time-buckets'; @@ -138,6 +139,30 @@ export const getAnomalySwimLaneEmbeddableFactory = ( const api = buildApi( { + isEditingEnabled: () => true, + getTypeDisplayName: () => + i18n.translate('xpack.ml.swimlaneEmbeddable.typeDisplayName', { + defaultMessage: 'swim lane', + }), + onEdit: async () => { + try { + const { resolveAnomalySwimlaneUserInput } = await import( + './anomaly_swimlane_setup_flyout' + ); + + const result = await resolveAnomalySwimlaneUserInput( + { ...coreStartServices, ...pluginsStartServices }, + { + ...serializeTitles(), + ...serializeSwimLaneState(), + } + ); + + swimLaneControlsApi.updateUserInput(result); + } catch (e) { + return Promise.reject(); + } + }, ...titlesApi, ...timeRangeApi, ...swimLaneControlsApi, diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx index b4dd02be726a6..64c0d9db7b7b7 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_initializer.tsx @@ -5,53 +5,101 @@ * 2.0. */ -import type { FC } from 'react'; -import React, { useState } from 'react'; +import React, { type FC, useEffect, useRef, useState } from 'react'; import { EuiButton, EuiButtonEmpty, EuiButtonGroup, + EuiFieldText, + EuiFlexGroup, + EuiFlexItem, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiFlyoutHeader, EuiForm, EuiFormRow, - EuiModalBody, - EuiModalFooter, - EuiModalHeader, - EuiModalHeaderTitle, EuiSelect, - EuiFieldText, - EuiModal, + EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; +import useMountedState from 'react-use/lib/useMountedState'; +import { useMlLink } from '../../application/contexts/kibana'; +import { ML_PAGES } from '../../../common/constants/locator'; +import type { MlApiServices } from '../../application/services/ml_api_service'; +import { extractInfluencers } from '../../../common/util/job_utils'; +import { JobSelectorControl } from '../../alerting/job_selector'; import type { SwimlaneType } from '../../application/explorer/explorer_constants'; -import { SWIMLANE_TYPE } from '../../application/explorer/explorer_constants'; -import type { AnomalySwimlaneEmbeddableUserInput, AnomalySwimLaneEmbeddableState } from '..'; +import { SWIMLANE_TYPE, VIEW_BY_JOB_LABEL } from '../../application/explorer/explorer_constants'; +import type { AnomalySwimLaneEmbeddableState, AnomalySwimlaneEmbeddableUserInput } from '..'; +import { getDefaultSwimlanePanelTitle } from './anomaly_swimlane_embeddable'; -export type ExplicitInput = Omit; +export type ExplicitInput = AnomalySwimlaneEmbeddableUserInput; export interface AnomalySwimlaneInitializerProps { - defaultTitle: string; - influencers: string[]; initialInput?: Partial< - Pick + Pick >; onCreate: (swimlaneProps: ExplicitInput) => void; onCancel: () => void; + adJobsApiService: MlApiServices['jobs']; } +const getJobSelectionErrors = (jobIds: string[]) => { + if (jobIds.length === 0) { + return [ + i18n.translate('xpack.ml.swimlaneEmbeddable.setupModal.jobSelectionRequiredError', { + defaultMessage: 'Job selection is required', + }), + ]; + } +}; + export const AnomalySwimlaneInitializer: FC = ({ - defaultTitle, - influencers, onCreate, onCancel, initialInput, + adJobsApiService, }) => { - const [panelTitle, setPanelTitle] = useState(defaultTitle); + const isMounted = useMountedState(); + + const titleManuallyChanged = useRef(!!initialInput?.title); + + const [jobIds, setJobIds] = useState(initialInput?.jobIds ?? []); + + const [influencers, setInfluencers] = useState([VIEW_BY_JOB_LABEL]); + + useEffect( + function updateInfluencers() { + async function fetchInfluencers() { + const jobs = await adJobsApiService.jobs(jobIds); + if (isMounted()) { + setInfluencers([...extractInfluencers(jobs), VIEW_BY_JOB_LABEL]); + } + } + + if (jobIds.length > 0) { + fetchInfluencers(); + } + }, + [adJobsApiService, isMounted, jobIds] + ); + + const [panelTitle, setPanelTitle] = useState(initialInput?.title ?? ''); const [swimlaneType, setSwimlaneType] = useState( initialInput?.swimlaneType ?? SWIMLANE_TYPE.OVERALL ); const [viewBySwimlaneFieldName, setViewBySwimlaneFieldName] = useState(initialInput?.viewBy); + useEffect( + function updateDefaultTitle() { + if (!titleManuallyChanged.current) { + setPanelTitle(getDefaultSwimlanePanelTitle(jobIds)); + } + }, + [initialInput?.title, jobIds] + ); + const swimlaneTypeOptions = [ { id: SWIMLANE_TYPE.OVERALL, @@ -76,30 +124,49 @@ export const AnomalySwimlaneInitializer: FC = ( const isPanelTitleValid = panelTitle.length > 0; + const jobIdsErrors = getJobSelectionErrors(jobIds); + const isFormValid = isPanelTitleValid && + !jobIdsErrors && (swimlaneType === SWIMLANE_TYPE.OVERALL || (swimlaneType === SWIMLANE_TYPE.VIEW_BY && !!viewBySwimlaneFieldName)); const resultInput = { + jobIds, panelTitle, swimlaneType, ...(viewBySwimlaneFieldName ? { viewBy: viewBySwimlaneFieldName } : {}), }; + const newJobUrl = useMlLink({ page: ML_PAGES.ANOMALY_DETECTION_CREATE_JOB }); + return ( - - - - - - + <> + + +

+ +

+
+
- + + { + setJobIds([...(update?.jobIds ?? []), ...(update?.groupIds ?? [])]); + }} + errors={jobIdsErrors} + /> + = ( /> } isInvalid={!isPanelTitleValid} + fullWidth > setPanelTitle(e.target.value)} + onChange={(e) => { + titleManuallyChanged.current = true; + setPanelTitle(e.target.value); + }} isInvalid={!isPanelTitleValid} + fullWidth /> @@ -125,6 +197,7 @@ export const AnomalySwimlaneInitializer: FC = ( defaultMessage="Swim lane type" /> } + fullWidth > = ( label={ } + fullWidth > = ( )} - + - - - - - - - - - -
+ + + + + + + + + + + + + + + ); }; diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx index 596da35f66d4c..56eaed3e9a271 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout.tsx @@ -8,53 +8,63 @@ import React from 'react'; import type { CoreStart } from '@kbn/core/public'; import { toMountPoint } from '@kbn/react-kibana-mount'; -import type { DataViewsContract } from '@kbn/data-views-plugin/public'; -import { extractInfluencers } from '../../../common/util/job_utils'; -import { VIEW_BY_JOB_LABEL } from '../../application/explorer/explorer_constants'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { distinctUntilChanged, from, skip, takeUntil } from 'rxjs'; +import { jobsApiProvider } from '../../application/services/ml_api_service/jobs'; import { AnomalySwimlaneInitializer } from './anomaly_swimlane_initializer'; -import { getDefaultSwimlanePanelTitle } from './anomaly_swimlane_embeddable'; import { HttpService } from '../../application/services/http_service'; -import type { AnomalySwimlaneEmbeddableUserInput, AnomalySwimLaneEmbeddableState } from '..'; -import { resolveJobSelection } from '../common/resolve_job_selection'; -import { mlApiServicesProvider } from '../../application/services/ml_api_service'; +import type { AnomalySwimLaneEmbeddableState, AnomalySwimlaneEmbeddableUserInput } from '..'; export async function resolveAnomalySwimlaneUserInput( coreStart: CoreStart, - dataViews: DataViewsContract, input?: Partial ): Promise { - const { http, overlays, ...startServices } = coreStart; - - const { getJobs } = mlApiServicesProvider(new HttpService(http)); + const { + http, + overlays, + application: { currentAppId$ }, + ...startServices + } = coreStart; return new Promise(async (resolve, reject) => { try { - const { jobIds } = await resolveJobSelection(coreStart, dataViews, input?.jobIds); - const title = input?.title ?? getDefaultSwimlanePanelTitle(jobIds); - const { jobs } = await getJobs({ jobId: jobIds.join(',') }); - const influencers = extractInfluencers(jobs); - influencers.push(VIEW_BY_JOB_LABEL); - const modalSession = overlays.openModal( + const adJobsApiService = jobsApiProvider(new HttpService(http)); + + const flyoutSession = overlays.openFlyout( toMountPoint( - { - modalSession.close(); - resolve({ - jobIds, - ...explicitInput, - }); - }} - onCancel={() => { - modalSession.close(); - reject(); - }} - />, + + { + flyoutSession.close(); + resolve(explicitInput); + }} + onCancel={() => { + flyoutSession.close(); + reject(); + }} + /> + , startServices - ) + ), + { + type: 'push', + ownFocus: true, + size: 's', + onClose: () => { + flyoutSession.close(); + reject(); + }, + } ); + + // Close the flyout when user navigates out of the current plugin + currentAppId$ + .pipe(skip(1), takeUntil(from(flyoutSession.onClose)), distinctUntilChanged()) + .subscribe(() => { + flyoutSession.close(); + }); } catch (error) { reject(error); } diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/initialize_swim_lane_data_fetcher.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/initialize_swim_lane_data_fetcher.ts index f10afe8e874c0..6946215b0c452 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/initialize_swim_lane_data_fetcher.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/initialize_swim_lane_data_fetcher.ts @@ -8,14 +8,15 @@ import type { estypes } from '@elastic/elasticsearch'; import type { TimeRange } from '@kbn/es-query'; import type { PublishesUnifiedSearch } from '@kbn/presentation-publishing'; -import type { Observable } from 'rxjs'; import { BehaviorSubject, catchError, combineLatest, debounceTime, + EMPTY, from, map, + type Observable, of, shareReplay, skipWhile, @@ -55,7 +56,9 @@ export const initializeSwimLaneDataFetcher = ( const selectedJobs$ = getJobsObservable( swimLaneApi.jobIds.pipe(map((jobIds) => ({ jobIds }))), anomalyDetectorService, - (error) => blockingError.next(error) + (error) => { + blockingError.next(error); + } ).pipe(shareReplay(1)); const swimLaneInput$ = combineLatest({ @@ -105,7 +108,7 @@ export const initializeSwimLaneDataFetcher = ( } catch (e) { // handle query syntax errors blockingError.next(e); - return of(undefined); + return EMPTY; } return from( @@ -146,12 +149,12 @@ export const initializeSwimLaneDataFetcher = ( ); } return of(overallSwimlaneData); + }), + catchError((error) => { + blockingError.next(error); + return EMPTY; }) ); - }), - catchError((error) => { - blockingError.next(error); - return of(undefined); }) ) .subscribe((data) => { diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts index 9e24c02f49c2b..cde7ff1350687 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/types.ts @@ -7,6 +7,7 @@ import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import type { + HasEditCapabilities, PublishesDataViews, PublishesUnifiedSearch, PublishesWritablePanelTitle, @@ -41,6 +42,7 @@ export type AnomalySwimLaneEmbeddableApi = MlEmbeddableBaseApi v.jobIds), distinctUntilChanged(isEqual), - switchMap((jobsIds) => anomalyDetectorService.getJobs$(jobsIds)), + switchMap((jobsIds) => + anomalyDetectorService.getJobs$(jobsIds).pipe( + catchError((e) => { + // Catch error to prevent the observable from completing + setErrorHandler(e.body ?? e); + return EMPTY; + }) + ) + ), map((jobs) => { const explorerJobs: ExplorerJob[] = jobs.map((job) => { const bucketSpan = parseInterval(job.analysis_config.bucket_span!); @@ -33,10 +41,6 @@ export function getJobsObservable( }; }); return explorerJobs; - }), - catchError((e) => { - setErrorHandler(e.body ?? e); - return of(undefined); }) ); } diff --git a/x-pack/plugins/ml/public/index.ts b/x-pack/plugins/ml/public/index.ts index 25bec18e80ab0..bf293e2228570 100755 --- a/x-pack/plugins/ml/public/index.ts +++ b/x-pack/plugins/ml/public/index.ts @@ -26,6 +26,7 @@ export const plugin: PluginInitializer< > = (initializerContext: PluginInitializerContext) => new MlPlugin(initializerContext); export type { MlPluginSetup, MlPluginStart }; +export type { TrainedModelConfigResponse } from '../common/types/trained_models'; export type { MlCapabilitiesResponse } from '../common/types/capabilities'; export type { MlSummaryJob } from '../common/types/anomaly_detection_jobs'; diff --git a/x-pack/plugins/ml/public/ui_actions/create_swim_lane.tsx b/x-pack/plugins/ml/public/ui_actions/create_swim_lane.tsx index 1bb54b776e140..a2acc14dbe7de 100644 --- a/x-pack/plugins/ml/public/ui_actions/create_swim_lane.tsx +++ b/x-pack/plugins/ml/public/ui_actions/create_swim_lane.tsx @@ -56,14 +56,17 @@ export function createAddSwimlanePanelAction( const presentationContainerParent = await parentApiIsCompatible(context.embeddable); if (!presentationContainerParent) throw new IncompatibleActionError(); - const [coreStart, deps] = await getStartServices(); + const [coreStart, pluginStart] = await getStartServices(); try { const { resolveAnomalySwimlaneUserInput } = await import( '../embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout' ); - const initialState = await resolveAnomalySwimlaneUserInput(coreStart, deps.data.dataViews); + const initialState = await resolveAnomalySwimlaneUserInput({ + ...coreStart, + ...pluginStart, + }); presentationContainerParent.addNewPanel({ panelType: ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, diff --git a/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx b/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx deleted file mode 100644 index 3612446e8f5af..0000000000000 --- a/x-pack/plugins/ml/public/ui_actions/edit_swimlane_panel_action.tsx +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; -import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; -import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; -import { IncompatibleActionError } from '@kbn/ui-actions-plugin/public'; -import type { AnomalySwimLaneEmbeddableApi } from '../embeddables/anomaly_swimlane/types'; -import type { MlCoreSetup } from '../plugin'; -import { isSwimLaneEmbeddableContext } from '../embeddables/anomaly_swimlane/types'; - -export const EDIT_SWIMLANE_PANEL_ACTION = 'editSwimlanePanelAction'; - -export type EditSwimlanePanelActionContext = EmbeddableApiContext & { - embeddable: AnomalySwimLaneEmbeddableApi; -}; - -export function createEditSwimlanePanelAction( - getStartServices: MlCoreSetup['getStartServices'] -): UiActionsActionDefinition { - return { - id: 'edit-anomaly-swimlane', - type: EDIT_SWIMLANE_PANEL_ACTION, - order: 50, - getIconType(): string { - return 'pencil'; - }, - getDisplayName: () => - i18n.translate('xpack.ml.actions.editSwimlaneTitle', { - defaultMessage: 'Edit swim lane', - }), - async execute(context) { - if (!isSwimLaneEmbeddableContext(context)) { - throw new IncompatibleActionError(); - } - - const [coreStart, deps] = await getStartServices(); - - try { - const { resolveAnomalySwimlaneUserInput } = await import( - '../embeddables/anomaly_swimlane/anomaly_swimlane_setup_flyout' - ); - - const { jobIds, viewBy, swimlaneType, panelTitle } = context.embeddable; - - const result = await resolveAnomalySwimlaneUserInput(coreStart, deps.data.dataViews, { - jobIds: jobIds.getValue(), - swimlaneType: swimlaneType.getValue(), - viewBy: viewBy.getValue(), - title: panelTitle?.getValue(), - }); - - context.embeddable.updateUserInput(result); - context.embeddable.setPanelTitle(result.panelTitle); - } catch (e) { - return Promise.reject(); - } - }, - async isCompatible(context: EmbeddableApiContext) { - return ( - isSwimLaneEmbeddableContext(context) && - context.embeddable.parentApi?.viewMode?.getValue() === 'edit' - ); - }, - }; -} diff --git a/x-pack/plugins/ml/public/ui_actions/index.ts b/x-pack/plugins/ml/public/ui_actions/index.ts index 15014205b8c83..41cdc5dcf6c4f 100644 --- a/x-pack/plugins/ml/public/ui_actions/index.ts +++ b/x-pack/plugins/ml/public/ui_actions/index.ts @@ -16,7 +16,6 @@ import { createApplyTimeRangeSelectionAction } from './apply_time_range_action'; import { createClearSelectionAction } from './clear_selection_action'; import { createAddSwimlanePanelAction } from './create_swim_lane'; import { createEditAnomalyChartsPanelAction } from './edit_anomaly_charts_panel_action'; -import { createEditSwimlanePanelAction } from './edit_swimlane_panel_action'; import { createEditSingleMetricViewerPanelAction } from './edit_single_metric_viewer_panel_action'; import { createAddSingleMetricViewerPanelAction } from './create_single_metric_viewer'; import { @@ -29,12 +28,11 @@ import { createVisToADJobAction } from './open_vis_in_ml_action'; import { entityFieldSelectionTrigger, EXPLORER_ENTITY_FIELD_SELECTION_TRIGGER, - swimLaneSelectionTrigger, SWIM_LANE_SELECTION_TRIGGER, + swimLaneSelectionTrigger, } from './triggers'; export { APPLY_INFLUENCER_FILTERS_ACTION } from './apply_influencer_filters_action'; export { APPLY_TIME_RANGE_SELECTION_ACTION } from './apply_time_range_action'; -export { EDIT_SWIMLANE_PANEL_ACTION } from './edit_swimlane_panel_action'; export { OPEN_IN_ANOMALY_EXPLORER_ACTION } from './open_in_anomaly_explorer_action'; export { CREATE_LENS_VIS_TO_ML_AD_JOB_ACTION } from './open_vis_in_ml_action'; export { SWIM_LANE_SELECTION_TRIGGER }; @@ -50,7 +48,6 @@ export function registerMlUiActions( core.getStartServices ); const addSwimlanePanelAction = createAddSwimlanePanelAction(core.getStartServices); - const editSwimlanePanelAction = createEditSwimlanePanelAction(core.getStartServices); const editSingleMetricViewerPanelAction = createEditSingleMetricViewerPanelAction( core.getStartServices ); @@ -74,7 +71,6 @@ export function registerMlUiActions( // Assign triggers uiActions.addTriggerAction('ADD_PANEL_TRIGGER', addSingleMetricViewerPanelAction); uiActions.addTriggerAction('ADD_PANEL_TRIGGER', addSwimlanePanelAction); - uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editSwimlanePanelAction); uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editSingleMetricViewerPanelAction); uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, editExplorerPanelAction); uiActions.addTriggerAction(CONTEXT_MENU_TRIGGER, openInExplorerAction); diff --git a/x-pack/plugins/observability_solution/apm/common/es_fields/assets.ts b/x-pack/plugins/observability_solution/apm/common/es_fields/assets.ts new file mode 100644 index 0000000000000..ffe0c99286fc5 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/common/es_fields/assets.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const ASSET_TYPE = 'asset.type'; +export const LAST_SEEN = 'asset.last_seen'; +export const FIRST_SEEN = 'asset.first_seen'; diff --git a/x-pack/plugins/observability_solution/apm/common/utils/get_bucket_size/calculate_auto.test.ts b/x-pack/plugins/observability_solution/apm/common/utils/get_bucket_size/calculate_auto.test.ts new file mode 100644 index 0000000000000..34f920a2a68dc --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/common/utils/get_bucket_size/calculate_auto.test.ts @@ -0,0 +1,64 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import moment from 'moment'; +import { calculateAuto } from './calculate_auto'; + +const numBuckets = 8; + +describe('calculateAuto', () => { + describe('when using near', () => { + const end = moment(); + it('returns 30 day interval for a 4 year duration', () => { + const start = moment().subtract(4, 'years'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(2592000000); + }); + it('returns 30 day interval for a 1 year duration', () => { + const start = moment().subtract(1, 'years'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(2592000000); + }); + it('returns 7 day interval for a 5 month duration', () => { + const start = moment().subtract(5, 'months'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(604800000); + }); + it('returns 7 day interval for a 3 month duration', () => { + const start = moment().subtract(3, 'months'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(604800000); + }); + it('returns 7 day interval for a 2 month duration', () => { + const start = moment().subtract(2, 'months'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(604800000); + }); + it('returns 5 minute interval for a 1 hour duration', () => { + const start = moment().subtract(1, 'hour'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(300000); + }); + it('returns 1 minute interval for a 15 minute duration', () => { + const start = moment().subtract(15, 'minutes'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(60000); + }); + it('returns 5 second interval for a 1 minute duration', () => { + const start = moment().subtract(1, 'minutes'); + expect( + calculateAuto.near(numBuckets, moment.duration(end.diff(start)))?.asMilliseconds() + ).toEqual(5000); + }); + }); +}); diff --git a/x-pack/plugins/observability_solution/apm/common/utils/get_bucket_size/get_bucket_size.test.ts b/x-pack/plugins/observability_solution/apm/common/utils/get_bucket_size/get_bucket_size.test.ts new file mode 100644 index 0000000000000..6d3434b0cc9e2 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/common/utils/get_bucket_size/get_bucket_size.test.ts @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import moment from 'moment'; +import { getBucketSize } from '.'; + +const numBuckets = 8; + +describe('getBucketSize', () => { + const end = moment(); + it('returns 60 second interval for a 1 minute duration', () => { + const start = moment(end).subtract(15, 'milliseconds'); + const minBucketSize = 60; + expect( + getBucketSize({ + start: start.valueOf(), + end: end.valueOf(), + numBuckets, + minBucketSize, + }).bucketSize + ).toEqual(minBucketSize); + }); + it('returns minBucketSize for a less than 1 second duration', () => { + const start = moment(end).subtract(500, 'milliseconds'); // 0.5 seconds as milliseconds + const minBucketSize = 60; // in seconds + expect( + getBucketSize({ + start: start.valueOf(), + end: end.valueOf(), + numBuckets, + minBucketSize, + }).bucketSize + ).toEqual(minBucketSize); + }); + it('returns 1 for a less than 1 second duration when minBucketSize is not provided', () => { + const start = moment(end).subtract(500, 'milliseconds'); // 0.5 seconds as milliseconds + expect( + getBucketSize({ + start: start.valueOf(), + end: end.valueOf(), + numBuckets, + }).bucketSize + ).toEqual(1); + }); +}); diff --git a/x-pack/plugins/observability_solution/apm/dev_docs/apm_queries.md b/x-pack/plugins/observability_solution/apm/dev_docs/apm_queries.md index 7b0fd244bfdd5..8f7ee301e6467 100644 --- a/x-pack/plugins/observability_solution/apm/dev_docs/apm_queries.md +++ b/x-pack/plugins/observability_solution/apm/dev_docs/apm_queries.md @@ -226,7 +226,7 @@ GET apm-*-metric-*,metrics-apm*/_search?terminate_after=1000 Service transaction metrics are aggregated metric documents that hold latency and throughput metrics pivoted by `service.name`, `service.environment` and `transaction.type`. Additionally, `agent.name` and `service.language.name` are included as metadata. -We use the response from the `GET /internal/apm/time_range_metadata` endpoint to determine what data source is available. A data source is considered available if there is either data before the current time range, or, if there is no data at all before the current time range, if there is data within the current time range. This means that existing deployments will use transaction metrics right after upgrading (instead of using service transaction metrics and seeing a mostly blank screen), but also that new deployments immediately get the benefits of service transaction metrics, instead of falling all the way back to transaction events. +We use the response from the `GET /internal/apm/time_range_metadata` endpoint to determine what data source is available. Service transaction metrics docs, introduced in APM >= 8.7, is considered available if there is data before *and* within the current time range. This ensure the UI won't miss information shipped by APM < 8.7. For < 8.7 documents, availability is determined by whether there is data before the current time range, or no data at all before the current time range, but there is data within the current time range. This means that existing deployments will use transaction metrics right after upgrading (instead of using service transaction metrics and seeing a mostly blank screen), but also that new deployments immediately get the benefits of service transaction metrics, instead of falling all the way back to transaction events. A pre-aggregated document where `_doc_count` is the number of transaction events diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/setup_cypress_node_events.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/setup_cypress_node_events.ts index c8e6f473e2e3b..3d322a169663c 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/setup_cypress_node_events.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/setup_cypress_node_events.ts @@ -28,7 +28,9 @@ export function setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.Plugin version: config.env.APM_PACKAGE_VERSION, }); - synthtraceEsClient.pipeline(synthtraceEsClient.getDefaultPipeline(false)); + synthtraceEsClient.pipeline( + synthtraceEsClient.getDefaultPipeline({ includeSerialization: false }) + ); initPlugin(on, config); diff --git a/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx b/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx index 3a403e8d73f5b..11dd29811c088 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/alerting/ui_components/alert_details_app_section/latency_chart.tsx @@ -5,12 +5,12 @@ * 2.0. */ import { Theme } from '@elastic/charts'; -import { RecursivePartial } from '@elastic/eui'; +import { RecursivePartial, transparentize } from '@elastic/eui'; import React, { useMemo } from 'react'; import { EuiFlexItem, EuiPanel, EuiFlexGroup, EuiTitle } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { getDurationFormatter } from '@kbn/observability-plugin/common'; -import { ALERT_RULE_TYPE_ID, ALERT_EVALUATION_THRESHOLD } from '@kbn/rule-data-utils'; +import { ALERT_RULE_TYPE_ID, ALERT_EVALUATION_THRESHOLD, ALERT_END } from '@kbn/rule-data-utils'; import type { TopAlert } from '@kbn/observability-plugin/public'; import { AlertActiveTimeRangeAnnotation, @@ -21,6 +21,8 @@ import { import { useEuiTheme } from '@elastic/eui'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { UI_SETTINGS } from '@kbn/data-plugin/public'; +import moment from 'moment'; +import chroma from 'chroma-js'; import { filterNil } from '../../../shared/charts/latency_chart'; import { TimeseriesChart } from '../../../shared/charts/timeseries_chart'; import { @@ -112,6 +114,9 @@ function LatencyChart({ preferred, ] ); + + const alertEnd = alert.fields[ALERT_END] ? moment(alert.fields[ALERT_END]).valueOf() : undefined; + const alertEvalThreshold = alert.fields[ALERT_EVALUATION_THRESHOLD]; const alertEvalThresholdChartData = alertEvalThreshold @@ -120,7 +125,6 @@ function LatencyChart({ key={'alertThresholdRect'} id={'alertThresholdRect'} threshold={alertEvalThreshold} - alertStarted={alert.start} color={euiTheme.colors.danger} />, , diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx index 7cf39b8bd1097..ee4cfc5d89fac 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/dependencies_inventory/dependencies_inventory_table/index.tsx @@ -38,7 +38,7 @@ export function DependenciesInventoryTable() { start, end, environment, - numBuckets: 20, + numBuckets: 8, offset: comparisonEnabled && isTimeComparison(offset) ? offset : undefined, kuery, }, diff --git a/x-pack/plugins/observability_solution/apm/scripts/precommit.js b/x-pack/plugins/observability_solution/apm/scripts/precommit.js index 79a05a8ec2304..fcf6120fc36f4 100644 --- a/x-pack/plugins/observability_solution/apm/scripts/precommit.js +++ b/x-pack/plugins/observability_solution/apm/scripts/precommit.js @@ -9,7 +9,7 @@ /* eslint-disable import/no-extraneous-dependencies*/ const execa = require('execa'); -const Listr = require('listr'); +const { Listr } = require('listr2'); const { resolve } = require('path'); const root = resolve(__dirname, '../../../..'); diff --git a/x-pack/plugins/observability_solution/apm/server/lib/helpers/create_es_client/create_assets_es_client/create_assets_es_clients.ts b/x-pack/plugins/observability_solution/apm/server/lib/helpers/create_es_client/create_assets_es_client/create_assets_es_clients.ts new file mode 100644 index 0000000000000..2b77f08f10269 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/lib/helpers/create_es_client/create_assets_es_client/create_assets_es_clients.ts @@ -0,0 +1,67 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { KibanaRequest } from '@kbn/core/server'; +import { ElasticsearchClient } from '@kbn/core/server'; +import { unwrapEsResponse } from '@kbn/observability-plugin/common/utils/unwrap_es_response'; +import { withApmSpan } from '../../../../utils/with_apm_span'; + +const ASSETS_INDEX_NAME = 'assets'; + +export function cancelEsRequestOnAbort>( + promise: T, + request: KibanaRequest, + controller: AbortController +): T { + const subscription = request.events.aborted$.subscribe(() => { + controller.abort(); + }); + + return promise.finally(() => subscription.unsubscribe()) as T; +} + +export interface AssetsESClient { + search( + operationName: string, + searchRequest: TSearchRequest + ): Promise>; +} + +export async function createAssetsESClient({ + request, + esClient, +}: { + request: KibanaRequest; + esClient: ElasticsearchClient; +}) { + return { + search( + operationName: string, + searchRequest: TSearchRequest + ): Promise> { + const controller = new AbortController(); + + const promise = withApmSpan(operationName, () => { + return cancelEsRequestOnAbort( + esClient.search( + { ...searchRequest, index: [ASSETS_INDEX_NAME] }, + { + signal: controller.signal, + meta: true, + } + ) as unknown as Promise<{ + body: InferSearchResponseOf; + }>, + request, + controller + ); + }); + + return unwrapEsResponse(promise); + }, + }; +} diff --git a/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_document_sources.ts b/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_document_sources.ts index 9f959cb195cec..ca049603b5c52 100644 --- a/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_document_sources.ts +++ b/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_document_sources.ts @@ -11,22 +11,13 @@ import { RollupInterval } from '../../../common/rollup'; import { APMEventClient } from './create_es_client/create_apm_event_client'; import { getConfigForDocumentType } from './create_es_client/document_type'; import { TimeRangeMetadata } from '../../../common/time_range_metadata'; -import { getDurationLegacyFilter } from './transactions'; +import { isDurationSummaryNotSupportedFilter } from './transactions'; const QUERY_INDEX = { - BEFORE: 0, - CURRENT: 1, - DURATION_SUMMARY: 2, + DOCUMENT_TYPE: 0, + DURATION_SUMMARY_NOT_SUPPORTED: 1, } as const; -interface DocumentTypeData { - documentType: ApmDocumentType; - rollupInterval: RollupInterval; - hasDocBefore: boolean; - hasDocAfter: boolean; - allHaveDurationSummary: boolean; -} - const getRequest = ({ documentType, rollupInterval, @@ -93,10 +84,8 @@ export async function getDocumentSources({ documentTypesToCheck, }); - const hasAnySourceDocBefore = documentTypesInfo.some((source) => source.hasDocBefore); - return [ - ...mapToSources(documentTypesInfo, hasAnySourceDocBefore), + ...documentTypesInfo, { documentType: ApmDocumentType.TransactionEvent, rollupInterval: RollupInterval.None, @@ -120,7 +109,7 @@ const getDocumentTypesInfo = async ({ kuery: string; enableContinuousRollups: boolean; documentTypesToCheck: ApmDocumentType[]; -}) => { +}): Promise => { const getRequests = getDocumentTypeRequestsFn({ enableContinuousRollups, start, @@ -131,25 +120,36 @@ const getDocumentTypesInfo = async ({ const sourceRequests = documentTypesToCheck.flatMap(getRequests); const allSearches = sourceRequests - .flatMap(({ before, current, durationSummaryCheck }) => [before, current, durationSummaryCheck]) + .flatMap(({ documentTypeQuery, durationSummaryNotSupportedQuery }) => [ + documentTypeQuery, + durationSummaryNotSupportedQuery, + ]) .filter((request): request is ReturnType => request !== undefined); const allResponses = (await apmEventClient.msearch('get_document_availability', ...allSearches)) .responses; + const hasAnyLegacyDocuments = sourceRequests.some( + ({ documentType, rollupInterval }, index) => + isLegacyDocType(documentType, rollupInterval) && + allResponses[index + QUERY_INDEX.DURATION_SUMMARY_NOT_SUPPORTED].hits.total.value > 0 + ); + return sourceRequests.map(({ documentType, rollupInterval, ...queries }) => { const numberOfQueries = Object.values(queries).filter(Boolean).length; // allResponses is sorted by the order of the requests in sourceRequests const docTypeResponses = allResponses.splice(0, numberOfQueries); + const hasDocs = docTypeResponses[QUERY_INDEX.DOCUMENT_TYPE].hits.total.value > 0; + // can only use >=8.7 document types (ServiceTransactionMetrics or TransactionMetrics with 10m and 60m intervals) + // if there are no legacy documents + const canUseContinousRollupDocs = hasDocs && !hasAnyLegacyDocuments; return { documentType, rollupInterval, - hasDocBefore: docTypeResponses[QUERY_INDEX.BEFORE].hits.total.value > 0, - hasDocAfter: docTypeResponses[QUERY_INDEX.CURRENT].hits.total.value > 0, - allHaveDurationSummary: docTypeResponses[QUERY_INDEX.DURATION_SUMMARY] - ? docTypeResponses[QUERY_INDEX.DURATION_SUMMARY].hits.total.value === 0 - : true, + hasDocs: isLegacyDocType(documentType, rollupInterval) ? hasDocs : canUseContinousRollupDocs, + // all >=8.7 document types with rollups support duration summary + hasDurationSummaryField: canUseContinousRollupDocs, }; }); }; @@ -168,9 +168,7 @@ const getDocumentTypeRequestsFn = }) => (documentType: ApmDocumentType) => { const currentRange = rangeQuery(start, end); - const diff = end - start; const kql = kqlQuery(kuery); - const beforeRange = rangeQuery(start - diff, end - diff); const rollupIntervals = enableContinuousRollups ? getConfigForDocumentType(documentType).rollupIntervals @@ -179,48 +177,26 @@ const getDocumentTypeRequestsFn = return rollupIntervals.map((rollupInterval) => ({ documentType, rollupInterval, - before: getRequest({ - documentType, - rollupInterval, - filters: [...kql, ...beforeRange], - }), - current: getRequest({ + documentTypeQuery: getRequest({ documentType, rollupInterval, filters: [...kql, ...currentRange], }), - ...(documentType !== ApmDocumentType.ServiceTransactionMetric + ...(isLegacyDocType(documentType, rollupInterval) ? { - durationSummaryCheck: getRequest({ + durationSummaryNotSupportedQuery: getRequest({ documentType, rollupInterval, - filters: [...kql, ...currentRange, getDurationLegacyFilter()], + filters: [...kql, ...currentRange, isDurationSummaryNotSupportedFilter()], }), } - : {}), + : undefined), })); }; -const mapToSources = (sources: DocumentTypeData[], hasAnySourceDocBefore: boolean) => { - return sources.map((source) => { - const { documentType, hasDocAfter, hasDocBefore, rollupInterval, allHaveDurationSummary } = - source; - - const hasDocBeforeOrAfter = hasDocBefore || hasDocAfter; - - // If there is any data before, we require that data is available before - // this time range to mark this source as available. If we don't do that, - // users that upgrade to a version that starts generating service tx metrics - // will see a mostly empty screen for a while after upgrading. - // If we only check before, users with a new deployment will use raw transaction - // events. - const hasDocs = hasAnySourceDocBefore ? hasDocBefore : hasDocBeforeOrAfter; - - return { - documentType, - rollupInterval, - hasDocs, - hasDurationSummaryField: allHaveDurationSummary, - }; - }); +const isLegacyDocType = (documentType: ApmDocumentType, rollupInterval: RollupInterval) => { + return ( + documentType === ApmDocumentType.TransactionMetric && + rollupInterval === RollupInterval.OneMinute + ); }; diff --git a/x-pack/plugins/observability_solution/apm/server/lib/helpers/transactions/index.ts b/x-pack/plugins/observability_solution/apm/server/lib/helpers/transactions/index.ts index 117c2c667b9c2..f1aa16f4e4f37 100644 --- a/x-pack/plugins/observability_solution/apm/server/lib/helpers/transactions/index.ts +++ b/x-pack/plugins/observability_solution/apm/server/lib/helpers/transactions/index.ts @@ -164,17 +164,10 @@ export function isRootTransaction(searchAggregatedTransactions: boolean) { }; } -export function getDurationLegacyFilter(): QueryDslQueryContainer { +export function isDurationSummaryNotSupportedFilter(): QueryDslQueryContainer { return { bool: { - must: [ - { - bool: { - filter: [{ exists: { field: TRANSACTION_DURATION_HISTOGRAM } }], - must_not: [{ exists: { field: TRANSACTION_DURATION_SUMMARY } }], - }, - }, - ], + must_not: [{ exists: { field: TRANSACTION_DURATION_SUMMARY } }], }, }; } diff --git a/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts b/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts index 6c7b6d07ad2f4..8fee2cba47dc6 100644 --- a/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts +++ b/x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts @@ -44,6 +44,7 @@ import { suggestionsRouteRepository } from '../suggestions/route'; import { timeRangeMetadataRoute } from '../time_range_metadata/route'; import { traceRouteRepository } from '../traces/route'; import { transactionRouteRepository } from '../transactions/route'; +import { servicesAssetsRoutesRepository } from '../assets/services/routes'; function getTypedGlobalApmServerRouteRepository() { const repository = { @@ -55,6 +56,7 @@ function getTypedGlobalApmServerRouteRepository() { ...observabilityOverviewRouteRepository, ...serviceMapRouteRepository, ...serviceRouteRepository, + ...servicesAssetsRoutesRepository, ...serviceGroupRouteRepository, ...suggestionsRouteRepository, ...traceRouteRepository, diff --git a/x-pack/plugins/observability_solution/apm/server/routes/assets/get_assets.ts b/x-pack/plugins/observability_solution/apm/server/routes/assets/get_assets.ts new file mode 100644 index 0000000000000..0848b014eee0c --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/assets/get_assets.ts @@ -0,0 +1,65 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { termQuery, kqlQuery } from '@kbn/observability-plugin/server'; +import { ASSET_TYPE, FIRST_SEEN, LAST_SEEN } from '../../../common/es_fields/assets'; +import { AssetsESClient } from '../../lib/helpers/create_es_client/create_assets_es_client/create_assets_es_clients'; + +type AssetType = 'service'; + +export function assetsRangeQuery(start: number, end: number): QueryDslQueryContainer[] { + return [ + { + range: { + [FIRST_SEEN]: { + gte: start, + }, + }, + }, + { + range: { + [LAST_SEEN]: { + lte: end, + }, + }, + }, + ]; +} + +export async function getAssets({ + assetsESClient, + start, + end, + kuery, + assetType, + size, +}: { + assetsESClient: AssetsESClient; + start: number; + end: number; + kuery: string; + assetType: AssetType; + size: number; +}) { + const response = await assetsESClient.search(`get_${assetType}_from_assets`, { + body: { + size, + track_total_hits: false, + query: { + bool: { + filter: [ + ...termQuery(ASSET_TYPE, assetType), + ...kqlQuery(kuery), + ...assetsRangeQuery(start, end), + ], + }, + }, + }, + }); + + return response; +} diff --git a/x-pack/plugins/observability_solution/apm/server/routes/assets/services/get_service_assets.ts b/x-pack/plugins/observability_solution/apm/server/routes/assets/services/get_service_assets.ts new file mode 100644 index 0000000000000..a467ffd3f71d4 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/assets/services/get_service_assets.ts @@ -0,0 +1,72 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { Logger } from '@kbn/core/server'; +import { errors } from '@elastic/elasticsearch'; +import { WrappedElasticsearchClientError } from '@kbn/observability-plugin/server'; +import { AssetsESClient } from '../../../lib/helpers/create_es_client/create_assets_es_client/create_assets_es_clients'; +import { withApmSpan } from '../../../utils/with_apm_span'; +import { ServiceAssetDocument } from './types'; +import { getAssets } from '../get_assets'; + +export const MAX_NUMBER_OF_SERVICES = 1_000; + +export async function getServiceAssets({ + assetsESClient, + start, + end, + kuery, + logger, +}: { + assetsESClient: AssetsESClient; + start: number; + end: number; + kuery: string; + logger: Logger; +}) { + return withApmSpan('get_service_assets', async () => { + try { + const response = await getAssets({ + assetsESClient, + start, + end, + kuery, + size: MAX_NUMBER_OF_SERVICES, + assetType: 'service', + }); + + return response.hits.hits.map((hit) => { + const serviceAsset = hit._source as ServiceAssetDocument; + + return { + asset: { + signalTypes: serviceAsset.asset.signalTypes, + identifyingMetadata: serviceAsset.asset.identifying_metadata, + }, + service: { + name: serviceAsset.service.name, + environment: serviceAsset.service.environment, + }, + }; + }); + } catch (error) { + // If the index does not exist, handle it gracefully + if ( + error instanceof WrappedElasticsearchClientError && + error.originalError instanceof errors.ResponseError + ) { + const type = error.originalError.body.error.type; + + if (type === 'index_not_found_exception') { + logger.error(`Asset index does not exist. Unable to fetch services.`); + return []; + } + } + + throw error; + } + }); +} diff --git a/x-pack/plugins/observability_solution/apm/server/routes/assets/services/routes.ts b/x-pack/plugins/observability_solution/apm/server/routes/assets/services/routes.ts new file mode 100644 index 0000000000000..876ff495eae17 --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/assets/services/routes.ts @@ -0,0 +1,44 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import * as t from 'io-ts'; +import { createApmServerRoute } from '../../apm_routes/create_apm_server_route'; +import { createAssetsESClient } from '../../../lib/helpers/create_es_client/create_assets_es_client/create_assets_es_clients'; +import { getServiceAssets } from './get_service_assets'; +import { kueryRt, rangeRt } from '../../default_api_types'; +import { AssetServicesResponse } from './types'; + +const servicesAssetsRoute = createApmServerRoute({ + endpoint: 'GET /internal/apm/assets/services', + params: t.type({ + query: t.intersection([kueryRt, rangeRt]), + }), + options: { tags: ['access:apm'] }, + async handler(resources): Promise { + const { context, params, request } = resources; + const coreContext = await context.core; + + const assetsESClient = await createAssetsESClient({ + request, + esClient: coreContext.elasticsearch.client.asCurrentUser, + }); + + const { start, end, kuery } = params.query; + + const services = await getServiceAssets({ + assetsESClient, + start, + end, + kuery, + logger: resources.logger, + }); + return { services }; + }, +}); + +export const servicesAssetsRoutesRepository = { + ...servicesAssetsRoute, +}; diff --git a/x-pack/plugins/observability_solution/apm/server/routes/assets/services/types.ts b/x-pack/plugins/observability_solution/apm/server/routes/assets/services/types.ts new file mode 100644 index 0000000000000..14fb8a012239c --- /dev/null +++ b/x-pack/plugins/observability_solution/apm/server/routes/assets/services/types.ts @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export interface SignalTypes { + 'asset.trace'?: boolean; + 'asset.logs'?: boolean; +} + +interface ServiceItem { + environment?: string; + name: string; +} + +interface AssetItem { + signalTypes: SignalTypes; + identifyingMetadata: string[]; +} + +export interface ServiceAssetDocument { + asset: { + signalTypes: SignalTypes; + identifying_metadata: string[]; + }; + service: ServiceItem; +} + +export interface AssetServicesResponse { + services: Array<{ asset: AssetItem; service: ServiceItem }>; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts b/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts index d31f3d537eb22..1f3d1e3c8d403 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts @@ -193,7 +193,7 @@ export const summaryPanelDatasetsActivityText = i18n.translate( export const summaryPanelDatasetsActivityTooltipText = i18n.translate( 'xpack.datasetQuality.summaryPanelDatasetsActivityTooltipText', { - defaultMessage: 'The number of datasets with activity in the last 24 hours.', + defaultMessage: 'The number of datasets with activity in the selected time range.', } ); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx index 6fcd7dc732405..ad343f912e4ff 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx @@ -41,16 +41,16 @@ export const createDatasetQuality = ({ ); return ( - - + + - - + + ); }; }; @@ -67,10 +67,10 @@ function DatasetQuality() {
- + - + diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx index 75c9f6e72b9e0..8c247104415cd 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/filters/filters.tsx @@ -55,7 +55,7 @@ export default function Filters() { ); return ( - + diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx index fba5df2e9dbe2..2c5bbb35063cf 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/summary_panel/last_day_data_placeholder.tsx @@ -16,8 +16,6 @@ import { EuiIconTip, EuiSkeletonTitle, } from '@elastic/eui'; -import { summaryPanelLast24hText } from '../../../../common/translations'; - interface LastDayDataPlaceholderParams { title: string; tooltip: string; @@ -34,16 +32,11 @@ export function LastDayDataPlaceholder({ return ( - - - {title} - - - - - - {summaryPanelLast24hText} - + + {title} + + + {isLoading ? ( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx index eaac36d016de6..5ca7c6e281bdf 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx @@ -205,6 +205,7 @@ export const useDatasetQualityTable = () => { sort: { sort }, onTableChange, pagination, + filteredItems, renderedItems, columns, loading, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_summary_panel.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_summary_panel.tsx index 9d4108ff7340c..db83151a2e6e3 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_summary_panel.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_summary_panel.tsx @@ -10,6 +10,9 @@ import { useInterpret, useSelector } from '@xstate/react'; import { IToasts } from '@kbn/core-notifications-browser'; import { IDataStreamsStatsClient } from '../services/data_streams_stats'; import { createDatasetsSummaryPanelStateMachine } from '../state_machines/summary_panel'; +import { useDatasetQualityTable } from '.'; +import { useDatasetQualityContext } from '../components/dataset_quality/context'; +import { filterInactiveDatasets } from '../utils'; interface SummaryPanelContextDeps { dataStreamStatsClient: IDataStreamsStatsClient; @@ -17,6 +20,11 @@ interface SummaryPanelContextDeps { } const useSummaryPanel = ({ dataStreamStatsClient, toasts }: SummaryPanelContextDeps) => { + const { service } = useDatasetQualityContext(); + const { filteredItems } = useDatasetQualityTable(); + + const { timeRange } = useSelector(service, (state) => state.context.filters); + const summaryPanelStateService = useInterpret(() => createDatasetsSummaryPanelStateMachine({ dataStreamStatsClient, @@ -27,29 +35,28 @@ const useSummaryPanel = ({ dataStreamStatsClient, toasts }: SummaryPanelContextD /* Datasets Quality */ - const datasetsQuality = useSelector( - summaryPanelStateService, - (state) => state.context.datasetsQuality - ); - const isDatasetsQualityLoading = useSelector( - summaryPanelStateService, - (state) => - state.matches('datasetsQuality.fetching') || - state.matches('datasetsQuality.retrying') || - state.matches('datasetsActivity.fetching') + + const datasetsQuality = { + percentages: filteredItems.map((item) => item.degradedDocs.percentage), + }; + + const isDatasetsQualityLoading = useSelector(service, (state) => + state.matches('degradedDocs.fetching') ); /* Datasets Activity */ - const datasetsActivity = useSelector( - summaryPanelStateService, - (state) => state.context.datasetsActivity - ); - const isDatasetsActivityLoading = useSelector( - summaryPanelStateService, - (state) => - state.matches('datasetsActivity.fetching') || state.matches('datasetsActivity.retrying') + const datasetsActivity = { + total: filteredItems.length, + active: filterInactiveDatasets({ + datasets: filteredItems, + timeRange, + }).length, + }; + + const isDatasetsActivityLoading = useSelector(service, (state) => + state.matches('datasets.fetching') ); /* diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/defaults.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/defaults.ts index be7327c47a8cb..be67409c3dab1 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/defaults.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/defaults.ts @@ -11,19 +11,10 @@ export const MAX_RETRIES = 1; export const RETRY_DELAY_IN_MS = 5000; export const defaultContext: DefaultDatasetsSummaryPanelContext = { - datasetsQuality: { - percentages: [], - }, - datasetsActivity: { - total: 0, - active: 0, - }, estimatedData: { estimatedDataInBytes: 0, }, retries: { - datasetsQualityRetries: 0, - datasetsActivityRetries: 0, estimatedDataRetries: 0, }, }; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/notifications.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/notifications.ts index dabd30f02af61..6b6e48ecdc785 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/notifications.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/notifications.ts @@ -8,25 +8,6 @@ import { IToasts } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -export const fetchDatasetsQualityFailedNotifier = (toasts: IToasts, error: Error) => { - toasts.addDanger({ - title: i18n.translate('xpack.datasetQuality.fetchDatasetsQualityDetailsFailed', { - defaultMessage: "We couldn't get your datasets quality details. Default values are shown.", - }), - text: error.message, - }); -}; - -export const fetchDatasetsActivityFailedNotifier = (toasts: IToasts, error: Error) => { - toasts.addDanger({ - title: i18n.translate('xpack.datasetQuality.fetchDatasetsActivityFailed', { - defaultMessage: - "We couldn't get your active/inactive datasets details. Default values are shown.", - }), - text: error.message, - }); -}; - export const fetchDatasetsEstimatedDataFailedNotifier = (toasts: IToasts, error: Error) => { toasts.addDanger({ title: i18n.translate('xpack.datasetQuality.fetchDatasetsEstimatedDataFailed', { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/state_machine.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/state_machine.ts index ae5e414c192fb..60d038549a8e1 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/state_machine.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/state_machine.ts @@ -8,19 +8,11 @@ import { IToasts } from '@kbn/core/public'; import { getDateISORange } from '@kbn/timerange'; import { assign, createMachine, DoneInvokeEvent, InterpreterFrom } from 'xstate'; -import { DataStreamStat } from '../../../../common/data_streams_stats/data_stream_stat'; import { DEFAULT_TIME_RANGE } from '../../../../common/constants'; import { IDataStreamsStatsClient } from '../../../services/data_streams_stats'; -import { filterInactiveDatasets } from '../../../utils/filter_inactive_datasets'; import { defaultContext, MAX_RETRIES, RETRY_DELAY_IN_MS } from './defaults'; +import { fetchDatasetsEstimatedDataFailedNotifier } from './notifications'; import { - fetchDatasetsActivityFailedNotifier, - fetchDatasetsEstimatedDataFailedNotifier, - fetchDatasetsQualityFailedNotifier, -} from './notifications'; -import { - DatasetsActivityDetails, - DatasetsQuality, DatasetsSummaryPanelContext, DatasetsSummaryPanelState, DatasetSummaryPanelEvent, @@ -40,78 +32,6 @@ export const createPureDatasetsSummaryPanelStateMachine = ( id: 'DatasetsQualitySummaryPanel', type: 'parallel', states: { - datasetsQuality: { - initial: 'fetching', - states: { - fetching: { - invoke: { - src: 'loadDatasetsQuality', - onDone: { - target: 'loaded', - actions: ['storeDatasetsQuality'], - }, - onError: [ - { - target: 'retrying', - cond: { - type: 'canRetry', - counter: 'datasetsQualityRetries', - }, - actions: ['incrementDatasetsQualityRetries'], - }, - { - target: 'loaded', - actions: ['notifyFetchDatasetsQualityFailed'], - }, - ], - }, - }, - retrying: { - after: { - [RETRY_DELAY_IN_MS]: 'fetching', - }, - }, - loaded: { - type: 'final', - }, - }, - }, - datasetsActivity: { - initial: 'fetching', - states: { - fetching: { - invoke: { - src: 'loadDatasetsActivity', - onDone: { - target: 'loaded', - actions: ['storeDatasetsActivity'], - }, - onError: [ - { - target: 'retrying', - cond: { - type: 'canRetry', - counter: 'datasetsActivityRetries', - }, - actions: ['incrementDatasetsActivityRetries'], - }, - { - target: 'loaded', - actions: ['notifyFetchDatasetsActivityFailed'], - }, - ], - }, - }, - retrying: { - after: { - [RETRY_DELAY_IN_MS]: 'fetching', - }, - }, - loaded: { - type: 'final', - }, - }, - }, estimatedData: { initial: 'fetching', states: { @@ -163,12 +83,6 @@ export const createPureDatasetsSummaryPanelStateMachine = ( }, { actions: { - storeDatasetsQuality: assign((_context, event) => - 'data' in event ? { datasetsQuality: event.data as DatasetsQuality } : {} - ), - storeDatasetsActivity: assign((_context, event) => - 'data' in event ? { datasetsActivity: event.data as DatasetsActivityDetails } : {} - ), storeEstimatedData: assign((_context, event) => 'data' in event ? { @@ -176,12 +90,6 @@ export const createPureDatasetsSummaryPanelStateMachine = ( } : {} ), - incrementDatasetsQualityRetries: assign(({ retries }, _event) => ({ - retries: { ...retries, datasetsQualityRetries: retries.datasetsQualityRetries + 1 }, - })), - incrementDatasetsActivityRetries: assign(({ retries }, _event) => ({ - retries: { ...retries, datasetsActivityRetries: retries.datasetsActivityRetries + 1 }, - })), incrementEstimatedDataRetries: assign(({ retries }, _event) => ({ retries: { ...retries, estimatedDataRetries: retries.estimatedDataRetries + 1 }, })), @@ -214,29 +122,10 @@ export const createDatasetsSummaryPanelStateMachine = ({ }: DatasetsSummaryPanelStateMachineDependencies) => createPureDatasetsSummaryPanelStateMachine(initialContext).withConfig({ actions: { - notifyFetchDatasetsQualityFailed: (_context, event: DoneInvokeEvent) => - fetchDatasetsQualityFailedNotifier(toasts, event.data), - notifyFetchDatasetsActivityFailed: (_context, event: DoneInvokeEvent) => - fetchDatasetsActivityFailedNotifier(toasts, event.data), notifyFetchEstimatedDataFailed: (_context, event: DoneInvokeEvent) => fetchDatasetsEstimatedDataFailedNotifier(toasts, event.data), }, services: { - loadDatasetsQuality: async (_context) => { - const dataStreamsStats = await dataStreamStatsClient.getDataStreamsDegradedStats(); - const percentages = dataStreamsStats.map((stat) => stat.percentage); - return { percentages }; - }, - loadDatasetsActivity: async (_context) => { - const dataStreamStats = await dataStreamStatsClient.getDataStreamsStats(); - const activeDataStreams = filterInactiveDatasets({ - datasets: dataStreamStats.map(DataStreamStat.create), - }); - return { - total: dataStreamStats.length, - active: activeDataStreams.length, - }; - }, loadEstimatedData: async (_context) => { const { startDate, endDate } = getDateISORange(DEFAULT_TIME_RANGE); return dataStreamStatsClient.getDataStreamsEstimatedDataInBytes({ diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/types.ts index f627d5f511110..3e8b4c7ef9919 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/summary_panel/src/types.ts @@ -9,32 +9,13 @@ import { DoneInvokeEvent } from 'xstate'; import { GetDataStreamsEstimatedDataInBytesResponse } from '../../../../common/data_streams_stats'; export interface Retries { - datasetsQualityRetries: number; - datasetsActivityRetries: number; estimatedDataRetries: number; } -export interface DatasetsQuality { - percentages: number[]; -} - -export interface DatasetsActivityDetails { - total: number; - active: number; -} - export interface EstimatedDataDetails { estimatedDataInBytes: number; } -export interface WithDatasetsQuality { - datasetsQuality: DatasetsQuality; -} - -export interface WithActiveDatasets { - datasetsActivity: DatasetsActivityDetails; -} - export interface WithEstimatedData { estimatedData: EstimatedDataDetails; } @@ -43,36 +24,9 @@ export interface WithRetries { retries: Retries; } -export type DefaultDatasetsSummaryPanelContext = WithDatasetsQuality & - WithActiveDatasets & - WithEstimatedData & - WithRetries; +export type DefaultDatasetsSummaryPanelContext = WithEstimatedData & WithRetries; export type DatasetsSummaryPanelState = - | { - value: 'datasetsQuality.fetching'; - context: DefaultDatasetsSummaryPanelContext; - } - | { - value: 'datasetsQuality.loaded'; - context: DefaultDatasetsSummaryPanelContext; - } - | { - value: 'datasetsQuality.retrying'; - context: DefaultDatasetsSummaryPanelContext; - } - | { - value: 'datasetsActivity.fetching'; - context: DefaultDatasetsSummaryPanelContext; - } - | { - value: 'datasetsActivity.loaded'; - context: DefaultDatasetsSummaryPanelContext; - } - | { - value: 'datasetsActivity.retrying'; - context: DefaultDatasetsSummaryPanelContext; - } | { value: 'estimatedData.fetching'; context: DefaultDatasetsSummaryPanelContext; @@ -92,8 +46,6 @@ export type DatasetsSummaryPanelState = export type DatasetSummaryPanelEvent = | DoneInvokeEvent - | DoneInvokeEvent - | DoneInvokeEvent | DoneInvokeEvent | DoneInvokeEvent; diff --git a/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx b/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx index bcc876295973f..d43ab65832271 100644 --- a/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx +++ b/x-pack/plugins/observability_solution/infra/public/common/asset_details_config/asset_details_tabs.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiBadge } from '@elastic/eui'; +import { EuiBetaBadge } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { ContentTabIds, type Tab } from '../../components/asset_details/types'; @@ -65,11 +65,21 @@ export const commonFlyoutTabs: Tab[] = [ defaultMessage: 'Dashboards', }), append: ( - - {i18n.translate('xpack.infra.customDashboards.newLabel', { - defaultMessage: 'NEW', + + tooltipContent={i18n.translate( + 'xpack.infra.customDashboards.technicalPreviewBadgeDescription', + { + defaultMessage: + 'This functionality is in technical preview and may be changed or removed completely in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.', + } + )} + iconType="beaker" + size="s" + style={{ verticalAlign: 'middle' }} + /> ), }, ]; diff --git a/x-pack/plugins/observability_solution/logs_data_access/README.md b/x-pack/plugins/observability_solution/logs_data_access/README.md new file mode 100644 index 0000000000000..a1b0505cb5934 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/README.md @@ -0,0 +1,5 @@ +# Logs data access + +Exposes services to access logs data. + +Services are registered during plugin [start](./server/plugin.ts) phase and defined in the [services](./server/services/) folder. diff --git a/x-pack/plugins/observability_solution/logs_data_access/jest.config.js b/x-pack/plugins/observability_solution/logs_data_access/jest.config.js new file mode 100644 index 0000000000000..08c16628e15ca --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/jest.config.js @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +const path = require('path'); + +module.exports = { + preset: '@kbn/test', + rootDir: path.resolve(__dirname, '../../../..'), + roots: ['/x-pack/plugins/observability_solution/logs_data_access'], +}; diff --git a/x-pack/plugins/observability_solution/logs_data_access/kibana.jsonc b/x-pack/plugins/observability_solution/logs_data_access/kibana.jsonc new file mode 100644 index 0000000000000..0636aac3e5c96 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/kibana.jsonc @@ -0,0 +1,16 @@ +{ + "type": "plugin", + "id": "@kbn/logs-data-access-plugin", + "owner": "@elastic/obs-ux-logs-team", + "plugin": { + "id": "logsDataAccess", + "server": true, + "browser": false, + "requiredPlugins": [ + "data", + "dataViews" + ], + "optionalPlugins": [], + "requiredBundles": [] + } +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/index.ts b/x-pack/plugins/observability_solution/logs_data_access/server/index.ts new file mode 100644 index 0000000000000..ee394c191c276 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { PluginInitializerContext } from '@kbn/core/server'; +import type { LogsDataAccessPluginSetup, LogsDataAccessPluginStart } from './plugin'; + +export type { LogsDataAccessPluginSetup, LogsDataAccessPluginStart }; + +export async function plugin(initializerContext: PluginInitializerContext) { + const { LogsDataAccessPlugin } = await import('./plugin'); + return new LogsDataAccessPlugin(initializerContext); +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/plugin.ts b/x-pack/plugins/observability_solution/logs_data_access/server/plugin.ts new file mode 100644 index 0000000000000..13977e869b233 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/plugin.ts @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + CoreSetup, + CoreStart, + Logger, + Plugin, + PluginInitializerContext, +} from '@kbn/core/server'; +import { registerServices } from './services/register_services'; +import { LogsDataAccessPluginStartDeps, LogsDataAccessPluginSetupDeps } from './types'; + +export type LogsDataAccessPluginSetup = ReturnType; +export type LogsDataAccessPluginStart = ReturnType; + +export class LogsDataAccessPlugin + implements + Plugin< + LogsDataAccessPluginSetup, + LogsDataAccessPluginStart, + LogsDataAccessPluginSetupDeps, + LogsDataAccessPluginStartDeps + > +{ + private readonly logger: Logger; + + constructor(initializerContext: PluginInitializerContext) { + this.logger = initializerContext.logger.get(); + } + public setup(core: CoreSetup, plugins: LogsDataAccessPluginSetupDeps) {} + + public start(core: CoreStart, plugins: LogsDataAccessPluginStartDeps) { + const services = registerServices({ + logger: this.logger, + deps: {}, + }); + + return { + services, + }; + } +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/index.ts b/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/index.ts new file mode 100644 index 0000000000000..1634270309689 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/index.ts @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ElasticsearchClient } from '@kbn/core/server'; +import { estypes } from '@elastic/elasticsearch'; +import { RegisterServicesParams } from '../register_services'; +import { getLogErrorRate, getLogRatePerMinute } from './utils'; + +export interface LogsRatesServiceParams { + esClient: ElasticsearchClient; + serviceNames: string[]; + identifyingMetadata: string; + timeFrom: number; + timeTo: number; +} + +interface LogErrorsAggregation extends estypes.AggregationsStringRareTermsBucketKeys { + logErrors: estypes.AggregationsTermsAggregateBase; +} + +interface LogRateQueryAggregation { + services: estypes.AggregationsTermsAggregateBase; +} + +export interface LogsRatesServiceReturnType { + [serviceName: string]: { + logRatePerMinute: number; + logErrorRate: null | number; + }; +} + +export function createGetLogsRatesService(params: RegisterServicesParams) { + return async ({ + esClient, + identifyingMetadata, + serviceNames, + timeFrom, + timeTo, + }: LogsRatesServiceParams): Promise => { + const esResponse = await esClient.search({ + index: 'logs-*-*', + size: 0, + query: { + bool: { + filter: [ + { + terms: { + [identifyingMetadata]: serviceNames, + }, + }, + { + range: { + ['@timestamp']: { + gte: timeFrom, + lte: timeTo, + format: 'epoch_millis', + }, + }, + }, + ], + }, + }, + aggs: { + services: { + terms: { + field: identifyingMetadata, + }, + aggs: { + logErrors: { + terms: { + field: 'log.level', + include: ['error', 'ERROR'], + }, + }, + }, + }, + }, + }); + const aggregations = esResponse.aggregations as LogRateQueryAggregation | undefined; + const buckets = aggregations?.services.buckets as LogErrorsAggregation[] | undefined; + + return buckets + ? buckets.reduce((acc, bucket) => { + const logCount = bucket.doc_count; + const logErrorBuckets = bucket.logErrors + .buckets as estypes.AggregationsStringRareTermsBucketKeys[]; + + const logErrorCount = logErrorBuckets[0]?.doc_count; + + return { + ...acc, + [bucket.key]: { + logRatePerMinute: getLogRatePerMinute({ logCount, timeFrom, timeTo }), + logErrorRate: logErrorCount ? getLogErrorRate({ logCount, logErrorCount }) : null, + }, + }; + }, {}) + : {}; + }; +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/utils.test.ts b/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/utils.test.ts new file mode 100644 index 0000000000000..e1fbd84e7177b --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/utils.test.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { getLogRatePerMinute, getLogErrorRate } from './utils'; + +describe('getLogRatePerMinute', () => { + it('should log rate per minute for one minute period', () => { + expect(getLogRatePerMinute({ logCount: 60, timeFrom: 0, timeTo: 60000 })).toBe(60); + }); + + it('should log rate per minute for five minutes period', () => { + expect(getLogRatePerMinute({ logCount: 60, timeFrom: 0, timeTo: 300000 })).toBe(12); + }); + + it('should handle zero log count', () => { + expect(getLogRatePerMinute({ logCount: 0, timeFrom: 0, timeTo: 60000 })).toBe(0); + }); +}); + +describe('getLogErrorRate', () => { + it('should return the correct log error rate', () => { + expect(getLogErrorRate({ logCount: 100, logErrorCount: 10 })).toBe(0.1); + }); + + it('should handle zero error count', () => { + expect(getLogErrorRate({ logCount: 100, logErrorCount: 0 })).toBe(0); + }); + + it('should handle no error count provided', () => { + expect(getLogErrorRate({ logCount: 100 })).toBe(0); + }); + + it('should handle error count exceeding log count', () => { + expect(getLogErrorRate({ logCount: 100, logErrorCount: 150 })).toBe(1.5); + }); +}); diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/utils.ts b/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/utils.ts new file mode 100644 index 0000000000000..c56f7114999ad --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/services/get_logs_rates_service/utils.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export function getLogRatePerMinute({ + logCount, + timeFrom, + timeTo, +}: { + logCount: number; + timeFrom: number; + timeTo: number; +}) { + const durationAsMinutes = (timeTo - timeFrom) / 1000 / 60; + return logCount / durationAsMinutes; +} + +export function getLogErrorRate({ + logCount, + logErrorCount = 0, +}: { + logCount: number; + logErrorCount?: number; +}) { + return logErrorCount / logCount; +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/services/register_services.ts b/x-pack/plugins/observability_solution/logs_data_access/server/services/register_services.ts new file mode 100644 index 0000000000000..c35b30783b5f4 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/services/register_services.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Logger } from '@kbn/logging'; +import { createGetLogsRatesService } from './get_logs_rates_service'; + +export interface RegisterServicesParams { + logger: Logger; + deps: {}; +} + +export function registerServices(params: RegisterServicesParams) { + return { + getLogsRatesService: createGetLogsRatesService(params), + }; +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/server/types.ts b/x-pack/plugins/observability_solution/logs_data_access/server/types.ts new file mode 100644 index 0000000000000..12346d6ab7f57 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/server/types.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { + PluginSetup as DataPluginSetup, + PluginStart as DataPluginStart, +} from '@kbn/data-plugin/server'; +import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; + +export interface LogsDataAccessPluginSetupDeps { + data: DataPluginSetup; +} + +export interface LogsDataAccessPluginStartDeps { + data: DataPluginStart; + dataViews: DataViewsPluginStart; +} diff --git a/x-pack/plugins/observability_solution/logs_data_access/tsconfig.json b/x-pack/plugins/observability_solution/logs_data_access/tsconfig.json new file mode 100644 index 0000000000000..9bd4031c7a39e --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_data_access/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types" + }, + "include": ["common/**/*", "server/**/*", "jest.config.js"], + "exclude": ["target/**/*"], + "kbn_references": [ + "@kbn/core", + "@kbn/logging", + "@kbn/data-plugin", + "@kbn/data-views-plugin", + ] +} diff --git a/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts b/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts index 87f60b977691c..46bbfa2c08757 100644 --- a/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts +++ b/x-pack/plugins/observability_solution/observability/common/ui_settings_keys.ts @@ -24,6 +24,7 @@ export const enableInfrastructureAssetCustomDashboards = export const enableAwsLambdaMetrics = 'observability:enableAwsLambdaMetrics'; export const enableAgentExplorerView = 'observability:apmAgentExplorerView'; export const apmEnableTableSearchBar = 'observability:apmEnableTableSearchBar'; +export const apmEnableMultiSignal = 'observability:apmEnableMultiSignal'; export const apmEnableServiceInventoryTableSearchBar = 'observability:apmEnableServiceInventoryTableSearchBar'; export const apmAWSLambdaPriceFactor = 'observability:apmAWSLambdaPriceFactor'; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx index 5ab79c6dfa141..22289706784e7 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx @@ -19,6 +19,7 @@ import { ALERT_EVALUATION_VALUES, ALERT_RULE_NAME, ALERT_RULE_CATEGORY, + ALERT_START, } from '@kbn/rule-data-utils'; import { isEmpty } from 'lodash'; import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; @@ -95,6 +96,7 @@ export const getRenderCellValue = ({ } return ; case TIMESTAMP: + case ALERT_START: return ; case ALERT_DURATION: return asDuration(Number(value)); diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_alert_detail.test.ts b/x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_alert_detail.test.ts index e8e25fc5cbc57..a35299bfb1033 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_alert_detail.test.ts +++ b/x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_alert_detail.test.ts @@ -43,6 +43,7 @@ describe('useFetchAlertDetail', () => { 'event.action': 'active', 'kibana.version': '8.1.0', tags: [], + _index: 'alert-index', }; const id = '123'; @@ -115,6 +116,7 @@ describe('useFetchAlertDetail', () => { "active": true, "fields": Object { "@timestamp": "2022-01-31T18:20:57.204Z", + "_index": "alert-index", "event.action": "active", "event.kind": "signal", "kibana.alert.duration.us": 13793555000, @@ -146,6 +148,7 @@ describe('useFetchAlertDetail', () => { }, "raw": Object { "@timestamp": "2022-01-31T18:20:57.204Z", + "_index": "alert-index", "event.action": "active", "event.kind": "signal", "kibana.alert.duration.us": 13793555000, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx index 6e003664804ff..4dd23f30aefb4 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/alert_details.tsx @@ -240,6 +240,7 @@ export function AlertDetails() { > diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx index f719a37237240..6c07c54f60454 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx @@ -110,6 +110,7 @@ describe('Header Actions', () => { const { getByTestId, findByTestId } = render( @@ -122,7 +123,7 @@ describe('Header Actions', () => { expect(attachments).toEqual([ { alertId: mockAlertUuid, - index: '.internal.alerts-observability.metrics.alerts-*', + index: 'alert-index', rule: { id: mockRuleId, name: mockRuleName, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx index 88418530eb757..3d47e34002945 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx @@ -35,11 +35,17 @@ import { useBulkUntrackAlerts } from '../hooks/use_bulk_untrack_alerts'; export interface HeaderActionsProps { alert: TopAlert | null; + alertIndex?: string; alertStatus?: AlertStatus; onUntrackAlert: () => void; } -export function HeaderActions({ alert, alertStatus, onUntrackAlert }: HeaderActionsProps) { +export function HeaderActions({ + alert, + alertIndex, + alertStatus, + onUntrackAlert, +}: HeaderActionsProps) { const { cases: { hooks: { useCasesAddToExistingCaseModal }, @@ -78,7 +84,7 @@ export function HeaderActions({ alert, alertStatus, onUntrackAlert }: HeaderActi ? [ { alertId: alert?.fields[ALERT_UUID] || '', - index: '.internal.alerts-observability.metrics.alerts-*', + index: alertIndex || '', rule: { id: rule.id, name: rule.name, diff --git a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts index 2b5468e0715f8..6ce519dbbc496 100644 --- a/x-pack/plugins/observability_solution/observability/server/ui_settings.ts +++ b/x-pack/plugins/observability_solution/observability/server/ui_settings.ts @@ -21,6 +21,7 @@ import { apmLabsButton, enableAgentExplorerView, apmEnableTableSearchBar, + apmEnableMultiSignal, enableAwsLambdaMetrics, apmAWSLambdaPriceFactor, apmAWSLambdaRequestCostPerMillion, @@ -326,6 +327,23 @@ export const uiSettings: Record = { requiresPageReload: true, type: 'boolean', }, + [apmEnableMultiSignal]: { + category: [observabilityFeatureId], + name: i18n.translate('xpack.observability.apmEnableMultiSignal', { + defaultMessage: 'Multi signal APM', + }), + description: i18n.translate('xpack.observability.apmEnableMultiSignalDescription', { + defaultMessage: + '{technicalPreviewLabel} Enable the multi-signal feature in APM, which allows you to monitor services from logs and traces.', + values: { + technicalPreviewLabel: `[${technicalPreviewLabel}]`, + }, + }), + schema: schema.boolean(), + value: false, + requiresPageReload: true, + type: 'boolean', + }, [apmEnableServiceInventoryTableSearchBar]: { category: [observabilityFeatureId], name: i18n.translate('xpack.observability.apmEnableServiceInventoryTableSearchBar', { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts index cc0a487331e61..c1bd72e285c72 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts @@ -129,12 +129,18 @@ interface ErrorMetaAttributes { tokenLimit?: number; tokenCount?: number; }; - [ChatCompletionErrorCode.FunctionNotFoundError]: {}; + [ChatCompletionErrorCode.FunctionNotFoundError]: { + name: string; + }; [ChatCompletionErrorCode.FunctionLimitExceededError]: {}; } export class ChatCompletionError extends Error { - constructor(public code: T, message: string, public meta?: ErrorMetaAttributes[T]) { + constructor( + public code: T, + message: string, + public meta: ErrorMetaAttributes[T] = {} as ErrorMetaAttributes[T] + ) { super(message); } } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts index 8a36561f971a8..8d9efd033bad7 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts @@ -29,11 +29,11 @@ import { type StreamingChatResponseEventWithoutError, } from '../../common'; import { ObservabilityAIAssistantScreenContext } from '../../common/types'; -import { createFunctionResponseError } from '../../common/utils/create_function_response_error'; import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; import { throwSerializedChatCompletionErrors } from '../../common/utils/throw_serialized_chat_completion_errors'; import type { ObservabilityAIAssistantAPIClientRequestParamsOf } from '../api'; import { ObservabilityAIAssistantChatService } from '../types'; +import { createPublicFunctionResponseError } from '../utils/create_function_response_error'; export function complete( { @@ -154,7 +154,7 @@ export function complete( } if (!requestedAction) { - const errorMessage = createFunctionResponseError({ + const errorMessage = createPublicFunctionResponseError({ name: functionCall.name, error: new Error(`Requested action ${functionCall.name} was not found`), }); @@ -211,7 +211,7 @@ export function complete( }); }) .catch((error) => { - return createFunctionResponseError({ + return createPublicFunctionResponseError({ name: functionCall.name, error, }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_function_response_error.ts similarity index 57% rename from x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.ts rename to x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_function_response_error.ts index bfb4021894273..de6aa8d336063 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_function_response_error.ts @@ -4,10 +4,11 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; -import { createFunctionResponseMessage } from './create_function_response_message'; - -export function createFunctionResponseError({ +// this one does not check for ES errors, they don't get to the browser +// and we prevent importing Node.js-only code +export function createPublicFunctionResponseError({ name, error, message, @@ -16,11 +17,15 @@ export function createFunctionResponseError({ error: Error; message?: string; }) { + const sanitizedError: Record = JSON.parse( + 'toJSON' in error && typeof error.toJSON === 'function' ? error.toJSON() : JSON.stringify(error) + ); + return createFunctionResponseMessage({ name, content: { error: { - ...error, + ...sanitizedError, name: error.name, message: error.message, cause: error.cause, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts index 7bd31f0ef7689..ed5f9a9ee044d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.test.ts @@ -688,6 +688,7 @@ describe('Observability AI Assistant client', () => { code: ChatCompletionErrorCode.InternalError, message: 'Connection unexpectedly closed', stack: expect.any(String), + meta: {}, }, type: StreamingChatResponseEventType.ChatCompletionError, }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts index 2bb71ba2ad592..0dc38698faa89 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/index.ts @@ -284,6 +284,7 @@ export class ObservabilityAIAssistantClient { knowledgeBaseInstructions, requestInstructions, signal, + logger: this.dependencies.logger, disableFunctions, }) ); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/catch_function_not_found_error.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/catch_function_not_found_error.ts new file mode 100644 index 0000000000000..251bd3e67e20a --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/catch_function_not_found_error.ts @@ -0,0 +1,30 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { catchError, of, OperatorFunction, throwError } from 'rxjs'; +import { + createFunctionLimitExceededError, + isFunctionNotFoundError, + MessageAddEvent, +} from '../../../../common/conversation_complete'; +import { createServerSideFunctionResponseError } from '../../util/create_server_side_function_response_error'; + +export function catchFunctionNotFoundError(): OperatorFunction { + return catchError((error) => { + if (isFunctionNotFoundError(error)) { + const functionLimitExceededError = createFunctionLimitExceededError(); + return of( + createServerSideFunctionResponseError({ + name: error.meta.name, + error: functionLimitExceededError, + }) + ); + } + + return throwError(() => error); + }); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/continue_conversation.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/continue_conversation.ts index 8d27a946556a7..0f75bbceb4a35 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/continue_conversation.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/continue_conversation.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { Logger } from '@kbn/logging'; import { decode, encode } from 'gpt-tokenizer'; import { pick, take } from 'lodash'; import { @@ -12,6 +13,7 @@ import { concat, EMPTY, from, + identity, isObservable, Observable, of, @@ -27,14 +29,15 @@ import { } from '../../../../common/conversation_complete'; import { FunctionVisibility } from '../../../../common/functions/types'; import { UserInstruction } from '../../../../common/types'; -import { createFunctionResponseError } from '../../../../common/utils/create_function_response_error'; import { createFunctionResponseMessage } from '../../../../common/utils/create_function_response_message'; import { emitWithConcatenatedMessage } from '../../../../common/utils/emit_with_concatenated_message'; import { withoutTokenCountEvents } from '../../../../common/utils/without_token_count_events'; import type { ChatFunctionClient } from '../../chat_function_client'; import type { ChatFunctionWithoutConnector } from '../../types'; +import { createServerSideFunctionResponseError } from '../../util/create_server_side_function_response_error'; import { getSystemMessageFromInstructions } from '../../util/get_system_message_from_instructions'; import { replaceSystemMessage } from '../../util/replace_system_message'; +import { catchFunctionNotFoundError } from './catch_function_not_found_error'; import { extractMessages } from './extract_messages'; import { hideTokenCountEvents } from './hide_token_count_events'; @@ -47,6 +50,7 @@ function executeFunctionAndCatchError({ messages, chat, signal, + logger, }: { name: string; args: string | undefined; @@ -54,6 +58,7 @@ function executeFunctionAndCatchError({ messages: Message[]; chat: ChatFunctionWithoutConnector; signal: AbortSignal; + logger: Logger; }): Observable { // hide token count events from functions to prevent them from // having to deal with it as well @@ -72,12 +77,13 @@ function executeFunctionAndCatchError({ return executeFunctionResponse$.pipe( catchError((error) => { + logger.error(`Encountered error running function ${name}: ${JSON.stringify(error)}`); // We want to catch the error only when a promise occurs // if it occurs in the Observable, we cannot easily recover // from it because the function may have already emitted // values which could lead to an invalid conversation state, // so in that case we let the stream fail. - return of(createFunctionResponseError({ name, error })); + return of(createServerSideFunctionResponseError({ name, error })); }), switchMap((response) => { if (isObservable(response)) { @@ -150,6 +156,7 @@ export function continueConversation({ functionCallsLeft, requestInstructions, knowledgeBaseInstructions, + logger, disableFunctions, }: { messages: Message[]; @@ -159,12 +166,15 @@ export function continueConversation({ functionCallsLeft: number; requestInstructions: Array; knowledgeBaseInstructions: UserInstruction[]; + logger: Logger; disableFunctions: boolean; }): Observable { let nextFunctionCallsLeft = functionCallsLeft; + const functionLimitExceeded = functionCallsLeft <= 0; + const definitions = getFunctionDefinitions({ - functionLimitExceeded: functionCallsLeft <= 0, + functionLimitExceeded, functionClient, disableFunctions, }); @@ -196,7 +206,10 @@ export function continueConversation({ return chat(operationName, { messages: messagesWithUpdatedSystemMessage, functions: definitions, - }).pipe(emitWithConcatenatedMessage()); + }).pipe( + emitWithConcatenatedMessage(), + functionLimitExceeded ? catchFunctionNotFoundError() : identity + ); } const functionCallName = lastMessage.function_call?.name; @@ -218,7 +231,7 @@ export function continueConversation({ if (currentFunctionCallsLeft === 0) { // create a function call response error so the LLM knows it needs to stop calling functions return of( - createFunctionResponseError({ + createServerSideFunctionResponseError({ name: functionCallName, error: createFunctionLimitExceededError(), }) @@ -241,7 +254,7 @@ export function continueConversation({ } catch (error) { // return a function response error for the LLM to handle return of( - createFunctionResponseError({ + createServerSideFunctionResponseError({ name: functionCallName, error, }) @@ -254,7 +267,7 @@ export function continueConversation({ if (!functionClient.hasFunction(functionCallName)) { // tell the LLM the function was not found return of( - createFunctionResponseError({ + createServerSideFunctionResponseError({ name: functionCallName, error: createFunctionNotFoundError(functionCallName), }) @@ -268,6 +281,7 @@ export function continueConversation({ functionClient, messages: messagesWithUpdatedSystemMessage, signal, + logger, }); } @@ -292,6 +306,7 @@ export function continueConversation({ signal, knowledgeBaseInstructions, requestInstructions, + logger, disableFunctions, }); }) diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.test.ts new file mode 100644 index 0000000000000..9fec3657a7fcc --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.test.ts @@ -0,0 +1,215 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { filter, lastValueFrom, of, throwError, toArray } from 'rxjs'; +import { + ChatCompletionChunkEvent, + Message, + MessageRole, + StreamingChatResponseEventType, +} from '../../../../common'; +import { ChatEvent } from '../../../../common/conversation_complete'; +import { getGeneratedTitle } from './get_generated_title'; + +describe('getGeneratedTitle', () => { + const messages: Message[] = [ + { + '@timestamp': new Date().toISOString(), + message: { + content: 'A message', + role: MessageRole.User, + }, + }, + ]; + + function createChatCompletionChunk( + content: string | { content?: string; function_call?: { name: string; arguments: string } } + ): ChatCompletionChunkEvent { + const msg = typeof content === 'string' ? { content } : content; + + return { + type: StreamingChatResponseEventType.ChatCompletionChunk, + id: 'id', + message: msg, + }; + } + + function callGenerateTitle( + ...rest: [ChatEvent[]] | [{ responseLanguage?: string }, ChatEvent[]] + ) { + const options = rest.length === 1 ? {} : rest[0]; + const chunks = rest.length === 1 ? rest[0] : rest[1]; + + const chatSpy = jest.fn().mockImplementation(() => of(...chunks)); + + const title$ = getGeneratedTitle({ + chat: chatSpy, + logger: { + debug: jest.fn(), + error: jest.fn(), + }, + messages, + ...options, + }); + + return { chatSpy, title$ }; + } + + it('returns the given title as a string', async () => { + const { title$ } = callGenerateTitle([ + createChatCompletionChunk({ + function_call: { + name: 'title_conversation', + arguments: JSON.stringify({ title: 'My title' }), + }, + }), + ]); + + const title = await lastValueFrom( + title$.pipe(filter((event): event is string => typeof event === 'string')) + ); + + expect(title).toEqual('My title'); + }); + + it('calls chat with the user message', async () => { + const { chatSpy, title$ } = callGenerateTitle([ + createChatCompletionChunk({ + function_call: { + name: 'title_conversation', + arguments: JSON.stringify({ title: 'My title' }), + }, + }), + ]); + + await lastValueFrom(title$); + + const [name, params] = chatSpy.mock.calls[0]; + + expect(name).toEqual('generate_title'); + expect(params.messages.length).toBe(2); + expect(params.messages[1].message.content).toContain('A message'); + }); + + it('strips quotes from the title', async () => { + async function testTitle(title: string) { + const { title$ } = callGenerateTitle([ + createChatCompletionChunk({ + function_call: { + name: 'title_conversation', + arguments: JSON.stringify({ title }), + }, + }), + ]); + + return await lastValueFrom( + title$.pipe(filter((event): event is string => typeof event === 'string')) + ); + } + + expect(await testTitle(`"My title"`)).toEqual('My title'); + expect(await testTitle(`'My title'`)).toEqual('My title'); + expect(await testTitle(`"User's request for a title"`)).toEqual(`User's request for a title`); + }); + + it('mentions the given response language in the instruction', async () => { + const { chatSpy, title$ } = callGenerateTitle( + { + responseLanguage: 'Orcish', + }, + [ + createChatCompletionChunk({ + function_call: { + name: 'title_conversation', + arguments: JSON.stringify({ title: 'My title' }), + }, + }), + ] + ); + + await lastValueFrom(title$); + + const [, params] = chatSpy.mock.calls[0]; + expect(params.messages[0].message.content).toContain('Orcish'); + }); + + it('handles partial updates', async () => { + const { title$ } = callGenerateTitle([ + createChatCompletionChunk({ + function_call: { + name: 'title_conversation', + arguments: '', + }, + }), + createChatCompletionChunk({ + function_call: { + name: '', + arguments: JSON.stringify({ title: 'My title' }), + }, + }), + ]); + + const title = await lastValueFrom(title$); + + expect(title).toEqual('My title'); + }); + + it('ignores token count events and still passes them through', async () => { + const { title$ } = callGenerateTitle([ + createChatCompletionChunk({ + function_call: { + name: 'title_conversation', + arguments: JSON.stringify({ title: 'My title' }), + }, + }), + { + type: StreamingChatResponseEventType.TokenCount, + tokens: { + completion: 10, + prompt: 10, + total: 10, + }, + }, + ]); + + const events = await lastValueFrom(title$.pipe(toArray())); + + expect(events).toEqual([ + 'My title', + { + tokens: { + completion: 10, + prompt: 10, + total: 10, + }, + type: StreamingChatResponseEventType.TokenCount, + }, + ]); + }); + + it('handles errors in chat and falls back to the default title', async () => { + const chatSpy = jest + .fn() + .mockImplementation(() => throwError(() => new Error('Error generating title'))); + + const logger = { + debug: jest.fn(), + error: jest.fn(), + }; + + const title$ = getGeneratedTitle({ + chat: chatSpy, + logger, + messages, + }); + + const title = await lastValueFrom(title$); + + expect(title).toEqual('New conversation'); + + expect(logger.error).toHaveBeenCalledWith('Error generating title'); + }); +}); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.ts index f35e0716f1051..af8f0d15466f1 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/operators/get_generated_title.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { catchError, map, Observable, of, tap } from 'rxjs'; +import { catchError, last, map, Observable, of, tap } from 'rxjs'; import { Logger } from '@kbn/logging'; import type { ObservabilityAIAssistantClient } from '..'; import { Message, MessageRole } from '../../../../common'; @@ -30,7 +30,7 @@ export function getGeneratedTitle({ responseLanguage?: string; messages: Message[]; chat: ChatFunctionWithoutConnectorAndTokenCount; - logger: Logger; + logger: Pick; }): Observable { return hideTokenCountEvents((hide) => chat('generate_title', { @@ -46,9 +46,11 @@ export function getGeneratedTitle({ '@timestamp': new Date().toISOString(), message: { role: MessageRole.User, - content: messages.slice(1).reduce((acc, curr) => { - return `${acc} ${curr.message.role}: ${curr.message.content}`; - }, 'Generate a title, using the title_conversation_function, based on the following conversation:\n\n'), + content: messages + .filter((msg) => msg.message.role !== MessageRole.System) + .reduce((acc, curr) => { + return `${acc} ${curr.message.role}: ${curr.message.content}`; + }, 'Generate a title, using the title_conversation_function, based on the following conversation:\n\n'), }, }, ], @@ -72,21 +74,21 @@ export function getGeneratedTitle({ }).pipe( hide(), concatenateChatCompletionChunks(), + last(), map((concatenatedMessage) => { - const input = + const title: string = (concatenatedMessage.message.function_call.name ? JSON.parse(concatenatedMessage.message.function_call.arguments).title : concatenatedMessage.message?.content) || ''; - // This regular expression captures a string enclosed in single or double quotes. + // This captures a string enclosed in single or double quotes. // It extracts the string content without the quotes. // Example matches: // - "Hello, World!" => Captures: Hello, World! // - 'Another Example' => Captures: Another Example // - JustTextWithoutQuotes => Captures: JustTextWithoutQuotes - const match = input.match(/^["']?([^"']+)["']?$/); - const title = match ? match[1] : input; - return title; + + return title.replace(/^"(.*)"$/g, '$1').replace(/^'(.*)'$/g, '$1'); }), tap((event) => { if (typeof event === 'string') { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_server_side_function_response_error.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_server_side_function_response_error.ts new file mode 100644 index 0000000000000..820aee7d6c137 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_server_side_function_response_error.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { errors } from '@elastic/elasticsearch'; +import { createFunctionResponseMessage } from '../../../common/utils/create_function_response_message'; + +export function createServerSideFunctionResponseError({ + name, + error, + message, +}: { + name: string; + error: Error; + message?: string; +}) { + const isElasticsearchError = error instanceof errors.ElasticsearchClientError; + + const sanitizedError: Record = JSON.parse( + 'toJSON' in error && typeof error.toJSON === 'function' ? error.toJSON() : JSON.stringify(error) + ); + + if (isElasticsearchError) { + // remove meta key which is huge and noisy + delete sanitizedError.meta; + } + + return createFunctionResponseMessage({ + name, + content: { + error: { + ...sanitizedError, + name: error.name, + message: error.message, + cause: error.cause, + }, + message: message || error.message, + }, + data: { + stack: error.stack, + }, + }); +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/experimental_onboarding_flow.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/experimental_onboarding_flow.tsx index 265e1cf810476..f3eac58303425 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/experimental_onboarding_flow.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/experimental_onboarding_flow.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import React from 'react'; +import React, { useEffect } from 'react'; import { Route, Routes } from '@kbn/shared-ux-router'; import { useNavigate, useLocation } from 'react-router-dom-v5-compat'; import { EuiButtonEmpty, EuiPageTemplate, EuiSpacer } from '@elastic/eui'; @@ -22,6 +22,12 @@ import { CustomLogsPanel } from './quickstart_flows/custom_logs'; const queryClient = new QueryClient(); export function ExperimentalOnboardingFlow() { + const { pathname } = useLocation(); + + useEffect(() => { + window.scrollTo(0, 0); + }, [pathname]); + return ( { @@ -207,7 +207,7 @@ export function SloGroupFilters({ selectedFilters, onSelected }: Props) { defaultMessage: 'Select a {selectedGroupByLabel}', values: { selectedGroupByLabel }, })} - data-test-subj="sloGroup" + data-test-subj="sloGroupOverviewConfigurationGroup" options={groupOptions} selectedOptions={selectedGroupOptions} async @@ -233,6 +233,7 @@ export function SloGroupFilters({ selectedFilters, onSelected }: Props) { } > - + - + @@ -200,7 +200,7 @@ export function SloConfiguration({ initialInput, onCreate, onCancel }: SloConfig ); return ( - + diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable_factory.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable_factory.tsx index 08d0876bfe5ae..a4f26679dd1dd 100644 --- a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable_factory.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable_factory.tsx @@ -138,6 +138,7 @@ export const getOverviewEmbeddableFactory = (deps: SloEmbeddableDeps) => { return ( { embeddable: api, } as ActionExecutionContext); }} - data-test-subj="o11ySloAlertsWrapperSlOsIncludedLink" + data-test-subj="o11ySloOverviewEditCriteriaLink" > {i18n.translate('xpack.slo.overviewEmbeddable.editCriteriaLabel', { defaultMessage: 'Edit criteria', diff --git a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx index 5d2ca2597f69e..72a0b57be723b 100644 --- a/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx @@ -105,7 +105,7 @@ export function SloOverview({ sloId, sloInstanceId, remoteName, reloadSubject }: const historicalSliData = formatHistoricalData(historicalSummary, 'sli_value'); return ( -
+
; diff --git a/x-pack/plugins/osquery/public/application.tsx b/x-pack/plugins/osquery/public/application.tsx index 83156c0e8d9bc..37f5417d192f1 100644 --- a/x-pack/plugins/osquery/public/application.tsx +++ b/x-pack/plugins/osquery/public/application.tsx @@ -5,11 +5,9 @@ * 2.0. */ -import { EuiErrorBoundary } from '@elastic/eui'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router } from '@kbn/shared-ux-router'; -import { I18nProvider } from '@kbn/i18n-react'; import { QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; @@ -20,17 +18,17 @@ import { OsqueryApp } from './components/app'; import { PLUGIN_NAME } from '../common'; import { KibanaContextProvider } from './common/lib/kibana'; import { queryClient } from './query_client'; -import { KibanaThemeProvider } from './shared_imports'; +import { KibanaRenderContextProvider } from './shared_imports'; export const renderApp = ( core: CoreStart, services: AppPluginStartDependencies, - { element, history, theme$ }: AppMountParameters, + { element, history }: AppMountParameters, storage: Storage, kibanaVersion: string ) => { ReactDOM.render( - + - - - - - - - - - - + + + + + + - , + , element ); diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx index 8bff73f67c982..a6f317fc4cac0 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_result_wrapper.tsx @@ -5,12 +5,13 @@ * 2.0. */ -import { EuiComment, EuiErrorBoundary } from '@elastic/eui'; +import { EuiComment } from '@elastic/eui'; import React, { useState, useEffect } from 'react'; import { FormattedRelative } from '@kbn/i18n-react'; import type { CoreStart } from '@kbn/core-lifecycle-browser'; -import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { QueryClientProvider } from '@tanstack/react-query'; import { EmptyPrompt } from '../../routes/components/empty_prompt'; import { useKibana } from '../../common/lib/kibana'; @@ -72,15 +73,13 @@ const OsqueryActionResultWrapperComponent: React.FC ( - + - - - - - + + + - + ); const OsqueryActionResultWrapper = React.memo(OsqueryActionResultWrapperComponent); diff --git a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx index 92f01cc76a076..c9108e028bb3f 100644 --- a/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx +++ b/x-pack/plugins/osquery/public/shared_components/osquery_results/osquery_results.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { EuiErrorBoundary, EuiSpacer } from '@elastic/eui'; +import { EuiSpacer } from '@elastic/eui'; import React from 'react'; import { QueryClientProvider } from '@tanstack/react-query'; import type { CoreStart } from '@kbn/core/public'; @@ -14,7 +14,7 @@ import { EmptyPrompt } from '../../routes/components/empty_prompt'; import { KibanaContextProvider, useKibana } from '../../common/lib/kibana'; import { queryClient } from '../../query_client'; -import { KibanaThemeProvider } from '../../shared_imports'; +import { KibanaRenderContextProvider } from '../../shared_imports'; import type { StartPlugins } from '../../types'; import type { OsqueryActionResultsProps } from './types'; import { OsqueryResult } from './osquery_result'; @@ -61,15 +61,13 @@ const OsqueryActionResultsWrapperComponent: React.FC ( - + - - - - - + + + - + ); const OsqueryActionResultsWrapper = React.memo(OsqueryActionResultsWrapperComponent); diff --git a/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx b/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx index 7b6949696bbee..a45c39ac54da1 100644 --- a/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx +++ b/x-pack/plugins/osquery/public/shared_components/services_wrapper.tsx @@ -5,14 +5,13 @@ * 2.0. */ -import { EuiErrorBoundary } from '@elastic/eui'; import React from 'react'; import { QueryClientProvider } from '@tanstack/react-query'; import type { CoreStart } from '@kbn/core/public'; import { KibanaContextProvider } from '../common/lib/kibana'; import { queryClient } from '../query_client'; -import { KibanaThemeProvider } from '../shared_imports'; +import { KibanaRenderContextProvider } from '../shared_imports'; import type { StartPlugins } from '../types'; export interface ServicesWrapperProps { @@ -21,13 +20,11 @@ export interface ServicesWrapperProps { } const ServicesWrapperComponent: React.FC = ({ services, children }) => ( - + - - {children} - + {children} - + ); const ServicesWrapper = React.memo(ServicesWrapperComponent); diff --git a/x-pack/plugins/osquery/public/shared_imports.ts b/x-pack/plugins/osquery/public/shared_imports.ts index 83d7cd8d45bb4..0585ccef0fc30 100644 --- a/x-pack/plugins/osquery/public/shared_imports.ts +++ b/x-pack/plugins/osquery/public/shared_imports.ts @@ -45,4 +45,5 @@ export { export { fieldValidators } from '@kbn/es-ui-shared-plugin/static/forms/helpers'; export type { ERROR_CODE } from '@kbn/es-ui-shared-plugin/static/forms/helpers/field_validators/types'; -export { useUiSetting$, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +export { useUiSetting$ } from '@kbn/kibana-react-plugin/public'; +export { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; diff --git a/x-pack/plugins/osquery/public/timelines/add_to_timeline_button.tsx b/x-pack/plugins/osquery/public/timelines/add_to_timeline_button.tsx index 48cd3a0ff71c1..6a03317c486d7 100644 --- a/x-pack/plugins/osquery/public/timelines/add_to_timeline_button.tsx +++ b/x-pack/plugins/osquery/public/timelines/add_to_timeline_button.tsx @@ -22,7 +22,8 @@ export interface AddToTimelineButtonProps { export const SECURITY_APP_NAME = 'Security'; export const AddToTimelineButton = (props: AddToTimelineButtonProps) => { - const { timelines, appName } = useKibana().services; + const { timelines, appName, analytics, i18n, theme } = useKibana().services; + const startServices = { analytics, i18n, theme }; const { field, value, isIcon, iconProps } = props; const queryIds = isArray(value) ? value : [value]; @@ -60,5 +61,6 @@ export const AddToTimelineButton = (props: AddToTimelineButtonProps) => { ...(isIcon ? { showTooltip: true, Component: TimelineIconComponent } : { Component: TimelineComponent }), + startServices, }); }; diff --git a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts b/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts index 42612b25a673d..2d6c47cdb8f54 100644 --- a/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts +++ b/x-pack/plugins/osquery/server/handlers/action/create_action_handler.ts @@ -29,7 +29,7 @@ interface Metadata { interface CreateActionHandlerOptions { soClient?: SavedObjectsClientContract; metadata?: Metadata; - alertData?: ParsedTechnicalFields; + alertData?: ParsedTechnicalFields & { _index: string }; error?: string; } diff --git a/x-pack/plugins/osquery/server/handlers/action/create_action_service.ts b/x-pack/plugins/osquery/server/handlers/action/create_action_service.ts index 1ec052e0bbb77..e5e54e40c382a 100644 --- a/x-pack/plugins/osquery/server/handlers/action/create_action_service.ts +++ b/x-pack/plugins/osquery/server/handlers/action/create_action_service.ts @@ -23,7 +23,7 @@ export const createActionService = (osqueryContext: OsqueryAppContext) => { const create = async ( params: CreateLiveQueryRequestBodySchema, - alertData?: ParsedTechnicalFields + alertData?: ParsedTechnicalFields & { _index: string } ) => { const error = validateLicense(licenses); diff --git a/x-pack/plugins/osquery/server/handlers/action/create_queries.test.ts b/x-pack/plugins/osquery/server/handlers/action/create_queries.test.ts index 29386c3db90db..6d6924fb8017e 100644 --- a/x-pack/plugins/osquery/server/handlers/action/create_queries.test.ts +++ b/x-pack/plugins/osquery/server/handlers/action/create_queries.test.ts @@ -60,7 +60,7 @@ describe('create queries', () => { process: { pid, }, - } as unknown as ParsedTechnicalFields, + } as unknown as ParsedTechnicalFields & { _index: string }, osqueryContext: {} as OsqueryAppContext, }); expect(queries[0].query).toBe(`SELECT * FROM processes where pid=${pid};`); @@ -77,7 +77,7 @@ describe('create queries', () => { agents: [TEST_AGENT], alertData: { process: { pid }, - } as unknown as ParsedTechnicalFields, + } as unknown as ParsedTechnicalFields & { _index: string }, osqueryContext: {} as OsqueryAppContext, }); expect(queries[0].query).toBe(`SELECT * FROM processes where pid=${pid};`); @@ -89,7 +89,7 @@ describe('create queries', () => { agents: [TEST_AGENT], alertData: { process: {}, - } as unknown as ParsedTechnicalFields, + } as unknown as ParsedTechnicalFields & { _index: string }, osqueryContext: {} as OsqueryAppContext, }); expect(queries[0].query).toBe('SELECT * FROM processes where pid={{process.pid}};'); diff --git a/x-pack/plugins/osquery/server/handlers/action/create_queries.ts b/x-pack/plugins/osquery/server/handlers/action/create_queries.ts index cf7f2563b3fbb..b71dd503db283 100644 --- a/x-pack/plugins/osquery/server/handlers/action/create_queries.ts +++ b/x-pack/plugins/osquery/server/handlers/action/create_queries.ts @@ -17,7 +17,7 @@ import { isSavedQueryPrebuilt } from '../../routes/saved_query/utils'; interface CreateDynamicQueriesParams { params: CreateLiveQueryRequestBodySchema; - alertData?: ParsedTechnicalFields; + alertData?: ParsedTechnicalFields & { _index: string }; agents: string[]; osqueryContext: OsqueryAppContext; error?: string; @@ -71,7 +71,7 @@ export const createDynamicQueries = async ({ export const replacedQueries = ( query: string | undefined, - alertData?: ParsedTechnicalFields + alertData?: ParsedTechnicalFields & { _index: string } ): { query: string | undefined; error?: string } => { if (alertData && query) { const { result, skipped } = replaceParamsQuery(query, alertData); diff --git a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts index fff242db7475c..c93b58cf5af73 100644 --- a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts @@ -11,6 +11,7 @@ import markdown from 'remark-parse-no-trim'; import { some, filter } from 'lodash'; import deepEqual from 'fast-deep-equal'; import type { ECSMappingOrUndefined } from '@kbn/osquery-io-ts-types'; +import type { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; import type { CreateLiveQueryRequestBodySchema } from '../../../common/api'; import { createLiveQueryRequestBodySchema } from '../../../common/api'; import { API_VERSIONS } from '../../../common/constants'; @@ -59,7 +60,9 @@ export const createLiveQueryRoute = (router: IRouter, osqueryContext: OsqueryApp ?.getRacClientWithRequest(request); const alertData = request.body.alert_ids?.length - ? await client?.get({ id: request.body.alert_ids[0] }) + ? ((await client?.get({ id: request.body.alert_ids[0] })) as ParsedTechnicalFields & { + _index: string; + }) : undefined; if (isInvalid) { diff --git a/x-pack/plugins/osquery/tsconfig.json b/x-pack/plugins/osquery/tsconfig.json index d520d59c515f8..6d713311c777d 100644 --- a/x-pack/plugins/osquery/tsconfig.json +++ b/x-pack/plugins/osquery/tsconfig.json @@ -76,6 +76,7 @@ "@kbn/shared-ux-page-kibana-template", "@kbn/openapi-generator", "@kbn/code-editor", - "@kbn/search-types" + "@kbn/search-types", + "@kbn/react-kibana-context-render" ] } diff --git a/x-pack/plugins/painless_lab/public/application/index.tsx b/x-pack/plugins/painless_lab/public/application/index.tsx index a4e795b2d7839..251f797ee0d86 100644 --- a/x-pack/plugins/painless_lab/public/application/index.tsx +++ b/x-pack/plugins/painless_lab/public/application/index.tsx @@ -7,33 +7,27 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import type { - CoreSetup, - CoreStart, - HttpSetup, - ChromeStart, - ThemeServiceStart, -} from '@kbn/core/public'; +import type { CoreSetup, CoreStart, HttpSetup, ChromeStart } from '@kbn/core/public'; -import { createKibanaReactContext, KibanaThemeProvider } from '../shared_imports'; +import { createKibanaReactContext, KibanaRenderContextProvider } from '../shared_imports'; import { Links } from '../links'; import { AppContextProvider } from './context'; import { Main } from './components/main'; +import { PainlessLabStartServices } from '../types'; interface AppDependencies { http: HttpSetup; - I18nContext: CoreStart['i18n']['Context']; uiSettings: CoreSetup['uiSettings']; settings: CoreStart['settings']; links: Links; chrome: ChromeStart; - theme: ThemeServiceStart; + startServices: PainlessLabStartServices; } export function renderApp( element: HTMLElement | null, - { http, I18nContext, uiSettings, links, chrome, theme, settings }: AppDependencies + { http, uiSettings, links, chrome, settings, startServices }: AppDependencies ) { if (!element) { return () => undefined; @@ -41,18 +35,16 @@ export function renderApp( const { Provider: KibanaReactContextProvider } = createKibanaReactContext({ uiSettings, settings, - theme, }); render( - - - - -
- - - - , + + + +
+ + + , + element ); return () => unmountComponentAtNode(element); diff --git a/x-pack/plugins/painless_lab/public/plugin.tsx b/x-pack/plugins/painless_lab/public/plugin.tsx index 61a89791b76d7..02ff77d5a862d 100644 --- a/x-pack/plugins/painless_lab/public/plugin.tsx +++ b/x-pack/plugins/painless_lab/public/plugin.tsx @@ -52,13 +52,15 @@ export class PainlessLabUIPlugin implements Plugin { diff --git a/x-pack/plugins/painless_lab/public/shared_imports.ts b/x-pack/plugins/painless_lab/public/shared_imports.ts index 20a5ade3ca7c2..bf0e1fcaffda3 100644 --- a/x-pack/plugins/painless_lab/public/shared_imports.ts +++ b/x-pack/plugins/painless_lab/public/shared_imports.ts @@ -5,4 +5,6 @@ * 2.0. */ -export { createKibanaReactContext, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +export { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; + +export { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; diff --git a/x-pack/plugins/painless_lab/public/types.ts b/x-pack/plugins/painless_lab/public/types.ts index afdc1e8c11b3d..693488860aff0 100644 --- a/x-pack/plugins/painless_lab/public/types.ts +++ b/x-pack/plugins/painless_lab/public/types.ts @@ -8,9 +8,16 @@ import { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import { DevToolsSetup } from '@kbn/dev-tools-plugin/public'; import { LicensingPluginSetup } from '@kbn/licensing-plugin/public'; +import { AnalyticsServiceStart, I18nStart, ThemeServiceStart } from '@kbn/core/public'; export interface PluginDependencies { licensing: LicensingPluginSetup; home: HomePublicPluginSetup; devTools: DevToolsSetup; } + +export interface PainlessLabStartServices { + analytics: Pick; + i18n: I18nStart; + theme: Pick; +} diff --git a/x-pack/plugins/painless_lab/tsconfig.json b/x-pack/plugins/painless_lab/tsconfig.json index 1b993284dea64..857711e8da847 100644 --- a/x-pack/plugins/painless_lab/tsconfig.json +++ b/x-pack/plugins/painless_lab/tsconfig.json @@ -20,6 +20,7 @@ "@kbn/i18n-react", "@kbn/config-schema", "@kbn/code-editor", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts index f395ddb4b75f7..0c449d4f4126a 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts @@ -620,7 +620,10 @@ export class AlertsClient { } // move away from pulling data from _source in the future - return alert.hits.hits[0]._source; + return { + ...alert.hits.hits[0]._source, + _index: alert.hits.hits[0]._index, + }; } catch (error) { this.logger.error(`get threw an error: ${error}`); throw error; diff --git a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts index 4185fb7e83eb6..1526e209e40c0 100644 --- a/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts +++ b/x-pack/plugins/rule_registry/server/alert_data_client/tests/get.test.ts @@ -112,6 +112,7 @@ describe('get()', () => { const result = await alertsClient.get({ id: '1', index: '.alerts-observability.apm.alerts' }); expect(result).toMatchInlineSnapshot(` Object { + "_index": ".alerts-observability.apm.alerts", "kibana.alert.rule.consumer": "apm", "kibana.alert.rule.rule_type_id": "apm.error_rate", "kibana.alert.status": "active", @@ -346,6 +347,7 @@ describe('get()', () => { expect(result).toMatchInlineSnapshot(` Object { + "_index": ".alerts-observability.apm.alerts", "kibana.alert.rule.consumer": "apm", "kibana.alert.rule.rule_type_id": "apm.error_rate", "kibana.alert.status": "active", diff --git a/x-pack/plugins/rule_registry/server/routes/get_alert_by_id.test.ts b/x-pack/plugins/rule_registry/server/routes/get_alert_by_id.test.ts index 809a5167870a1..b4e94cc3b20b2 100644 --- a/x-pack/plugins/rule_registry/server/routes/get_alert_by_id.test.ts +++ b/x-pack/plugins/rule_registry/server/routes/get_alert_by_id.test.ts @@ -25,13 +25,12 @@ import { } from '@kbn/rule-data-utils'; import { BASE_RAC_ALERTS_API_PATH } from '../../common/constants'; import { ParsedTechnicalFields } from '../../common/parse_technical_fields'; -import { ParsedExperimentalFields } from '../../common/parse_experimental_fields'; import { getAlertByIdRoute } from './get_alert_by_id'; import { requestContextMock } from './__mocks__/request_context'; import { getReadRequest } from './__mocks__/request_responses'; import { requestMock, serverMock } from './__mocks__/server'; -const getMockAlert = (): ParsedTechnicalFields & ParsedExperimentalFields => ({ +const getMockAlert = (): ParsedTechnicalFields & { _index: string } => ({ [ALERT_INSTANCE_ID]: 'fake-alert-id', [ALERT_RULE_CATEGORY]: 'apm.error_rate', [ALERT_RULE_CONSUMER]: 'apm', @@ -47,6 +46,7 @@ const getMockAlert = (): ParsedTechnicalFields & ParsedExperimentalFields => ({ [SPACE_IDS]: ['fake-space-id'], [TIMESTAMP]: '2021-06-21T21:33:05.713Z', [VERSION]: '7.13.0', + _index: 'fake-alert-index', }); describe('getAlertByIdRoute', () => { diff --git a/x-pack/plugins/runtime_fields/public/load_editor.tsx b/x-pack/plugins/runtime_fields/public/load_editor.tsx index b9c8b8983eb01..d04a8e0707ada 100644 --- a/x-pack/plugins/runtime_fields/public/load_editor.tsx +++ b/x-pack/plugins/runtime_fields/public/load_editor.tsx @@ -55,7 +55,7 @@ export const getRuntimeFieldEditorLoader = ctx={ctx} /> , - { theme$: theme.theme$ } + core ) ); diff --git a/x-pack/plugins/runtime_fields/public/plugin.test.ts b/x-pack/plugins/runtime_fields/public/plugin.test.ts index 38a37839145d6..b911f211638e5 100644 --- a/x-pack/plugins/runtime_fields/public/plugin.test.ts +++ b/x-pack/plugins/runtime_fields/public/plugin.test.ts @@ -8,8 +8,8 @@ import { CoreSetup } from '@kbn/core/public'; import { coreMock, themeServiceMock } from '@kbn/core/public/mocks'; -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/runtime_fields/public/shared_imports.ts b/x-pack/plugins/runtime_fields/public/shared_imports.ts index 98f62f3ffbb71..0794e0c9f55a0 100644 --- a/x-pack/plugins/runtime_fields/public/shared_imports.ts +++ b/x-pack/plugins/runtime_fields/public/shared_imports.ts @@ -22,6 +22,8 @@ export { fieldValidators } from '@kbn/es-ui-shared-plugin/static/forms/helpers'; export { TextField } from '@kbn/es-ui-shared-plugin/static/forms/components'; -export { toMountPoint, createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; +export { createKibanaReactContext } from '@kbn/kibana-react-plugin/public'; + +export { toMountPoint } from '@kbn/react-kibana-mount'; export { CodeEditor } from '@kbn/code-editor'; diff --git a/x-pack/plugins/runtime_fields/tsconfig.json b/x-pack/plugins/runtime_fields/tsconfig.json index 4127b838a70f6..f2f2a6e27e6c1 100644 --- a/x-pack/plugins/runtime_fields/tsconfig.json +++ b/x-pack/plugins/runtime_fields/tsconfig.json @@ -17,6 +17,7 @@ "@kbn/monaco", "@kbn/code-editor", "@kbn/code-editor-mock", + "@kbn/react-kibana-mount", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/search_playground/kibana.jsonc b/x-pack/plugins/search_playground/kibana.jsonc index 07c5866b34029..221d5bf9e1873 100644 --- a/x-pack/plugins/search_playground/kibana.jsonc +++ b/x-pack/plugins/search_playground/kibana.jsonc @@ -20,7 +20,8 @@ "triggersActionsUi", ], "optionalPlugins": [ - "cloud" + "cloud", + "usageCollection", ], "requiredBundles": [ "kibanaReact" diff --git a/x-pack/plugins/search_playground/public/components/chat.tsx b/x-pack/plugins/search_playground/public/components/chat.tsx index d0c28117fcca4..59e52778e42ca 100644 --- a/x-pack/plugins/search_playground/public/components/chat.tsx +++ b/x-pack/plugins/search_playground/public/components/chat.tsx @@ -68,13 +68,13 @@ export const Chat = () => { data: buildFormData(data), } ); - usageTracker.click(AnalyticsEvents.chatQuestionSent); + usageTracker?.click(AnalyticsEvents.chatQuestionSent); resetField(ChatFormFields.question); }; const handleStopRequest = () => { stopRequest(); - usageTracker.click(AnalyticsEvents.chatRequestStopped); + usageTracker?.click(AnalyticsEvents.chatRequestStopped); }; const chatMessages = useMemo( () => [ @@ -101,15 +101,15 @@ export const Chat = () => { }); setIsRegenerating(false); - usageTracker.click(AnalyticsEvents.chatRegenerateMessages); + usageTracker?.click(AnalyticsEvents.chatRegenerateMessages); }; const handleClearChat = () => { setMessages([]); - usageTracker.click(AnalyticsEvents.chatCleared); + usageTracker?.click(AnalyticsEvents.chatCleared); }; useEffect(() => { - usageTracker.load(AnalyticsEvents.chatPageLoaded); + usageTracker?.load(AnalyticsEvents.chatPageLoaded); }, [usageTracker]); return ( diff --git a/x-pack/plugins/search_playground/public/components/edit_context/edit_context_flyout.tsx b/x-pack/plugins/search_playground/public/components/edit_context/edit_context_flyout.tsx index 5a3a6065cba3a..c56b1848e70f4 100644 --- a/x-pack/plugins/search_playground/public/components/edit_context/edit_context_flyout.tsx +++ b/x-pack/plugins/search_playground/public/components/edit_context/edit_context_flyout.tsx @@ -65,23 +65,23 @@ export const EditContextFlyout: React.FC = ({ onClose }) ...tempSourceFields, [index]: [field], }); - usageTracker.click(AnalyticsEvents.editContextFieldToggled); + usageTracker?.click(AnalyticsEvents.editContextFieldToggled); }; const saveSourceFields = () => { - usageTracker.click(AnalyticsEvents.editContextSaved); + usageTracker?.click(AnalyticsEvents.editContextSaved); onChangeSourceFields(tempSourceFields); onChangeSize(docSize); onClose(); }; const handleDocSizeChange = (e: React.ChangeEvent) => { - usageTracker.click(AnalyticsEvents.editContextDocSizeChanged); + usageTracker?.click(AnalyticsEvents.editContextDocSizeChanged); setDocSize(Number(e.target.value)); }; useEffect(() => { - usageTracker.load(AnalyticsEvents.editContextFlyoutOpened); + usageTracker?.load(AnalyticsEvents.editContextFlyoutOpened); }, [usageTracker]); return ( diff --git a/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx b/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx index aaa6fcb650f96..feca593604a92 100644 --- a/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx +++ b/x-pack/plugins/search_playground/public/components/message_list/citations_table.tsx @@ -32,12 +32,12 @@ export const CitationsTable: React.FC = ({ citations }) => if (itemIdToExpandedRowMapValues[citation.metadata._id]) { delete itemIdToExpandedRowMapValues[citation.metadata._id]; - usageTracker.click(AnalyticsEvents.citationDetailsCollapsed); + usageTracker?.click(AnalyticsEvents.citationDetailsCollapsed); } else { itemIdToExpandedRowMapValues[citation.metadata._id] = ( {citation.content} ); - usageTracker.click(AnalyticsEvents.citationDetailsExpanded); + usageTracker?.click(AnalyticsEvents.citationDetailsExpanded); } setItemIdToExpandedRowMap(itemIdToExpandedRowMapValues); diff --git a/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx b/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx index 80d6e1dbe5bdc..38ddc9cc4458a 100644 --- a/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx +++ b/x-pack/plugins/search_playground/public/components/message_list/retrieval_docs_flyout.tsx @@ -81,7 +81,7 @@ export const RetrievalDocsFlyout: React.FC = ({ ]; useEffect(() => { - usageTracker.load(AnalyticsEvents.retrievalDocsFlyoutOpened); + usageTracker?.load(AnalyticsEvents.retrievalDocsFlyoutOpened); }, [usageTracker]); return ( diff --git a/x-pack/plugins/search_playground/public/components/set_up_connector_panel_for_start_chat.tsx b/x-pack/plugins/search_playground/public/components/set_up_connector_panel_for_start_chat.tsx index 2bd885b46514b..2430cd4e6c7a0 100644 --- a/x-pack/plugins/search_playground/public/components/set_up_connector_panel_for_start_chat.tsx +++ b/x-pack/plugins/search_playground/public/components/set_up_connector_panel_for_start_chat.tsx @@ -36,19 +36,19 @@ export const SetUpConnectorPanelForStartChat: React.FC = () => { setConnectorFlyoutOpen(false); }; const handleSetupGenAiConnector = () => { - usageTracker.click(AnalyticsEvents.genAiConnectorCreated); + usageTracker?.click(AnalyticsEvents.genAiConnectorCreated); setConnectorFlyoutOpen(true); }; useEffect(() => { if (connectors?.length) { if (showCallout) { - usageTracker.load(AnalyticsEvents.genAiConnectorAdded); + usageTracker?.load(AnalyticsEvents.genAiConnectorAdded); } else { - usageTracker.load(AnalyticsEvents.genAiConnectorExists); + usageTracker?.load(AnalyticsEvents.genAiConnectorExists); } } else { - usageTracker.load(AnalyticsEvents.genAiConnectorSetup); + usageTracker?.load(AnalyticsEvents.genAiConnectorSetup); } }, [connectors?.length, showCallout, usageTracker]); @@ -82,6 +82,7 @@ export const SetUpConnectorPanelForStartChat: React.FC = () => { defaultMessage="You need to connect to a large-language model to use this feature. Start by adding connection details for your LLM provider." /> } + dataTestSubj="connectToLLMChatPanel" > diff --git a/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx index 8e2b2b7896c5e..5a270fe3d44dd 100644 --- a/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx +++ b/x-pack/plugins/search_playground/public/components/sources_panel/sources_panel_for_start_chat.tsx @@ -35,6 +35,7 @@ export const SourcesPanelForStartChat: React.FC = () => { "Select the Elasticsearch indices you'd like to query, providing additional context for the LLM.", })} isValid={!!selectedIndices.length} + dataTestSubj="selectIndicesChatPanel" > {!!selectedIndices?.length && ( diff --git a/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx b/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx index c08d9bdbeeafd..996f088090d29 100644 --- a/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx +++ b/x-pack/plugins/search_playground/public/components/start_chat_panel.tsx @@ -22,6 +22,7 @@ interface StartChatPanelProps { title: string; description: string | React.ReactNode; isValid?: boolean; + dataTestSubj: string; } export const StartChatPanel: FC> = ({ @@ -29,8 +30,9 @@ export const StartChatPanel: FC> = ({ description, children, isValid, + dataTestSubj, }) => ( - +
{title}
diff --git a/x-pack/plugins/search_playground/public/components/start_new_chat.tsx b/x-pack/plugins/search_playground/public/components/start_new_chat.tsx index eef59b44820ea..0db891438cb3d 100644 --- a/x-pack/plugins/search_playground/public/components/start_new_chat.tsx +++ b/x-pack/plugins/search_playground/public/components/start_new_chat.tsx @@ -37,7 +37,7 @@ export const StartNewChat: React.FC = ({ onStartClick }) => { const usageTracker = useUsageTracker(); useEffect(() => { - usageTracker.load(AnalyticsEvents.startNewChatPageLoaded); + usageTracker?.load(AnalyticsEvents.startNewChatPageLoaded); }, [usageTracker]); return ( @@ -85,7 +85,7 @@ export const StartNewChat: React.FC = ({ onStartClick }) => {
- + = ({ const usageTracker = useUsageTracker(); const handleChange = (value: boolean) => { onChange(value); - usageTracker.click(`${AnalyticsEvents.includeCitations}_${String(value)}`); + usageTracker?.click(`${AnalyticsEvents.includeCitations}_${String(value)}`); }; return ( diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx index d4e909c3f1dd2..baea917937264 100644 --- a/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/instructions_field.tsx @@ -29,7 +29,7 @@ export const InstructionsField: React.FC = ({ value, onC }; const handleBlur = () => { if (baseValue !== value) { - usageTracker.click(AnalyticsEvents.instructionsFieldChanged); + usageTracker?.click(AnalyticsEvents.instructionsFieldChanged); } setBaseValue(''); }; diff --git a/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_model.tsx b/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_model.tsx index dc390479a5b1b..13a77d0c01e10 100644 --- a/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_model.tsx +++ b/x-pack/plugins/search_playground/public/components/summarization_panel/summarization_model.tsx @@ -97,7 +97,7 @@ export const SummarizationModel: React.FC = ({ ); useEffect(() => { - usageTracker.click( + usageTracker?.click( `${AnalyticsEvents.modelSelected}_${selectedModel.value || selectedModel.connectorType}` ); }, [usageTracker, selectedModel]); diff --git a/x-pack/plugins/search_playground/public/components/toolbar.tsx b/x-pack/plugins/search_playground/public/components/toolbar.tsx index b35062fa80eb6..e322c9c6bb3ff 100644 --- a/x-pack/plugins/search_playground/public/components/toolbar.tsx +++ b/x-pack/plugins/search_playground/public/components/toolbar.tsx @@ -13,7 +13,7 @@ import { EditContextAction } from './edit_context/edit_context_action'; export const Toolbar: React.FC = () => { return ( - + diff --git a/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx b/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx index b9eba5baa673b..b90ea9a9ee3b3 100644 --- a/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx +++ b/x-pack/plugins/search_playground/public/components/view_code/view_code_flyout.tsx @@ -70,11 +70,11 @@ export const ViewCodeFlyout: React.FC = ({ onClose }) => { }; useEffect(() => { - usageTracker.load(AnalyticsEvents.viewCodeFlyoutOpened); + usageTracker?.load(AnalyticsEvents.viewCodeFlyoutOpened); }, [usageTracker]); useEffect(() => { - usageTracker.click(`${AnalyticsEvents.viewCodeLanguageChange}_${selectedLanguage}`); + usageTracker?.click(`${AnalyticsEvents.viewCodeLanguageChange}_${selectedLanguage}`); }, [usageTracker, selectedLanguage]); return ( diff --git a/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx b/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx index 621fecfaf72d4..d808fec85aaa4 100644 --- a/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx +++ b/x-pack/plugins/search_playground/public/components/view_query/view_query_flyout.tsx @@ -106,7 +106,7 @@ export const ViewQueryFlyout: React.FC = ({ onClose }) => ...tempQueryFields, [index]: newFields, }); - usageTracker.count(AnalyticsEvents.viewQueryFieldsUpdated, newFields.length); + usageTracker?.count(AnalyticsEvents.viewQueryFieldsUpdated, newFields.length); }; const saveQuery = () => { @@ -117,12 +117,12 @@ export const ViewQueryFlyout: React.FC = ({ onClose }) => const groupedQueryFields = groupTypeQueryFields(fields, tempQueryFields); groupedQueryFields.forEach((typeQueryFields) => - usageTracker.click(`${AnalyticsEvents.viewQuerySaved}_${typeQueryFields}`) + usageTracker?.click(`${AnalyticsEvents.viewQuerySaved}_${typeQueryFields}`) ); }; useEffect(() => { - usageTracker.load(AnalyticsEvents.viewQueryFlyoutOpened); + usageTracker?.load(AnalyticsEvents.viewQueryFlyoutOpened); }, [usageTracker]); return ( diff --git a/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts b/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts index 1704181d7bc94..342be7c191778 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_source_indices_field.ts @@ -91,7 +91,10 @@ export const useSourceIndicesFields = () => { onElasticsearchQueryChange(createQuery(defaultFields, fields)); onSourceFieldsChange(defaultSourceFields); - usageTracker.count(AnalyticsEvents.sourceFieldsLoaded, Object.values(fields)?.flat()?.length); + usageTracker?.count( + AnalyticsEvents.sourceFieldsLoaded, + Object.values(fields)?.flat()?.length + ); } else { setNoFieldsIndicesWarning(null); } @@ -103,14 +106,14 @@ export const useSourceIndicesFields = () => { const newIndices = [...selectedIndices, newIndex]; setLoading(true); onIndicesChange(newIndices); - usageTracker.count(AnalyticsEvents.sourceIndexUpdated, newIndices.length); + usageTracker?.count(AnalyticsEvents.sourceIndexUpdated, newIndices.length); }; const removeIndex = (index: IndexName) => { const newIndices = selectedIndices.filter((indexName: string) => indexName !== index); setLoading(true); onIndicesChange(newIndices); - usageTracker.count(AnalyticsEvents.sourceIndexUpdated, newIndices.length); + usageTracker?.count(AnalyticsEvents.sourceIndexUpdated, newIndices.length); }; return { diff --git a/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.test.ts b/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.test.ts index 2f2d118c0646d..9fb74674504f8 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.test.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.test.ts @@ -30,15 +30,15 @@ describe('useUsageTracker', () => { it('returns bound functions for tracking usage', () => { const { result } = renderHook(() => useUsageTracker()); - expect(typeof result.current.click).toBe('function'); - expect(typeof result.current.count).toBe('function'); - expect(typeof result.current.load).toBe('function'); + expect(typeof result.current?.click).toBe('function'); + expect(typeof result.current?.count).toBe('function'); + expect(typeof result.current?.load).toBe('function'); }); it('calls reportUiCounter with correct arguments for click', () => { const { result } = renderHook(() => useUsageTracker()); - result.current.click('button_click'); + result.current?.click('button_click'); expect(reportUiCounter).toHaveBeenCalledWith('search_playground', 'click', 'button_click'); }); @@ -46,7 +46,7 @@ describe('useUsageTracker', () => { it('calls reportUiCounter with correct arguments for count', () => { const { result } = renderHook(() => useUsageTracker()); - result.current.count('item_count'); + result.current?.count('item_count'); expect(reportUiCounter).toHaveBeenCalledWith('search_playground', 'count', 'item_count'); }); @@ -54,8 +54,21 @@ describe('useUsageTracker', () => { it('calls reportUiCounter with correct arguments for load', () => { const { result } = renderHook(() => useUsageTracker()); - result.current.load('page_loaded'); + result.current?.load('page_loaded'); expect(reportUiCounter).toHaveBeenCalledWith('search_playground', 'loaded', 'page_loaded'); }); + + it('does not reportUiCounter if usageCollection is not loaded properly', () => { + reportUiCounter = jest.fn(); + (useKibana as jest.Mock).mockReturnValue({ + services: { usageCollection: undefined }, + }); + + const { result } = renderHook(() => useUsageTracker()); + + result.current?.load('page_loaded'); + + expect(reportUiCounter).toHaveBeenCalledTimes(0); + }); }); diff --git a/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.ts b/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.ts index e8b63c120da0e..7764c0d84c85d 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.ts +++ b/x-pack/plugins/search_playground/public/hooks/use_usage_tracker.ts @@ -14,24 +14,25 @@ const APP_TRACKER_NAME = 'search_playground'; export const useUsageTracker = () => { const { usageCollection } = useKibana().services; - return useMemo( - () => ({ - click: usageCollection.reportUiCounter.bind( - usageCollection, - APP_TRACKER_NAME, - METRIC_TYPE.CLICK - ), - count: usageCollection.reportUiCounter.bind( - usageCollection, - APP_TRACKER_NAME, - METRIC_TYPE.COUNT - ), - load: usageCollection.reportUiCounter.bind( - usageCollection, - APP_TRACKER_NAME, - METRIC_TYPE.LOADED - ), - }), - [usageCollection] - ); + return useMemo(() => { + if (usageCollection) { + return { + click: usageCollection.reportUiCounter.bind( + usageCollection, + APP_TRACKER_NAME, + METRIC_TYPE.CLICK + ), + count: usageCollection.reportUiCounter.bind( + usageCollection, + APP_TRACKER_NAME, + METRIC_TYPE.COUNT + ), + load: usageCollection.reportUiCounter.bind( + usageCollection, + APP_TRACKER_NAME, + METRIC_TYPE.LOADED + ), + }; + } + }, [usageCollection]); }; diff --git a/x-pack/plugins/search_playground/public/types.ts b/x-pack/plugins/search_playground/public/types.ts index 1bfbca56f8f44..ebca62cad5acd 100644 --- a/x-pack/plugins/search_playground/public/types.ts +++ b/x-pack/plugins/search_playground/public/types.ts @@ -40,7 +40,7 @@ export interface SearchPlaygroundPluginStart { export interface AppPluginStartDependencies { history: AppMountParameters['history']; - usageCollection: UsageCollectionStart; + usageCollection?: UsageCollectionStart; navigation: NavigationPublicPluginStart; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; share: SharePluginStart; @@ -52,7 +52,7 @@ export interface AppServicesContext { share: SharePluginStart; cloud?: CloudSetup; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; - usageCollection: UsageCollectionStart; + usageCollection?: UsageCollectionStart; } export enum ChatFormFields { diff --git a/x-pack/plugins/searchprofiler/kibana.jsonc b/x-pack/plugins/searchprofiler/kibana.jsonc index cce2712681b31..3c2b0909cef2b 100644 --- a/x-pack/plugins/searchprofiler/kibana.jsonc +++ b/x-pack/plugins/searchprofiler/kibana.jsonc @@ -17,8 +17,7 @@ "share" ], "requiredBundles": [ - "esUiShared", - "kibanaReact" + "esUiShared" ] } } diff --git a/x-pack/plugins/searchprofiler/public/application/index.tsx b/x-pack/plugins/searchprofiler/public/application/index.tsx index 644a2764e85c7..273f65dcb5380 100644 --- a/x-pack/plugins/searchprofiler/public/application/index.tsx +++ b/x-pack/plugins/searchprofiler/public/application/index.tsx @@ -7,45 +7,41 @@ import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; -import { Observable } from 'rxjs'; -import { HttpStart as Http, ToastsSetup, CoreTheme } from '@kbn/core/public'; +import { HttpStart as Http, ToastsSetup } from '@kbn/core/public'; import { RouteComponentProps } from 'react-router-dom'; import { LicenseStatus } from '../../common'; -import { KibanaThemeProvider } from '../shared_imports'; +import { KibanaRenderContextProvider } from '../shared_imports'; import { App } from './app'; import { AppContextProvider } from './contexts/app_context'; import { ProfileContextProvider } from './contexts/profiler_context'; +import { SearchProfilerStartServices } from '../types'; interface AppDependencies { el: HTMLElement; http: Http; - I18nContext: any; notifications: ToastsSetup; initialLicenseStatus: LicenseStatus; - theme$: Observable; location: RouteComponentProps['location']; + startServices: SearchProfilerStartServices; } export const renderApp = ({ el, http, - I18nContext, notifications, initialLicenseStatus, - theme$, location, + startServices, }: AppDependencies) => { render( - - - - - - - - - , + + + + + + + , el ); diff --git a/x-pack/plugins/searchprofiler/public/plugin.ts b/x-pack/plugins/searchprofiler/public/plugin.ts index a039de9fa0f66..4d8cecaf31381 100644 --- a/x-pack/plugins/searchprofiler/public/plugin.ts +++ b/x-pack/plugins/searchprofiler/public/plugin.ts @@ -47,7 +47,9 @@ export class SearchProfilerUIPlugin implements Plugin { const [coreStart] = await getStartServices(); - const { notifications, i18n: i18nDep } = coreStart; + const { notifications, analytics, i18n: i18nStart, theme } = coreStart; + const startServices = { analytics, i18n: i18nStart, theme }; + const { renderApp } = await import('./application'); const license = await firstValueFrom(licensing.license$); @@ -57,10 +59,9 @@ export class SearchProfilerUIPlugin implements Plugin; + i18n: I18nStart; + theme: Pick; +} export interface AppPublicPluginDependencies { licensing: LicensingPluginSetup; diff --git a/x-pack/plugins/searchprofiler/tsconfig.json b/x-pack/plugins/searchprofiler/tsconfig.json index b5aff5d6214fc..b99b0962e39fc 100644 --- a/x-pack/plugins/searchprofiler/tsconfig.json +++ b/x-pack/plugins/searchprofiler/tsconfig.json @@ -16,13 +16,13 @@ "@kbn/licensing-plugin", "@kbn/i18n", "@kbn/share-plugin", - "@kbn/kibana-react-plugin", "@kbn/utility-types", "@kbn/expect", "@kbn/test-jest-helpers", "@kbn/i18n-react", "@kbn/ace", "@kbn/config-schema", + "@kbn/react-kibana-context-render", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/security/common/index.ts b/x-pack/plugins/security/common/index.ts index de3e6e8cac0ca..1a767f778fb7a 100644 --- a/x-pack/plugins/security/common/index.ts +++ b/x-pack/plugins/security/common/index.ts @@ -31,6 +31,7 @@ export type { RoleIndexPrivilege, RoleKibanaPrivilege, RoleRemoteIndexPrivilege, + RoleRemoteClusterPrivilege, FeaturesPrivileges, LoginLayout, SecurityLicenseFeatures, diff --git a/x-pack/plugins/security/common/licensing/license_service.test.ts b/x-pack/plugins/security/common/licensing/license_service.test.ts index 8bf9f4a030051..f1b80db5cba2d 100644 --- a/x-pack/plugins/security/common/licensing/license_service.test.ts +++ b/x-pack/plugins/security/common/licensing/license_service.test.ts @@ -26,6 +26,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, layout: 'error-es-unavailable', allowRbac: false, allowSubFeaturePrivileges: false, @@ -50,6 +51,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, layout: 'error-xpack-unavailable', allowRbac: false, allowSubFeaturePrivileges: false, @@ -78,6 +80,7 @@ describe('license features', function () { "allowAuditLogging": false, "allowLogin": false, "allowRbac": false, + "allowRemoteClusterPrivileges": false, "allowRoleDocumentLevelSecurity": false, "allowRoleFieldLevelSecurity": false, "allowRoleRemoteIndexPrivileges": false, @@ -101,6 +104,7 @@ describe('license features', function () { "allowAuditLogging": true, "allowLogin": true, "allowRbac": true, + "allowRemoteClusterPrivileges": true, "allowRoleDocumentLevelSecurity": true, "allowRoleFieldLevelSecurity": true, "allowRoleRemoteIndexPrivileges": true, @@ -137,6 +141,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, allowRbac: true, allowSubFeaturePrivileges: false, allowAuditLogging: false, @@ -164,6 +169,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, allowRbac: false, allowSubFeaturePrivileges: false, allowAuditLogging: false, @@ -190,6 +196,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, allowRbac: true, allowSubFeaturePrivileges: false, allowAuditLogging: false, @@ -216,6 +223,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, allowRbac: true, allowSubFeaturePrivileges: true, allowAuditLogging: true, @@ -242,6 +250,7 @@ describe('license features', function () { allowRoleDocumentLevelSecurity: true, allowRoleFieldLevelSecurity: true, allowRoleRemoteIndexPrivileges: true, + allowRemoteClusterPrivileges: true, allowRbac: true, allowSubFeaturePrivileges: true, allowAuditLogging: true, diff --git a/x-pack/plugins/security/common/licensing/license_service.ts b/x-pack/plugins/security/common/licensing/license_service.ts index 70b84e1712e08..3066d32a72695 100644 --- a/x-pack/plugins/security/common/licensing/license_service.ts +++ b/x-pack/plugins/security/common/licensing/license_service.ts @@ -77,6 +77,7 @@ export class SecurityLicenseService { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, allowRbac: false, allowSubFeaturePrivileges: false, allowUserProfileCollaboration: false, @@ -98,6 +99,7 @@ export class SecurityLicenseService { allowRoleDocumentLevelSecurity: false, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, allowRbac: false, allowSubFeaturePrivileges: false, allowUserProfileCollaboration: false, @@ -119,6 +121,7 @@ export class SecurityLicenseService { allowRoleDocumentLevelSecurity: isLicensePlatinumOrBetter, allowRoleFieldLevelSecurity: isLicensePlatinumOrBetter, allowRoleRemoteIndexPrivileges: isLicensePlatinumOrBetter, + allowRemoteClusterPrivileges: isLicensePlatinumOrBetter, allowRbac: true, allowUserProfileCollaboration: isLicenseStandardOrBetter, }; diff --git a/x-pack/plugins/security/common/model/builtin_es_privileges.ts b/x-pack/plugins/security/common/model/builtin_es_privileges.ts index b6b5791a4477d..c2b6801e52961 100644 --- a/x-pack/plugins/security/common/model/builtin_es_privileges.ts +++ b/x-pack/plugins/security/common/model/builtin_es_privileges.ts @@ -8,4 +8,5 @@ export interface BuiltinESPrivileges { cluster: string[]; index: string[]; + remote_cluster: string[]; } diff --git a/x-pack/plugins/security/public/management/role_mappings/role_mappings_api_client.ts b/x-pack/plugins/security/public/management/role_mappings/role_mappings_api_client.ts index bab0222222dec..c2b1f08d90319 100644 --- a/x-pack/plugins/security/public/management/role_mappings/role_mappings_api_client.ts +++ b/x-pack/plugins/security/public/management/role_mappings/role_mappings_api_client.ts @@ -15,6 +15,7 @@ export interface CheckRoleMappingFeaturesResponse { canUseStoredScripts: boolean; hasCompatibleRealms: boolean; canUseRemoteIndices: boolean; + canUseRemoteClusters: boolean; } type DeleteRoleMappingsResponse = Array<{ diff --git a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx index 745cb2d68ab07..56fb561443e82 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx @@ -211,7 +211,7 @@ function useRole( ? rolesAPIClient.getRole(roleName) : Promise.resolve({ name: '', - elasticsearch: { cluster: [], indices: [], run_as: [] }, + elasticsearch: { cluster: [], indices: [], run_as: [], remote_cluster: [] }, kibana: [], _unrecognized_applications: [], } as Role); @@ -529,6 +529,9 @@ export const EditRolePage: FunctionComponent = ({ canUseRemoteIndices={ buildFlavor === 'traditional' && featureCheckState.value?.canUseRemoteIndices } + canUseRemoteClusters={ + buildFlavor === 'traditional' && featureCheckState.value?.canUseRemoteClusters + } isDarkMode={isDarkMode} buildFlavor={buildFlavor} /> diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/elasticsearch_privileges.test.tsx.snap b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/elasticsearch_privileges.test.tsx.snap index 6bd0c97b5e8ac..7732ac20b4ee9 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/elasticsearch_privileges.test.tsx.snap +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/elasticsearch_privileges.test.tsx.snap @@ -59,6 +59,7 @@ exports[`it renders correctly in serverless mode 1`] = ` "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": Array [], "run_as": Array [], }, "kibana": Array [], @@ -141,6 +142,7 @@ exports[`it renders correctly in serverless mode 1`] = ` "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": Array [], "run_as": Array [], }, "kibana": Array [], @@ -215,6 +217,7 @@ exports[`it renders without crashing 1`] = ` "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": Array [], "run_as": Array [], }, "kibana": Array [], @@ -346,6 +349,7 @@ exports[`it renders without crashing 1`] = ` "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": Array [], "run_as": Array [], }, "kibana": Array [], diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/index_privileges.test.tsx.snap b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/index_privileges.test.tsx.snap index d99dac15df58f..c3df729a7e3ee 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/index_privileges.test.tsx.snap +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/index_privileges.test.tsx.snap @@ -36,6 +36,7 @@ exports[`it renders without crashing 1`] = ` "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": Array [], "run_as": Array [], }, "kibana": Array [], diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_cluster_privileges.test.tsx.snap b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_cluster_privileges.test.tsx.snap new file mode 100644 index 0000000000000..e0939f7f55e02 --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_cluster_privileges.test.tsx.snap @@ -0,0 +1,52 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`it renders without crashing 1`] = ` + +`; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_cluster_privileges_form.test.tsx.snap b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_cluster_privileges_form.test.tsx.snap new file mode 100644 index 0000000000000..6f48ce3b977aa --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_cluster_privileges_form.test.tsx.snap @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`it renders without crashing 1`] = ` + + + + + + + + + } + labelType="label" + > + + + + + + } + labelType="label" + > + + + + + + + + + + + +`; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_clusters_combo_box.test.tsx.snap b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_clusters_combo_box.test.tsx.snap new file mode 100644 index 0000000000000..158d4882f457c --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/__snapshots__/remote_clusters_combo_box.test.tsx.snap @@ -0,0 +1,146 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`it renders without crashing 1`] = ` + + } + type="warning" + />, + "disabled": true, + "label": "test1", + }, + ] + } + selectedOptions={Array []} + singleSelection={false} + sortMatchesBy="none" +/> +`; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/cluster_privileges.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/cluster_privileges.test.tsx index 81edde34b4d28..0793083ca21df 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/cluster_privileges.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/cluster_privileges.test.tsx @@ -17,6 +17,7 @@ test('it renders without crashing', () => { const role: Role = { name: '', elasticsearch: { + remote_cluster: [], cluster: [], indices: [], run_as: [], @@ -39,6 +40,7 @@ test('it renders fields as disabled when not editable', () => { name: '', elasticsearch: { cluster: [], + remote_cluster: [], indices: [], run_as: [], }, @@ -61,6 +63,7 @@ test('it allows for custom cluster privileges', () => { name: '', elasticsearch: { cluster: ['existing-custom', 'monitor'], + remote_cluster: [], indices: [], run_as: [], }, diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.test.tsx index 3850e55f9211c..ef914c58522c0 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.test.tsx @@ -30,6 +30,7 @@ function getProps() { name: '', elasticsearch: { cluster: [], + remote_cluster: [], indices: [], run_as: [], }, @@ -43,6 +44,7 @@ function getProps() { builtinESPrivileges: { cluster: ['all', 'manage', 'monitor'], index: ['all', 'read', 'write', 'index'], + remote_cluster: [], }, indicesAPIClient: indicesAPIClientMock.create(), docLinks, @@ -75,13 +77,26 @@ test('it renders remote index privileges section when `canUseRemoteIndices` is e expect(wrapper.find('IndexPrivileges[indexType="remote_indices"]')).toHaveLength(1); }); +test('it does not render remote cluster privileges section by default', () => { + const wrapper = shallowWithIntl(); + expect(wrapper.find('RemoteClusterPrivileges')).toHaveLength(0); +}); + +test('it renders remote index privileges section when `canUseRemoteClusters` is enabled', () => { + const wrapper = shallowWithIntl(); + expect(wrapper.find('RemoteClusterPrivileges')).toHaveLength(1); +}); + test('it renders fields as disabled when not editable', () => { - const wrapper = shallowWithIntl(); + const wrapper = shallowWithIntl( + + ); expect(wrapper.find('EuiComboBox').prop('isDisabled')).toBe(true); expect(wrapper.find('ClusterPrivileges').prop('editable')).toBe(false); expect( wrapper.find('IndexPrivileges').everyWhere((component) => component.prop('editable')) ).toBe(false); + expect(wrapper.find('RemoteClusterPrivileges').prop('editable')).toBe(false); }); test('it renders correctly in serverless mode', () => { diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.tsx index 0aa4900e8715b..1ff2ede4c575c 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/elasticsearch_privileges.tsx @@ -25,6 +25,7 @@ import type { PublicMethodsOf } from '@kbn/utility-types'; import { ClusterPrivileges } from './cluster_privileges'; import { IndexPrivileges } from './index_privileges'; +import { RemoteClusterPrivileges } from './remote_cluster_privileges'; import type { BuiltinESPrivileges, Role, SecurityLicense } from '../../../../../../common'; import type { IndicesAPIClient } from '../../../indices_api_client'; import { CollapsiblePanel } from '../../collapsible_panel'; @@ -43,6 +44,7 @@ interface Props { indexPatterns: string[]; remoteClusters?: Cluster[]; canUseRemoteIndices?: boolean; + canUseRemoteClusters?: boolean; isDarkMode?: boolean; buildFlavor: BuildFlavor; } @@ -69,6 +71,7 @@ export class ElasticsearchPrivileges extends Component { license, builtinESPrivileges, canUseRemoteIndices, + canUseRemoteClusters, buildFlavor, } = this.props; @@ -219,6 +222,40 @@ export class ElasticsearchPrivileges extends Component { /> )} + {buildFlavor === 'traditional' && canUseRemoteClusters && ( + <> + + + + +

+ +

+
+ + +

+ + {this.learnMore(docLinks.links.security.clusterPrivileges)} +

+
+ + + )} ); }; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.test.tsx index fa1bbe2f8c447..dc7ebaf3b3069 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.test.tsx @@ -107,70 +107,6 @@ test('should not render clusters field for local indices', () => { expect(wrapper.find('[data-test-subj="clustersInput0"]')).toHaveLength(0); }); -test('should render clusters field for remote indices', () => { - const wrapper = shallowWithIntl( - - ); - const clustersInput = wrapper.find('[data-test-subj="clustersInput0"]'); - expect(clustersInput).toHaveLength(1); - expect(clustersInput.prop('options')).toEqual([ - { label: 'test2' }, - { label: expect.anything(), isGroupLabelOption: true }, - { - label: 'test1', - disabled: true, - append: expect.anything(), - }, - ]); -}); - describe('delete button', () => { const props = { indexType: 'indices' as const, diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.tsx index 30e1c6423d1ff..f89195e624f5b 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privilege_form.tsx @@ -12,7 +12,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiFormRow, - EuiIconTip, EuiPanel, EuiSpacer, EuiSwitch, @@ -27,6 +26,7 @@ import type { monaco } from '@kbn/monaco'; import type { Cluster } from '@kbn/remote-clusters-plugin/public'; import type { PublicMethodsOf } from '@kbn/utility-types'; +import { RemoteClusterComboBox } from './remote_clusters_combo_box'; import type { RoleIndexPrivilege, RoleRemoteIndexPrivilege } from '../../../../../../common'; import type { IndicesAPIClient } from '../../../indices_api_client'; import type { RoleValidator } from '../../validate_role'; @@ -125,45 +125,6 @@ export class IndexPrivilegeForm extends Component { } private getPrivilegeForm = () => { - const remoteClusterOptions: EuiComboBoxOptionOption[] = []; - if (this.props.remoteClusters) { - const incompatibleOptions: EuiComboBoxOptionOption[] = []; - this.props.remoteClusters.forEach((item, i) => { - const disabled = item.securityModel !== 'api_key'; - if (!disabled) { - remoteClusterOptions.push({ - label: item.name, - }); - } else { - incompatibleOptions.push({ - label: item.name, - disabled, - append: disabled ? ( - - } - /> - ) : undefined, - }); - } - }); - if (incompatibleOptions.length) { - remoteClusterOptions.push( - { - label: 'Incompatible clusters', - isGroupLabelOption: true, - }, - ...incompatibleOptions - ); - } - } - return ( <> @@ -181,9 +142,8 @@ export class IndexPrivilegeForm extends Component { this.props.indexPrivilege as RoleRemoteIndexPrivilege )} > - { 'xpack.security.management.editRole.indexPrivilegeForm.clustersPlaceholder', { defaultMessage: 'Add a remote cluster…' } )} + remoteClusters={this.props.remoteClusters ?? []} + type="remote_indexes" fullWidth /> diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privileges.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privileges.test.tsx index 05ddf9d7d5514..ab125c1ca7076 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privileges.test.tsx +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/index_privileges.test.tsx @@ -38,6 +38,7 @@ test('it renders without crashing', async () => { kibana: [], elasticsearch: { cluster: [], + remote_cluster: [], indices: [], run_as: [], }, @@ -75,6 +76,7 @@ test('it renders an IndexPrivilegeForm for each index privilege on the role', as kibana: [], elasticsearch: { cluster: [], + remote_cluster: [], indices: [ { names: ['foo*'], @@ -129,6 +131,7 @@ test('it renders an IndexPrivilegeForm for each remote index privilege on the ro kibana: [], elasticsearch: { cluster: [], + remote_cluster: [], indices: [], remote_indices: [ { @@ -183,6 +186,7 @@ test('it renders fields as disabled when not editable', async () => { kibana: [], elasticsearch: { cluster: [], + remote_cluster: [], indices: [ { names: ['foo*'], diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges.test.tsx new file mode 100644 index 0000000000000..5739c0ca2e1d2 --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges.test.tsx @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import { coreMock } from '@kbn/core/public/mocks'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import type { SecurityLicenseFeatures } from '@kbn/security-plugin-types-common'; +import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers'; +import '@kbn/code-editor-mock/jest_helper'; + +import { RemoteClusterPrivileges } from './remote_cluster_privileges'; +import { RemoteClusterPrivilegesForm } from './remote_cluster_privileges_form'; +import { licenseMock } from '../../../../../../common/licensing/index.mock'; +import { RoleValidator } from '../../validate_role'; + +test('it renders without crashing', async () => { + const wrapper = shallowWithIntl( + + + + ); + + expect(wrapper.children()).toMatchSnapshot(); +}); + +test('it renders an RemoteClusterPrivilegesForm for each remote cluster privilege on the role', async () => { + const wrapper = mountWithIntl( + + + + ); + + expect(wrapper.find(RemoteClusterPrivilegesForm)).toHaveLength(3); +}); + +test('it renders fields as disabled when not editable', async () => { + const props = { + role: { + name: '', + kibana: [], + elasticsearch: { + cluster: [], + remote_cluster: [ + { + clusters: ['cluster1', 'cluster2'], + privileges: ['monitor_enrich'], + }, + { + clusters: ['cluster3', 'cluster4'], + privileges: ['monitor_enrich'], + }, + ], + indices: [], + run_as: [], + }, + }, + onChange: jest.fn(), + editable: false, + validator: new RoleValidator(), + availableRemoteClusterPrivileges: ['monitor_enrich'], + license: licenseMock.create(), + }; + const wrapper = mountWithIntl( + + + + ); + + expect( + wrapper + .find('RemoteClusterPrivilegesForm') + .everyWhere((component) => component.prop('isRoleReadOnly')) + ).toBe(true); +}); + +test('it renders fields as disabled when `allowRemoteClusterPrivileges` is set to false', async () => { + const license = licenseMock.create(); + + license.getFeatures.mockReturnValue({ + allowRemoteClusterPrivileges: false, + } as SecurityLicenseFeatures); + + const props = { + role: { + name: '', + kibana: [], + elasticsearch: { + cluster: [], + remote_cluster: [ + { + clusters: ['cluster1', 'cluster2'], + privileges: ['monitor_enrich'], + }, + { + clusters: ['cluster3', 'cluster4'], + privileges: ['monitor_enrich'], + }, + ], + indices: [], + run_as: [], + }, + }, + onChange: jest.fn(), + editable: false, + validator: new RoleValidator(), + availableRemoteClusterPrivileges: ['monitor_enrich'], + license: licenseMock.create(), + }; + const wrapper = mountWithIntl( + + + + ); + + expect( + wrapper + .find('RemoteClusterPrivilegesForm') + .everyWhere((component) => component.prop('isRoleReadOnly')) + ).toBe(true); +}); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges.tsx new file mode 100644 index 0000000000000..7b6096356dd63 --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges.tsx @@ -0,0 +1,147 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiIconTip, EuiSpacer } from '@elastic/eui'; +import React, { useCallback, useMemo } from 'react'; + +import { FormattedMessage } from '@kbn/i18n-react'; +import type { Cluster } from '@kbn/remote-clusters-plugin/public'; + +import { RemoteClusterPrivilegesForm } from './remote_cluster_privileges_form'; +import type { Role, RoleRemoteClusterPrivilege, SecurityLicense } from '../../../../../../common'; +import { isRoleReadOnly } from '../../../../../../common/model'; +import type { RoleValidator } from '../../validate_role'; + +interface Props { + remoteClusters?: Cluster[]; + role: Role; + availableRemoteClusterPrivileges: string[]; + license: SecurityLicense; + onChange: (role: Role) => void; + validator: RoleValidator; + editable?: boolean; +} + +export const RemoteClusterPrivileges: React.FunctionComponent = ({ + remoteClusters, + license, + availableRemoteClusterPrivileges, + role, + editable, + onChange, + validator, +}) => { + const remoteClusterPrivileges = useMemo(() => role.elasticsearch.remote_cluster ?? [], [role]); + const remoteClusterPrivilegesDisabled = useMemo(() => { + const { allowRemoteClusterPrivileges } = license.getFeatures(); + + return !allowRemoteClusterPrivileges; + }, [license]); + + const isReadOnly = useMemo( + () => !editable || isRoleReadOnly(role) || remoteClusterPrivilegesDisabled, + [role, editable, remoteClusterPrivilegesDisabled] + ); + + const onRoleChange = useCallback( + (remoteCluster: RoleRemoteClusterPrivilege[]) => { + const roleDraft = { + ...role, + elasticsearch: { + ...role.elasticsearch, + remote_cluster: remoteCluster, + }, + }; + + onChange(roleDraft); + }, + [onChange, role] + ); + + const addRemoteClusterPrivilege = useCallback(() => { + const newRemoteClusterPrivileges = [ + ...remoteClusterPrivileges, + { + clusters: [], + privileges: [], + }, + ]; + + onRoleChange(newRemoteClusterPrivileges); + }, [onRoleChange, remoteClusterPrivileges]); + + const onRemoteClusterPrivilegeChange = useCallback( + (privilegeIndex: number) => (updatedPrivilege: RoleRemoteClusterPrivilege) => { + const newRemoteClusterPrivileges = [...remoteClusterPrivileges]; + newRemoteClusterPrivileges[privilegeIndex] = updatedPrivilege; + + onRoleChange(newRemoteClusterPrivileges); + }, + [onRoleChange, remoteClusterPrivileges] + ); + + const onRemoteClusterPrivilegeDelete = useCallback( + (privilegeIndex: number) => () => { + const newRemoteClusterPrivileges = [...remoteClusterPrivileges]; + newRemoteClusterPrivileges.splice(privilegeIndex, 1); + + onRoleChange(newRemoteClusterPrivileges); + }, + [onRoleChange, remoteClusterPrivileges] + ); + + return ( + <> + {remoteClusterPrivileges.map((remoteClusterPrivilege, i) => ( + + ))} + {editable && ( + <> + + + + + + + + {remoteClusterPrivilegesDisabled && ( + + + } + position="right" + /> + + )} + + + )} + + ); +}; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges_form.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges_form.test.tsx new file mode 100644 index 0000000000000..c1bbc330a9070 --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges_form.test.tsx @@ -0,0 +1,182 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonIcon } from '@elastic/eui'; +import type { EuiComboBoxProps } from '@elastic/eui'; +import React from 'react'; + +import '@kbn/code-editor-mock/jest_helper'; +import { mountWithIntl, shallowWithIntl } from '@kbn/test-jest-helpers'; + +import { RemoteClusterPrivilegesForm } from './remote_cluster_privileges_form'; +import { RoleValidator } from '../../validate_role'; + +test('it renders without crashing', () => { + const wrapper = shallowWithIntl( + + ); + expect(wrapper).toMatchSnapshot(); +}); + +test('it allows for custom remote cluster input', () => { + const onChange = jest.fn(); + const wrapper = mountWithIntl( + + ); + + const privilegesSelect = wrapper.find( + 'EuiComboBox[data-test-subj="remoteClusterClustersInput0"]' + ); + + (privilegesSelect.props() as any).onCreateOption('custom-cluster'); + + expect(onChange).toHaveBeenCalledWith( + expect.objectContaining({ clusters: ['cluster1', 'custom-cluster'] }) + ); +}); + +test('it does not allow for custom remote cluster privileges', () => { + const onChange = jest.fn(); + const wrapper = mountWithIntl( + + ); + + const privilegesSelect = wrapper.find( + 'EuiComboBox[data-test-subj="remoteClusterPrivilegesInput0"]' + ); + + expect((privilegesSelect.props() as EuiComboBoxProps).onCreateOption).toBe(undefined); +}); + +test('it allows for custom remote cluster clusters input', () => { + const onChange = jest.fn(); + const wrapper = mountWithIntl( + + ); + + const clustersSelect = wrapper.find('EuiComboBox[data-test-subj="remoteClusterClustersInput0"]'); + + (clustersSelect.props() as any).onCreateOption('cluster2'); + + expect(onChange).toHaveBeenCalledWith( + expect.objectContaining({ clusters: ['cluster1', 'cluster2'] }) + ); +}); + +test('it renders fields as disabled when isRoleReadOnly is true', () => { + const onChange = jest.fn(); + const wrapper = mountWithIntl( + + ); + + const privilegesSelect = wrapper.find( + 'EuiComboBox[data-test-subj="remoteClusterPrivilegesInput0"]' + ); + expect(privilegesSelect.prop('isDisabled')).toBe(true); + + const clustersSelect = wrapper.find('EuiComboBox[data-test-subj="remoteClusterClustersInput0"]'); + expect(clustersSelect.prop('isDisabled')).toBe(true); +}); + +describe('delete button', () => { + const props = { + remoteClusterPrivilege: { + clusters: ['cluster1'], + privileges: ['monitor_enrich'], + }, + formIndex: 0, + availableRemoteClusterPrivileges: ['monitor_enrich'], + isRoleReadOnly: false, + validator: new RoleValidator(), + onChange: jest.fn(), + onDelete: jest.fn(), + intl: {} as any, + }; + + test('it is hidden when isRoleReadOnly is true', () => { + const testProps = { + ...props, + isRoleReadOnly: true, + }; + const wrapper = mountWithIntl(); + expect(wrapper.find(EuiButtonIcon)).toHaveLength(0); + }); + + test('it is shown when isRoleReadOnly is false', () => { + const testProps = { + ...props, + isRoleReadOnly: false, + }; + const wrapper = mountWithIntl(); + expect(wrapper.find(EuiButtonIcon)).toHaveLength(1); + }); + + test('it invokes onDelete when clicked', () => { + const testProps = { + ...props, + isRoleReadOnly: false, + }; + const wrapper = mountWithIntl(); + wrapper.find(EuiButtonIcon).simulate('click'); + expect(testProps.onDelete).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges_form.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges_form.tsx new file mode 100644 index 0000000000000..5e55ebaf1d281 --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_cluster_privileges_form.tsx @@ -0,0 +1,170 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { EuiComboBoxOptionOption } from '@elastic/eui'; +import { + EuiButtonIcon, + EuiComboBox, + EuiFlexGroup, + EuiFlexItem, + EuiFormRow, + EuiPanel, + EuiSpacer, +} from '@elastic/eui'; +import React, { Fragment, useCallback } from 'react'; + +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import type { Cluster } from '@kbn/remote-clusters-plugin/public'; + +import { RemoteClusterComboBox } from './remote_clusters_combo_box'; +import type { RoleRemoteClusterPrivilege } from '../../../../../../common'; +import type { RoleValidator } from '../../validate_role'; + +const fromOption = (option: EuiComboBoxOptionOption) => option.label; +const toOption = (value: string): EuiComboBoxOptionOption => ({ label: value }); + +interface Props { + formIndex: number; + remoteClusterPrivilege: RoleRemoteClusterPrivilege; + remoteClusters?: Cluster[]; + availableRemoteClusterPrivileges: string[]; + onChange: (remoteClusterPrivilege: RoleRemoteClusterPrivilege) => void; + onDelete: () => void; + isRoleReadOnly: boolean; + validator: RoleValidator; +} + +export const RemoteClusterPrivilegesForm: React.FunctionComponent = ({ + isRoleReadOnly, + remoteClusters = [], + formIndex, + validator, + remoteClusterPrivilege, + availableRemoteClusterPrivileges, + onChange, + onDelete, +}) => { + const onCreateClusterOption = useCallback( + (option: string) => { + const nextClusters = (remoteClusterPrivilege.clusters ?? []).concat([option]); + + onChange({ + ...remoteClusterPrivilege, + clusters: nextClusters, + }); + }, + [remoteClusterPrivilege, onChange] + ); + + const onClustersChange = useCallback( + (nextOptions: EuiComboBoxOptionOption[]) => { + const clusters = nextOptions.map(fromOption); + onChange({ + ...remoteClusterPrivilege, + clusters, + }); + }, + [onChange, remoteClusterPrivilege] + ); + + const onPrivilegeChange = useCallback( + (newPrivileges: EuiComboBoxOptionOption[]) => { + onChange({ + ...remoteClusterPrivilege, + privileges: newPrivileges.map(fromOption), + }); + }, + [remoteClusterPrivilege, onChange] + ); + + return ( + + + + + + + + + } + fullWidth + {...validator.validateRemoteClusterPrivilegeClusterField(remoteClusterPrivilege)} + > + + + + + + } + fullWidth + {...validator.validateRemoteClusterPrivilegePrivilegesField( + remoteClusterPrivilege + )} + > + + + + + + + {!isRoleReadOnly && ( + + + + )} + + + ); +}; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_clusters_combo_box.test.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_clusters_combo_box.test.tsx new file mode 100644 index 0000000000000..4cf918d4c8c1c --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_clusters_combo_box.test.tsx @@ -0,0 +1,106 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +import '@kbn/code-editor-mock/jest_helper'; +import { shallowWithIntl } from '@kbn/test-jest-helpers'; + +import { RemoteClusterComboBox } from './remote_clusters_combo_box'; + +test('it renders without crashing', () => { + const wrapper = shallowWithIntl( + + ); + expect(wrapper).toMatchSnapshot(); +}); + +test('should render clusters field', () => { + const wrapper = shallowWithIntl( + + ); + const clustersInput = wrapper.find('EuiComboBox'); + expect(clustersInput.prop('options')).toEqual([ + { label: 'test2' }, + { label: expect.anything(), isGroupLabelOption: true }, + { + label: 'test1', + disabled: true, + append: expect.anything(), + }, + ]); +}); diff --git a/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_clusters_combo_box.tsx b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_clusters_combo_box.tsx new file mode 100644 index 0000000000000..30efc78f0aaf1 --- /dev/null +++ b/x-pack/plugins/security/public/management/roles/edit_role/privileges/es/remote_clusters_combo_box.tsx @@ -0,0 +1,87 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { EuiComboBoxOptionOption, EuiComboBoxProps } from '@elastic/eui'; +import { EuiComboBox, EuiIconTip } from '@elastic/eui'; +import React, { useMemo } from 'react'; + +import { FormattedMessage } from '@kbn/i18n-react'; +import type { Cluster } from '@kbn/remote-clusters-plugin/public'; + +const API_KEY_SECURITY_MODEL = 'api_key'; + +interface Props extends Omit, 'options'> { + remoteClusters: Cluster[]; + type: 'remote_cluster' | 'remote_indexes'; +} + +export const RemoteClusterComboBox: React.FunctionComponent = ({ + remoteClusters, + type, + ...restProps +}) => { + const remoteClusterOptions = useMemo(() => { + const { incompatible, remote } = remoteClusters.reduce<{ + remote: EuiComboBoxOptionOption[]; + incompatible: EuiComboBoxOptionOption[]; + }>( + (data, item) => { + const disabled = item.securityModel !== API_KEY_SECURITY_MODEL; + + if (!disabled) { + data.remote.push({ label: item.name }); + + return data; + } + + data.incompatible.push({ + label: item.name, + disabled, + append: disabled ? ( + + ) : ( + + ) + } + /> + ) : undefined, + }); + + return data; + }, + { + incompatible: [], + remote: [], + } + ); + + if (incompatible.length) { + remote.push( + { + label: 'Incompatible clusters', + isGroupLabelOption: true, + }, + ...incompatible + ); + } + + return remote; + }, [remoteClusters, type]); + + return ; +}; diff --git a/x-pack/plugins/security/public/management/roles/edit_role/validate_role.ts b/x-pack/plugins/security/public/management/roles/edit_role/validate_role.ts index 18728994a5e4e..bf85f80df1fc1 100644 --- a/x-pack/plugins/security/public/management/roles/edit_role/validate_role.ts +++ b/x-pack/plugins/security/public/management/roles/edit_role/validate_role.ts @@ -7,7 +7,12 @@ import { i18n } from '@kbn/i18n'; -import type { Role, RoleIndexPrivilege, RoleRemoteIndexPrivilege } from '../../../../common'; +import type { + Role, + RoleIndexPrivilege, + RoleRemoteClusterPrivilege, + RoleRemoteIndexPrivilege, +} from '../../../../common'; import { MAX_NAME_LENGTH, NAME_REGEX } from '../../../../common/constants'; interface RoleValidatorOptions { @@ -81,6 +86,27 @@ export class RoleValidator { return valid(); } + public validateRemoteClusterPrivileges(role: Role): RoleValidationResult { + if (!this.shouldValidate) { + return valid(); + } + + const areRemoteClustersInvalid = role.elasticsearch.remote_cluster?.some( + (remoteClusterPrivilege) => { + return ( + this.validateRemoteClusterPrivilegeClusterField(remoteClusterPrivilege).isInvalid || + this.validateRemoteClusterPrivilegePrivilegesField(remoteClusterPrivilege).isInvalid + ); + } + ); + + if (areRemoteClustersInvalid) { + return invalid(); + } + + return valid(); + } + public validateIndexPrivileges(role: Role): RoleValidationResult { if (!this.shouldValidate) { return valid(); @@ -239,6 +265,58 @@ export class RoleValidator { return valid(); } + public validateRemoteClusterPrivilegeClusterField( + remoteClusterPrivilege: RoleRemoteClusterPrivilege + ): RoleValidationResult { + if (!this.shouldValidate) { + return valid(); + } + + // Ignore if all other fields are empty + if (!remoteClusterPrivilege.privileges.length) { + return valid(); + } + + if (!remoteClusterPrivilege.clusters.length) { + return invalid( + i18n.translate( + 'xpack.security.management.editRole.validateRole.oneClusterRequiredWarningMessage', + { + defaultMessage: 'Enter or select at least one cluster', + } + ) + ); + } + + return valid(); + } + + public validateRemoteClusterPrivilegePrivilegesField( + remoteClusterPrivilege: RoleRemoteClusterPrivilege + ): RoleValidationResult { + if (!this.shouldValidate) { + return valid(); + } + + // Ignore if all other fields are empty + if (!remoteClusterPrivilege.clusters.length) { + return valid(); + } + + if (!remoteClusterPrivilege.privileges.length) { + return invalid( + i18n.translate( + 'xpack.security.management.editRole.validateRole.oneRemoteClusterPrivilegeRequiredWarningMessage', + { + defaultMessage: 'Enter or select at least one privilege', + } + ) + ); + } + + return valid(); + } + public validateSelectedSpaces( spaceIds: string[], privilege: string | null @@ -313,12 +391,15 @@ export class RoleValidator { const { isInvalid: areIndicesInvalid } = this.validateIndexPrivileges(role); const { isInvalid: areRemoteIndicesInvalid } = this.validateRemoteIndexPrivileges(role); const { isInvalid: areSpacePrivilegesInvalid } = this.validateSpacePrivileges(role); + const { isInvalid: areRemoteClusterPrivilegesInvalid } = + this.validateRemoteClusterPrivileges(role); if ( isNameInvalid || areIndicesInvalid || areRemoteIndicesInvalid || - areSpacePrivilegesInvalid + areSpacePrivilegesInvalid || + areRemoteClusterPrivilegesInvalid ) { return invalid(); } diff --git a/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts b/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts index 47947d2fb2adc..bb8b43c45f272 100644 --- a/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts +++ b/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.test.ts @@ -16,6 +16,7 @@ const roles = [ { name: 'global-base-all', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -33,6 +34,7 @@ const roles = [ { name: 'global-base-read', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -50,6 +52,7 @@ const roles = [ { name: 'global-foo-all', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -67,6 +70,7 @@ const roles = [ { name: 'global-foo-read', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -84,6 +88,7 @@ const roles = [ { name: 'global-malformed', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -101,6 +106,7 @@ const roles = [ { name: 'default-base-all', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -118,6 +124,7 @@ const roles = [ { name: 'default-base-read', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -135,6 +142,7 @@ const roles = [ { name: 'default-foo-all', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -152,6 +160,7 @@ const roles = [ { name: 'default-foo-read', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -169,6 +178,7 @@ const roles = [ { name: 'default-malformed', cluster: [], + remote_cluster: [], indices: [], applications: [ { @@ -294,6 +304,7 @@ describe('#transformElasticsearchRoleToRole', () => { const role = { name: 'global-all', cluster: [], + remote_cluster: [], indices: [], applications: [ { diff --git a/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts b/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts index 9477fa8be9084..e06c9938b078f 100644 --- a/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts +++ b/x-pack/plugins/security/server/authorization/roles/elasticsearch_role.ts @@ -28,6 +28,7 @@ export type ElasticsearchRole = Pick< resources: string[]; }>; cluster: Role['elasticsearch']['cluster']; + remote_cluster: Role['elasticsearch']['remote_cluster']; indices: Role['elasticsearch']['indices']; remote_indices?: Role['elasticsearch']['remote_indices']; run_as: Role['elasticsearch']['run_as']; @@ -56,6 +57,7 @@ export function transformElasticsearchRoleToRole( transient_metadata: elasticsearchRole.transient_metadata, elasticsearch: { cluster: elasticsearchRole.cluster, + remote_cluster: elasticsearchRole.remote_cluster, indices: elasticsearchRole.indices, remote_indices: elasticsearchRole.remote_indices, run_as: elasticsearchRole.run_as, diff --git a/x-pack/plugins/security/server/deprecations/privilege_deprecations.test.ts b/x-pack/plugins/security/server/deprecations/privilege_deprecations.test.ts index 2ab306ce82108..f62bdc52e6d4c 100644 --- a/x-pack/plugins/security/server/deprecations/privilege_deprecations.test.ts +++ b/x-pack/plugins/security/server/deprecations/privilege_deprecations.test.ts @@ -66,6 +66,7 @@ describe('#getPrivilegeDeprecationsService', () => { "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": undefined, "remote_indices": undefined, "run_as": Array [], }, @@ -139,6 +140,7 @@ describe('#getPrivilegeDeprecationsService', () => { "elasticsearch": Object { "cluster": Array [], "indices": Array [], + "remote_cluster": undefined, "remote_indices": undefined, "run_as": Array [], }, diff --git a/x-pack/plugins/security/server/routes/authorization/privileges/get_builtin.ts b/x-pack/plugins/security/server/routes/authorization/privileges/get_builtin.ts index e51e8e1d5ae51..98b1f33bd5b38 100644 --- a/x-pack/plugins/security/server/routes/authorization/privileges/get_builtin.ts +++ b/x-pack/plugins/security/server/routes/authorization/privileges/get_builtin.ts @@ -21,7 +21,10 @@ export function defineGetBuiltinPrivilegesRoutes({ router }: RouteDefinitionPara : [privileges.index]; privileges.index = indexPriviledges.filter((privilege) => privilege !== 'none'); - return response.ok({ body: privileges }); + // TODO: remove hardcoded value once ES returns built-in privileges for remote_cluster + const remoteClusterPrivileges = ['monitor_enrich']; + + return response.ok({ body: { ...privileges, remote_cluster: remoteClusterPrivileges } }); } ); } diff --git a/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts b/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts index 717170567a550..b9e772e6451db 100644 --- a/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts +++ b/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.test.ts @@ -108,10 +108,10 @@ describe('Put payload schema', () => { kibana: [{ spaces: ['foo-*'] }], }) ).toThrowErrorMatchingInlineSnapshot(` -"[kibana.0.spaces]: types that failed validation: -- [kibana.0.spaces.0.0]: expected value to equal [*] -- [kibana.0.spaces.1.0]: must be lower case, a-z, 0-9, '_', and '-' are allowed" -`); + "[kibana.0.spaces]: types that failed validation: + - [kibana.0.spaces.0.0]: expected value to equal [*] + - [kibana.0.spaces.1.0]: must be lower case, a-z, 0-9, '_', and '-' are allowed" + `); }); test(`can't assign space and global in same entry`, () => { @@ -120,10 +120,10 @@ describe('Put payload schema', () => { kibana: [{ spaces: ['*', 'foo-space'] }], }) ).toThrowErrorMatchingInlineSnapshot(` -"[kibana.0.spaces]: types that failed validation: -- [kibana.0.spaces.0.1]: expected value to equal [*] -- [kibana.0.spaces.1.0]: must be lower case, a-z, 0-9, '_', and '-' are allowed" -`); + "[kibana.0.spaces]: types that failed validation: + - [kibana.0.spaces.0.1]: expected value to equal [*] + - [kibana.0.spaces.1.0]: must be lower case, a-z, 0-9, '_', and '-' are allowed" + `); }); test(`only allows known Kibana space base privileges`, () => { @@ -424,8 +424,72 @@ describe('Put payload schema', () => { `); }); + test('passes through remote_cluster when specified', () => { + expect( + getPutPayloadSchema(() => basePrivilegeNamesMap).validate({ + elasticsearch: { + remote_cluster: [ + { + privileges: ['monitor_enrich'], + clusters: ['my_remote*'], + }, + ], + }, + }) + ).toMatchInlineSnapshot(` + Object { + "elasticsearch": Object { + "remote_cluster": Array [ + Object { + "clusters": Array [ + "my_remote*", + ], + "privileges": Array [ + "monitor_enrich", + ], + }, + ], + }, + } + `); + }); + + test(`doesn't allow empty privilege for remote_cluster`, () => { + expect(() => + getPutPayloadSchema(() => basePrivilegeNamesMap).validate({ + elasticsearch: { + remote_cluster: [ + { + privileges: [], + clusters: ['cluster1'], + }, + ], + }, + }) + ).toThrowErrorMatchingInlineSnapshot( + `"[elasticsearch.remote_cluster.0.privileges]: array size is [0], but cannot be smaller than [1]"` + ); + }); + + test(`doesn't allow empty clusters for remote_cluster`, () => { + expect(() => + getPutPayloadSchema(() => basePrivilegeNamesMap).validate({ + elasticsearch: { + remote_cluster: [ + { + privileges: ['enrich_monitor'], + clusters: [], + }, + ], + }, + }) + ).toThrowErrorMatchingInlineSnapshot( + `"[elasticsearch.remote_cluster.0.clusters]: array size is [0], but cannot be smaller than [1]"` + ); + }); + // This is important for backwards compatibility - test('does not set default value for remote_indices when not specified', () => { + test('does not set default value for remote_indices/remote_cluster when not specified', () => { expect(getPutPayloadSchema(() => basePrivilegeNamesMap).validate({})).toMatchInlineSnapshot(` Object { "elasticsearch": Object {}, diff --git a/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts b/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts index 9d0a82c1e6ac8..52c8178a651a7 100644 --- a/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts +++ b/x-pack/plugins/security/server/routes/authorization/roles/model/put_payload.ts @@ -19,6 +19,7 @@ export const transformPutPayloadToElasticsearchRole = ( ) => { const { elasticsearch = { + remote_cluster: undefined, cluster: undefined, indices: undefined, remote_indices: undefined, @@ -34,6 +35,7 @@ export const transformPutPayloadToElasticsearchRole = ( ...(rolePayload.description && { description: rolePayload.description }), metadata: rolePayload.metadata, cluster: elasticsearch.cluster || [], + remote_cluster: elasticsearch.remote_cluster, indices: elasticsearch.indices || [], remote_indices: elasticsearch.remote_indices, run_as: elasticsearch.run_as || [], diff --git a/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts b/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts index 4591bfaaea4aa..642aec90c4748 100644 --- a/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts +++ b/x-pack/plugins/security/server/routes/authorization/roles/put.test.ts @@ -325,6 +325,7 @@ describe('PUT role', () => { body: { cluster: [], indices: [], + remote_cluster: undefined, remote_indices: undefined, run_as: [], applications: [], @@ -936,5 +937,59 @@ describe('PUT role', () => { result: undefined, }, }); + + putRoleTest(`creates role with remote_cluster privileges`, { + name: 'foo-role-remote-cluster', + payload: { + kibana: [], + elasticsearch: { + remote_cluster: [ + { + clusters: ['cluster1', 'cluster2'], + privileges: ['monitor_enrich'], + }, + { + clusters: ['cluster3', 'cluster4'], + privileges: ['monitor_enrich'], + }, + ], + }, + }, + apiResponses: { + get: () => ({}), + put: () => {}, + }, + asserts: { + recordSubFeaturePrivilegeUsage: false, + apiArguments: { + get: [{ name: 'foo-role-remote-cluster' }, { ignore: [404] }], + put: [ + { + name: 'foo-role-remote-cluster', + body: { + applications: [], + cluster: [], + indices: [], + remote_indices: undefined, + run_as: [], + remote_cluster: [ + { + clusters: ['cluster1', 'cluster2'], + privileges: ['monitor_enrich'], + }, + { + clusters: ['cluster3', 'cluster4'], + privileges: ['monitor_enrich'], + }, + ], + metadata: undefined, + }, + }, + ], + }, + statusCode: 204, + result: undefined, + }, + }); }); }); diff --git a/x-pack/plugins/security/server/routes/role_mapping/feature_check.test.ts b/x-pack/plugins/security/server/routes/role_mapping/feature_check.test.ts index d18fd1ff1d314..c0bf0041ed0ac 100644 --- a/x-pack/plugins/security/server/routes/role_mapping/feature_check.test.ts +++ b/x-pack/plugins/security/server/routes/role_mapping/feature_check.test.ts @@ -98,6 +98,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: true, hasCompatibleRealms: true, canUseRemoteIndices: true, + canUseRemoteClusters: true, }, }, }); @@ -122,6 +123,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: true, hasCompatibleRealms: true, canUseRemoteIndices: true, + canUseRemoteClusters: true, }, }, }); @@ -141,6 +143,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: true, hasCompatibleRealms: true, canUseRemoteIndices: false, + canUseRemoteClusters: false, }, }, } @@ -166,6 +169,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: false, hasCompatibleRealms: true, canUseRemoteIndices: true, + canUseRemoteClusters: true, }, }, }); @@ -190,6 +194,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: true, hasCompatibleRealms: true, canUseRemoteIndices: true, + canUseRemoteClusters: true, }, }, }); @@ -218,6 +223,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: true, hasCompatibleRealms: false, canUseRemoteIndices: true, + canUseRemoteClusters: true, }, }, }); @@ -249,6 +255,7 @@ describe('GET role mappings feature check', () => { canUseStoredScripts: true, hasCompatibleRealms: false, canUseRemoteIndices: false, + canUseRemoteClusters: false, }, }, } diff --git a/x-pack/plugins/security/server/routes/role_mapping/feature_check.ts b/x-pack/plugins/security/server/routes/role_mapping/feature_check.ts index 309cdfbeab456..6aca083dab1e2 100644 --- a/x-pack/plugins/security/server/routes/role_mapping/feature_check.ts +++ b/x-pack/plugins/security/server/routes/role_mapping/feature_check.ts @@ -131,7 +131,8 @@ async function getEnabledRoleMappingsFeatures(esClient: ElasticsearchClient, log hasCompatibleRealms, canUseStoredScripts, canUseInlineScripts, - canUseRemoteIndices: !!xpackUsage.remote_clusters, + canUseRemoteIndices: Boolean(xpackUsage.remote_clusters), + canUseRemoteClusters: Boolean(xpackUsage.remote_clusters), }; } diff --git a/x-pack/plugins/security/server/routes/views/login.test.ts b/x-pack/plugins/security/server/routes/views/login.test.ts index 086c0c785e6bc..87e9bf9e4495b 100644 --- a/x-pack/plugins/security/server/routes/views/login.test.ts +++ b/x-pack/plugins/security/server/routes/views/login.test.ts @@ -167,6 +167,7 @@ describe('Login view routes', () => { allowRoleDocumentLevelSecurity: true, allowRoleFieldLevelSecurity: false, allowRoleRemoteIndexPrivileges: false, + allowRemoteClusterPrivileges: false, layout: 'error-es-unavailable', showLinks: false, showRoleMappingsManagement: true, diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.gen.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.gen.ts index 3da400bdef9e0..141991327fb2d 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.gen.ts +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.gen.ts @@ -40,6 +40,20 @@ export const CreateAssetCriticalityRecord = AssetCriticalityRecordIdParts.merge( * The criticality level of the asset. */ criticality_level: z.enum(['low_impact', 'medium_impact', 'high_impact', 'extreme_impact']), + /** + * If 'wait_for' the request will wait for the index refresh. + */ + refresh: z.literal('wait_for').optional(), + }) +); + +export type DeleteAssetCriticalityRecord = z.infer; +export const DeleteAssetCriticalityRecord = AssetCriticalityRecordIdParts.merge( + z.object({ + /** + * If 'wait_for' the request will wait for the index refresh. + */ + refresh: z.literal('wait_for').optional(), }) ); diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.schema.yaml b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.schema.yaml index 9fa0c7bcfce18..3d3e82524109d 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/common.schema.yaml @@ -50,8 +50,21 @@ components: type: string enum: [low_impact, medium_impact, high_impact, extreme_impact] description: The criticality level of the asset. + refresh: + type: string + enum: [wait_for] + description: If 'wait_for' the request will wait for the index refresh. required: - criticality_level + DeleteAssetCriticalityRecord: + allOf: + - $ref: '#/components/schemas/AssetCriticalityRecordIdParts' + - type: object + properties: + refresh: + type: string + enum: [wait_for] + description: If 'wait_for' the request will wait for the index refresh. AssetCriticalityRecord: allOf: - $ref: '#/components/schemas/CreateAssetCriticalityRecord' diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/engine_settings_route.schema.yaml b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/engine_settings_route.schema.yaml index aad2d49032856..cb67a3686822b 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/engine_settings_route.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/engine_settings_route.schema.yaml @@ -13,6 +13,7 @@ servers: paths: /engine/settings: + x-internal: true get: operationId: RiskEngineSettingsGet summary: Get the settings of the Risk Engine @@ -23,11 +24,11 @@ paths: application/json: schema: $ref: '#/components/schemas/RiskEngineSettingsResponse' - + components: schemas: RiskEngineSettingsResponse: type: object properties: range: - $ref: '../common/common.schema.yaml#/components/schemas/DateRange' \ No newline at end of file + $ref: '../common/common.schema.yaml#/components/schemas/DateRange' diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts index c583616198313..f4d7c393f6e7f 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.gen.ts @@ -28,6 +28,10 @@ export const RiskScoresEntityCalculationRequest = z.object({ * Used to define the type of entity. */ identifier_type: IdentifierType, + /** + * If 'wait_for' the request will wait for the index refresh. + */ + refresh: z.literal('wait_for').optional(), }); export type RiskScoresEntityCalculationResponse = z.infer< diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml index de5f01f850187..d776f6363a01e 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/risk_engine/entity_calculation_route.schema.yaml @@ -15,6 +15,7 @@ servers: paths: /api/risk_scores/calculation/entity: + x-internal: true post: summary: Trigger calculation of Risk Scores for an entity description: Calculates and persists Risk Scores for an entity, returning the calculated risk score. @@ -44,19 +45,23 @@ components: - identifier_type properties: identifier: - description: Used to identify the entity. + description: Used to identify the entity. type: string example: 'my.host' identifier_type: description: Used to define the type of entity. $ref: './common.schema.yaml#/components/schemas/IdentifierType' + refresh: + type: string + enum: [wait_for] + description: If 'wait_for' the request will wait for the index refresh. RiskScoresEntityCalculationResponse: - type: object - required: - - success - properties: - success: - type: boolean - score: - $ref: './common.schema.yaml#/components/schemas/RiskScore' + type: object + required: + - success + properties: + success: + type: boolean + score: + $ref: './common.schema.yaml#/components/schemas/RiskScore' diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts index a3b3ebaf26142..b5e4e874c7537 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.test.ts @@ -98,6 +98,27 @@ describe('Endpoint Authz service', () => { ); }); + it('should not give canReadFleetAgents if `fleet.readAgents` is false', () => { + fleetAuthz.fleet.readAgents = false; + expect(calculateEndpointAuthz(licenseService, fleetAuthz, userRoles).canReadFleetAgents).toBe( + false + ); + }); + + it('should not give canWriteFleetAgents if `fleet.allAgents` is false', () => { + fleetAuthz.fleet.allAgents = false; + expect( + calculateEndpointAuthz(licenseService, fleetAuthz, userRoles).canWriteFleetAgents + ).toBe(false); + }); + + it('should not give canReadFleetAgentPolicies if `fleet.readAgentPolicies` is false', () => { + fleetAuthz.fleet.readAgentPolicies = false; + expect( + calculateEndpointAuthz(licenseService, fleetAuthz, userRoles).canReadFleetAgentPolicies + ).toBe(false); + }); + it('should not give canAccessEndpointManagement if not superuser', () => { userRoles = []; expect( @@ -276,6 +297,9 @@ describe('Endpoint Authz service', () => { canWriteSecuritySolution: false, canReadSecuritySolution: false, canAccessFleet: false, + canReadFleetAgentPolicies: false, + canReadFleetAgents: false, + canWriteFleetAgents: false, canAccessEndpointActionsLogManagement: false, canAccessEndpointManagement: false, canCreateArtifactsByPolicy: false, diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts index f38a636b78211..95430a6df82fb 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/authz.ts @@ -98,6 +98,9 @@ export const calculateEndpointAuthz = ( canWriteSecuritySolution, canReadSecuritySolution, canAccessFleet: fleetAuthz?.fleet.all ?? false, + canReadFleetAgentPolicies: fleetAuthz?.fleet.readAgentPolicies ?? false, + canWriteFleetAgents: fleetAuthz?.fleet.allAgents ?? false, + canReadFleetAgents: fleetAuthz?.fleet.readAgents ?? false, canAccessEndpointManagement: hasEndpointManagementAccess, // TODO: is this one deprecated? it is the only place we need to check for superuser. canCreateArtifactsByPolicy: isPlatinumPlusLicense, canWriteEndpointList, @@ -157,6 +160,9 @@ export const getEndpointAuthzInitialState = (): EndpointAuthz => { canWriteSecuritySolution: false, canReadSecuritySolution: false, canAccessFleet: false, + canReadFleetAgentPolicies: false, + canReadFleetAgents: false, + canWriteFleetAgents: false, canAccessEndpointActionsLogManagement: false, canAccessEndpointManagement: false, canCreateArtifactsByPolicy: false, diff --git a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts index 1ec8f84a87073..0ccefaa686f72 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/authz.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/authz.ts @@ -16,6 +16,12 @@ export interface EndpointAuthz { canReadSecuritySolution: boolean; /** If the user has permissions to access Fleet */ canAccessFleet: boolean; + /** If the user has permissions to access Fleet Agent policies */ + canReadFleetAgentPolicies: boolean; + /** If the user has permissions to read Fleet Agents */ + canReadFleetAgents: boolean; + /** If the user has permissions to write Fleet Agents */ + canWriteFleetAgents: boolean; /** If the user has permissions to access Endpoint management (includes check to ensure they also have access to fleet) */ canAccessEndpointManagement: boolean; /** If the user has permissions to access Actions Log management and also has a platinum license (used for endpoint details flyout) */ diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 175a40288b9d8..f21f9e82ad92f 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -208,6 +208,11 @@ export const allowedExperimentalValues = Object.freeze({ */ crowdstrikeDataInAnalyzerEnabled: false, + /** + * Enables experimental JAMF integration data to be available in Analyzer + */ + jamfDataInAnalyzerEnabled: false, + /** * Enables experimental "Updates" tab in the prebuilt rule upgrade flyout. * This tab shows the JSON diff between the installed prebuilt rule @@ -255,7 +260,7 @@ export const allowedExperimentalValues = Object.freeze({ /** * Enables Security AI Assistant's Flyout mode */ - aiAssistantFlyoutMode: false, + aiAssistantFlyoutMode: true, /** * Enables the new modal for the value list items diff --git a/x-pack/plugins/security_solution/kibana.jsonc b/x-pack/plugins/security_solution/kibana.jsonc index c9f4b85b8c3d8..14741ec4c37e0 100644 --- a/x-pack/plugins/security_solution/kibana.jsonc +++ b/x-pack/plugins/security_solution/kibana.jsonc @@ -53,6 +53,7 @@ "notifications", "savedSearch", "unifiedDocViewer", + "charts" ], "optionalPlugins": [ "cloudExperiments", diff --git a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.test.ts b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.test.ts index 178757d835785..bb395829bcdff 100644 --- a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.test.ts +++ b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.test.ts @@ -108,7 +108,7 @@ describe('createFilterInCellActionFactory', () => { it('should execute using generic filterManager', async () => { await filterInAction.execute(dataTableContext); expect(mockGlobalFilterManager.addFilters).toHaveBeenCalled(); - expect(services.timelineFilterManager.addFilters).not.toHaveBeenCalled(); + expect(services.timelineDataService.query.filterManager.addFilters).not.toHaveBeenCalled(); }); it('should show warning if value type is unsupported', async () => { @@ -122,7 +122,7 @@ describe('createFilterInCellActionFactory', () => { ], }); expect(mockGlobalFilterManager.addFilters).not.toHaveBeenCalled(); - expect(services.timelineFilterManager.addFilters).not.toHaveBeenCalled(); + expect(services.timelineDataService.query.filterManager.addFilters).not.toHaveBeenCalled(); expect(mockWarningToast).toHaveBeenCalled(); }); }); @@ -135,7 +135,7 @@ describe('createFilterInCellActionFactory', () => { it('should execute using timeline filterManager', async () => { await filterInAction.execute(timelineContext); - expect(services.timelineFilterManager.addFilters).toHaveBeenCalled(); + expect(services.timelineDataService.query.filterManager.addFilters).toHaveBeenCalled(); expect(mockGlobalFilterManager.addFilters).not.toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.ts b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.ts index fb85c32963d01..3a92021089361 100644 --- a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.ts +++ b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_in.ts @@ -29,6 +29,9 @@ export const createFilterInCellActionFactory = ({ }) => { const { filterManager } = services.data.query; const { notifications } = services; + const { + query: { filterManager: timelineFilterManager }, + } = services.timelineDataService; const genericFilterInActionFactory = createFilterInActionFactory({ filterManager, notifications, @@ -65,7 +68,7 @@ export const createFilterInCellActionFactory = ({ const addFilter = metadata?.negateFilters === true ? addFilterOut : addFilterIn; if (metadata?.scopeId && isTimelineScope(metadata.scopeId)) { - addFilter({ filterManager: services.timelineFilterManager, fieldName, value, dataViewId }); + addFilter({ filterManager: timelineFilterManager, fieldName, value, dataViewId }); } else { addFilter({ filterManager, fieldName, value, dataViewId }); } diff --git a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.test.ts b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.test.ts index 23e7fb7e3f662..43238b1d988e8 100644 --- a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.test.ts +++ b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.test.ts @@ -105,7 +105,9 @@ describe('createFilterOutCellActionFactory', () => { it('should execute using generic filterManager', async () => { await filterOutAction.execute(dataTableContext); expect(mockGlobalFilterManager.addFilters).toHaveBeenCalled(); - expect(mockServices.timelineFilterManager.addFilters).not.toHaveBeenCalled(); + expect( + mockServices.timelineDataService.query.filterManager.addFilters + ).not.toHaveBeenCalled(); }); it('should show warning if value type is unsupported', async () => { @@ -119,7 +121,9 @@ describe('createFilterOutCellActionFactory', () => { ], }); expect(mockGlobalFilterManager.addFilters).not.toHaveBeenCalled(); - expect(mockServices.timelineFilterManager.addFilters).not.toHaveBeenCalled(); + expect( + mockServices.timelineDataService.query.filterManager.addFilters + ).not.toHaveBeenCalled(); expect(mockWarningToast).toHaveBeenCalled(); }); }); @@ -132,7 +136,7 @@ describe('createFilterOutCellActionFactory', () => { it('should execute using timeline filterManager', async () => { await filterOutAction.execute(timelineContext); - expect(mockServices.timelineFilterManager.addFilters).toHaveBeenCalled(); + expect(mockServices.timelineDataService.query.filterManager.addFilters).toHaveBeenCalled(); expect(mockGlobalFilterManager.addFilters).not.toHaveBeenCalled(); }); }); diff --git a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.ts b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.ts index bbc433e94256b..f177413901448 100644 --- a/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.ts +++ b/x-pack/plugins/security_solution/public/actions/filter/cell_action/filter_out.ts @@ -29,6 +29,9 @@ export const createFilterOutCellActionFactory = ({ }) => { const { filterManager } = services.data.query; const { notifications } = services; + const { + query: { filterManager: timelineFilterManager }, + } = services.timelineDataService; const genericFilterOutActionFactory = createFilterOutActionFactory({ filterManager, @@ -65,7 +68,7 @@ export const createFilterOutCellActionFactory = ({ const addFilter = metadata?.negateFilters === true ? addFilterIn : addFilterOut; if (metadata?.scopeId && isTimelineScope(metadata.scopeId)) { - addFilter({ filterManager: services.timelineFilterManager, fieldName, value, dataViewId }); + addFilter({ filterManager: timelineFilterManager, fieldName, value, dataViewId }); } else { addFilter({ filterManager, fieldName, value, dataViewId }); } diff --git a/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.test.ts b/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.test.ts index 1efbbc9960146..d8f004f063ecb 100644 --- a/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.test.ts +++ b/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.test.ts @@ -26,7 +26,7 @@ jest.mock('../../../timelines/store', () => ({ describe('createFilterLensAction', () => { const mockServices = { - timelineFilterManager: 'mockTimelineFilterManager', + timelineDataService: { query: { filterManager: 'mockTimelineFilterManager' } }, data: { query: { filterManager: 'mockFilterManager' } }, application: { currentAppId$: of('appId') }, topValuesPopover: { diff --git a/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts b/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts index ecfe71bc3a112..a6d69bf1b3530 100644 --- a/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts +++ b/x-pack/plugins/security_solution/public/actions/filter/lens/create_action.ts @@ -46,7 +46,16 @@ export const createFilterLensAction = ({ services, negate, }: CreateFilterLensActionParams) => { - const { application, notifications, data: dataService, topValuesPopover } = services; + const { + application, + notifications, + data: dataService, + topValuesPopover, + timelineDataService, + } = services; + const { + query: { filterManager: timelineFilterManager }, + } = timelineDataService; let currentAppId: string | undefined; application.currentAppId$.subscribe((appId) => { @@ -93,7 +102,7 @@ export const createFilterLensAction = ({ const timeline = getTimelineById(store.getState(), TimelineId.active); // timeline is open add the filter to timeline, otherwise add filter to global filters const filterManager = timeline?.show - ? services.timelineFilterManager + ? timelineFilterManager : dataService.query.filterManager; // If value type is value_count, we want to filter an `Exists` filter instead of a `Term` filter diff --git a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts index 2332ab5a0c5ef..a5c2bb2cc815b 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/attack/mini_attack_chain/translations.ts @@ -10,6 +10,6 @@ import { i18n } from '@kbn/i18n'; export const ATTACK_CHAIN_TOOLTIP = (tacticsCount: number) => i18n.translate('xpack.securitySolution.attackDiscovery.miniAttackChain.attackChainTooltip', { defaultMessage: - '{tacticsCount} {tacticsCount, plural, one {tactic was} other {tactics were}} identified in the analysis, providing insight into the nature of the detected violations:', + '{tacticsCount} {tacticsCount, plural, one {tactic was} other {tactics were}} identified in the attack:', values: { tacticsCount }, }); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx index d5e8c8cb2bf2e..a5ee15a452aca 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx @@ -11,11 +11,14 @@ import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, + EuiIconTip, EuiLink, EuiSpacer, EuiText, EuiToolTip, + useEuiTheme, } from '@elastic/eui'; +import { css } from '@emotion/react'; import React, { useMemo } from 'react'; import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; @@ -35,6 +38,7 @@ const EmptyPromptComponent: React.FC = ({ isDisabled = false, onGenerate, }) => { + const { euiTheme } = useEuiTheme(); const { hasAssistantPrivilege } = useAssistantAvailability(); const title = useMemo( () => ( @@ -51,6 +55,16 @@ const EmptyPromptComponent: React.FC = ({ + + {i18n.UP_TO} + + @@ -58,11 +72,25 @@ const EmptyPromptComponent: React.FC = ({ {i18n.ALERTS_WILL_BE_ANALYZED(alertsCount)} + + + + ), - [alertsCount] + [alertsCount, euiTheme.size.xs] ); const body = useMemo( diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts index d71b47c3f099d..33ffdbdf478f2 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/translations.ts @@ -30,6 +30,14 @@ export const LEARN_MORE = i18n.translate( } ); +export const RESPONSES_FROM_AI_SYSTEMS = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.responsesFromAiSystemsTooltip', + { + defaultMessage: + 'Responses from AI systems may not always be entirely accurate, although they can seem convincing. For more information on the Attack Discovery feature and its usage, please reference the documentation.', + } +); + export const SELECT_A_CONNECTOR = i18n.translate( 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.selectAConnectorLabel', { @@ -40,6 +48,13 @@ export const SELECT_A_CONNECTOR = i18n.translate( export const START_GENERATING_DISCOVERIES = i18n.translate( 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.startGeneratingDiscoveriesLabel', { - defaultMessage: 'Start generating discoveries via Elastic AI Assistant.', + defaultMessage: 'Start discovering attacks with the power of AI and Elastic Security.', + } +); + +export const UP_TO = i18n.translate( + 'xpack.securitySolution.attackDiscovery.pages.emptyPrompt.upToTitle', + { + defaultMessage: 'Up to', } ); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx index ba07122fbfb04..d74c7c4801f4d 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx @@ -11,6 +11,7 @@ import { ConnectorSelectorInline } from '@kbn/elastic-assistant'; import { noop } from 'lodash/fp'; import React from 'react'; +import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; import * as i18n from './translations'; @@ -27,6 +28,7 @@ const HeaderComponent: React.FC = ({ onGenerate, onConnectorIdSelected, }) => { + const isFlyoutMode = useIsExperimentalFeatureEnabled('aiAssistantFlyoutMode'); const { hasAssistantPrivilege } = useAssistantAvailability(); const { euiTheme } = useEuiTheme(); const disabled = !hasAssistantPrivilege || isLoading || connectorId == null; @@ -43,7 +45,7 @@ const HeaderComponent: React.FC = ({ > 'xpack.securitySolution.attackDiscovery.loadingCallout.countdown.lastTimesPopover.aiIsCurrentlyAnalyzing', { defaultMessage: - 'Average time is calculated over the last {intervals} {intervals, plural, =1 {generation} other {generations}} on the selected connector:', + 'Remaining time is based on the average speed of the last {intervals} {intervals, plural, =1 {time} other {times}} the same connector generated results.', values: { intervals }, } ); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.ts index a63a419b147b5..6c8f9b60c5ac6 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/loading_callout/translations.ts @@ -11,7 +11,7 @@ export const AI_IS_CURRENTLY_ANALYZING = (alertsCount: number) => i18n.translate( 'xpack.securitySolution.attackDiscovery.pages.loadingCallout.aiIsCurrentlyAnalyzing', { - defaultMessage: `AI is currently analyzing up to {alertsCount} {alertsCount, plural, =1 {alert} other {alerts}} in the last 24 hours to generate discoveries.`, + defaultMessage: `AI is analyzing up to {alertsCount} {alertsCount, plural, =1 {alert} other {alerts}} in the last 24 hours to generate discoveries.`, values: { alertsCount }, } ); diff --git a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx index b254fcb9e7d09..188a10c06036c 100644 --- a/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx +++ b/x-pack/plugins/security_solution/public/common/components/hover_actions/use_hover_action_items.tsx @@ -82,7 +82,10 @@ export const useHoverActionItems = ({ }: UseHoverActionItemsProps): UseHoverActionItems => { const kibana = useKibana(); const dispatch = useDispatch(); - const { timelines, timelineFilterManager } = kibana.services; + const { timelines, timelineDataService, analytics, i18n, theme } = kibana.services; + const { + query: { filterManager: timelineFilterManager }, + } = timelineDataService; const dataViewId = useDataViewId(getSourcererScopeId(scopeId ?? '')); // Common actions used by the alert table and alert flyout @@ -168,127 +171,130 @@ export const useHoverActionItems = ({ ] ); - const allItems = useMemo( - () => - [ - showFilters ? ( -
- {getFilterForValueButton({ - defaultFocusedButtonRef, - field, - filterManager, - keyboardEvent: stKeyboardEvent, - onClick: handleHoverActionClicked, - onFilterAdded, - ownFocus, - showTooltip: enableOverflowButton ? false : true, - value: values, - dataViewId, - })} -
- ) : null, - showFilters ? ( -
- {getFilterOutValueButton({ - field, - filterManager, - keyboardEvent: stKeyboardEvent, - onFilterAdded, - ownFocus, - onClick: handleHoverActionClicked, - showTooltip: enableOverflowButton ? false : true, - value: values, - dataViewId, - })} -
- ) : null, - toggleColumn && !shouldDisableColumnToggle ? ( -
- {getColumnToggleButton({ - Component: enableOverflowButton ? EuiContextMenuItem : undefined, - field, - isDisabled: isObjectArray && dataType !== 'geo_point', - isObjectArray, - keyboardEvent: stKeyboardEvent, - ownFocus, - onClick: handleHoverActionClicked, - showTooltip: enableOverflowButton ? false : true, - toggleColumn, - value: values, - })} -
- ) : null, - values != null && (draggableId != null || !isEmpty(dataProvider)) && !hideAddToTimeline ? ( -
- {getAddToTimelineButton({ - Component: enableOverflowButton ? EuiContextMenuItem : undefined, - dataProvider, - draggableId, - field, - keyboardEvent: stKeyboardEvent, - ownFocus, - onClick: onAddToTimelineClicked, - showTooltip: enableOverflowButton ? false : true, - value: values, - })} -
- ) : null, - allowTopN({ - fieldType, - isAggregatable, - fieldName: field, - hideTopN, - }) - ? showTopNBtn - : null, - field != null ? ( -
- {getCopyButton({ - Component: enableOverflowButton ? EuiContextMenuItem : undefined, - field, - isHoverAction: true, - keyboardEvent: stKeyboardEvent, - ownFocus, - onClick: handleHoverActionClicked, - showTooltip: enableOverflowButton ? false : true, - value: values, - })} -
- ) : null, - ].filter((item) => { - return item != null; - }), - [ - dataProvider, - dataType, - defaultFocusedButtonRef, - draggableId, - enableOverflowButton, - field, - fieldType, - isAggregatable, - filterManager, - getAddToTimelineButton, - getColumnToggleButton, - getCopyButton, - getFilterForValueButton, - getFilterOutValueButton, - handleHoverActionClicked, - onAddToTimelineClicked, - hideAddToTimeline, - hideTopN, - isObjectArray, - onFilterAdded, - ownFocus, - shouldDisableColumnToggle, - showFilters, - showTopNBtn, - stKeyboardEvent, - toggleColumn, - values, - dataViewId, - ] - ) as JSX.Element[]; + const allItems = useMemo(() => { + const startServices = { analytics, i18n, theme }; + return [ + showFilters ? ( +
+ {getFilterForValueButton({ + defaultFocusedButtonRef, + field, + filterManager, + keyboardEvent: stKeyboardEvent, + onClick: handleHoverActionClicked, + onFilterAdded, + ownFocus, + showTooltip: enableOverflowButton ? false : true, + value: values, + dataViewId, + })} +
+ ) : null, + showFilters ? ( +
+ {getFilterOutValueButton({ + field, + filterManager, + keyboardEvent: stKeyboardEvent, + onFilterAdded, + ownFocus, + onClick: handleHoverActionClicked, + showTooltip: enableOverflowButton ? false : true, + value: values, + dataViewId, + })} +
+ ) : null, + toggleColumn && !shouldDisableColumnToggle ? ( +
+ {getColumnToggleButton({ + Component: enableOverflowButton ? EuiContextMenuItem : undefined, + field, + isDisabled: isObjectArray && dataType !== 'geo_point', + isObjectArray, + keyboardEvent: stKeyboardEvent, + ownFocus, + onClick: handleHoverActionClicked, + showTooltip: enableOverflowButton ? false : true, + toggleColumn, + value: values, + })} +
+ ) : null, + values != null && (draggableId != null || !isEmpty(dataProvider)) && !hideAddToTimeline ? ( +
+ {getAddToTimelineButton({ + Component: enableOverflowButton ? EuiContextMenuItem : undefined, + dataProvider, + draggableId, + field, + keyboardEvent: stKeyboardEvent, + ownFocus, + onClick: onAddToTimelineClicked, + showTooltip: enableOverflowButton ? false : true, + value: values, + startServices, + })} +
+ ) : null, + allowTopN({ + fieldType, + isAggregatable, + fieldName: field, + hideTopN, + }) + ? showTopNBtn + : null, + field != null ? ( +
+ {getCopyButton({ + Component: enableOverflowButton ? EuiContextMenuItem : undefined, + field, + isHoverAction: true, + keyboardEvent: stKeyboardEvent, + ownFocus, + onClick: handleHoverActionClicked, + showTooltip: enableOverflowButton ? false : true, + value: values, + })} +
+ ) : null, + ].filter((item) => { + return item != null; + }); + }, [ + dataProvider, + dataType, + defaultFocusedButtonRef, + draggableId, + enableOverflowButton, + field, + fieldType, + isAggregatable, + filterManager, + getAddToTimelineButton, + getColumnToggleButton, + getCopyButton, + getFilterForValueButton, + getFilterOutValueButton, + handleHoverActionClicked, + onAddToTimelineClicked, + hideAddToTimeline, + hideTopN, + isObjectArray, + onFilterAdded, + ownFocus, + shouldDisableColumnToggle, + showFilters, + showTopNBtn, + stKeyboardEvent, + toggleColumn, + values, + dataViewId, + analytics, + i18n, + theme, + ]) as JSX.Element[]; const overflowActionItems = useMemo( () => diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx index 4b88b5cca19ab..b6be02ccdad53 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/use_update_data_view.test.tsx @@ -29,8 +29,8 @@ jest.mock('../../lib/kibana', () => { useKibana: () => mockedUseKibana, }; }); -jest.mock('@kbn/kibana-react-plugin/public', () => { - const original = jest.requireActual('@kbn/kibana-react-plugin/public'); +jest.mock('@kbn/react-kibana-mount', () => { + const original = jest.requireActual('@kbn/react-kibana-mount'); return { ...original, diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx index eb218e626f176..88b58e46adbf8 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.test.tsx @@ -664,6 +664,34 @@ describe('Sourcerer Hooks', () => { expect(result.current.indexPattern).toHaveProperty('getName'); }); }); + + it('should update the title of the data view according to the selected patterns', async () => { + const { result, rerender } = renderHook( + () => useSourcererDataView(), + { + wrapper: ({ children }) => {children}, + } + ); + + expect(result.current.sourcererDataView?.title).toBe( + 'apm-*-transaction*,auditbeat-*,endgame-*,filebeat-*,logs-*,packetbeat-*,traces-apm*,winlogbeat-*,-*elastic-cloud-logs-*' + ); + + const testPatterns = ['anotherTestPattern', 'justATestPattern']; + await act(async () => { + store.dispatch( + sourcererActions.setSelectedDataView({ + id: SourcererScopeName.default, + selectedDataViewId: 'security-solution-default', + selectedPatterns: testPatterns, + }) + ); + + await rerender(); + + expect(result.current.sourcererDataView?.title).toBe(testPatterns.join(',')); + }); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx index 0a8985d5bfb86..6ae176890291d 100644 --- a/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/containers/sourcerer/index.tsx @@ -445,11 +445,18 @@ export const useSourcererDataView = ( } }, [missingPatterns, selectedDataView, selectedPatterns]); - const sourcererDataView = useMemo( - () => - selectedDataView == null || missingPatterns.length > 0 ? legacyDataView : selectedDataView, - [legacyDataView, missingPatterns.length, selectedDataView] - ); + const sourcererDataView = useMemo(() => { + const _dv = + selectedDataView == null || missingPatterns.length > 0 ? legacyDataView : selectedDataView; + // Make sure the title is up to date, so that the correct index patterns are used everywhere + return { + ..._dv, + dataView: { + ..._dv.dataView, + title: selectedPatterns.join(','), + }, + }; + }, [legacyDataView, missingPatterns.length, selectedDataView, selectedPatterns]); const indicesExist = useMemo(() => { if (loading || sourcererDataView.loading) { diff --git a/x-pack/plugins/security_solution/public/common/hooks/esql/use_esql_availability.ts b/x-pack/plugins/security_solution/public/common/hooks/esql/use_esql_availability.ts index 41fc7084b32bf..3e9bdb658c3e1 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/esql/use_esql_availability.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/esql/use_esql_availability.ts @@ -18,17 +18,19 @@ import { useIsExperimentalFeatureEnabled } from '../use_experimental_features'; export const useEsqlAvailability = () => { const { uiSettings } = useKibana().services; const isEsqlAdvancedSettingEnabled = uiSettings?.get(ENABLE_ESQL); + + const isTimelineEsqlFeatureFlagDisabled = + useIsExperimentalFeatureEnabled('timelineEsqlTabDisabled'); + const isEsqlRuleTypeEnabled = !useIsExperimentalFeatureEnabled('esqlRulesDisabled') && isEsqlAdvancedSettingEnabled; - const isESQLTabInTimelineEnabled = - !useIsExperimentalFeatureEnabled('timelineEsqlTabDisabled') && isEsqlAdvancedSettingEnabled; return useMemo( () => ({ isEsqlAdvancedSettingEnabled, isEsqlRuleTypeEnabled, - isESQLTabInTimelineEnabled, + isTimelineEsqlEnabledByFeatureFlag: !isTimelineEsqlFeatureFlagDisabled, }), - [isESQLTabInTimelineEnabled, isEsqlAdvancedSettingEnabled, isEsqlRuleTypeEnabled] + [isEsqlAdvancedSettingEnabled, isTimelineEsqlFeatureFlagDisabled, isEsqlRuleTypeEnabled] ); }; diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_inspect_query.test.tsx b/x-pack/plugins/security_solution/public/common/hooks/use_inspect_query.test.tsx deleted file mode 100644 index 1bf2de3242ac7..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_inspect_query.test.tsx +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { renderHook } from '@testing-library/react-hooks'; -import { useInspectQuery } from './use_inspect_query'; - -import { useGlobalTime } from '../containers/use_global_time'; - -jest.mock('../containers/use_global_time'); - -const QUERY_ID = 'tes_query_id'; - -const RESPONSE = { - inspect: { dsl: [], response: [] }, - isPartial: false, - isRunning: false, - total: 0, - loaded: 0, - rawResponse: { - took: 0, - timed_out: false, - _shards: { - total: 0, - successful: 0, - failed: 0, - skipped: 0, - }, - results: { - hits: { - total: 0, - }, - }, - hits: { - total: 0, - max_score: 0, - hits: [], - }, - }, - totalCount: 0, - enrichments: [], -}; - -describe('useInspectQuery', () => { - let deleteQuery: jest.Mock; - let setQuery: jest.Mock; - - beforeEach(() => { - deleteQuery = jest.fn(); - setQuery = jest.fn(); - (useGlobalTime as jest.Mock).mockImplementation(() => ({ - deleteQuery, - setQuery, - isInitializing: false, - })); - }); - - it('it calls setQuery', () => { - renderHook(() => useInspectQuery(QUERY_ID, false, RESPONSE)); - - expect(setQuery).toHaveBeenCalledTimes(1); - expect(setQuery.mock.calls[0][0].id).toBe(QUERY_ID); - }); - - it("doesn't call setQuery when response is undefined", () => { - renderHook(() => useInspectQuery(QUERY_ID, false, undefined)); - - expect(setQuery).not.toHaveBeenCalled(); - }); - - it("doesn't call setQuery when loading", () => { - renderHook(() => useInspectQuery(QUERY_ID, true)); - - expect(setQuery).not.toHaveBeenCalled(); - }); - - it('calls deleteQuery when unmouting', () => { - const result = renderHook(() => useInspectQuery(QUERY_ID, false, RESPONSE)); - result.unmount(); - - expect(deleteQuery).toHaveBeenCalledWith({ id: QUERY_ID }); - }); -}); diff --git a/x-pack/plugins/security_solution/public/common/hooks/use_inspect_query.ts b/x-pack/plugins/security_solution/public/common/hooks/use_inspect_query.ts deleted file mode 100644 index 4c0cb1c4fcdca..0000000000000 --- a/x-pack/plugins/security_solution/public/common/hooks/use_inspect_query.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { noop } from 'lodash'; -import { useEffect } from 'react'; -import type { FactoryQueryTypes, StrategyResponseType } from '../../../common/search_strategy'; -import { getInspectResponse } from '../../helpers'; -import { useGlobalTime } from '../containers/use_global_time'; -import type { Refetch, RefetchKql } from '../store/inputs/model'; - -/** - * Add and remove query response from global input store. - */ -export const useInspectQuery = ( - id: string, - loading: boolean, - response?: StrategyResponseType, - refetch: Refetch | RefetchKql = noop -) => { - const { deleteQuery, setQuery, isInitializing } = useGlobalTime(); - - useEffect(() => { - if (!loading && !isInitializing && response?.inspect) { - setQuery({ - id, - inspect: getInspectResponse(response, { - dsl: [], - response: [], - }), - loading, - refetch, - }); - } - - return () => { - if (deleteQuery) { - deleteQuery({ id }); - } - }; - }, [deleteQuery, setQuery, loading, response, isInitializing, id, refetch]); -}; diff --git a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts index d3aa07d0f6cda..f20679d68884c 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kibana/kibana_react.mock.ts @@ -14,7 +14,6 @@ import { coreMock, themeServiceMock } from '@kbn/core/public/mocks'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { securityMock } from '@kbn/security-plugin/public/mocks'; -import { createFilterManagerMock } from '@kbn/data-plugin/public/query/filter_manager/filter_manager.mock'; import { DEFAULT_APP_REFRESH_INTERVAL, @@ -128,7 +127,7 @@ export const createStartServicesMock = ( const guidedOnboarding = guidedOnboardingMock.createStart(); const cloud = cloudMock.createStart(); const mockSetHeaderActionMenu = jest.fn(); - const mockTimelineFilterManager = createFilterManagerMock(); + const timelineDataService = dataPluginMock.createStartContract(); const alerting = alertingPluginMock.createStartContract(); /* @@ -136,17 +135,17 @@ export const createStartServicesMock = ( * when data service is passed through as a prop * * */ - data.query.timefilter.timefilter.getAbsoluteTime = jest.fn(() => ({ + timelineDataService.query.timefilter.timefilter.getAbsoluteTime = jest.fn(() => ({ from: '2021-08-31T22:00:00.000Z', to: '2022-09-01T09:16:29.553Z', })); - data.query.timefilter.timefilter.getTime = jest.fn(() => { + timelineDataService.query.timefilter.timefilter.getTime = jest.fn(() => { return { from: 'now-15m', to: 'now' }; }); - data.query.timefilter.timefilter.getRefreshInterval = jest.fn(() => { + timelineDataService.query.timefilter.timefilter.getRefreshInterval = jest.fn(() => { return { pause: true, value: 1000 }; }); - data.query.timefilter.timefilter.calculateBounds = jest.fn(calculateBounds); + timelineDataService.query.timefilter.timefilter.calculateBounds = jest.fn(calculateBounds); /** ************************************************* */ return { @@ -251,7 +250,7 @@ export const createStartServicesMock = ( fieldFormats: fieldFormatsMock, dataViewFieldEditor: indexPatternFieldEditorPluginMock.createStartContract(), upselling: new UpsellingService(), - timelineFilterManager: mockTimelineFilterManager, + timelineDataService, alerting, } as unknown as StartServices; }; diff --git a/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts b/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts index 487917f381b9b..5018abe6bdf62 100644 --- a/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts +++ b/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts @@ -231,6 +231,12 @@ export const convertToBuildEsQuery = ({ } }; +export interface CombinedQuery { + filterQuery: string | undefined; + kqlError: Error | undefined; + baseKqlQuery: Query; +} + export const combineQueries = ({ config, dataProviders = [], @@ -239,7 +245,7 @@ export const combineQueries = ({ filters = [], kqlQuery, kqlMode, -}: CombineQueries): { filterQuery: string | undefined; kqlError: Error | undefined } | null => { +}: CombineQueries): CombinedQuery | null => { const kuery: Query = { query: '', language: kqlQuery.language }; if (isDataProviderEmpty(dataProviders) && isEmpty(kqlQuery.query) && isEmpty(filters)) { return null; @@ -254,6 +260,7 @@ export const combineQueries = ({ return { filterQuery, kqlError, + baseKqlQuery: kuery, }; } @@ -281,5 +288,6 @@ export const combineQueries = ({ return { filterQuery, kqlError, + baseKqlQuery: kuery, }; }; diff --git a/x-pack/plugins/security_solution/public/common/translations.ts b/x-pack/plugins/security_solution/public/common/translations.ts index ee0172e01b281..126aa4eabe3b0 100644 --- a/x-pack/plugins/security_solution/public/common/translations.ts +++ b/x-pack/plugins/security_solution/public/common/translations.ts @@ -15,6 +15,13 @@ export const SOLUTION_NAME = i18n.translate('xpack.securitySolution.pages.common defaultMessage: 'Security', }); +export const ASSISTANT_MANAGEMENT_TITLE = i18n.translate( + 'xpack.securitySolution.securityAiAssistantManagement.app.title', + { + defaultMessage: 'AI Assistant for Security', + } +); + export const BETA = i18n.translate('xpack.securitySolution.pages.common.beta', { defaultMessage: 'Beta', }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx index 553abf36e2d5c..f16a2c98311ff 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/investigate_in_resolver.tsx @@ -17,10 +17,12 @@ export const useIsInvestigateInResolverActionEnabled = (ecsData?: Ecs) => { const crowdstrikeDataInAnalyzerEnabled = useIsExperimentalFeatureEnabled( 'crowdstrikeDataInAnalyzerEnabled' ); + const jamfDataInAnalyzerEnabled = useIsExperimentalFeatureEnabled('jamfDataInAnalyzerEnabled'); return useMemo(() => { const fileBeatModules = [ ...(sentinelOneDataInAnalyzerEnabled ? ['sentinel_one_cloud_funnel', 'sentinel_one'] : []), ...(crowdstrikeDataInAnalyzerEnabled ? ['crowdstrike'] : []), + ...(jamfDataInAnalyzerEnabled ? ['jamf_protect'] : []), ] as const; const agentType = get(['agent', 'type', 0], ecsData); @@ -40,5 +42,10 @@ export const useIsInvestigateInResolverActionEnabled = (ecsData?: Ecs) => { processEntityIds != null && processEntityIds.length === 1 && firstProcessEntityId !== ''; return isAcceptedAgentType && hasProcessEntityId; - }, [crowdstrikeDataInAnalyzerEnabled, ecsData, sentinelOneDataInAnalyzerEnabled]); + }, [ + crowdstrikeDataInAnalyzerEnabled, + ecsData, + sentinelOneDataInAnalyzerEnabled, + jamfDataInAnalyzerEnabled, + ]); }; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts index fb14efde91a26..225ae72c57616 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts @@ -6,6 +6,10 @@ */ import { useMemo } from 'react'; +import type { + RiskScoresEntityCalculationRequest, + RiskScoresEntityCalculationResponse, +} from '../../../common/api/entity_analytics/risk_engine/entity_calculation_route.gen'; import type { AssetCriticalityCsvUploadResponse } from '../../../common/entity_analytics/asset_criticality/types'; import type { AssetCriticalityRecord } from '../../../common/api/entity_analytics/asset_criticality'; import type { RiskScoreEntity } from '../../../common/search_strategy'; @@ -21,6 +25,7 @@ import { RISK_SCORE_INDEX_STATUS_API_URL, RISK_ENGINE_SETTINGS_URL, ASSET_CRITICALITY_CSV_UPLOAD_URL, + RISK_SCORE_ENTITY_CALCULATION_URL, } from '../../../common/constants'; import type { @@ -97,6 +102,17 @@ export const useEntityAnalyticsRoutes = () => { method: 'POST', }); + /** + * Calculate and stores risk score for an entity + */ + const calculateEntityRiskScore = (params: RiskScoresEntityCalculationRequest) => { + return http.fetch(RISK_SCORE_ENTITY_CALCULATION_URL, { + version: '1', + method: 'POST', + body: JSON.stringify(params), + }); + }; + /** * Get risk engine privileges */ @@ -119,7 +135,9 @@ export const useEntityAnalyticsRoutes = () => { * Create asset criticality */ const createAssetCriticality = async ( - params: Pick + params: Pick & { + refresh?: 'wait_for'; + } ): Promise => http.fetch(ASSET_CRITICALITY_URL, { version: '1', @@ -128,16 +146,17 @@ export const useEntityAnalyticsRoutes = () => { id_value: params.idValue, id_field: params.idField, criticality_level: params.criticalityLevel, + refresh: params.refresh, }), }); const deleteAssetCriticality = async ( - params: Pick + params: Pick & { refresh?: 'wait_for' } ): Promise<{ deleted: true }> => { await http.fetch(ASSET_CRITICALITY_URL, { version: '1', method: 'DELETE', - query: { id_value: params.idValue, id_field: params.idField }, + query: { id_value: params.idValue, id_field: params.idField, refresh: params.refresh }, }); // spoof a response to allow us to better distnguish a delete from a create in use_asset_criticality.ts @@ -219,6 +238,7 @@ export const useEntityAnalyticsRoutes = () => { uploadAssetCriticalityFile, getRiskScoreIndexStatus, fetchRiskEngineSettings, + calculateEntityRiskScore, }; }, [http]); }; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_calculate_entity_risk_score.test.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_calculate_entity_risk_score.test.ts new file mode 100644 index 0000000000000..106fb9404372d --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_calculate_entity_risk_score.test.ts @@ -0,0 +1,103 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { act, renderHook } from '@testing-library/react-hooks'; +import { TestProviders } from '../../../common/mock'; +import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { useCalculateEntityRiskScore } from './use_calculate_entity_risk_score'; +import { RiskEngineStatus } from '../../../../common/entity_analytics/risk_engine'; +import { waitFor } from '@testing-library/react'; + +const enabledRiskEngineStatus = { + risk_engine_status: RiskEngineStatus.ENABLED, +}; +const disabledRiskEngineStatus = { + risk_engine_status: RiskEngineStatus.DISABLED, +}; + +const mockUseRiskEngineStatus = jest.fn(); +jest.mock('./use_risk_engine_status', () => ({ + useRiskEngineStatus: () => mockUseRiskEngineStatus(), +})); + +const mockCalculateEntityRiskScore = jest.fn(); +jest.mock('../api', () => ({ + useEntityAnalyticsRoutes: () => ({ + calculateEntityRiskScore: mockCalculateEntityRiskScore, + }), +})); + +const mockAddError = jest.fn(); +jest.mock('../../../common/hooks/use_app_toasts', () => ({ + useAppToasts: jest.fn().mockReturnValue({ + addError: () => mockAddError(), + }), +})); + +const identifierType = RiskScoreEntity.user; +const identifier = 'test-user'; +const options = { + onSuccess: jest.fn(), +}; + +describe('useRiskScoreData', () => { + beforeEach(() => { + jest.clearAllMocks(); + mockUseRiskEngineStatus.mockReturnValue({ data: enabledRiskEngineStatus }); + mockCalculateEntityRiskScore.mockResolvedValue({}); + }); + + it('should call calculateEntityRiskScore API when the callback function is called', async () => { + const { result } = renderHook( + () => useCalculateEntityRiskScore(identifierType, identifier, options), + { wrapper: TestProviders } + ); + + await act(async () => { + result.current.calculateEntityRiskScore(); + + await waitFor(() => + expect(mockCalculateEntityRiskScore).toHaveBeenCalledWith( + expect.objectContaining({ + identifier_type: identifierType, + identifier, + }) + ) + ); + }); + }); + + it('should NOT call calculateEntityRiskScore API when risk engine is disabled', async () => { + mockUseRiskEngineStatus.mockReturnValue({ + data: disabledRiskEngineStatus, + }); + const { result } = renderHook( + () => useCalculateEntityRiskScore(identifierType, identifier, options), + { wrapper: TestProviders } + ); + + await act(async () => { + result.current.calculateEntityRiskScore(); + + await waitFor(() => expect(mockCalculateEntityRiskScore).not.toHaveBeenCalled()); + }); + }); + + it('should display a toast error when the API returns an error', async () => { + mockCalculateEntityRiskScore.mockRejectedValue({}); + const { result } = renderHook( + () => useCalculateEntityRiskScore(identifierType, identifier, options), + { wrapper: TestProviders } + ); + + await act(async () => { + result.current.calculateEntityRiskScore(); + + await waitFor(() => expect(mockAddError).toHaveBeenCalled()); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_calculate_entity_risk_score.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_calculate_entity_risk_score.ts new file mode 100644 index 0000000000000..ff1eb5c46a702 --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_calculate_entity_risk_score.ts @@ -0,0 +1,58 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useCallback } from 'react'; + +import { i18n } from '@kbn/i18n'; +import { useMutation } from '@tanstack/react-query'; +import { useEntityAnalyticsRoutes } from '../api'; +import { useAppToasts } from '../../../common/hooks/use_app_toasts'; +import { useRiskEngineStatus } from './use_risk_engine_status'; +import { RiskScoreEntity, RiskEngineStatus } from '../../../../common/entity_analytics/risk_engine'; + +export const useCalculateEntityRiskScore = ( + identifierType: RiskScoreEntity, + identifier: string, + { onSuccess }: { onSuccess: () => void } +) => { + const { addError } = useAppToasts(); + const { data: riskEngineStatus } = useRiskEngineStatus(); + const { calculateEntityRiskScore } = useEntityAnalyticsRoutes(); + + const onError = useCallback( + (error: unknown) => { + addError(error, { + title: i18n.translate('xpack.securitySolution.entityDetails.userPanel.error', { + defaultMessage: 'There was a problem calculating the {entity} risk score', + values: { entity: identifierType === RiskScoreEntity.host ? "host's" : "user's" }, + }), + }); + }, + [addError, identifierType] + ); + + const { mutate, isLoading, data } = useMutation(calculateEntityRiskScore, { + onSuccess, + onError, + }); + + const calculateEntityRiskScoreCb = useCallback(async () => { + if (riskEngineStatus?.risk_engine_status === RiskEngineStatus.ENABLED) { + mutate({ + identifier_type: identifierType, + identifier, + refresh: 'wait_for', + }); + } + }, [riskEngineStatus?.risk_engine_status, mutate, identifierType, identifier]); + + return { + isLoading, + calculateEntityRiskScore: calculateEntityRiskScoreCb, + data, + }; +}; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_refetch_overview_page_risk_score.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_refetch_overview_page_risk_score.ts new file mode 100644 index 0000000000000..bf0c3db69b53c --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_refetch_overview_page_risk_score.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TableId } from '@kbn/securitysolution-data-table'; +import { useCallback } from 'react'; +import type { Refetch } from '../../../common/types'; +import { useRefetchQueryById } from './use_refetch_query_by_id'; + +export const useRefetchOverviewPageRiskScore = (overviewRiskScoreQueryId: string) => { + const refetchOverviewRiskScore = useRefetchQueryById(overviewRiskScoreQueryId); + const refetchAlertsRiskInputs = useRefetchQueryById(TableId.alertsRiskInputs); + + const refetchRiskScore = useCallback(() => { + if (refetchOverviewRiskScore) { + (refetchOverviewRiskScore as Refetch)(); + } + + if (refetchAlertsRiskInputs) { + (refetchAlertsRiskInputs as Refetch)(); + } + }, [refetchAlertsRiskInputs, refetchOverviewRiskScore]); + return refetchRiskScore; +}; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_refetch_query_by_id.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_refetch_query_by_id.ts new file mode 100644 index 0000000000000..331855560da7c --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_refetch_query_by_id.ts @@ -0,0 +1,16 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo } from 'react'; +import { useDeepEqualSelector } from '../../../common/hooks/use_selector'; +import { inputsSelectors } from '../../../common/store'; + +export const useRefetchQueryById = (QueryId: string) => { + const getGlobalQuery = useMemo(() => inputsSelectors.globalQueryByIdSelector(), []); + const { refetch } = useDeepEqualSelector((state) => getGlobalQuery(state, QueryId)); + return refetch; +}; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/common/utils.ts b/x-pack/plugins/security_solution/public/entity_analytics/common/utils.ts index 69080b13631e3..3756780e18ae6 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/common/utils.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/common/utils.ts @@ -63,3 +63,8 @@ export enum HostRiskScoreQueryId { */ export const formatRiskScore = (riskScore: number) => (Math.round(riskScore * 100) / 100).toFixed(2); + +export const FIRST_RECORD_PAGINATION = { + cursorStart: 0, + querySize: 1, +}; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/asset_criticality_selector.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/asset_criticality_selector.tsx index 587ef695ff94c..e29dca9d48f3d 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/asset_criticality_selector.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/asset_criticality_selector.tsx @@ -39,10 +39,14 @@ import { PICK_ASSET_CRITICALITY } from './translations'; import { AssetCriticalityBadge } from './asset_criticality_badge'; import type { Entity, State } from './use_asset_criticality'; import { useAssetCriticalityData, useAssetCriticalityPrivileges } from './use_asset_criticality'; -import type { CriticalityLevelWithUnassigned } from '../../../../common/entity_analytics/asset_criticality/types'; +import type { + CriticalityLevel, + CriticalityLevelWithUnassigned, +} from '../../../../common/entity_analytics/asset_criticality/types'; interface Props { entity: Entity; + onChange?: () => void; } const AssetCriticalitySelectorComponent: React.FC<{ criticality: State; @@ -52,6 +56,15 @@ const AssetCriticalitySelectorComponent: React.FC<{ const [visible, toggleModal] = useToggle(false); const sFontSize = useEuiFontSize('s').fontSize; + const onSave = (value: CriticalityLevelWithUnassigned) => { + criticality.mutation.mutate({ + criticalityLevel: value, + idField: `${entity.type}.name`, + idValue: entity.name, + }); + toggleModal(false); + }; + return ( <> {criticality.query.isLoading || criticality.mutation.isLoading ? ( @@ -121,7 +134,11 @@ const AssetCriticalitySelectorComponent: React.FC<{
)} {visible ? ( - + ) : null} ); @@ -130,12 +147,13 @@ const AssetCriticalitySelectorComponent: React.FC<{ export const AssetCriticalitySelector = React.memo(AssetCriticalitySelectorComponent); AssetCriticalitySelector.displayName = 'AssetCriticalitySelector'; -const AssetCriticalityAccordionComponent: React.FC = ({ entity }) => { +const AssetCriticalityAccordionComponent: React.FC = ({ entity, onChange }) => { const { euiTheme } = useEuiTheme(); const privileges = useAssetCriticalityPrivileges(entity.name); const criticality = useAssetCriticalityData({ entity, enabled: !!privileges.data?.has_read_permissions, + onChange, }); if (privileges.isLoading || !privileges.data?.has_read_permissions) { @@ -191,15 +209,19 @@ export const AssetCriticalityTitle = () => ( ); interface ModalProps { - criticality: State; + initialCriticalityLevel: CriticalityLevel | undefined; toggle: (nextValue: boolean) => void; - entity: Entity; + onSave: (value: CriticalityLevelWithUnassigned) => void; } -const AssetCriticalityModal: React.FC = ({ criticality, entity, toggle }) => { +const AssetCriticalityModal: React.FC = ({ + initialCriticalityLevel, + toggle, + onSave, +}) => { const basicSelectId = useGeneratedHtmlId({ prefix: 'basicSelect' }); const [value, setNewValue] = useState( - criticality.query.data?.criticality_level ?? 'unassigned' + initialCriticalityLevel ?? 'unassigned' ); return ( @@ -228,14 +250,7 @@ const AssetCriticalityModal: React.FC = ({ criticality, entity, togg { - criticality.mutation.mutate({ - criticalityLevel: value, - idField: `${entity.type}.name`, - idValue: entity.name, - }); - toggle(false); - }} + onClick={() => onSave(value)} fill data-test-subj="asset-criticality-modal-save-btn" > diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/use_asset_criticality.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/use_asset_criticality.ts index 403ca5c656bf0..c56b394236326 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/use_asset_criticality.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality/use_asset_criticality.ts @@ -46,9 +46,11 @@ export const useAssetCriticalityPrivileges = ( export const useAssetCriticalityData = ({ entity, enabled = true, + onChange, }: { entity: Entity; enabled?: boolean; + onChange?: () => void; }): State => { const QC = useQueryClient(); const QUERY_KEY = [ASSET_CRITICALITY_KEY, entity.name]; @@ -71,18 +73,24 @@ export const useAssetCriticalityData = ({ >({ mutationFn: (params: Params) => { if (params.criticalityLevel === 'unassigned') { - return deleteAssetCriticality({ idField: params.idField, idValue: params.idValue }); + return deleteAssetCriticality({ + idField: params.idField, + idValue: params.idValue, + refresh: 'wait_for', + }); } return createAssetCriticality({ idField: params.idField, idValue: params.idValue, criticalityLevel: params.criticalityLevel, + refresh: 'wait_for', }); }, onSuccess: (data) => { const queryData = 'deleted' in data ? null : data; QC.setQueryData(QUERY_KEY, queryData); + onChange?.(); }, }); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx index a1e3807c80fc5..6b632a8269365 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs.test.tsx @@ -49,6 +49,12 @@ const riskScore = { }, }; +const riskScoreWithAssetCriticalityContribution = (contribution: number) => { + const score = JSON.parse(JSON.stringify(riskScore)); + score.user.risk.category_2_score = contribution; + return score; +}; + describe('RiskInputsTab', () => { beforeEach(() => { jest.clearAllMocks(); @@ -117,6 +123,62 @@ describe('RiskInputsTab', () => { expect(queryByTestId('risk-input-contexts-title')).toBeInTheDocument(); }); + it('Displays 0.00 for the asset criticality contribution if the contribution value is less than -0.01', () => { + mockUseUiSetting.mockReturnValue([true]); + + mockUseRiskScore.mockReturnValue({ + loading: false, + error: false, + data: [riskScoreWithAssetCriticalityContribution(-0.0000001)], + }); + + const { getByTestId } = render( + + + + ); + const contextsTable = getByTestId('risk-input-contexts-table'); + expect(contextsTable).not.toHaveTextContent('-0.00'); + expect(contextsTable).toHaveTextContent('0.00'); + }); + + it('Displays 0.00 for the asset criticality contribution if the contribution value is less than 0.01', () => { + mockUseUiSetting.mockReturnValue([true]); + + mockUseRiskScore.mockReturnValue({ + loading: false, + error: false, + data: [riskScoreWithAssetCriticalityContribution(0.0000001)], + }); + + const { getByTestId } = render( + + + + ); + const contextsTable = getByTestId('risk-input-contexts-table'); + expect(contextsTable).not.toHaveTextContent('+0.00'); + expect(contextsTable).toHaveTextContent('0.00'); + }); + + it('Adds a plus to positive asset criticality contribution scores', () => { + mockUseUiSetting.mockReturnValue([true]); + + mockUseRiskScore.mockReturnValue({ + loading: false, + error: false, + data: [riskScoreWithAssetCriticalityContribution(2.22)], + }); + + const { getByTestId } = render( + + + + ); + + expect(getByTestId('risk-input-contexts-table')).toHaveTextContent('+2.22'); + }); + it('shows extra alerts contribution message', () => { const alerts = times( (number) => ({ diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx index bcf83d2cd9ad3..48f004cbd7069 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab.tsx @@ -14,6 +14,9 @@ import { useUiSetting$ } from '@kbn/kibana-react-plugin/public'; import { ALERT_RULE_NAME } from '@kbn/rule-data-utils'; import { get } from 'lodash/fp'; +import { useGlobalTime } from '../../../../../common/containers/use_global_time'; +import { useQueryInspector } from '../../../../../common/components/page/manage_query'; +import { formatRiskScore } from '../../../../common'; import type { InputAlert, UseRiskContributingAlertsResult, @@ -44,7 +47,10 @@ const FIRST_RECORD_PAGINATION = { querySize: 1, }; +export const RISK_INPUTS_TAB_QUERY_ID = 'RiskInputsTabQuery'; + export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) => { + const { setQuery, deleteQuery } = useGlobalTime(); const [selectedItems, setSelectedItems] = useState([]); const nameFilterQuery = useMemo(() => { @@ -59,6 +65,8 @@ export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) => data: riskScoreData, error: riskScoreError, loading: loadingRiskScore, + inspect: inspectRiskScore, + refetch, } = useRiskScore({ riskEntity: entityType, filterQuery: nameFilterQuery, @@ -67,6 +75,15 @@ export const RiskInputsTab = ({ entityType, entityName }: RiskInputsTabProps) => skip: nameFilterQuery === undefined, }); + useQueryInspector({ + deleteQuery, + inspect: inspectRiskScore, + loading: loadingRiskScore, + queryId: RISK_INPUTS_TAB_QUERY_ID, + refetch, + setQuery, + }); + const riskScore = riskScoreData && riskScoreData.length > 0 ? riskScoreData[0] : undefined; const alerts = useRiskContributingAlerts({ riskScore }); @@ -242,6 +259,7 @@ const ContextsSection: React.FC<{ = ({ riskScore, aler ); }; -const formatContribution = (value: number) => - value > 0 ? `+${value.toFixed(2)}` : value.toFixed(2); +const formatContribution = (value: number): string => { + const fixedValue = formatRiskScore(value); + + // prevent +0.00 for values like 0.0001 + if (fixedValue === '0.00') { + return fixedValue; + } + + if (value > 0) { + return `+${fixedValue}`; + } + + return fixedValue; +}; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.stories.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.stories.tsx index cece761cd9d6f..b48629cbbe26f 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.stories.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.stories.tsx @@ -26,6 +26,7 @@ export const Default: Story = () => { openDetailsPanel={() => {}} riskScoreData={{ ...mockRiskScoreState, data: [] }} queryId={'testQuery'} + recalculatingScore={false} />
diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.test.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.test.tsx index c7debcdbdc965..56a84c340dee3 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.test.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.test.tsx @@ -49,6 +49,7 @@ describe('RiskSummary', () => { riskScoreData={mockHostRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -79,6 +80,7 @@ describe('RiskSummary', () => { riskScoreData={mockHostRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -110,12 +112,28 @@ describe('RiskSummary', () => { riskScoreData={{ ...mockHostRiskScoreState, data: undefined }} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); expect(getByTestId('risk-summary-table')).toBeInTheDocument(); }); + it('risk summary header does not render link when riskScoreData is loading', () => { + const { queryByTestId } = render( + + {}} + recalculatingScore={false} + /> + + ); + + expect(queryByTestId('riskInputsTitleLink')).not.toBeInTheDocument(); + }); + it('renders visualization embeddable', () => { const { getByTestId } = render( @@ -123,6 +141,7 @@ describe('RiskSummary', () => { riskScoreData={mockHostRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -137,6 +156,7 @@ describe('RiskSummary', () => { riskScoreData={mockHostRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -151,6 +171,7 @@ describe('RiskSummary', () => { riskScoreData={mockHostRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -177,6 +198,7 @@ describe('RiskSummary', () => { riskScoreData={mockHostRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -198,6 +220,7 @@ describe('RiskSummary', () => { riskScoreData={mockUserRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); @@ -219,6 +242,7 @@ describe('RiskSummary', () => { riskScoreData={mockUserRiskScoreState} queryId={'testQuery'} openDetailsPanel={() => {}} + recalculatingScore={false} /> ); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.tsx index dc3471d46254c..b7a88353ddd4a 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_summary_flyout/risk_summary.tsx @@ -49,12 +49,14 @@ import { export interface RiskSummaryProps { riskScoreData: RiskScoreState; + recalculatingScore: boolean; queryId: string; openDetailsPanel: (tab: EntityDetailsLeftPanelTab) => void; } const RiskSummaryComponent = ({ riskScoreData, + recalculatingScore, queryId, openDetailsPanel, }: RiskSummaryProps) => { @@ -119,11 +121,13 @@ const RiskSummaryComponent = ({ [entityData?.name, riskData] ); + const riskDataTimestamp = riskData?.['@timestamp']; const timerange = useMemo(() => { const from = dateMath.parse(LAST_30_DAYS.from)?.toISOString() ?? LAST_30_DAYS.from; const to = dateMath.parse(LAST_30_DAYS.to)?.toISOString() ?? LAST_30_DAYS.to; return { from, to }; - }, []); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [riskDataTimestamp]); // Update the timerange whenever the risk score timestamp changes to include new entries return ( ({ defaultMessage="View risk contributions" /> ), - link: { - callback: () => openDetailsPanel(EntityDetailsLeftPanelTab.RISK_INPUTS), - tooltip: ( - - ), - }, + link: riskScoreData.loading + ? undefined + : { + callback: () => openDetailsPanel(EntityDetailsLeftPanelTab.RISK_INPUTS), + tooltip: ( + + ), + }, iconType: 'arrowStart', }} expand={{ @@ -265,6 +271,7 @@ const RiskSummaryComponent = ({ columns={columns} items={rows} compressed + loading={riskScoreData.loading || recalculatingScore} />
diff --git a/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx index 08260caa4eb91..dda6437ba783d 100644 --- a/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/hosts/pages/details/index.tsx @@ -20,6 +20,7 @@ import type { Filter } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { tableDefaults, dataTableSelectors, TableId } from '@kbn/securitysolution-data-table'; +import { useCalculateEntityRiskScore } from '../../../../entity_analytics/api/hooks/use_calculate_entity_risk_score'; import { useAssetCriticalityData, useAssetCriticalityPrivileges, @@ -33,7 +34,7 @@ import { useSignalIndex } from '../../../../detections/containers/detection_engi import { useAlertsPrivileges } from '../../../../detections/containers/detection_engine/alerts/use_alerts_privileges'; import { InputsModelId } from '../../../../common/store/inputs/constants'; import type { HostItem } from '../../../../../common/search_strategy'; -import { LastEventIndexKey } from '../../../../../common/search_strategy'; +import { LastEventIndexKey, RiskScoreEntity } from '../../../../../common/search_strategy'; import { SecurityPageName } from '../../../../app/types'; import { FiltersGlobal } from '../../../../common/components/filters_global'; import { HeaderPage } from '../../../../common/components/header_page'; @@ -44,7 +45,10 @@ import { hasMlUserPermissions } from '../../../../../common/machine_learning/has import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; import { TabNavigation } from '../../../../common/components/navigation/tab_navigation'; -import { HostOverview } from '../../../../overview/components/host_overview'; +import { + HostOverview, + HOST_OVERVIEW_RISK_SCORE_QUERY_ID, +} from '../../../../overview/components/host_overview'; import { SiemSearchBar } from '../../../../common/components/search_bar'; import { SecuritySolutionPageWrapper } from '../../../../common/components/page_wrapper'; import { useGlobalTime } from '../../../../common/containers/use_global_time'; @@ -75,6 +79,7 @@ import { AlertCountByRuleByStatus } from '../../../../common/components/alert_co import { useLicense } from '../../../../common/hooks/use_license'; import { ResponderActionButton } from '../../../../detections/components/endpoint_responder/responder_action_button'; import { useHasSecurityCapability } from '../../../../helper_hooks'; +import { useRefetchOverviewPageRiskScore } from '../../../../entity_analytics/api/hooks/use_refetch_overview_page_risk_score'; const ES_HOST_FIELD = 'host.name'; const HostOverviewManage = manageQuery(HostOverview); @@ -175,12 +180,26 @@ const HostDetailsComponent: React.FC = ({ detailName, hostDeta [detailName] ); + const additionalFilters = useMemo( + () => (rawFilteredQuery ? [rawFilteredQuery] : []), + [rawFilteredQuery] + ); + const entity = useMemo(() => ({ type: 'host' as const, name: detailName }), [detailName]); const privileges = useAssetCriticalityPrivileges(entity.name); + + const refetchRiskScore = useRefetchOverviewPageRiskScore(HOST_OVERVIEW_RISK_SCORE_QUERY_ID); + const { calculateEntityRiskScore } = useCalculateEntityRiskScore( + RiskScoreEntity.host, + detailName, + { onSuccess: refetchRiskScore } + ); + const canReadAssetCriticality = !!privileges.data?.has_read_permissions; const criticality = useAssetCriticalityData({ entity, enabled: canReadAssetCriticality, + onChange: calculateEntityRiskScore, }); return ( @@ -259,14 +278,14 @@ const HostDetailsComponent: React.FC = ({ detailName, hostDeta
diff --git a/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx index f0356b9125dc3..f7e30dd47bf93 100644 --- a/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/network/pages/details/index.tsx @@ -124,6 +124,11 @@ const NetworkDetailsComponent: React.FC = () => { } }, [globalFilters, indexPattern, networkDetailsFilter, query, uiSettings]); + const additionalFilters = useMemo( + () => (rawFilteredQuery ? [rawFilteredQuery] : []), + [rawFilteredQuery] + ); + const stringifiedAdditionalFilters = JSON.stringify(rawFilteredQuery); useInvalidFilterQuery({ id: ID, @@ -226,14 +231,14 @@ const NetworkDetailsComponent: React.FC = () => {
diff --git a/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx b/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx index 88d9b260c8d38..4e61c7083d038 100644 --- a/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx +++ b/x-pack/plugins/security_solution/public/explore/users/pages/details/index.tsx @@ -20,6 +20,7 @@ import { getEsQueryConfig } from '@kbn/data-plugin/common'; import type { Filter } from '@kbn/es-query'; import { buildEsQuery } from '@kbn/es-query'; import { dataTableSelectors, TableId } from '@kbn/securitysolution-data-table'; +import { useCalculateEntityRiskScore } from '../../../../entity_analytics/api/hooks/use_calculate_entity_risk_score'; import { useAssetCriticalityData, useAssetCriticalityPrivileges, @@ -60,10 +61,13 @@ import { } from '../../../../common/hooks/use_selector'; import { useInvalidFilterQuery } from '../../../../common/hooks/use_invalid_filter_query'; import { LastEventTime } from '../../../../common/components/last_event_time'; -import { LastEventIndexKey } from '../../../../../common/search_strategy'; +import { LastEventIndexKey, RiskScoreEntity } from '../../../../../common/search_strategy'; import { AnomalyTableProvider } from '../../../../common/components/ml/anomaly/anomaly_table_provider'; -import { UserOverview } from '../../../../overview/components/user_overview'; +import { + UserOverview, + USER_OVERVIEW_RISK_SCORE_QUERY_ID, +} from '../../../../overview/components/user_overview'; import { useObservedUserDetails } from '../../containers/users/observed_details'; import { useQueryInspector } from '../../../../common/components/page/manage_query'; import { scoreIntervalToDateTime } from '../../../../common/components/ml/score/score_interval_to_datetime'; @@ -73,6 +77,7 @@ import { hasMlUserPermissions } from '../../../../../common/machine_learning/has import { useMlCapabilities } from '../../../../common/components/ml/hooks/use_ml_capabilities'; import { EmptyPrompt } from '../../../../common/components/empty_prompt'; import { useHasSecurityCapability } from '../../../../helper_hooks'; +import { useRefetchOverviewPageRiskScore } from '../../../../entity_analytics/api/hooks/use_refetch_overview_page_risk_score'; const QUERY_ID = 'UsersDetailsQueryId'; const ES_USER_FIELD = 'user.name'; @@ -180,10 +185,24 @@ const UsersDetailsComponent: React.FC = ({ const entity = useMemo(() => ({ type: 'user' as const, name: detailName }), [detailName]); const privileges = useAssetCriticalityPrivileges(entity.name); + + const refetchRiskScore = useRefetchOverviewPageRiskScore(USER_OVERVIEW_RISK_SCORE_QUERY_ID); + const { calculateEntityRiskScore } = useCalculateEntityRiskScore( + RiskScoreEntity.user, + detailName, + { onSuccess: refetchRiskScore } + ); + + const additionalFilters = useMemo( + () => (rawFilteredQuery ? [rawFilteredQuery] : []), + [rawFilteredQuery] + ); + const canReadAssetCriticality = !!privileges.data?.has_read_permissions; const criticality = useAssetCriticalityData({ entity, enabled: canReadAssetCriticality, + onChange: calculateEntityRiskScore, }); return ( @@ -250,14 +269,14 @@ const UsersDetailsComponent: React.FC = ({
diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.stories.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.stories.tsx index 4d998153cda1b..3bca4be245646 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.stories.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.stories.tsx @@ -35,6 +35,8 @@ storiesOf('Components/HostPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} hostName={'test-host-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )) .add('no observed data', () => ( @@ -58,6 +60,8 @@ storiesOf('Components/HostPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} hostName={'test-host-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )) .add('loading', () => ( @@ -81,5 +85,7 @@ storiesOf('Components/HostPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} hostName={'test-host-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )); diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.tsx index 64d5ea41898a0..a2d7b7b733ee0 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/content.tsx @@ -26,16 +26,20 @@ interface HostPanelContentProps { isDraggable: boolean; openDetailsPanel: (tab: EntityDetailsLeftPanelTab) => void; hostName: string; + onAssetCriticalityChange: () => void; + recalculatingScore: boolean; } export const HostPanelContent = ({ hostName, observedHost, riskScoreState, + recalculatingScore, contextID, scopeId, isDraggable, openDetailsPanel, + onAssetCriticalityChange, }: HostPanelContentProps) => { const observedFields = useObservedHostFields(observedHost); @@ -45,13 +49,17 @@ export const HostPanelContent = ({ <> )} - + { expect(getByTestId('securitySolutionFlyoutNavigationExpandDetailButton')).toBeInTheDocument(); }); - it('renders loading state when risk score is loading', () => { - mockedHostRiskScore.mockReturnValue({ - ...mockHostRiskScoreState, - data: undefined, - loading: true, - }); - - const { getByTestId } = render( - - - - ); - - expect(getByTestId('securitySolutionFlyoutLoading')).toBeInTheDocument(); - }); - it('renders loading state when observed host is loading', () => { mockedUseObservedHost.mockReturnValue({ ...mockObservedHostData, diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx index 3d649ad360cd0..2c58eb0eb324c 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/host_right/index.tsx @@ -9,6 +9,10 @@ import React, { useCallback, useMemo } from 'react'; import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import { useRefetchQueryById } from '../../../entity_analytics/api/hooks/use_refetch_query_by_id'; +import { RISK_INPUTS_TAB_QUERY_ID } from '../../../entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab'; +import type { Refetch } from '../../../common/types'; +import { useCalculateEntityRiskScore } from '../../../entity_analytics/api/hooks/use_calculate_entity_risk_score'; import { useKibana } from '../../../common/lib/kibana/kibana_react'; import { hostToCriteria } from '../../../common/components/ml/criteria/host_to_criteria'; import { useRiskScore } from '../../../entity_analytics/api/hooks/use_risk_score'; @@ -68,6 +72,18 @@ export const HostPanel = ({ contextID, scopeId, hostName, isDraggable }: HostPan const hostRiskData = hostRisk && hostRisk.length > 0 ? hostRisk[0] : undefined; const isRiskScoreExist = !!hostRiskData?.host.risk; + const refetchRiskInputsTab = useRefetchQueryById(RISK_INPUTS_TAB_QUERY_ID); + const refetchRiskScore = useCallback(() => { + refetch(); + (refetchRiskInputsTab as Refetch | null)?.(); + }, [refetch, refetchRiskInputsTab]); + + const { isLoading: recalculatingScore, calculateEntityRiskScore } = useCalculateEntityRiskScore( + RiskScoreEntity.host, + hostName, + { onSuccess: refetchRiskScore } + ); + useQueryInspector({ deleteQuery, inspect: inspectRiskScore, @@ -98,7 +114,7 @@ export const HostPanel = ({ contextID, scopeId, hostName, isDraggable }: HostPan const openDefaultPanel = useCallback(() => openTabPanel(), [openTabPanel]); const observedHost = useObservedHost(hostName); - if (riskScoreState.loading || observedHost.isLoading) { + if (observedHost.isLoading) { return ; } @@ -134,6 +150,8 @@ export const HostPanel = ({ contextID, scopeId, hostName, isDraggable }: HostPan scopeId={scopeId} isDraggable={!!isDraggable} openDetailsPanel={openTabPanel} + recalculatingScore={recalculatingScore} + onAssetCriticalityChange={calculateEntityRiskScore} /> ); diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.stories.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.stories.tsx index 64fa6dcd80913..57705099edc05 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.stories.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.stories.tsx @@ -39,6 +39,8 @@ storiesOf('Components/UserPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} userName={'test-user-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )) .add('integration disabled', () => ( @@ -55,6 +57,8 @@ storiesOf('Components/UserPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} userName={'test-user-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )) .add('no managed data', () => ( @@ -71,6 +75,8 @@ storiesOf('Components/UserPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} userName={'test-user-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )) .add('no observed data', () => ( @@ -107,6 +113,8 @@ storiesOf('Components/UserPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} userName={'test-user-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )) .add('loading', () => ( @@ -147,5 +155,7 @@ storiesOf('Components/UserPanelContent', module) isDraggable={false} openDetailsPanel={() => {}} userName={'test-user-name'} + onAssetCriticalityChange={() => {}} + recalculatingScore={false} /> )); diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.tsx index 7c40e4b30507f..46e5e9beaa3aa 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/content.tsx @@ -29,9 +29,11 @@ interface UserPanelContentProps { observedUser: ObservedEntityData; managedUser: ManagedUserData; riskScoreState: RiskScoreState; + recalculatingScore: boolean; contextID: string; scopeId: string; isDraggable: boolean; + onAssetCriticalityChange: () => void; openDetailsPanel: (tab: EntityDetailsLeftPanelTab) => void; } @@ -40,10 +42,12 @@ export const UserPanelContent = ({ observedUser, managedUser, riskScoreState, + recalculatingScore, contextID, scopeId, isDraggable, openDetailsPanel, + onAssetCriticalityChange, }: UserPanelContentProps) => { const observedFields = useObservedUserItems(observedUser); const isManagedUserEnable = useIsExperimentalFeatureEnabled('newUserDetailsFlyoutManagedUser'); @@ -54,13 +58,17 @@ export const UserPanelContent = ({ <> )} - + { expect(getByTestId('securitySolutionFlyoutNavigationExpandDetailButton')).toBeInTheDocument(); }); - it('renders loading state when risk score is loading', () => { - mockedUseRiskScore.mockReturnValue({ - ...mockRiskScoreState, - data: undefined, - loading: true, - }); - - const { getByTestId } = render( - - - - ); - - expect(getByTestId('securitySolutionFlyoutLoading')).toBeInTheDocument(); - }); - it('renders loading state when observed user is loading', () => { mockedUseObservedUser.mockReturnValue({ ...mockObservedUser, diff --git a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx index a342a1318bb24..3aac81f343016 100644 --- a/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/entity_details/user_right/index.tsx @@ -8,6 +8,10 @@ import React, { useCallback, useMemo } from 'react'; import type { FlyoutPanelProps } from '@kbn/expandable-flyout'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import { useRefetchQueryById } from '../../../entity_analytics/api/hooks/use_refetch_query_by_id'; +import type { Refetch } from '../../../common/types'; +import { RISK_INPUTS_TAB_QUERY_ID } from '../../../entity_analytics/components/entity_details_flyout/tabs/risk_inputs/risk_inputs_tab'; +import { useCalculateEntityRiskScore } from '../../../entity_analytics/api/hooks/use_calculate_entity_risk_score'; import { useKibana } from '../../../common/lib/kibana/kibana_react'; import { useRiskScore } from '../../../entity_analytics/api/hooks/use_risk_score'; import { ManagedUserDatasetKey } from '../../../../common/search_strategy/security_solution/users/managed_details'; @@ -70,6 +74,18 @@ export const UserPanel = ({ contextID, scopeId, userName, isDraggable }: UserPan const { data: userRisk } = riskScoreState; const userRiskData = userRisk && userRisk.length > 0 ? userRisk[0] : undefined; + const refetchRiskInputsTab = useRefetchQueryById(RISK_INPUTS_TAB_QUERY_ID); + const refetchRiskScore = useCallback(() => { + refetch(); + (refetchRiskInputsTab as Refetch | null)?.(); + }, [refetch, refetchRiskInputsTab]); + + const { isLoading: recalculatingScore, calculateEntityRiskScore } = useCalculateEntityRiskScore( + RiskScoreEntity.user, + userName, + { onSuccess: refetchRiskScore } + ); + useQueryInspector({ deleteQuery, inspect, @@ -108,7 +124,7 @@ export const UserPanel = ({ contextID, scopeId, userName, isDraggable }: UserPan !!managedUser.data?.[ManagedUserDatasetKey.OKTA] || !!managedUser.data?.[ManagedUserDatasetKey.ENTRA]; - if (riskScoreState.loading || observedUser.isLoading || managedUser.isLoading) { + if (observedUser.isLoading || managedUser.isLoading) { return ; } @@ -144,6 +160,8 @@ export const UserPanel = ({ contextID, scopeId, userName, isDraggable }: UserPan managedUser={managedUser} observedUser={observedUserWithAnomalies} riskScoreState={riskScoreState} + recalculatingScore={recalculatingScore} + onAssetCriticalityChange={calculateEntityRiskScore} contextID={contextID} scopeId={scopeId} isDraggable={!!isDraggable} diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts index f7c70ebf8c7e9..1b5fcddf6b392 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts @@ -26,7 +26,7 @@ import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_ const AGENT_BEAT_FILE_PATH_SUFFIX = '/components/agentbeat'; -describe('Response console', { tags: ['@ess', '@serverless'] }, () => { +describe('Response console', { tags: ['@ess', '@serverless', '@skipInServerlessMKI'] }, () => { beforeEach(() => { login(); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx index 1bd0c3dff62ff..5003aeae08840 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks/use_endpoint_action_items.tsx @@ -43,7 +43,9 @@ export const useEndpointActionItems = ( canIsolateHost, canUnIsolateHost, canAccessEndpointActionsLogManagement, - canAccessFleet, + canReadFleetAgentPolicies, + canWriteFleetAgents, + canReadFleetAgents, } = useUserPrivileges().endpointPrivileges; return useMemo(() => { @@ -177,7 +179,7 @@ export const useEndpointActionItems = ( /> ), }, - ...(canAccessFleet + ...(canReadFleetAgentPolicies ? [ { icon: 'gear', @@ -204,6 +206,10 @@ export const useEndpointActionItems = ( /> ), }, + ] + : []), + ...(canReadFleetAgents + ? [ { icon: 'gear', key: 'agentDetailsLink', @@ -228,6 +234,10 @@ export const useEndpointActionItems = ( /> ), }, + ] + : []), + ...(canWriteFleetAgents + ? [ { icon: 'gear', key: 'agentPolicyReassignLink', @@ -272,6 +282,8 @@ export const useEndpointActionItems = ( options?.isEndpointList, canIsolateHost, canUnIsolateHost, - canAccessFleet, + canReadFleetAgentPolicies, + canReadFleetAgents, + canWriteFleetAgents, ]); }; diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index f625e88e8a30c..91bc557d94d2d 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -1455,12 +1455,15 @@ describe('when on the endpoint list page', () => { const hostLink = await renderResult.findByTestId('hostLink'); expect(hostLink).not.toBeNull(); }); - it('shows Agent Policy, View Agent Details and Reassign Policy Links when canAccessFleet RBAC control is enabled', async () => { + it('shows Agent Policy, View Agent Details and Reassign Policy Links when canReadFleetAgents,canWriteFleetAgents,canReadFleetAgentPolicies RBAC control is enabled', async () => { mockUserPrivileges.mockReturnValue({ ...mockInitialUserPrivilegesState(), endpointPrivileges: { ...mockInitialUserPrivilegesState().endpointPrivileges, canAccessFleet: true, + canReadFleetAgents: true, + canWriteFleetAgents: true, + canReadFleetAgentPolicies: true, }, }); await renderAndClickActionsButton(); diff --git a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx index 92ff143585117..6b499b085a23c 100644 --- a/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/host_overview/index.tsx @@ -10,6 +10,9 @@ import { euiDarkVars as darkTheme, euiLightVars as lightTheme } from '@kbn/ui-th import { getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; +import { useQueryInspector } from '../../../common/components/page/manage_query'; +import { FIRST_RECORD_PAGINATION } from '../../../entity_analytics/common'; import { useRiskScore } from '../../../entity_analytics/api/hooks/use_risk_score'; import type { HostItem } from '../../../../common/search_strategy'; import { buildHostNamesFilter, RiskScoreEntity } from '../../../../common/search_strategy'; @@ -63,6 +66,8 @@ const HostRiskOverviewWrapper = styled(EuiFlexGroup)` width: ${({ $width }: { $width: string }) => $width}; `; +export const HOST_OVERVIEW_RISK_SCORE_QUERY_ID = 'riskInputsTabQuery'; + export const HostOverview = React.memo( ({ anomaliesData, @@ -88,11 +93,29 @@ export const HostOverview = React.memo( () => (hostName ? buildHostNamesFilter([hostName]) : undefined), [hostName] ); + const { deleteQuery, setQuery } = useGlobalTime(); - const { data: hostRisk, isAuthorized } = useRiskScore({ + const { + data: hostRisk, + isAuthorized, + inspect: inspectRiskScore, + loading: loadingRiskScore, + refetch: refetchRiskScore, + } = useRiskScore({ filterQuery, riskEntity: RiskScoreEntity.host, skip: hostName == null, + onlyLatest: false, + pagination: FIRST_RECORD_PAGINATION, + }); + + useQueryInspector({ + deleteQuery, + inspect: inspectRiskScore, + loading: loadingRiskScore, + queryId: HOST_OVERVIEW_RISK_SCORE_QUERY_ID, + refetch: refetchRiskScore, + setQuery, }); const getDefaultRenderer = useCallback( diff --git a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx index bd9e56dffee8d..321f87a3b5984 100644 --- a/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx +++ b/x-pack/plugins/security_solution/public/overview/components/user_overview/index.tsx @@ -10,6 +10,9 @@ import { euiDarkVars as darkTheme, euiLightVars as lightTheme } from '@kbn/ui-th import { getOr } from 'lodash/fp'; import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; +import { useGlobalTime } from '../../../common/containers/use_global_time'; +import { FIRST_RECORD_PAGINATION } from '../../../entity_analytics/common'; +import { useQueryInspector } from '../../../common/components/page/manage_query'; import { useRiskScore } from '../../../entity_analytics/api/hooks/use_risk_score'; import { buildUserNamesFilter, RiskScoreEntity } from '../../../../common/search_strategy'; import type { DescriptionList } from '../../../../common/utility_types'; @@ -61,6 +64,8 @@ const UserRiskOverviewWrapper = styled(EuiFlexGroup)` width: ${({ $width }: { $width: string }) => $width}; `; +export const USER_OVERVIEW_RISK_SCORE_QUERY_ID = 'riskInputsTabQuery'; + export const UserOverview = React.memo( ({ anomaliesData, @@ -86,11 +91,29 @@ export const UserOverview = React.memo( () => (userName ? buildUserNamesFilter([userName]) : undefined), [userName] ); + const { deleteQuery, setQuery } = useGlobalTime(); - const { data: userRisk, isAuthorized } = useRiskScore({ + const { + data: userRisk, + isAuthorized, + inspect: inspectRiskScore, + loading: loadingRiskScore, + refetch: refetchRiskScore, + } = useRiskScore({ filterQuery, skip: userName == null, riskEntity: RiskScoreEntity.user, + onlyLatest: false, + pagination: FIRST_RECORD_PAGINATION, + }); + + useQueryInspector({ + deleteQuery, + inspect: inspectRiskScore, + loading: loadingRiskScore, + queryId: USER_OVERVIEW_RISK_SCORE_QUERY_ID, + refetch: refetchRiskScore, + setQuery, }); const getDefaultRenderer = useCallback( diff --git a/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx b/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx index edfda063ac5ba..3da5612254215 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/detection_response.tsx @@ -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 React, { useMemo } from 'react'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; import type { DocLinks } from '@kbn/doc-links'; import { APP_ID } from '../../../common'; @@ -43,6 +43,8 @@ const DetectionResponseComponent = () => { const canReadCases = userCasesPermissions.read; const canReadAlerts = hasKibanaREAD && hasIndexRead; const isSocTrendsEnabled = useIsExperimentalFeatureEnabled('socTrendsEnabled'); + const additionalFilters = useMemo(() => (filterQuery ? [filterQuery] : []), [filterQuery]); + if (!canReadAlerts && !canReadCases) { return docLinks.siem.privileges} />; } @@ -66,7 +68,7 @@ const DetectionResponseComponent = () => { )} diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index dfadc74330281..8707f9cf190bf 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -16,7 +16,6 @@ import type { CoreStart, PluginInitializerContext, Plugin as IPlugin, - AppMount, } from '@kbn/core/public'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; @@ -33,7 +32,7 @@ import type { StartedSubPlugins, StartPluginsDependencies, } from './types'; -import { SOLUTION_NAME } from './common/translations'; +import { SOLUTION_NAME, ASSISTANT_MANAGEMENT_TITLE } from './common/translations'; import { APP_ID, APP_UI_ID, APP_PATH, APP_ICON_SOLUTION } from '../common/constants'; @@ -94,93 +93,18 @@ export class Plugin implements IPlugin { - // required to show the alert table inside cases - const { alertsTableConfigurationRegistry } = plugins.triggersActionsUi; - const { registerAlertsTableConfiguration } = - await this.lazyRegisterAlertsTableConfiguration(); - registerAlertsTableConfiguration(alertsTableConfigurationRegistry, this.storage); - - const [coreStart, startPlugins] = await core.getStartServices(); - const subPlugins = await this.startSubPlugins(this.storage, coreStart, startPlugins); - const store = await this.store(coreStart, startPlugins, subPlugins); - const services = await this.services.generateServices(coreStart, startPlugins); - await this.registerActions(store, params.history, core, services); - - const { renderApp } = await this.lazyApplicationDependencies(); - const { ManagementSettings } = await this.lazyAssistantSettingsManagement(); - - return renderApp({ - ...params, - services, - store, - usageCollection: plugins.usageCollection, - children: , - }); - }, - }); - } - } - - const mount: AppMount = async (params) => { + // Lazily instantiate subPlugins and initialize services + const mountDependencies = async (params?: AppMountParameters) => { + const { renderApp } = await this.lazyApplicationDependencies(); const [coreStart, startPlugins] = await core.getStartServices(); - const services = await this.services.generateServices(coreStart, startPlugins, params); const subPlugins = await this.startSubPlugins(this.storage, coreStart, startPlugins); const store = await this.store(coreStart, startPlugins, subPlugins); - const { renderApp } = await this.lazyApplicationDependencies(); - const { getSubPluginRoutesByCapabilities } = await this.lazyHelpersForRoutes(); - - await this.registerActions(store, params.history, core, services); - await this.registerAlertsTableConfiguration(triggersActionsUi); - - const subPluginRoutes = getSubPluginRoutesByCapabilities(subPlugins, services); - - return renderApp({ ...params, services, store, usageCollection, subPluginRoutes }); + const services = await this.services.generateServices(coreStart, startPlugins, params); + return { renderApp, subPlugins, store, services }; }; // Register main Security Solution plugin @@ -192,7 +116,17 @@ export class Plugin implements IPlugin { + const { renderApp, services, store, subPlugins } = await mountDependencies(params); + const { getSubPluginRoutesByCapabilities } = await this.lazyHelpersForRoutes(); + + await this.registerActions(store, params.history, core, services); + await this.registerAlertsTableConfiguration(triggersActionsUi); + + const subPluginRoutes = getSubPluginRoutesByCapabilities(subPlugins, services); + + return renderApp({ ...params, services, store, usageCollection, subPluginRoutes }); + }, }); // Register legacy SIEM app for backward compatibility @@ -215,7 +149,53 @@ export class Plugin implements IPlugin { + const { renderApp, services, store } = await mountDependencies(); + const { ManagementSettings } = await this.lazyAssistantSettingsManagement(); + + return renderApp({ + ...params, + services, + store, + usageCollection, + children: , + }); + }, + }); + + cases?.attachmentFramework.registerExternalReference( getExternalReferenceAttachmentEndpointRegular() ); @@ -534,7 +514,7 @@ export class Plugin implements IPlugin SecuritySolutionTemplateWrapper }, contentManagement: startPlugins.contentManagement, telemetry: this.telemetry.start(), customDataService, + timelineDataService, topValuesPopover: new TopValuesPopoverService(), - timelineFilterManager: new FilterManager(coreStart.uiSettings), + ...(params && { + onAppLeave: params.onAppLeave, + setHeaderActionMenu: params.setHeaderActionMenu, + }), }; } @@ -150,4 +171,12 @@ export class PluginServices { customDataService.query.filterManager._name = 'customFilterManager'; return customDataService; }; + + private startTimelineDataService = (query: QueryStart, data: DataPublicPluginStart) => { + // Used in the unified timeline + return { + ...data, + query, + }; + }; } diff --git a/x-pack/plugins/security_solution/public/resolver/types.ts b/x-pack/plugins/security_solution/public/resolver/types.ts index 576ee0979cb1f..7c21667df34bf 100644 --- a/x-pack/plugins/security_solution/public/resolver/types.ts +++ b/x-pack/plugins/security_solution/public/resolver/types.ts @@ -878,7 +878,7 @@ export interface ResolverPluginSetup { /** * The Resolver component without the required Providers. - * You must wrap this component in: `I18nProvider`, `Router` (from react-router,) `KibanaContextProvider`, + * You must wrap this component in: `KibanaRenderContextProvider`, `Router` (from react-router,) `KibanaContextProvider`, * and the `Provider` component provided by this object. */ ResolverWithoutProviders: React.MemoExoticComponent< diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx index 0f22f4ea15cac..82ea7bac73fad 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/helpers.tsx @@ -7,6 +7,7 @@ import { isEmpty, isNumber } from 'lodash/fp'; +import type { Filter } from '@kbn/es-query'; import { elementOrChildrenHasFocus, getFocusedAriaColindexCell, @@ -280,3 +281,8 @@ export const buildIsOneOfQueryMatch = ({ export const isPrimitiveArray = (value: unknown): value is Array => Array.isArray(value) && (value.every((x) => typeof x === 'string') || value.every((x) => typeof x === 'number')); + +export const TIMELINE_FILTER_DROP_AREA = 'timeline-filter-drop-area'; + +export const getNonDropAreaFilters = (filters: Filter[] = []) => + filters.filter((f: Filter) => f.meta.controlledBy !== TIMELINE_FILTER_DROP_AREA); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx index 8e165a2303036..0758ec73271b0 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/eql/index.tsx @@ -8,7 +8,7 @@ import { isEmpty, isEqual } from 'lodash'; import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useDispatch } from 'react-redux'; -import styled from 'styled-components'; +import { css } from '@emotion/css'; import type { EqlOptionsSelected, @@ -64,7 +64,7 @@ const schema: FormSchema = { }, }; -const HiddenUseField = styled(UseField)` +const hiddenUseFieldClassName = css` display: none; `; @@ -188,8 +188,8 @@ export const EqlQueryBarTimeline = memo(({ timelineId }: { timelineId: string }) return (
- - + + { isRefreshPaused={true} refreshInterval={3000} savedQueryId={null} - setFilters={mockSetFilters} setSavedQueryId={mockSetSavedQueryId} timelineId="timline-real-id" updateReduxTime={mockUpdateReduxTime} @@ -123,7 +122,6 @@ describe('Timeline QueryBar ', () => { isRefreshPaused={true} refreshInterval={3000} savedQueryId={null} - setFilters={mockSetFilters} setSavedQueryId={mockSetSavedQueryId} timelineId="timeline-real-id" updateReduxTime={mockUpdateReduxTime} @@ -161,7 +159,6 @@ describe('Timeline QueryBar ', () => { isRefreshPaused={true} refreshInterval={3000} savedQueryId={null} - setFilters={mockSetFilters} setSavedQueryId={mockSetSavedQueryId} timelineId="timeline-real-id" updateReduxTime={mockUpdateReduxTime} @@ -201,7 +198,6 @@ describe('Timeline QueryBar ', () => { isRefreshPaused={true} refreshInterval={3000} savedQueryId={null} - setFilters={mockSetFilters} setSavedQueryId={mockSetSavedQueryId} timelineId="timeline-real-id" updateReduxTime={mockUpdateReduxTime} @@ -239,7 +235,6 @@ describe('Timeline QueryBar ', () => { isRefreshPaused={true} refreshInterval={3000} savedQueryId={null} - setFilters={mockSetFilters} setSavedQueryId={mockSetSavedQueryId} timelineId="timeline-real-id" updateReduxTime={mockUpdateReduxTime} diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx index 73d83469413c4..749c3512cbd20 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.tsx @@ -6,10 +6,8 @@ */ import { isEmpty } from 'lodash/fp'; -import React, { memo, useCallback, useState, useEffect } from 'react'; +import React, { memo, useCallback, useState, useEffect, useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { Subscription } from 'rxjs'; -import deepEqual from 'fast-deep-equal'; import type { Filter, Query } from '@kbn/es-query'; import { FilterStateStore } from '@kbn/es-query'; @@ -25,7 +23,7 @@ import { useSavedQueryServices } from '../../../../common/utils/saved_query_serv import type { DispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; import { QueryBar } from '../../../../common/components/query_bar'; import type { DataProvider } from '../data_providers/data_provider'; -import { buildGlobalQuery } from '../helpers'; +import { TIMELINE_FILTER_DROP_AREA, buildGlobalQuery, getNonDropAreaFilters } from '../helpers'; import { timelineActions } from '../../../store'; import type { KueryFilterQuery, KueryFilterQueryKind } from '../../../../../common/types/timeline'; @@ -40,7 +38,6 @@ export interface QueryBarTimelineComponentProps { isRefreshPaused: boolean; refreshInterval: number; savedQueryId: string | null; - setFilters: (filters: Filter[]) => void; setSavedQueryId: (savedQueryId: string | null) => void; timelineId: string; to: string; @@ -84,11 +81,6 @@ const SearchBarContainer = styled.div` } `; -export const TIMELINE_FILTER_DROP_AREA = 'timeline-filter-drop-area'; - -const getNonDropAreaFilters = (filters: Filter[] = []) => - filters.filter((f: Filter) => f.meta.controlledBy !== TIMELINE_FILTER_DROP_AREA); - // eslint-disable-next-line react/display-name export const QueryBarTimeline = memo( ({ @@ -101,7 +93,6 @@ export const QueryBarTimeline = memo( kqlMode, isRefreshPaused, savedQueryId, - setFilters, setSavedQueryId, refreshInterval, timelineId, @@ -122,9 +113,8 @@ export const QueryBarTimeline = memo( query: filterQuery != null ? filterQuery.expression : '', language: filterQuery != null ? filterQuery.kind : 'kuery', }); - const [queryBarFilters, setQueryBarFilters] = useState( - getNonDropAreaFilters(filters) - ); + const queryBarFilters = useMemo(() => getNonDropAreaFilters(filters), [filters]); + const [dataProvidersDsl, setDataProvidersDsl] = useState( convertKueryToElasticSearchQuery(buildGlobalQuery(dataProviders, browserFields), indexPattern) ); @@ -147,38 +137,6 @@ export const QueryBarTimeline = memo( [dispatch, indexPattern, timelineId] ); - useEffect(() => { - let isSubscribed = true; - const subscriptions = new Subscription(); - filterManager.setFilters(filters); - - subscriptions.add( - filterManager.getUpdates$().subscribe({ - next: () => { - if (isSubscribed) { - const filterWithoutDropArea = getNonDropAreaFilters(filterManager.getFilters()); - setFilters(filterWithoutDropArea); - setQueryBarFilters(filterWithoutDropArea); - } - }, - }) - ); - - return () => { - isSubscribed = false; - subscriptions.unsubscribe(); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); - - useEffect(() => { - const filterWithoutDropArea = getNonDropAreaFilters(filterManager.getFilters()); - if (!deepEqual(filters, filterWithoutDropArea)) { - filterManager.setFilters(filters); - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [filters]); - useEffect(() => { setFilterQueryConverted({ query: filterQuery != null ? filterQuery.expression : '', diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx index cdd6fc793082f..0145922910e63 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/index.tsx @@ -31,6 +31,7 @@ import { timelineDefaults } from '../../../store/defaults'; import { dispatchUpdateReduxTime } from '../../../../common/components/super_date_picker'; import { SearchOrFilter } from './search_or_filter'; import { setDataProviderVisibility } from '../../../store/actions'; +import { getNonDropAreaFilters } from '../helpers'; import * as i18n from './translations'; const FilterItemsContainer = styled(EuiFlexGroup)``; @@ -110,19 +111,37 @@ const StatefulSearchOrFilterComponent = React.memo( const arrDataView = useMemo(() => (dataView != null ? [dataView] : []), [dataView]); + // Keep filter manager in sync with redux filters + useEffect(() => { + if (!deepEqual(filterManager.getFilters(), filters)) { + filterManager.setFilters(filters); + } + }, [filterManager, filters]); + + // When a filter update comes in through the filter manager, update redux + useEffect(() => { + const subscription = filterManager.getUpdates$().subscribe(() => { + const filtersWithoutDropArea = getNonDropAreaFilters(filterManager.getFilters()); + if (!deepEqual(filtersWithoutDropArea, filters)) { + setFilters({ + id: timelineId, + filters: filtersWithoutDropArea, + }); + } + }); + return () => { + subscription.unsubscribe(); + }; + }, [filterManager, timelineId, setFilters, filters]); + + // Sync redux filters with updated from const onFiltersUpdated = useCallback( (newFilters: Filter[]) => { - filterManager.setFilters(newFilters); - }, - [filterManager] - ); - - const setFiltersInTimeline = useCallback( - (newFilters: Filter[]) => setFilters({ id: timelineId, filters: newFilters, - }), + }); + }, [timelineId, setFilters] ); @@ -180,7 +199,6 @@ const StatefulSearchOrFilterComponent = React.memo( kqlMode={kqlMode} refreshInterval={refreshInterval} savedQueryId={savedQueryId} - setFilters={setFiltersInTimeline} setSavedQueryId={setSavedQueryInTimeline} timelineId={timelineId} to={to} diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx index 16f053b4abb75..e6c8d403d4cce 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/search_or_filter/search_or_filter.tsx @@ -41,7 +41,6 @@ interface Props { timelineId: string; updateKqlMode: ({ id, kqlMode }: { id: string; kqlMode: KqlMode }) => void; refreshInterval: number; - setFilters: (filters: Filter[]) => void; setSavedQueryId: (savedQueryId: string | null) => void; filters: Filter[]; savedQueryId: string | null; @@ -79,7 +78,6 @@ export const SearchOrFilter = React.memo( timelineId, refreshInterval, savedQueryId, - setFilters, setSavedQueryId, to, toStr, @@ -129,7 +127,6 @@ export const SearchOrFilter = React.memo( isRefreshPaused={isRefreshPaused} refreshInterval={refreshInterval} savedQueryId={savedQueryId} - setFilters={setFilters} setSavedQueryId={setSavedQueryId} timelineId={timelineId} to={to} diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/styles.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/styles.tsx index 0a779a3b8e3a9..6e82809231828 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/styles.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/esql/styles.tsx @@ -21,4 +21,9 @@ export const TimelineESQLGlobalStyles = createGlobalStyle` body:has(.timeline-portal-overlay-mask) .DiscoverFlyout { z-index: 1002; // For its usage in the Security Solution timeline, we need Discover flyout to be above the timeline flyout (which has a z-index of 1001) } + + // TODO this should be removed when we change the ES|QL tab to be our own component instead of Discover (hopefully 8.15) + .unifiedDataTable__fullScreen .dscPageBody * { + z-index: unset !important; + } `; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.test.tsx index 7f399aa095a8a..a3048347a6b7f 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.test.tsx @@ -16,9 +16,18 @@ import { TimelineType } from '../../../../../common/api/timeline'; import { useEsqlAvailability } from '../../../../common/hooks/esql/use_esql_availability'; import { render, screen, waitFor } from '@testing-library/react'; +jest.mock('react-router-dom', () => { + const original = jest.requireActual('react-router-dom'); + return { + ...original, + useLocation: () => ({}), + }; +}); + jest.mock('../../../../common/hooks/esql/use_esql_availability', () => ({ useEsqlAvailability: jest.fn().mockReturnValue({ - isESQLTabInTimelineEnabled: true, + isEsqlAdvancedSettingEnabled: true, + isTimelineEsqlEnabledByFeatureFlag: true, }), })); @@ -44,38 +53,79 @@ describe('Timeline', () => { expect(screen.getByTestId(esqlTabSubj)).toBeVisible(); }); - it('should not show the esql tab when the advanced setting is disabled', async () => { - useEsqlAvailabilityMock.mockReturnValue({ - isESQLTabInTimelineEnabled: false, + describe('no existing esql query is present', () => { + it('should not show the esql tab when the advanced setting is disabled', async () => { + useEsqlAvailabilityMock.mockReturnValue({ + isEsqlAdvancedSettingEnabled: false, + isTimelineEsqlEnabledByFeatureFlag: true, + }); + render( + + + + ); + + await waitFor(() => { + expect(screen.queryByTestId(esqlTabSubj)).toBeNull(); + }); }); - render( - - - - ); + it('should not show the esql tab when the esql is disabled by feature flag', async () => { + useEsqlAvailabilityMock.mockReturnValue({ + isEsqlAdvancedSettingEnabled: false, + isTimelineEsqlEnabledByFeatureFlag: false, + }); + render( + + + + ); - await waitFor(() => { - expect(screen.queryByTestId(esqlTabSubj)).toBeNull(); + await waitFor(() => { + expect(screen.queryByTestId(esqlTabSubj)).toBeNull(); + }); }); }); - it('should show the esql tab when the advanced setting is disabled, but an esql query is present', async () => { - useEsqlAvailabilityMock.mockReturnValue({ - isESQLTabInTimelineEnabled: false, + describe('existing esql query is present', () => { + let mockStore: ReturnType; + beforeEach(() => { + const stateWithSavedSearchId = structuredClone(mockGlobalState); + stateWithSavedSearchId.timeline.timelineById[TimelineId.test].savedSearchId = 'test-id'; + mockStore = createMockStore(stateWithSavedSearchId); }); - const stateWithSavedSearchId = structuredClone(mockGlobalState); - stateWithSavedSearchId.timeline.timelineById[TimelineId.test].savedSearchId = 'test-id'; - const mockStore = createMockStore(stateWithSavedSearchId); + it('should show the esql tab when the advanced setting is disabled', async () => { + useEsqlAvailabilityMock.mockReturnValue({ + isESQLTabInTimelineEnabled: false, + isTimelineEsqlEnabledByFeatureFlag: true, + }); - render( - - - - ); + render( + + + + ); + + await waitFor(() => { + expect(screen.queryByTestId(esqlTabSubj)).toBeVisible(); + }); + }); + + it('should not show the esql tab when the esql is disabled by the feature flag', async () => { + useEsqlAvailabilityMock.mockReturnValue({ + isESQLTabInTimelineEnabled: true, + isTimelineEsqlEnabledByFeatureFlag: false, + }); + + render( + + + + ); - await waitFor(() => { - expect(screen.queryByTestId(esqlTabSubj)).toBeVisible(); + await waitFor(() => { + expect(screen.queryByTestId(esqlTabSubj)).toBeNull(); + }); }); }); }); diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx index 2e164677735dd..643a5b54be415 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/index.tsx @@ -110,11 +110,20 @@ const ActiveTimelineTab = memo( showTimeline, }) => { const { hasAssistantPrivilege } = useAssistantAvailability(); - const { isESQLTabInTimelineEnabled } = useEsqlAvailability(); + const { isTimelineEsqlEnabledByFeatureFlag, isEsqlAdvancedSettingEnabled } = + useEsqlAvailability(); const timelineESQLSavedSearch = useShallowEqualSelector((state) => selectTimelineESQLSavedSearchId(state, timelineId) ); - const shouldShowESQLTab = isESQLTabInTimelineEnabled || timelineESQLSavedSearch != null; + const shouldShowESQLTab = useMemo(() => { + // disabling esql feature from feature flag should unequivocally hide the tab + // irrespective of the fact that the advanced setting is enabled or + // not or existing esql query is present or not + if (!isTimelineEsqlEnabledByFeatureFlag) { + return false; + } + return isEsqlAdvancedSettingEnabled || timelineESQLSavedSearch != null; + }, [isEsqlAdvancedSettingEnabled, isTimelineEsqlEnabledByFeatureFlag, timelineESQLSavedSearch]); const aiAssistantFlyoutMode = useIsExperimentalFeatureEnabled('aiAssistantFlyoutMode'); const getTab = useCallback( (tab: TimelineTabs) => { @@ -271,14 +280,24 @@ const TabsContentComponent: React.FC = ({ const getAppNotes = useMemo(() => getNotesSelector(), []); const getTimelineNoteIds = useMemo(() => getNoteIdsSelector(), []); const getTimelinePinnedEventNotes = useMemo(() => getEventIdToNoteIdsSelector(), []); - const { isESQLTabInTimelineEnabled } = useEsqlAvailability(); + const { isEsqlAdvancedSettingEnabled, isTimelineEsqlEnabledByFeatureFlag } = + useEsqlAvailability(); + const timelineESQLSavedSearch = useShallowEqualSelector((state) => selectTimelineESQLSavedSearchId(state, timelineId) ); const activeTab = useShallowEqualSelector((state) => getActiveTab(state, timelineId)); const showTimeline = useShallowEqualSelector((state) => getShowTimeline(state, timelineId)); - const shouldShowESQLTab = isESQLTabInTimelineEnabled || timelineESQLSavedSearch != null; + const shouldShowESQLTab = useMemo(() => { + // disabling esql feature from feature flag should unequivocally hide the tab + // irrespective of the fact that the advanced setting is enabled or + // not or existing esql query is present or not + if (!isTimelineEsqlEnabledByFeatureFlag) { + return false; + } + return isEsqlAdvancedSettingEnabled || timelineESQLSavedSearch != null; + }, [isEsqlAdvancedSettingEnabled, isTimelineEsqlEnabledByFeatureFlag, timelineESQLSavedSearch]); const numberOfPinnedEvents = useShallowEqualSelector((state) => getNumberOfPinnedEvents(state, timelineId) diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx index ff95229f9dc60..0dcbe36e09769 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.test.tsx @@ -55,6 +55,10 @@ mockUseResizeObserver.mockImplementation(() => ({})); jest.mock('../../../../../common/lib/kibana'); +jest.mock('../../../../containers/use_timeline_data_filters', () => ({ + useTimelineDataFilters: jest.fn().mockReturnValue({ from: 'now-15m', to: 'now' }), +})); + describe('Timeline', () => { let props = {} as QueryTabContentComponentProps; const sort: Sort[] = [ diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx index d557116ea6bf2..ed3cd15314444 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx @@ -16,6 +16,7 @@ import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { DataLoadingState } from '@kbn/unified-data-table'; import { useDeepEqualSelector } from '../../../../../common/hooks/use_selector'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; +import { useTimelineDataFilters } from '../../../../containers/use_timeline_data_filters'; import { InputsModelId } from '../../../../../common/store/inputs/constants'; import { useInvalidFilterQuery } from '../../../../../common/hooks/use_invalid_filter_query'; import { timelineActions, timelineSelectors } from '../../../../store'; @@ -40,6 +41,8 @@ import { inputsSelectors } from '../../../../../common/store'; import { SourcererScopeName } from '../../../../../common/store/sourcerer/model'; import { timelineDefaults } from '../../../../store/defaults'; import { useSourcererDataView } from '../../../../../common/containers/sourcerer'; +import { isActiveTimeline } from '../../../../../helpers'; + import type { TimelineModel } from '../../../../store/model'; import { DetailsPanel } from '../../../side_panel'; import { UnifiedTimelineBody } from '../../body/unified_timeline_body'; @@ -105,7 +108,11 @@ export const QueryTabContentComponent: React.FC = ({ selectedPatterns, } = useSourcererDataView(SourcererScopeName.timeline); - const { uiSettings, timelineFilterManager } = useKibana().services; + const { uiSettings, timelineDataService } = useKibana().services; + const { + query: { filterManager: timelineFilterManager }, + } = timelineDataService; + const unifiedComponentsInTimelineEnabled = useIsExperimentalFeatureEnabled( 'unifiedComponentsInTimelineEnabled' ); @@ -127,15 +134,17 @@ export const QueryTabContentComponent: React.FC = ({ [kqlQueryExpression, kqlQueryLanguage] ); - const combinedQueries = combineQueries({ - config: esQueryConfig, - dataProviders, - indexPattern, - browserFields, - filters, - kqlQuery, - kqlMode, - }); + const combinedQueries = useMemo(() => { + return combineQueries({ + config: esQueryConfig, + dataProviders, + indexPattern, + browserFields, + filters, + kqlQuery, + kqlMode, + }); + }, [esQueryConfig, dataProviders, indexPattern, browserFields, filters, kqlQuery, kqlMode]); useInvalidFilterQuery({ id: timelineId, @@ -163,12 +172,14 @@ export const QueryTabContentComponent: React.FC = ({ [combinedQueries, end, loadingSourcerer, start] ); - const timelineQuerySortField = sort.map(({ columnId, columnType, esTypes, sortDirection }) => ({ - field: columnId, - direction: sortDirection as Direction, - esTypes: esTypes ?? [], - type: columnType, - })); + const timelineQuerySortField = useMemo(() => { + return sort.map(({ columnId, columnType, esTypes, sortDirection }) => ({ + field: columnId, + direction: sortDirection as Direction, + esTypes: esTypes ?? [], + type: columnType, + })); + }, [sort]); const { augmentedColumnHeaders, defaultColumns, timelineQueryFieldsFromColumns } = useTimelineColumns(columns); @@ -226,6 +237,26 @@ export const QueryTabContentComponent: React.FC = ({ // is not getting refreshed when using browser navigation. const showEventsCountBadge = !isBlankTimeline && totalCount >= 0; + // + // Sync the timerange + const timelineFilters = useTimelineDataFilters(isActiveTimeline(timelineId)); + useEffect(() => { + timelineDataService.query.timefilter.timefilter.setTime({ + from: timelineFilters.from, + to: timelineFilters.to, + }); + }, [timelineDataService.query.timefilter.timefilter, timelineFilters.from, timelineFilters.to]); + + // Sync the base query + useEffect(() => { + timelineDataService.query.queryString.setQuery( + // We're using the base query of all combined queries here, to account for all + // of timeline's query dependencies (data providers, query etc.) + combinedQueries?.baseKqlQuery || { language: kqlQueryLanguage, query: '' } + ); + }, [timelineDataService, combinedQueries, kqlQueryLanguage]); + // + if (unifiedComponentsInTimelineEnabled) { return ( { const kibanaServiceMock: StartServices = { ...createStartServicesMock(), storage: storageMock, - timelineFilterManager: mockTimelineFilterManager, }; afterEach(() => { @@ -571,7 +568,9 @@ describe('unified timeline', () => { fireEvent.click(screen.getByTestId(`timelineFieldListPanelAddExistFilter-${field.name}`)); await waitFor(() => { - expect(mockTimelineFilterManager.addFilters).toHaveBeenNthCalledWith( + expect( + kibanaServiceMock.timelineDataService.query.filterManager.addFilters + ).toHaveBeenNthCalledWith( 1, expect.arrayContaining([ expect.objectContaining({ diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.tsx index fcdbb347fa9fc..b4daa07f11c40 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/unified_components/index.tsx @@ -158,14 +158,17 @@ const UnifiedTimelineComponent: React.FC = ({ dataViews, dataViewFieldEditor, application: { capabilities }, - data: dataPluginContract, uiActions, charts, docLinks, analytics, - timelineFilterManager, + timelineDataService, }, } = useKibana(); + const { + query: { filterManager: timelineFilterManager }, + } = timelineDataService; + const [eventIdsAddingNotes, setEventIdsAddingNotes] = useState>(new Set()); const onToggleShowNotes = useCallback( (eventId: string) => { @@ -179,12 +182,13 @@ const UnifiedTimelineComponent: React.FC = ({ }, [eventIdsAddingNotes] ); + const fieldListSidebarServices: UnifiedFieldListSidebarContainerProps['services'] = useMemo( () => ({ fieldFormats, dataViews, dataViewFieldEditor, - data: dataPluginContract, + data: timelineDataService, uiActions, charts, core: { @@ -197,7 +201,7 @@ const UnifiedTimelineComponent: React.FC = ({ fieldFormats, dataViews, dataViewFieldEditor, - dataPluginContract, + timelineDataService, uiActions, charts, uiSettings, diff --git a/x-pack/plugins/security_solution/public/types.ts b/x-pack/plugins/security_solution/public/types.ts index 1bd539bd52b6c..eb891e3145dd2 100644 --- a/x-pack/plugins/security_solution/public/types.ts +++ b/x-pack/plugins/security_solution/public/types.ts @@ -9,7 +9,7 @@ import type { Observable } from 'rxjs'; import type { CoreStart, AppMountParameters, AppLeaveHandler } from '@kbn/core/public'; import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; -import type { DataPublicPluginStart, FilterManager } from '@kbn/data-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { FieldFormatsStartCommon } from '@kbn/field-formats-plugin/common'; import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; import type { LensPublicStart } from '@kbn/lens-plugin/public'; @@ -185,7 +185,7 @@ export type StartServices = CoreStart & telemetry: TelemetryClientStart; customDataService: DataPublicPluginStart; topValuesPopover: TopValuesPopoverService; - timelineFilterManager: FilterManager; + timelineDataService: DataPublicPluginStart; }; export type StartRenderServices = Pick< diff --git a/x-pack/plugins/security_solution/scripts/openapi/bundle.js b/x-pack/plugins/security_solution/scripts/openapi/bundle.js index 6cfa1507ea9ee..82280d0ef0ebf 100644 --- a/x-pack/plugins/security_solution/scripts/openapi/bundle.js +++ b/x-pack/plugins/security_solution/scripts/openapi/bundle.js @@ -7,12 +7,14 @@ require('../../../../../src/setup_node_env'); const { bundle } = require('@kbn/openapi-bundler'); -const { resolve } = require('path'); +const { join, resolve } = require('path'); const SECURITY_SOLUTION_ROOT = resolve(__dirname, '../..'); bundle({ - rootDir: SECURITY_SOLUTION_ROOT, - sourceGlob: './common/api/**/*.schema.yaml', - outputFilePath: './target/openapi/security_solution.bundled.schema.yaml', + sourceGlob: join(SECURITY_SOLUTION_ROOT, 'common/api/**/*.schema.yaml'), + outputFilePath: join( + SECURITY_SOLUTION_ROOT, + 'target/openapi/security_solution-{version}.bundled.schema.yaml' + ), }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts index 766a92904f4bc..ba3c9b64ea32c 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/entity/utils/supported_schemas.ts @@ -36,12 +36,18 @@ export const getSupportedSchemas = ( ): SupportedSchema[] => { const sentinelOneDataInAnalyzerEnabled = experimentalFeatures?.sentinelOneDataInAnalyzerEnabled; const crowdstrikeDataInAnalyzerEnabled = experimentalFeatures?.crowdstrikeDataInAnalyzerEnabled; + const jamfDataInAnalyzerEnabled = experimentalFeatures?.jamfDataInAnalyzerEnabled; const supportedFileBeatDataSets = [ ...(sentinelOneDataInAnalyzerEnabled ? ['sentinel_one_cloud_funnel.event', 'sentinel_one.alert'] : []), - ...(crowdstrikeDataInAnalyzerEnabled ? ['crowdstrike.falcon', 'crowdstrike.fdr'] : []), + ...(crowdstrikeDataInAnalyzerEnabled + ? ['crowdstrike.falcon', 'crowdstrike.fdr', 'crowdstrike.alert'] + : []), + ...(jamfDataInAnalyzerEnabled + ? ['jamf_protect.alerts', 'jamf_protect.web-threat-events', 'jamf_protect.web-traffic-events'] + : []), ]; return [ diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts index aa6547506b366..58eda02ee9289 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/descendants.ts @@ -65,10 +65,10 @@ export class DescendantsQuery extends BaseResolverQuery { }, }, { - term: { 'event.category': 'process' }, + terms: { 'event.category': ['process'] }, }, { - term: { 'event.kind': 'event' }, + terms: { 'event.kind': ['event', 'alert'] }, }, ], }, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts index 84ebd8b4ae532..ca1578e071626 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/resolver/tree/queries/lifecycle.ts @@ -58,10 +58,10 @@ export class LifecycleQuery extends BaseResolverQuery { }, }, { - term: { 'event.category': 'process' }, + terms: { 'event.category': ['process'] }, }, { - term: { 'event.kind': 'event' }, + terms: { 'event.kind': ['event', 'alert'] }, }, ], }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/types.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/types.ts index 9d8f4b0246129..d34d2eba9e5ab 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/types.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/types.ts @@ -11,6 +11,7 @@ import type { CommonResponseActionMethodOptions } from '../../../endpoint/servic export type Alert = ParsedTechnicalFields & { _id: string; + _index: string; agent?: AlertAgent; host?: { name: string; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts index 81f0386a6c96c..fd5c2921972f3 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/asset_criticality_data_client.ts @@ -141,7 +141,10 @@ export class AssetCriticalityDataClient { } } - public async upsert(record: AssetCriticalityUpsert): Promise { + public async upsert( + record: AssetCriticalityUpsert, + refresh = 'wait_for' as const + ): Promise { const id = createId(record); const doc = { id_field: record.idField, @@ -153,6 +156,7 @@ export class AssetCriticalityDataClient { await this.options.esClient.update({ id, index: this.getIndex(), + refresh: refresh ?? false, body: { doc, doc_as_upsert: true, @@ -240,10 +244,11 @@ export class AssetCriticalityDataClient { return { errors, stats }; }; - public async delete(idParts: AssetCriticalityIdParts) { + public async delete(idParts: AssetCriticalityIdParts, refresh = 'wait_for' as const) { await this.options.esClient.delete({ id: createId(idParts), index: this.getIndex(), + refresh: refresh ?? false, }); } } diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/delete.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/delete.ts index f9630542283ef..6f1d677d414c5 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/delete.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/delete.ts @@ -12,7 +12,7 @@ import { APP_ID, ENABLE_ASSET_CRITICALITY_SETTING, } from '../../../../../common/constants'; -import { AssetCriticalityRecordIdParts } from '../../../../../common/api/entity_analytics/asset_criticality'; +import { DeleteAssetCriticalityRecord } from '../../../../../common/api/entity_analytics/asset_criticality'; import { buildRouteValidationWithZod } from '../../../../utils/build_validation/route_validation'; import { checkAndInitAssetCriticalityResources } from '../check_and_init_asset_criticality_resources'; import { assertAdvancedSettingsEnabled } from '../../utils/assert_advanced_setting_enabled'; @@ -36,7 +36,7 @@ export const assetCriticalityDeleteRoute = ( version: '1', validate: { request: { - query: buildRouteValidationWithZod(AssetCriticalityRecordIdParts), + query: buildRouteValidationWithZod(DeleteAssetCriticalityRecord), }, }, }, @@ -59,10 +59,13 @@ export const assetCriticalityDeleteRoute = ( await checkAndInitAssetCriticalityResources(context, logger); const assetCriticalityClient = securitySolution.getAssetCriticalityDataClient(); - await assetCriticalityClient.delete({ - idField: request.query.id_field, - idValue: request.query.id_value, - }); + await assetCriticalityClient.delete( + { + idField: request.query.id_field, + idValue: request.query.id_value, + }, + request.query.refresh + ); return response.ok(); } catch (e) { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts index 3e460b3f4e543..8a6d475695962 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/upsert.ts @@ -55,7 +55,10 @@ export const assetCriticalityUpsertRoute = ( criticalityLevel: request.body.criticality_level, }; - const result = await assetCriticalityClient.upsert(assetCriticalityRecord); + const result = await assetCriticalityClient.upsert( + assetCriticalityRecord, + request.body.refresh + ); securitySolution.getAuditLogger()?.log({ message: 'User attempted to assign the asset criticality level for an entity', diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts index 09fe204fe69e1..aa67d4abf78ba 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/calculate_and_persist_risk_scores.ts @@ -21,7 +21,7 @@ export const calculateAndPersistRiskScores = async ( riskScoreDataClient: RiskScoreDataClient; } ): Promise => { - const { riskScoreDataClient, spaceId, returnScores, ...rest } = params; + const { riskScoreDataClient, spaceId, returnScores, refresh, ...rest } = params; const writer = await riskScoreDataClient.getWriter({ namespace: spaceId, @@ -40,7 +40,7 @@ export const calculateAndPersistRiskScores = async ( ); } - const { errors, docs_written: scoresWritten } = await writer.bulk(scores); + const { errors, docs_written: scoresWritten } = await writer.bulk({ ...scores, refresh }); const result = { after_keys: afterKeys, errors, scores_written: scoresWritten }; diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts index e43b44ab01894..e140090ea55e4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_engine_data_writer.ts @@ -18,6 +18,7 @@ interface WriterBulkResponse { interface BulkParams { host?: RiskScore[]; user?: RiskScore[]; + refresh?: 'wait_for'; } export interface RiskEngineDataWriter { @@ -42,6 +43,7 @@ export class RiskEngineDataWriter implements RiskEngineDataWriter { const { errors, items, took } = await this.options.esClient.bulk({ operations: this.buildBulkOperations(params), + refresh: params.refresh ?? false, }); return { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts index bfc86643a6fd0..b326f50f767a4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/risk_score_service.ts @@ -44,6 +44,7 @@ export interface RiskScoreServiceFactoryParams { riskEngineDataClient: RiskEngineDataClient; riskScoreDataClient: RiskScoreDataClient; spaceId: string; + refresh?: 'wait_for'; } export const riskScoreServiceFactory = ({ diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.ts index 1ba609e885dda..dbb8459d0ae42 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.test.ts @@ -92,7 +92,9 @@ describe('entity risk score calculation route', () => { expect(response.status).toEqual(200); expect(mockRiskScoreService.calculateAndPersistScores).toHaveBeenCalledWith( - expect.objectContaining({ filter: [{ term: { 'host.name': 'test-host-name' } }] }) + expect.objectContaining({ + filter: { bool: { filter: [{ term: { 'host.name': 'test-host-name' } }] } }, + }) ); }); @@ -118,9 +120,9 @@ describe('entity risk score calculation route', () => { expect(response.body).toEqual({ message: 'No Risk engine configuration found', - status_code: 405, + status_code: 400, }); - expect(response.status).toEqual(405); + expect(response.status).toEqual(400); }); it('returns an error if the risk engine is disabled', async () => { @@ -133,9 +135,9 @@ describe('entity risk score calculation route', () => { expect(response.body).toEqual({ message: 'Risk engine is disabled', - status_code: 405, + status_code: 400, }); - expect(response.status).toEqual(405); + expect(response.status).toEqual(400); }); it('filter by user provided filter when it is defined', async () => { @@ -149,7 +151,9 @@ describe('entity risk score calculation route', () => { expect(response.status).toEqual(200); expect(mockRiskScoreService.calculateAndPersistScores).toHaveBeenCalledWith( - expect.objectContaining({ filter: expect.arrayContaining([userFilter]) }) + expect.objectContaining({ + filter: { bool: { filter: expect.arrayContaining([userFilter]) } }, + }) ); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.ts index 497e9ac189100..98b4149f70230 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_score/routes/entity_calculation.ts @@ -69,7 +69,7 @@ export const riskScoreEntityCalculationRoute = ( logger ); - const { identifier_type: identifierType, identifier } = request.body; + const { identifier_type: identifierType, identifier, refresh } = request.body; try { const entityAnalyticsConfig = await riskScoreService.getConfigurationWithDefaults( @@ -78,7 +78,7 @@ export const riskScoreEntityCalculationRoute = ( if (entityAnalyticsConfig == null) { return siemResponse.error({ - statusCode: 405, + statusCode: 400, body: 'No Risk engine configuration found', }); } @@ -94,7 +94,7 @@ export const riskScoreEntityCalculationRoute = ( if (!enabled) { return siemResponse.error({ - statusCode: 405, + statusCode: 400, body: 'Risk engine is disabled', }); } @@ -112,6 +112,7 @@ export const riskScoreEntityCalculationRoute = ( const identifierFilter = { term: { [getFieldForIdentifier(identifierType)]: identifier }, }; + const filter = isEmpty(userFilter) ? [identifierFilter] : [userFilter, identifierFilter]; const result: CalculateAndPersistScoresResponse = @@ -119,13 +120,18 @@ export const riskScoreEntityCalculationRoute = ( pageSize, identifierType, index, - filter, + filter: { + bool: { + filter, + }, + }, range, runtimeMappings, weights: [], alertSampleSizePerShard, afterKeys, returnScores: true, + refresh, }); if (result.errors.length) { diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts index d41edbd215642..a71912d2dffa4 100644 --- a/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/types.ts @@ -52,6 +52,7 @@ export interface CalculateAndPersistScoresParams { weights?: RiskWeights; alertSampleSizePerShard?: number; returnScores?: boolean; + refresh?: 'wait_for'; } export interface CalculateAndPersistScoresResponse { diff --git a/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline.tsx b/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline.tsx index 71d3071ee2c4a..214a6472bb600 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline.tsx +++ b/x-pack/plugins/threat_intelligence/public/modules/timeline/components/add_to_timeline.tsx @@ -94,8 +94,9 @@ export const AddToTimelineButtonEmpty: VFC = ({ const buttonRef = useRef(null); - const addToTimelineButton = - useKibana().services.timelines.getHoverActions().getAddToTimelineButton; + const { timelines, analytics, i18n: i18nStart, theme } = useKibana().services; + const startServices = { analytics, i18n: i18nStart, theme }; + const addToTimelineButton = timelines.getHoverActions().getAddToTimelineButton; const { key, value } = typeof data === 'string' ? { key: field, value: data } : getIndicatorFieldAndValue(data, field); @@ -110,6 +111,7 @@ export const AddToTimelineButtonEmpty: VFC = ({ dataProvider, field: key, ownFocus: false, + startServices, }; // Use case is for the barchart legend (for example). @@ -153,8 +155,10 @@ export const AddToTimelineContextMenu: VFC = ({ const contextMenuRef = useRef(null); - const addToTimelineButton = - useKibana().services.timelines.getHoverActions().getAddToTimelineButton; + const { timelines, analytics, i18n: i18nStart, theme } = useKibana().services; + const startServices = { analytics, i18n: i18nStart, theme }; + + const addToTimelineButton = timelines.getHoverActions().getAddToTimelineButton; const { key, value } = typeof data === 'string' ? { key: field, value: data } : getIndicatorFieldAndValue(data, field); @@ -169,6 +173,7 @@ export const AddToTimelineContextMenu: VFC = ({ dataProvider, field: key, ownFocus: false, + startServices, }; // Use case is for the barchart legend (for example). diff --git a/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts b/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts index ab69481d3b528..f40df09a49830 100644 --- a/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts +++ b/x-pack/plugins/threat_intelligence/public/modules/timeline/hooks/use_add_to_timeline.ts @@ -7,6 +7,7 @@ import { DataProvider } from '@kbn/timelines-plugin/common'; import { AddToTimelineButtonProps } from '@kbn/timelines-plugin/public'; +import { useKibana } from '../../../hooks/use_kibana'; import { generateDataProvider } from '../utils/data_provider'; import { fieldAndValueValid, getIndicatorFieldAndValue } from '../../indicators/utils/field_value'; import { Indicator } from '../../../../common/types/indicator'; @@ -38,6 +39,9 @@ export const useAddToTimeline = ({ indicator, field, }: UseAddToTimelineParam): UseAddToTimelineValue => { + const { analytics, i18n, theme } = useKibana().services; + const startServices = { analytics, i18n, theme }; + const { key, value } = typeof indicator === 'string' ? { key: field, value: indicator } @@ -53,6 +57,7 @@ export const useAddToTimeline = ({ dataProvider, field: key, ownFocus: false, + startServices, }; return { diff --git a/x-pack/plugins/threat_intelligence/public/plugin.tsx b/x-pack/plugins/threat_intelligence/public/plugin.tsx index 49f6b3b7724bf..09a0925577284 100755 --- a/x-pack/plugins/threat_intelligence/public/plugin.tsx +++ b/x-pack/plugins/threat_intelligence/public/plugin.tsx @@ -56,7 +56,7 @@ export const createApp = export class ThreatIntelligencePlugin implements Plugin { public async setup( - core: CoreSetup, + _core: CoreSetup, plugins: SetupPlugins ): Promise { const externalAttachmentType: ExternalReferenceAttachmentType = generateAttachmentType(); @@ -73,11 +73,11 @@ export class ThreatIntelligencePlugin implements Plugin { storage: new Storage(localStorage), }; - const services = { + const services: Services = { ...localPluginServices, ...core, ...plugins, - } as Services; + }; return { getComponent: createApp(services), diff --git a/x-pack/plugins/threat_intelligence/public/types.ts b/x-pack/plugins/threat_intelligence/public/types.ts index 45da610592cee..d1fdb8831e518 100644 --- a/x-pack/plugins/threat_intelligence/public/types.ts +++ b/x-pack/plugins/threat_intelligence/public/types.ts @@ -45,18 +45,17 @@ export interface ThreatIntelligencePluginStart { export interface ThreatIntelligencePluginStartDeps { data: DataPublicPluginStart; -} - -export type Services = { cases: CasesPublicStart; - data: DataPublicPluginStart; - storage: Storage; dataViews: DataViewsPublicPluginStart; triggersActionsUi: TriggersActionsStart; timelines: TimelinesUIStart; securityLayout: any; inspector: InspectorPluginStart; -} & CoreStart; +} + +export interface Services extends CoreStart, ThreatIntelligencePluginStartDeps { + storage: Storage; +} export interface LicenseAware { isEnterprise(): boolean; diff --git a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx index 9e05720913f19..32c502271e618 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx +++ b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.test.tsx @@ -7,6 +7,7 @@ import { EuiButtonEmpty } from '@elastic/eui'; import { act, fireEvent, render, screen } from '@testing-library/react'; +import { coreMock } from '@kbn/core/public/mocks'; import React from 'react'; import AddToTimelineButton, { @@ -18,6 +19,8 @@ import { DataProvider, IS_OPERATOR } from '../../../../common/types'; import { TestProviders } from '../../../mock'; import * as i18n from './translations'; +const coreStart = coreMock.createStart(); + const mockAddSuccess = jest.fn(); jest.mock('../../../hooks/use_app_toasts', () => ({ useAppToasts: () => ({ @@ -93,7 +96,7 @@ describe('add to timeline', () => { beforeEach(() => { render( - + ); }); @@ -111,7 +114,12 @@ describe('add to timeline', () => { beforeEach(() => { render( - + ); }); @@ -128,7 +136,12 @@ describe('add to timeline', () => { test('it renders a tooltip when `showTooltip` is true', () => { const { container } = render( - + ); @@ -138,7 +151,7 @@ describe('add to timeline', () => { test('it does NOT render a tooltip when `showTooltip` is false (default)', () => { const { container } = render( - + ); @@ -151,7 +164,12 @@ describe('add to timeline', () => { test('it starts dragging to timeline when a `draggableId` is provided', () => { render( - + ); @@ -163,7 +181,7 @@ describe('add to timeline', () => { test('it does NOT start dragging to timeline when a `draggableId` is NOT provided', () => { render( - + ); @@ -175,7 +193,12 @@ describe('add to timeline', () => { test('it dispatches a single `addProviderToTimeline` action when a single, non-array `dataProvider` is provided', () => { render( - + ); @@ -209,6 +232,7 @@ describe('add to timeline', () => { dataProvider={[providerA, providerB]} field={field} ownFocus={false} + startServices={coreStart} /> ); @@ -217,7 +241,7 @@ describe('add to timeline', () => { expect(mockDispatch).toHaveBeenCalledTimes(2); - providers.forEach((p, i) => + providers.forEach((_p, i) => expect(mockDispatch).toHaveBeenNthCalledWith(i + 1, { payload: { dataProvider: { @@ -241,7 +265,12 @@ describe('add to timeline', () => { render( - + ); @@ -273,6 +302,7 @@ describe('add to timeline', () => { keyboardEvent={keyboardEvent} ownFocus={true} showTooltip={true} + startServices={coreStart} /> ); @@ -290,6 +320,7 @@ describe('add to timeline', () => { keyboardEvent={keyboardEvent} ownFocus={true} showTooltip={true} + startServices={coreStart} /> ); @@ -308,6 +339,7 @@ describe('add to timeline', () => { keyboardEvent={keyboardEvent} ownFocus={true} showTooltip={true} + startServices={coreStart} /> ); @@ -338,6 +370,7 @@ describe('add to timeline', () => { keyboardEvent={keyboardEvent} ownFocus={true} showTooltip={true} + startServices={coreStart} /> ); @@ -355,6 +388,7 @@ describe('add to timeline', () => { keyboardEvent={keyboardEvent} ownFocus={true} showTooltip={true} + startServices={coreStart} /> ); @@ -373,6 +407,7 @@ describe('add to timeline', () => { keyboardEvent={keyboardEvent} ownFocus={true} showTooltip={true} + startServices={coreStart} /> ); @@ -387,7 +422,12 @@ describe('add to timeline', () => { test('Add success is called with "timeline" if timeline type is timeline', () => { render( - + ); @@ -408,6 +448,7 @@ describe('add to timeline', () => { field={field} ownFocus={false} timelineType={'template'} + startServices={coreStart} /> ); diff --git a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx index d927729a2e4af..c96a35e5cd472 100644 --- a/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx +++ b/x-pack/plugins/timelines/public/components/hover_actions/actions/add_to_timeline.tsx @@ -11,7 +11,8 @@ import { DraggableId } from '@hello-pangea/dnd'; import { isEmpty } from 'lodash'; import { useDispatch } from 'react-redux'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { TimelinesStartServices } from '../../..'; import { TimelineId } from '../../../store/timeline'; import { addProviderToTimeline } from '../../../store/timeline/actions'; import { stopPropagationAndPreventDefault } from '../../../../common/utils/accessibility'; @@ -63,6 +64,7 @@ export interface AddToTimelineButtonProps extends HoverActionComponentProps { draggableId?: DraggableId; dataProvider?: DataProvider[] | DataProvider; timelineType?: string; + startServices: TimelinesStartServices; } const AddToTimelineButton: React.FC = React.memo( @@ -78,6 +80,7 @@ const AddToTimelineButton: React.FC = React.memo( showTooltip = false, value, timelineType = 'default', + startServices, }) => { const dispatch = useDispatch(); const { addSuccess } = useAppToasts(); @@ -103,7 +106,8 @@ const AddToTimelineButton: React.FC = React.memo( provider.name, timelineType === 'default' )} - + , + startServices ), }); } @@ -121,6 +125,7 @@ const AddToTimelineButton: React.FC = React.memo( onClick, startDragToTimeline, timelineType, + startServices, ]); useEffect(() => { diff --git a/x-pack/plugins/timelines/public/index.ts b/x-pack/plugins/timelines/public/index.ts index 2efefc82f18da..7e6a71025e3ec 100644 --- a/x-pack/plugins/timelines/public/index.ts +++ b/x-pack/plugins/timelines/public/index.ts @@ -14,6 +14,8 @@ // first download since the other plugins/areas of your code can directly pull from the package in their async imports. // See: https://docs.elastic.dev/kibana-dev-docs/key-concepts/platform-intro#public-plugin-api +import type { CoreStart } from '@kbn/core/public'; + import { TimelinesPlugin } from './plugin'; export type { TimelinesUIStart } from './types'; @@ -49,3 +51,5 @@ export function plugin() { } export type { AddToTimelineButtonProps } from './components/hover_actions/actions/add_to_timeline'; + +export type TimelinesStartServices = Pick; diff --git a/x-pack/plugins/timelines/tsconfig.json b/x-pack/plugins/timelines/tsconfig.json index 3038d455e010c..a3350a2f2110b 100644 --- a/x-pack/plugins/timelines/tsconfig.json +++ b/x-pack/plugins/timelines/tsconfig.json @@ -2,7 +2,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "outDir": "target/types", + "outDir": "target/types" }, "include": [ "common/**/*", @@ -36,8 +36,9 @@ "@kbn/logging", "@kbn/search-errors", "@kbn/search-types", + "@kbn/react-kibana-mount" ], "exclude": [ - "target/**/*", + "target/**/*" ] } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index c5a3f25e77197..d55f8f3384724 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -13188,9 +13188,7 @@ "xpack.datasetQuality.expandLabel": "Développer", "xpack.datasetQuality.fetchDatasetDetailsFailed": "Nous n'avons pas pu obtenir les détails de votre ensemble de données.", "xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected": "Vous n'avez sélectionné aucun ensemble de données", - "xpack.datasetQuality.fetchDatasetsActivityFailed": "Nous n'avons pas pu obtenir les détails de vos ensembles de données actifs ou inactifs. Les valeurs par défaut sont affichées.", "xpack.datasetQuality.fetchDatasetsEstimatedDataFailed": "Nous n'avons pas pu obtenir les données estimées de vos ensembles de données. Les valeurs par défaut sont affichées.", - "xpack.datasetQuality.fetchDatasetsQualityDetailsFailed": "Nous n'avons pas pu obtenir de détails concernant la qualité de vos ensembles de données. Les valeurs par défaut sont affichées.", "xpack.datasetQuality.fetchDatasetStatsFailed": "Nous n'avons pas pu obtenir vos ensembles de données.", "xpack.datasetQuality.fetchDegradedStatsFailed": "Nous n'avons pas pu obtenir d'informations sur vos documents dégradés.", "xpack.datasetQuality.flyoutCancelText": "Annuler", @@ -17662,7 +17660,6 @@ "xpack.fleet.fleetServerSetupPermissionDeniedErrorMessage": "Le serveur Fleet doit être configuré. Pour cela, le privilège de cluster {roleName} est requis. Contactez votre administrateur.", "xpack.fleet.googleCloudShell.guide.description": "La commande Google Cloud Shell ci-dessous permet de créer toutes les ressources nécessaires à l'évaluation de la sécurité de vos projets GCP. En savoir plus sur {learnMore}.", "xpack.fleet.homeIntegration.tutorialModule.noticeText": "{notePrefix} Une version plus récente de ce module est {availableAsIntegrationLink}. Pour en savoir plus sur les intégrations et le nouvel agent Elastic Agent, lisez notre {blogPostLink}.", - "xpack.fleet.integration.settings.versionInfo.updatesAvailableBody": "Passez à la version {latestVersion} pour bénéficier des fonctionnalités les plus récentes.", "xpack.fleet.integrations.confirmUpdateModal.body.agentCount": "{agentCount, plural, one {# agent} other {# agents}}", "xpack.fleet.integrations.confirmUpdateModal.body.policyCount": "{packagePolicyCount, plural, one {# politique d’intégration} other {# politiques d’intégration}}", "xpack.fleet.integrations.installPackage.installingPackageButtonLabel": "Installation des ressources {title} en cours", @@ -25596,7 +25593,6 @@ "xpack.ml.actions.createADJobFromLens": "Créer une tâche de détection des anomalies", "xpack.ml.actions.createADJobFromPatternAnalysis": "Créer une tâche de catégorisation et de détection des anomalies", "xpack.ml.actions.editAnomalyChartsTitle": "Modifier les graphiques d'anomalies", - "xpack.ml.actions.editSwimlaneTitle": "Modifier le couloir", "xpack.ml.actions.openInAnomalyExplorerTitle": "Ouvrir dans Anomaly Explorer", "xpack.ml.actions.runPatternAnalysis.description": "Déclenché lorsque l'utilisateur souhaite effectuer une analyse du modèle sur un champ.", "xpack.ml.actions.runPatternAnalysis.title": "Exécuter l'analyse du modèle", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index c319d13c704d8..0842ddc97c8c9 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -13168,9 +13168,7 @@ "xpack.datasetQuality.expandLabel": "拡張", "xpack.datasetQuality.fetchDatasetDetailsFailed": "データセット詳細を取得できませんでした。", "xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected": "データセットが選択されていません", - "xpack.datasetQuality.fetchDatasetsActivityFailed": "アクティブ/非アクティブなデータセット詳細を取得できませんでした。デフォルト値が表示されます。", "xpack.datasetQuality.fetchDatasetsEstimatedDataFailed": "データセット推定データを取得できませんでした。デフォルト値が表示されます。", - "xpack.datasetQuality.fetchDatasetsQualityDetailsFailed": "データセット品質詳細を取得できませんでした。デフォルト値が表示されます。", "xpack.datasetQuality.fetchDatasetStatsFailed": "データセットを取得できませんでした。", "xpack.datasetQuality.fetchDegradedStatsFailed": "劣化したドキュメント情報を取得できませんでした。", "xpack.datasetQuality.flyoutCancelText": "キャンセル", @@ -17639,7 +17637,6 @@ "xpack.fleet.fleetServerSetupPermissionDeniedErrorMessage": "Fleetサーバーを設定する必要があります。これには{roleName}クラスター権限が必要です。管理者にお問い合わせください。", "xpack.fleet.googleCloudShell.guide.description": "以下のGoogle Cloud Shellコマンドは、GCPプロジェクトのセキュリティ態勢を評価するために必要なすべてのリソースを作成します。{learnMore}の詳細をご覧ください。", "xpack.fleet.homeIntegration.tutorialModule.noticeText": "{notePrefix}このモジュールの新しいバージョンは{availableAsIntegrationLink}です。統合と新しいElasticエージェントの詳細については、{blogPostLink}をお読みください。", - "xpack.fleet.integration.settings.versionInfo.updatesAvailableBody": "バージョン{latestVersion}にアップグレードして最新の機能を入手してください。", "xpack.fleet.integrations.confirmUpdateModal.body.agentCount": "{agentCount, plural, other {# 個のエージェント}}", "xpack.fleet.integrations.confirmUpdateModal.body.policyCount": "{packagePolicyCount, plural, other {# 個の統合ポリシー}}", "xpack.fleet.integrations.installPackage.installingPackageButtonLabel": "{title} アセットをインストールしています", @@ -25569,7 +25566,6 @@ "xpack.ml.actions.createADJobFromLens": "異常検知ジョブの作成", "xpack.ml.actions.createADJobFromPatternAnalysis": "分類異常検知ジョブを作成", "xpack.ml.actions.editAnomalyChartsTitle": "異常グラフを編集", - "xpack.ml.actions.editSwimlaneTitle": "スイムレーンの編集", "xpack.ml.actions.openInAnomalyExplorerTitle": "異常エクスプローラーで開く", "xpack.ml.actions.runPatternAnalysis.description": "ユーザーがフィールドに対してパターン分析を実行する場合にトリガーされます。", "xpack.ml.actions.runPatternAnalysis.title": "パターン分析を実行", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 7264328c582f7..b8a8545e1d5ce 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -13193,9 +13193,7 @@ "xpack.datasetQuality.expandLabel": "展开", "xpack.datasetQuality.fetchDatasetDetailsFailed": "无法获取数据集详情。", "xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected": "尚未选择任何数据集", - "xpack.datasetQuality.fetchDatasetsActivityFailed": "无法获取活动/非活动数据集详情。将显示默认值。", "xpack.datasetQuality.fetchDatasetsEstimatedDataFailed": "无法获取数据集估计数据。将显示默认值。", - "xpack.datasetQuality.fetchDatasetsQualityDetailsFailed": "无法获取数据集质量详情。将显示默认值。", "xpack.datasetQuality.fetchDatasetStatsFailed": "无法获取数据集。", "xpack.datasetQuality.fetchDegradedStatsFailed": "无法获取已降级文档信息。", "xpack.datasetQuality.flyoutCancelText": "取消", @@ -17667,7 +17665,6 @@ "xpack.fleet.fleetServerSetupPermissionDeniedErrorMessage": "需要设置 Fleet 服务器。这需要 {roleName} 集群权限。请联系您的管理员。", "xpack.fleet.googleCloudShell.guide.description": "以下 Google Cloud Shell 命令将创建所有必要资源来评估您的 GCP 组织的安全态势。详细了解 {learnMore}。", "xpack.fleet.homeIntegration.tutorialModule.noticeText": "{notePrefix} 此模块的较新版本为 {availableAsIntegrationLink}。要详细了解集成和新 Elastic 代理,请阅读我们的{blogPostLink}。", - "xpack.fleet.integration.settings.versionInfo.updatesAvailableBody": "升级到版本 {latestVersion} 可获取最新功能。", "xpack.fleet.integrations.confirmUpdateModal.body.agentCount": "{agentCount, plural, other {# 个代理}}", "xpack.fleet.integrations.confirmUpdateModal.body.policyCount": "{packagePolicyCount, plural, other {# 个集成策略}}", "xpack.fleet.integrations.installPackage.installingPackageButtonLabel": "正在安装 {title} 资产", @@ -25607,7 +25604,6 @@ "xpack.ml.actions.createADJobFromLens": "创建异常检测作业", "xpack.ml.actions.createADJobFromPatternAnalysis": "创建归类异常检测作业", "xpack.ml.actions.editAnomalyChartsTitle": "编辑异常图表", - "xpack.ml.actions.editSwimlaneTitle": "编辑泳道", "xpack.ml.actions.openInAnomalyExplorerTitle": "在 Anomaly Explorer 中打开", "xpack.ml.actions.runPatternAnalysis.description": "在用户希望对字段运行模式分析时触发。", "xpack.ml.actions.runPatternAnalysis.title": "运行模式分析", diff --git a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts index 08c43eb9f8c0f..3656fb9ea3469 100644 --- a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts +++ b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts @@ -793,6 +793,51 @@ describe('buildAgg', () => { }); }); + it('should create correct aggregation when condition params are defined and multi terms selected', async () => { + expect( + buildAggregation({ + aggType: 'sum', + aggField: 'avg-field', + termField: ['the-term', 'second-term'], + termSize: 100, + condition: { + resultLimit: 1000, + conditionScript: `params.compareValue <= 0`, + }, + }) + ).toEqual({ + groupAgg: { + multi_terms: { + size: 100, + terms: [{ field: 'the-term' }, { field: 'second-term' }], + order: { + metricAgg: 'desc', + }, + }, + aggs: { + conditionSelector: { + bucket_selector: { + buckets_path: { + compareValue: 'metricAgg', + }, + script: `params.compareValue <= 0`, + }, + }, + metricAgg: { + sum: { + field: 'avg-field', + }, + }, + }, + }, + groupAggCount: { + stats_bucket: { + buckets_path: 'groupAgg._count', + }, + }, + }); + }); + it('should add topHitsAgg if topHitsSize is defined', () => { expect( buildAggregation({ diff --git a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts index dfb141554a9fd..3c61368543b8c 100644 --- a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts +++ b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts @@ -46,7 +46,7 @@ export const buildAggregation = ({ condition, topHitsSize, }: BuildAggregationOpts): Record => { - const aggContainer = { + const aggContainer: AggregationsAggregationContainer = { aggs: {}, }; const isCountAgg = isCountAggregation(aggType); @@ -78,7 +78,7 @@ export const buildAggregation = ({ : terms : terms; - let aggParent: any = aggContainer; + let aggParent: AggregationsAggregationContainer = aggContainer; const getAggName = () => (isDateAgg ? 'sortValueAgg' : 'metricAgg'); @@ -114,9 +114,15 @@ export const buildAggregation = ({ // if not count add an order if (!isCountAgg) { const sortOrder = aggType === 'min' ? 'asc' : 'desc'; - aggParent.aggs.groupAgg.terms!.order = { - [getAggName()]: sortOrder, - }; + if (isMultiTerms && aggParent.aggs.groupAgg.multi_terms) { + aggParent.aggs.groupAgg.multi_terms.order = { + [getAggName()]: sortOrder, + }; + } else if (aggParent.aggs.groupAgg.terms) { + aggParent.aggs.groupAgg.terms.order = { + [getAggName()]: sortOrder, + }; + } } else if (includeConditionInQuery) { aggParent.aggs.groupAgg.aggs = { conditionSelector: { @@ -193,7 +199,7 @@ export const buildAggregation = ({ } if (timeSeries && dateRangeInfo) { - aggParent = aggParent.aggs.dateAgg; + aggParent = aggParent?.aggs?.dateAgg ?? {}; // finally, the metric aggregation, if requested if (!isCountAgg) { @@ -207,5 +213,5 @@ export const buildAggregation = ({ } } - return aggContainer.aggs; + return aggContainer.aggs ?? {}; }; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/api_key.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/api_key.ts index 44e2c3f0252af..b079571b26224 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/api_key.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/api_key.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { ALERTING_CASES_SAVED_OBJECT_INDEX, SavedObject } from '@kbn/core-saved-objects-server'; import { AdHocRunSO } from '@kbn/alerting-plugin/server/data/ad_hoc_run/types'; import { get } from 'lodash'; @@ -119,6 +120,8 @@ export default function apiKeyBackfillTests({ getService }: FtrProviderContext) } it('should wait to invalidate API key until backfill for rule is complete', async () => { + const start = moment().utc().startOf('day').subtract(7, 'days').toISOString(); + const end = moment().utc().startOf('day').subtract(4, 'day').toISOString(); const spaceId = SuperuserAtSpace1.space.id; // create 2 rules @@ -143,14 +146,9 @@ export default function apiKeyBackfillTests({ getService }: FtrProviderContext) .post(`${getUrlPrefix(spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) - .send([ - { - rule_id: ruleId1, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-22T12:00:00.000Z', - }, - ]) + .send([{ rule_id: ruleId1, start, end }]) .expect(200); + const result = response.body; const backfillId = result[0].id; const schedule = result[0].schedule; @@ -163,43 +161,20 @@ export default function apiKeyBackfillTests({ getService }: FtrProviderContext) expect(typeof adHocRun1.createdAt).to.be('string'); expect(adHocRun1.duration).to.eql('12h'); expect(adHocRun1.enabled).to.eql(true); - expect(adHocRun1.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun1.end).to.eql('2023-10-22T12:00:00.000Z'); + expect(adHocRun1.start).to.eql(start); + expect(adHocRun1.end).to.eql(end); expect(adHocRun1.status).to.eql('pending'); expect(adHocRun1.spaceId).to.eql(spaceId); testExpectedRule(adHocRun1, undefined, true); - expect(adHocRun1.schedule).to.eql([ - { - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-20T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-21T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-21T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-22T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-22T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + + let currentStart = start; + adHocRun1.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); // delete both rules which will mark the api keys for invalidation await supertestWithoutAuth diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/delete.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/delete.ts index d0b48e5753e29..cc86d9a7d157e 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/delete.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/delete.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { asyncForEach } from '@kbn/std'; import { GetResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { UserAtSpaceScenarios } from '../../../../scenarios'; @@ -26,6 +27,8 @@ export default function deleteBackfillTests({ getService }: FtrProviderContext) describe('delete backfill', () => { let backfillIds: Array<{ id: string; spaceId: string }> = []; const objectRemover = new ObjectRemover(supertest); + const start = moment().utc().startOf('day').subtract(31, 'days').toISOString(); + const end = moment().utc().startOf('day').subtract(1, 'day').toISOString(); afterEach(async () => { asyncForEach(backfillIds, async ({ id, spaceId }: { id: string; spaceId: string }) => { @@ -80,19 +83,10 @@ export default function deleteBackfillTests({ getService }: FtrProviderContext) const scheduleResponse = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') + // set a long time range so the backfill doesn't finish running and get deleted .send([ - { - // set a long time range so the backfill doesn't finish running and get deleted - rule_id: ruleId1, - start: '2023-10-19T12:00:00.000Z', - end: '2023-11-19T12:00:00.000Z', - }, - { - // set a long time range so the backfill doesn't finish running and get deleted - rule_id: ruleId2, - start: '2023-10-19T12:00:00.000Z', - end: '2023-11-19T12:00:00.000Z', - }, + { rule_id: ruleId1, start, end }, + { rule_id: ruleId2, start, end }, ]); const scheduleResult = scheduleResponse.body; @@ -258,7 +252,7 @@ export default function deleteBackfillTests({ getService }: FtrProviderContext) } }); - it('should not get backfill from another space', async () => { + it('should not delete backfill from another space', async () => { // create rule const rresponse = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/api/alerting/rule`) @@ -272,13 +266,7 @@ export default function deleteBackfillTests({ getService }: FtrProviderContext) const scheduleResponse = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') - .send([ - { - rule_id: ruleId, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-25T12:00:00.000Z', - }, - ]); + .send([{ rule_id: ruleId, start, end }]); const scheduleResult = scheduleResponse.body; expect(scheduleResult.length).to.eql(1); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts index 43fadf5ee04e9..1a6d94a7ffafb 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/find.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { asyncForEach } from '@kbn/std'; import { UserAtSpaceScenarios } from '../../../../scenarios'; import { getTestRuleData, getUrlPrefix, ObjectRemover } from '../../../../../common/lib'; @@ -19,6 +20,10 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { describe('find backfill', () => { let backfillIds: Array<{ id: string; spaceId: string }> = []; const objectRemover = new ObjectRemover(supertest); + const start1 = moment().utc().startOf('day').subtract(14, 'days').toISOString(); + const end1 = moment().utc().startOf('day').subtract(8, 'day').toISOString(); + const start2 = moment().utc().startOf('day').subtract(12, 'days').toISOString(); + const end2 = moment().utc().startOf('day').subtract(10, 'day').toISOString(); afterEach(async () => { asyncForEach(backfillIds, async ({ id, spaceId }: { id: string; spaceId: string }) => { @@ -47,50 +52,44 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { expect(data.id).to.eql(id); expect(data.duration).to.eql('12h'); expect(data.enabled).to.eql(true); - expect(data.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(data.end).to.eql('2023-10-25T12:00:00.000Z'); + expect(data.start).to.eql(start1); + expect(data.end).to.eql(end1); expect(data.status).to.eql('pending'); expect(data.space_id).to.eql(spaceId); expect(typeof data.created_at).to.be('string'); testExpectedRule(data, ruleId, false); expect(data.schedule.length).to.eql(12); + + let currentStart = start1; data.schedule.forEach((sched: any) => { expect(sched.interval).to.eql('12h'); expect(sched.status).to.match(/complete|pending|running|error|timeout/); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; }); - expect(data.schedule[0].run_at).to.eql('2023-10-20T00:00:00.000Z'); - expect(data.schedule[1].run_at).to.eql('2023-10-20T12:00:00.000Z'); - expect(data.schedule[2].run_at).to.eql('2023-10-21T00:00:00.000Z'); - expect(data.schedule[3].run_at).to.eql('2023-10-21T12:00:00.000Z'); - expect(data.schedule[4].run_at).to.eql('2023-10-22T00:00:00.000Z'); - expect(data.schedule[5].run_at).to.eql('2023-10-22T12:00:00.000Z'); - expect(data.schedule[6].run_at).to.eql('2023-10-23T00:00:00.000Z'); - expect(data.schedule[7].run_at).to.eql('2023-10-23T12:00:00.000Z'); - expect(data.schedule[8].run_at).to.eql('2023-10-24T00:00:00.000Z'); - expect(data.schedule[9].run_at).to.eql('2023-10-24T12:00:00.000Z'); - expect(data.schedule[10].run_at).to.eql('2023-10-25T00:00:00.000Z'); - expect(data.schedule[11].run_at).to.eql('2023-10-25T12:00:00.000Z'); } function testExpectedBackfill2(data: any, id: string, ruleId: string, spaceId: string) { expect(data.id).to.eql(id); expect(data.duration).to.eql('12h'); expect(data.enabled).to.eql(true); - expect(data.start).to.eql('2023-10-21T12:00:00.000Z'); - expect(data.end).to.eql('2023-10-23T12:00:00.000Z'); + expect(data.start).to.eql(start2); + expect(data.end).to.eql(end2); expect(data.status).to.eql('pending'); expect(data.space_id).to.eql(spaceId); expect(typeof data.created_at).to.be('string'); testExpectedRule(data, ruleId, false); expect(data.schedule.length).to.eql(4); + + let currentStart = start2; data.schedule.forEach((sched: any) => { expect(sched.interval).to.eql('12h'); expect(sched.status).to.match(/complete|pending|running|error|timeout/); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; }); - expect(data.schedule[0].run_at).to.eql('2023-10-22T00:00:00.000Z'); - expect(data.schedule[1].run_at).to.eql('2023-10-22T12:00:00.000Z'); - expect(data.schedule[2].run_at).to.eql('2023-10-23T00:00:00.000Z'); - expect(data.schedule[3].run_at).to.eql('2023-10-23T12:00:00.000Z'); } function testExpectedRule(result: any, ruleId: string | undefined, isSO: boolean) { @@ -165,16 +164,8 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .send([ - { - rule_id: ruleId1, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-25T12:00:00.000Z', - }, - { - rule_id: ruleId2, - start: '2023-10-21T12:00:00.000Z', - end: '2023-10-23T12:00:00.000Z', - }, + { rule_id: ruleId1, start: start1, end: end1 }, + { rule_id: ruleId2, start: start2, end: end2 }, ]); const scheduleResult = scheduleResponse.body; @@ -235,7 +226,11 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?start=2023-10-19T08:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?start=${moment() + .utc() + .startOf('day') + .subtract(15, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -245,7 +240,11 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?start=2023-10-20T08:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?start=${moment() + .utc() + .startOf('day') + .subtract(13, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -255,7 +254,11 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?start=2023-10-22T08:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?start=${moment() + .utc() + .startOf('day') + .subtract(5, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -265,7 +268,11 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?end=2023-10-26T00:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?end=${moment() + .utc() + .startOf('day') + .subtract(5, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -275,7 +282,11 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?end=2023-10-24T18:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?end=${moment() + .utc() + .startOf('day') + .subtract(9, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -285,7 +296,11 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?end=2023-10-18T00:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?end=${moment() + .utc() + .startOf('day') + .subtract(15, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -295,7 +310,15 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?start=2023-10-19T00:00:00.000Z&end=2023-10-26T00:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?start=${moment() + .utc() + .startOf('day') + .subtract(15, 'days') + .toISOString()}&end=${moment() + .utc() + .startOf('day') + .subtract(7, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -305,7 +328,15 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?start=2023-10-21T00:00:00.000Z&end=2023-10-23T13:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?start=${moment() + .utc() + .startOf('day') + .subtract(13, 'days') + .toISOString()}&end=${moment() + .utc() + .startOf('day') + .subtract(9, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -315,7 +346,15 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { .post( `${getUrlPrefix( apiOptions.spaceId - )}/internal/alerting/rules/backfill/_find?start=2023-10-18T00:00:00.000Z&end=2023-10-19T00:00:00.000Z` + )}/internal/alerting/rules/backfill/_find?start=${moment() + .utc() + .startOf('day') + .subtract(20, 'days') + .toISOString()}&end=${moment() + .utc() + .startOf('day') + .subtract(15, 'days') + .toISOString()}` ) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password); @@ -625,9 +664,9 @@ export default function findBackfillTests({ getService }: FtrProviderContext) { ruleId2, space.id ); - const start1 = new Date(resultFindWithSort.data[0].start).valueOf(); - const start2 = new Date(resultFindWithSort.data[1].start).valueOf(); - expect(start1).to.be.greaterThan(start2); + const sortedStart1 = new Date(resultFindWithSort.data[0].start).valueOf(); + const sortedStart2 = new Date(resultFindWithSort.data[1].start).valueOf(); + expect(sortedStart1).to.be.greaterThan(sortedStart2); break; default: diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts index cce0e974032a7..7b051df51b226 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/get.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { asyncForEach } from '@kbn/std'; import { UserAtSpaceScenarios } from '../../../../scenarios'; import { getTestRuleData, getUrlPrefix, ObjectRemover } from '../../../../../common/lib'; @@ -19,6 +20,9 @@ export default function getBackfillTests({ getService }: FtrProviderContext) { describe('get backfill', () => { let backfillIds: Array<{ id: string; spaceId: string }> = []; const objectRemover = new ObjectRemover(supertest); + const start = moment().utc().startOf('day').subtract(7, 'days').toISOString(); + const end1 = moment().utc().startOf('day').subtract(1, 'day').toISOString(); + const end2 = moment().utc().startOf('day').subtract(3, 'day').toISOString(); afterEach(async () => { asyncForEach(backfillIds, async ({ id, spaceId }: { id: string; spaceId: string }) => { @@ -115,16 +119,8 @@ export default function getBackfillTests({ getService }: FtrProviderContext) { .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .send([ - { - rule_id: ruleId1, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-25T12:00:00.000Z', - }, - { - rule_id: ruleId2, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-23T12:00:00.000Z', - }, + { rule_id: ruleId1, start, end: end1 }, + { rule_id: ruleId2, start, end: end2 }, ]); const scheduleResult = scheduleResponse.body; @@ -183,52 +179,42 @@ export default function getBackfillTests({ getService }: FtrProviderContext) { expect(getResponse1.body.id).to.eql(backfillId1); expect(getResponse1.body.duration).to.eql('12h'); expect(getResponse1.body.enabled).to.eql(true); - expect(getResponse1.body.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(getResponse1.body.end).to.eql('2023-10-25T12:00:00.000Z'); + expect(getResponse1.body.start).to.eql(start); + expect(getResponse1.body.end).to.eql(end1); expect(getResponse1.body.status).to.eql('pending'); expect(getResponse1.body.space_id).to.eql(space.id); expect(typeof getResponse1.body.created_at).to.be('string'); testExpectedRule(getResponse1.body, ruleId1, false); expect(getResponse1.body.schedule.length).to.eql(12); + + let currentStart = start; getResponse1.body.schedule.forEach((sched: any) => { expect(sched.interval).to.eql('12h'); expect(sched.status).to.match(/complete|pending|running|error|timeout/); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; }); - expect(getResponse1.body.schedule[0].run_at).to.eql('2023-10-20T00:00:00.000Z'); - expect(getResponse1.body.schedule[1].run_at).to.eql('2023-10-20T12:00:00.000Z'); - expect(getResponse1.body.schedule[2].run_at).to.eql('2023-10-21T00:00:00.000Z'); - expect(getResponse1.body.schedule[3].run_at).to.eql('2023-10-21T12:00:00.000Z'); - expect(getResponse1.body.schedule[4].run_at).to.eql('2023-10-22T00:00:00.000Z'); - expect(getResponse1.body.schedule[5].run_at).to.eql('2023-10-22T12:00:00.000Z'); - expect(getResponse1.body.schedule[6].run_at).to.eql('2023-10-23T00:00:00.000Z'); - expect(getResponse1.body.schedule[7].run_at).to.eql('2023-10-23T12:00:00.000Z'); - expect(getResponse1.body.schedule[8].run_at).to.eql('2023-10-24T00:00:00.000Z'); - expect(getResponse1.body.schedule[9].run_at).to.eql('2023-10-24T12:00:00.000Z'); - expect(getResponse1.body.schedule[10].run_at).to.eql('2023-10-25T00:00:00.000Z'); - expect(getResponse1.body.schedule[11].run_at).to.eql('2023-10-25T12:00:00.000Z'); expect(getResponse2.body.id).to.eql(backfillId2); expect(getResponse2.body.duration).to.eql('12h'); expect(getResponse2.body.enabled).to.eql(true); - expect(getResponse2.body.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(getResponse2.body.end).to.eql('2023-10-23T12:00:00.000Z'); + expect(getResponse2.body.start).to.eql(start); + expect(getResponse2.body.end).to.eql(end2); expect(getResponse2.body.status).to.eql('pending'); expect(getResponse2.body.space_id).to.eql(space.id); expect(typeof getResponse2.body.created_at).to.be('string'); testExpectedRule(getResponse2.body, ruleId2, false); expect(getResponse2.body.schedule.length).to.eql(8); + + currentStart = start; getResponse2.body.schedule.forEach((sched: any) => { expect(sched.interval).to.eql('12h'); expect(sched.status).to.match(/complete|pending|running|error|timeout/); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; }); - expect(getResponse2.body.schedule[0].run_at).to.eql('2023-10-20T00:00:00.000Z'); - expect(getResponse2.body.schedule[1].run_at).to.eql('2023-10-20T12:00:00.000Z'); - expect(getResponse2.body.schedule[2].run_at).to.eql('2023-10-21T00:00:00.000Z'); - expect(getResponse2.body.schedule[3].run_at).to.eql('2023-10-21T12:00:00.000Z'); - expect(getResponse2.body.schedule[4].run_at).to.eql('2023-10-22T00:00:00.000Z'); - expect(getResponse2.body.schedule[5].run_at).to.eql('2023-10-22T12:00:00.000Z'); - expect(getResponse2.body.schedule[6].run_at).to.eql('2023-10-23T00:00:00.000Z'); - expect(getResponse2.body.schedule[7].run_at).to.eql('2023-10-23T12:00:00.000Z'); break; default: throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); @@ -286,13 +272,7 @@ export default function getBackfillTests({ getService }: FtrProviderContext) { const scheduleResponse = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') - .send([ - { - rule_id: ruleId, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-25T12:00:00.000Z', - }, - ]); + .send([{ rule_id: ruleId, start, end: end1 }]); const scheduleResult = scheduleResponse.body; expect(scheduleResult.length).to.eql(1); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts index 4bcd91574997b..d5207718d844a 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/schedule.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { ALERTING_CASES_SAVED_OBJECT_INDEX, SavedObject } from '@kbn/core-saved-objects-server'; import { AdHocRunSO } from '@kbn/alerting-plugin/server/data/ad_hoc_run/types'; import { get } from 'lodash'; @@ -127,6 +128,8 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext password: user.password, }; it('should handle scheduling backfill job requests appropriately', async () => { + const defaultStart = moment().utc().startOf('day').subtract(7, 'days').toISOString(); + const defaultEnd = moment().utc().startOf('day').subtract(1, 'day').toISOString(); // create 2 rules const rresponse1 = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/api/alerting/rule`) @@ -152,10 +155,10 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext .send([ { rule_id: ruleId1, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-25T12:00:00.000Z', + start: defaultStart, + end: defaultEnd, }, - { rule_id: ruleId2, start: '2023-10-19T12:00:00.000Z' }, + { rule_id: ruleId2, start: defaultStart }, ]); switch (scenario.id) { @@ -195,92 +198,37 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext backfillIds.push({ id: result[0].id, spaceId: apiOptions.spaceId }); expect(result[0].duration).to.eql('12h'); expect(result[0].enabled).to.eql(true); - expect(result[0].start).to.eql('2023-10-19T12:00:00.000Z'); - expect(result[0].end).to.eql('2023-10-25T12:00:00.000Z'); + expect(result[0].start).to.eql(defaultStart); + expect(result[0].end).to.eql(defaultEnd); expect(result[0].status).to.eql('pending'); expect(result[0].space_id).to.eql(space.id); expect(typeof result[0].created_at).to.be('string'); testExpectedRule(result[0], ruleId1, false); - expect(result[0].schedule).to.eql([ - { - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-20T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-21T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-21T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-22T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-22T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-23T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-23T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-24T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-24T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-25T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - run_at: '2023-10-25T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + + let currentStart = defaultStart; + result[0].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); expect(typeof result[1].id).to.be('string'); backfillIds.push({ id: result[1].id, spaceId: apiOptions.spaceId }); expect(result[1].duration).to.eql('12h'); expect(result[1].enabled).to.eql(true); - expect(result[1].start).to.eql('2023-10-19T12:00:00.000Z'); - expect(result[1].end).to.eql('2023-10-20T00:00:00.000Z'); + expect(result[1].start).to.eql(defaultStart); + expect(result[1].end).to.eql(moment(defaultStart).add(12, 'hours').toISOString()); expect(result[1].status).to.eql('pending'); expect(result[1].space_id).to.eql(space.id); expect(typeof result[1].created_at).to.be('string'); testExpectedRule(result[1], ruleId2, false); - expect(result[1].schedule).to.eql([ - { - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + expect(result[1].schedule[0].interval).to.eql('12h'); + expect(result[1].schedule[0].status).to.eql('pending'); + expect(result[1].schedule[0].run_at).to.eql( + moment(defaultStart).add(12, 'hours').toISOString() + ); // check that the ad hoc run SO was created const adHocRunSO1 = (await getAdHocRunSO(result[0].id)) as SavedObject; @@ -293,91 +241,35 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext expect(typeof adHocRun1.createdAt).to.be('string'); expect(adHocRun1.duration).to.eql('12h'); expect(adHocRun1.enabled).to.eql(true); - expect(adHocRun1.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun1.end).to.eql('2023-10-25T12:00:00.000Z'); + expect(adHocRun1.start).to.eql(defaultStart); + expect(adHocRun1.end).to.eql(defaultEnd); expect(adHocRun1.status).to.eql('pending'); expect(adHocRun1.spaceId).to.eql(space.id); testExpectedRule(adHocRun1, undefined, true); - expect(adHocRun1.schedule).to.eql([ - { - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-20T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-21T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-21T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-22T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-22T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-23T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-23T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-24T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-24T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-25T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - { - runAt: '2023-10-25T12:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + currentStart = defaultStart; + adHocRun1.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); expect(typeof adHocRun2.apiKeyId).to.be('string'); expect(typeof adHocRun2.apiKeyToUse).to.be('string'); expect(typeof adHocRun2.createdAt).to.be('string'); expect(adHocRun2.duration).to.eql('12h'); expect(adHocRun2.enabled).to.eql(true); - expect(adHocRun2.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun2.end).to.eql('2023-10-20T00:00:00.000Z'); + expect(adHocRun2.start).to.eql(defaultStart); + expect(adHocRun2.end).to.eql(moment(defaultStart).add(12, 'hours').toISOString()); expect(adHocRun2.status).to.eql('pending'); expect(adHocRun2.spaceId).to.eql(space.id); testExpectedRule(adHocRun2, undefined, true); - expect(adHocRun2.schedule).to.eql([ - { - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + expect(adHocRun2.schedule[0].interval).to.eql('12h'); + expect(adHocRun2.schedule[0].status).to.eql('pending'); + expect(adHocRun2.schedule[0].runAt).to.eql( + moment(defaultStart).add(12, 'hours').toISOString() + ); // check references are stored correctly expect(adHocRunSO1.references).to.eql([{ id: ruleId1, name: 'rule', type: 'alert' }]); @@ -423,6 +315,11 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext }); it('should handle scheduling multiple backfill job requests for a single rule appropriately', async () => { + const start1 = moment().utc().startOf('day').subtract(7, 'days').toISOString(); + const end1 = moment().utc().startOf('day').subtract(4, 'days').toISOString(); + const start2 = moment().utc().startOf('day').subtract(8, 'days').toISOString(); + const start3 = moment().utc().startOf('day').subtract(14, 'days').toISOString(); + const end3 = moment().utc().startOf('day').subtract(12, 'days').toISOString(); // create 1 rule as current user const rresponse = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/api/alerting/rule`) @@ -438,17 +335,9 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password) .send([ - { - rule_id: ruleId, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-21T12:00:00.000Z', - }, - { rule_id: ruleId, start: '2023-10-18T12:00:00.000Z' }, - { - rule_id: ruleId, - start: '2023-12-30T12:00:00.000Z', - end: '2024-01-01T12:00:00.000Z', - }, + { rule_id: ruleId, start: start1, end: end1 }, + { rule_id: ruleId, start: start2 }, + { rule_id: ruleId, start: start3, end: end3 }, ]); switch (scenario.id) { @@ -488,85 +377,61 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext backfillIds.push({ id: result[0].id, spaceId: apiOptions.spaceId }); expect(result[0].duration).to.eql('12h'); expect(result[0].enabled).to.eql(true); - expect(result[0].start).to.eql('2023-10-19T12:00:00.000Z'); - expect(result[0].end).to.eql('2023-10-21T12:00:00.000Z'); + expect(result[0].start).to.eql(start1); + expect(result[0].end).to.eql(end1); expect(result[0].status).to.eql('pending'); expect(result[0].space_id).to.eql(space.id); expect(typeof result[0].created_at).to.be('string'); testExpectedRule(result[0], ruleId, false); - expect(result[0].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-20T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T12:00:00.000Z', - status: 'pending', - }, - ]); + + let currentStart = start1; + result[0].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); expect(typeof result[1].id).to.be('string'); backfillIds.push({ id: result[1].id, spaceId: apiOptions.spaceId }); expect(result[1].duration).to.eql('12h'); expect(result[1].enabled).to.eql(true); - expect(result[1].start).to.eql('2023-10-18T12:00:00.000Z'); - expect(result[1].end).to.eql('2023-10-19T00:00:00.000Z'); + expect(result[1].start).to.eql(start2); + expect(result[1].end).to.eql(moment(start2).add(12, 'hours').toISOString()); expect(result[1].status).to.eql('pending'); expect(result[1].space_id).to.eql(space.id); expect(typeof result[1].created_at).to.be('string'); testExpectedRule(result[1], ruleId, false); - expect(result[1].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-19T00:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start2; + result[1].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); expect(typeof result[2].id).to.be('string'); backfillIds.push({ id: result[2].id, spaceId: apiOptions.spaceId }); expect(result[2].duration).to.eql('12h'); expect(result[2].enabled).to.eql(true); - expect(result[2].start).to.eql('2023-12-30T12:00:00.000Z'); - expect(result[2].end).to.eql('2024-01-01T12:00:00.000Z'); + expect(result[2].start).to.eql(start3); + expect(result[2].end).to.eql(end3); expect(result[2].status).to.eql('pending'); expect(result[2].space_id).to.eql(space.id); expect(typeof result[2].created_at).to.be('string'); testExpectedRule(result[2], ruleId, false); - expect(result[2].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-12-31T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-12-31T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2024-01-01T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2024-01-01T12:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start3; + result[2].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); // check that the ad hoc run SO was created const adHocRunSO1 = (await getAdHocRunSO(result[0].id)) as SavedObject; @@ -581,84 +446,60 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext expect(typeof adHocRun1.createdAt).to.be('string'); expect(adHocRun1.duration).to.eql('12h'); expect(adHocRun1.enabled).to.eql(true); - expect(adHocRun1.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun1.end).to.eql('2023-10-21T12:00:00.000Z'); + expect(adHocRun1.start).to.eql(start1); + expect(adHocRun1.end).to.eql(end1); expect(adHocRun1.status).to.eql('pending'); expect(adHocRun1.spaceId).to.eql(space.id); testExpectedRule(adHocRun1, undefined, true); - expect(adHocRun1.schedule).to.eql([ - { - interval: '12h', - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2023-10-20T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2023-10-21T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2023-10-21T12:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start1; + adHocRun1.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); expect(typeof adHocRun2.apiKeyId).to.be('string'); expect(typeof adHocRun2.apiKeyToUse).to.be('string'); expect(typeof adHocRun2.createdAt).to.be('string'); expect(adHocRun2.duration).to.eql('12h'); expect(adHocRun2.enabled).to.eql(true); - expect(adHocRun2.start).to.eql('2023-10-18T12:00:00.000Z'); - expect(adHocRun2.end).to.eql('2023-10-19T00:00:00.000Z'); + expect(adHocRun2.start).to.eql(start2); + expect(adHocRun2.end).to.eql(moment(start2).add(12, 'hours').toISOString()); expect(adHocRun2.status).to.eql('pending'); expect(adHocRun2.spaceId).to.eql(space.id); testExpectedRule(adHocRun2, undefined, true); - expect(adHocRun2.schedule).to.eql([ - { - interval: '12h', - runAt: '2023-10-19T00:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start2; + adHocRun2.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); expect(typeof adHocRun3.apiKeyId).to.be('string'); expect(typeof adHocRun3.apiKeyToUse).to.be('string'); expect(typeof adHocRun3.createdAt).to.be('string'); expect(adHocRun3.duration).to.eql('12h'); expect(adHocRun3.enabled).to.eql(true); - expect(adHocRun3.start).to.eql('2023-12-30T12:00:00.000Z'); - expect(adHocRun3.end).to.eql('2024-01-01T12:00:00.000Z'); + expect(adHocRun3.start).to.eql(start3); + expect(adHocRun3.end).to.eql(end3); expect(adHocRun3.status).to.eql('pending'); expect(adHocRun3.spaceId).to.eql(space.id); testExpectedRule(adHocRun3, undefined, true); - expect(adHocRun3.schedule).to.eql([ - { - interval: '12h', - runAt: '2023-12-31T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2023-12-31T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2024-01-01T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2024-01-01T12:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start3; + adHocRun3.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); // check references are stored correctly expect(adHocRunSO1.references).to.eql([{ id: ruleId, name: 'rule', type: 'alert' }]); @@ -726,12 +567,7 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password) - .send([ - { - rule_id: 'abc', - start: 'foo', - }, - ]); + .send([{ rule_id: 'abc', start: 'foo' }]); // invalid end time const response2 = await supertestWithoutAuth @@ -741,34 +577,58 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext .send([ { rule_id: 'abc', - start: '2023-10-19T12:00:00.000Z', + start: moment().utc().startOf('day').subtract(7, 'days').toISOString(), end: 'foo', }, ]); // end time equals start time + const time = moment().utc().startOf('day').subtract(7, 'days').toISOString(); const response3 = await supertestWithoutAuth + .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) + .set('kbn-xsrf', 'foo') + .auth(apiOptions.username, apiOptions.password) + .send([{ rule_id: 'abc', start: time, end: time }]); + + // end time is before start time + const response4 = await supertestWithoutAuth .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password) .send([ { rule_id: 'abc', - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-19T12:00:00.000Z', + start: moment().utc().startOf('day').subtract(7, 'days').toISOString(), + end: moment().utc().startOf('day').subtract(8, 'days').toISOString(), }, ]); - // end time is before start time - const response4 = await supertestWithoutAuth + // start time is too far in the past + const response5 = await supertestWithoutAuth + .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) + .set('kbn-xsrf', 'foo') + .auth(apiOptions.username, apiOptions.password) + .send([{ rule_id: 'abc', start: '2023-04-30T00:00:00.000Z' }]); + + // start time is in the future + const response6 = await supertestWithoutAuth + .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) + .set('kbn-xsrf', 'foo') + .auth(apiOptions.username, apiOptions.password) + .send([ + { rule_id: 'abc', start: moment().utc().startOf('day').add(1, 'days').toISOString() }, + ]); + + // end time is in the future + const response7 = await supertestWithoutAuth .post(`${getUrlPrefix(apiOptions.spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password) .send([ { rule_id: 'abc', - start: '2023-10-19T12:00:00.000Z', - end: '2020-10-19T12:00:00.000Z', + start: moment().utc().startOf('day').subtract(1, 'days').toISOString(), + end: moment().utc().startOf('day').add(1, 'days').toISOString(), }, ]); @@ -817,6 +677,27 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext error: 'Bad Request', message: '[request body.0]: Backfill end must be greater than backfill start', }); + + expect(response5.statusCode).to.eql(400); + expect(response5.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: '[request body.0]: Backfill cannot look back more than 90 days', + }); + + expect(response6.statusCode).to.eql(400); + expect(response6.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: '[request body.0]: Backfill cannot be scheduled for the future', + }); + + expect(response7.statusCode).to.eql(400); + expect(response7.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: '[request body.0]: Backfill cannot be scheduled for the future', + }); break; default: throw new Error(`Scenario untested: ${JSON.stringify(scenario)}`); @@ -832,7 +713,7 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext .send([ { rule_id: 'ac612b4b-5d0c-46d7-855a-98dd920e3aa6', - start: '2023-10-19T12:00:00.000Z', + start: moment().utc().startOf('day').subtract(7, 'days').toISOString(), }, ]); @@ -872,6 +753,8 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext }); it('should handle schedule request where some requests succeed and some requests fail appropriately', async () => { + const start = moment().utc().startOf('day').subtract(7, 'days').toISOString(); + const end = moment().utc().startOf('day').subtract(5, 'days').toISOString(); // create 2 rules const rresponse1 = await supertest .post(`${getUrlPrefix(apiOptions.spaceId)}/api/alerting/rule`) @@ -927,16 +810,12 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext .set('kbn-xsrf', 'foo') .auth(apiOptions.username, apiOptions.password) .send([ - { - rule_id: ruleId1, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-21T00:00:00.000Z', - }, - { rule_id: ruleId2, start: '2023-10-19T12:00:00.000Z' }, - { rule_id: lifecycleRuleId, start: '2023-10-19T12:00:00.000Z' }, - { rule_id: disabledRuleId, start: '2023-10-19T12:00:00.000Z' }, - { rule_id: deletedRuleId, start: '2023-10-19T12:00:00.000Z' }, - { rule_id: ruleId1, start: '2023-10-19T12:00:00.000Z' }, + { rule_id: ruleId1, start, end }, + { rule_id: ruleId2, start }, + { rule_id: lifecycleRuleId, start }, + { rule_id: disabledRuleId, start }, + { rule_id: deletedRuleId, start }, + { rule_id: ruleId1, start }, ]); switch (scenario.id) { @@ -977,48 +856,42 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext backfillIds.push({ id: result[0].id, spaceId: apiOptions.spaceId }); expect(result[0].duration).to.eql('12h'); expect(result[0].enabled).to.eql(true); - expect(result[0].start).to.eql('2023-10-19T12:00:00.000Z'); - expect(result[0].end).to.eql('2023-10-21T00:00:00.000Z'); + expect(result[0].start).to.eql(start); + expect(result[0].end).to.eql(end); expect(result[0].status).to.eql('pending'); expect(result[0].space_id).to.eql(space.id); expect(typeof result[0].created_at).to.be('string'); testExpectedRule(result[0], ruleId1, false); - expect(result[0].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-20T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T00:00:00.000Z', - status: 'pending', - }, - ]); + + let currentStart = start; + result[0].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); // successful schedule expect(typeof result[1].id).to.be('string'); backfillIds.push({ id: result[1].id, spaceId: apiOptions.spaceId }); expect(result[1].duration).to.eql('12h'); expect(result[1].enabled).to.eql(true); - expect(result[1].start).to.eql('2023-10-19T12:00:00.000Z'); - expect(result[1].end).to.eql('2023-10-20T00:00:00.000Z'); + expect(result[1].start).to.eql(start); + expect(result[1].end).to.eql(moment(start).add(12, 'hours').toISOString()); expect(result[1].status).to.eql('pending'); expect(result[1].space_id).to.eql(space.id); expect(typeof result[1].created_at).to.be('string'); testExpectedRule(result[1], ruleId2, false); - expect(result[1].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start; + result[1].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); // error scheduling due to unsupported rule type expect(result[2]).to.eql({ @@ -1049,19 +922,21 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext backfillIds.push({ id: result[5].id, spaceId: apiOptions.spaceId }); expect(result[5].duration).to.eql('12h'); expect(result[5].enabled).to.eql(true); - expect(result[5].start).to.eql('2023-10-19T12:00:00.000Z'); - expect(result[5].end).to.eql('2023-10-20T00:00:00.000Z'); + expect(result[5].start).to.eql(start); + expect(result[5].end).to.eql(moment(start).add(12, 'hours').toISOString()); expect(result[5].status).to.eql('pending'); expect(result[5].space_id).to.eql(space.id); expect(typeof result[5].created_at).to.be('string'); testExpectedRule(result[5], ruleId1, false); - expect(result[5].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start; + result[5].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); // check that the expected ad hoc run SOs were created const adHocRunSO1 = (await getAdHocRunSO(result[0].id)) as SavedObject; @@ -1076,64 +951,60 @@ export default function scheduleBackfillTests({ getService }: FtrProviderContext expect(typeof adHocRun1.createdAt).to.be('string'); expect(adHocRun1.duration).to.eql('12h'); expect(adHocRun1.enabled).to.eql(true); - expect(adHocRun1.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun1.end).to.eql('2023-10-21T00:00:00.000Z'); + expect(adHocRun1.start).to.eql(start); + expect(adHocRun1.end).to.eql(end); expect(adHocRun1.status).to.eql('pending'); expect(adHocRun1.spaceId).to.eql(space.id); testExpectedRule(adHocRun1, undefined, true); - expect(adHocRun1.schedule).to.eql([ - { - interval: '12h', - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2023-10-20T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - runAt: '2023-10-21T00:00:00.000Z', - status: 'pending', - }, - ]); + + currentStart = start; + adHocRun1.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); expect(typeof adHocRun2.apiKeyId).to.be('string'); expect(typeof adHocRun2.apiKeyToUse).to.be('string'); expect(typeof adHocRun2.createdAt).to.be('string'); expect(adHocRun2.duration).to.eql('12h'); expect(adHocRun2.enabled).to.eql(true); - expect(adHocRun2.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun2.end).to.eql('2023-10-20T00:00:00.000Z'); + expect(adHocRun2.start).to.eql(start); + expect(adHocRun2.end).to.eql(moment(start).add(12, 'hours').toISOString()); expect(adHocRun2.status).to.eql('pending'); expect(adHocRun2.spaceId).to.eql(space.id); testExpectedRule(adHocRun2, undefined, true); - expect(adHocRun2.schedule).to.eql([ - { - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + + currentStart = start; + adHocRun2.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); expect(typeof adHocRun3.apiKeyId).to.be('string'); expect(typeof adHocRun3.apiKeyToUse).to.be('string'); expect(typeof adHocRun3.createdAt).to.be('string'); expect(adHocRun3.duration).to.eql('12h'); expect(adHocRun3.enabled).to.eql(true); - expect(adHocRun3.start).to.eql('2023-10-19T12:00:00.000Z'); - expect(adHocRun3.end).to.eql('2023-10-20T00:00:00.000Z'); + expect(adHocRun3.start).to.eql(start); + expect(adHocRun3.end).to.eql(moment(start).add(12, 'hours').toISOString()); expect(adHocRun3.status).to.eql('pending'); expect(adHocRun3.spaceId).to.eql(space.id); testExpectedRule(adHocRun3, undefined, true); - expect(adHocRun3.schedule).to.eql([ - { - runAt: '2023-10-20T00:00:00.000Z', - status: 'pending', - interval: '12h', - }, - ]); + + currentStart = start; + adHocRun3.schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.runAt).to.eql(runAt); + currentStart = runAt; + }); // check references are stored correctly expect(adHocRunSO1.references).to.eql([{ id: ruleId1, name: 'rule', type: 'alert' }]); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts index 72635b82c8daf..6b555198e5eff 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group1/tests/alerting/backfill/task_runner.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import moment from 'moment'; import { SearchHit } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { SecurityAlert } from '@kbn/alerts-as-data-utils'; import { @@ -61,28 +62,28 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide const timestampPattern = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/; const originalDocTimestamps = [ // before first backfill run - '2023-10-18T10:42:37.452Z', + moment().utc().subtract(14, 'days').toISOString(), // backfill execution set 1 - '2023-10-19T12:23:54.485Z', - '2023-10-19T13:48:11.654Z', - '2023-10-19T21:00:03.472Z', + moment().utc().startOf('day').subtract(13, 'days').add(64, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(13, 'days').add(65, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(13, 'days').add(66, 'seconds').toISOString(), // backfill execution set 2 - '2023-10-20T08:12:34.954Z', + moment().utc().startOf('day').subtract(12, 'days').add(89, 'seconds').toISOString(), // backfill execution set 3 - '2023-10-20T14:39:41.457Z', - '2023-10-20T14:39:41.457Z', - '2023-10-20T16:21:01.004Z', - '2023-10-20T19:02:12.475Z', - '2023-10-20T23:59:59.999Z', + moment().utc().startOf('day').subtract(11, 'days').add(785, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(11, 'days').add(888, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(11, 'days').add(954, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(11, 'days').add(1045, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(11, 'days').add(1145, 'seconds').toISOString(), // backfill execution set 4 purposely left empty // after last backfill - '2023-10-21T13:36:13.175Z', - '2023-10-21T15:42:31.145Z', + moment().utc().startOf('day').subtract(9, 'days').add(666, 'seconds').toISOString(), + moment().utc().startOf('day').subtract(9, 'days').add(667, 'seconds').toISOString(), ]; describe('ad hoc backfill task', () => { @@ -126,7 +127,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide tags: [], rule_type_id: 'siem.queryRule', consumer: 'siem', - schedule: { interval: '12h' }, + schedule: { interval: '24h' }, actions: [], params: { author: [], @@ -165,46 +166,30 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide const ruleId = response1.body.id; objectRemover.add(spaceId, ruleId, 'rule', 'alerting'); + const start = moment().utc().startOf('day').subtract(13, 'days').toISOString(); + const end = moment().utc().startOf('day').subtract(9, 'days').toISOString(); + // Schedule backfill for this rule const response2 = await supertestWithoutAuth .post(`${getUrlPrefix(spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) - .send([ - { - rule_id: ruleId, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-21T12:00:00.000Z', - }, - ]) + .send([{ rule_id: ruleId, start, end }]) .expect(200); const scheduleResult = response2.body; expect(scheduleResult.length).to.eql(1); expect(scheduleResult[0].schedule.length).to.eql(4); - expect(scheduleResult[0].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-20T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T12:00:00.000Z', - status: 'pending', - }, - ]); + + let currentStart = start; + scheduleResult[0].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('24h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(24, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); const backfillId = scheduleResult[0].id; @@ -414,16 +399,12 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide objectRemover.add(spaceId, ruleId, 'rule', 'alerting'); // schedule backfill for this rule + const start = moment().utc().startOf('day').subtract(13, 'days').toISOString(); const response2 = await supertestWithoutAuth .post(`${getUrlPrefix(spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) - .send([ - { - rule_id: ruleId, - start: '2023-10-19T12:00:00.000Z', - }, - ]) + .send([{ rule_id: ruleId, start }]) .expect(200); const scheduleResult = response2.body; @@ -433,7 +414,7 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide expect(scheduleResult[0].schedule).to.eql([ { interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', + run_at: moment(start).add(12, 'hours').toISOString(), status: 'pending', }, ]); @@ -556,45 +537,27 @@ export default function createBackfillTaskRunnerTests({ getService }: FtrProvide objectRemover.add(spaceId, ruleId, 'rule', 'alerting'); // schedule backfill for this rule + const start = moment().utc().startOf('day').subtract(13, 'days').toISOString(); + const end = moment().utc().startOf('day').subtract(11, 'days').toISOString(); const response2 = await supertestWithoutAuth .post(`${getUrlPrefix(spaceId)}/internal/alerting/rules/backfill/_schedule`) .set('kbn-xsrf', 'foo') .auth(SuperuserAtSpace1.user.username, SuperuserAtSpace1.user.password) - .send([ - { - rule_id: ruleId, - start: '2023-10-19T12:00:00.000Z', - end: '2023-10-21T12:00:00.000Z', - }, - ]) + .send([{ rule_id: ruleId, start, end }]) .expect(200); const scheduleResult = response2.body; expect(scheduleResult.length).to.eql(1); expect(scheduleResult[0].schedule.length).to.eql(4); - expect(scheduleResult[0].schedule).to.eql([ - { - interval: '12h', - run_at: '2023-10-20T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-20T12:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T00:00:00.000Z', - status: 'pending', - }, - { - interval: '12h', - run_at: '2023-10-21T12:00:00.000Z', - status: 'pending', - }, - ]); + let currentStart = start; + scheduleResult[0].schedule.forEach((sched: any) => { + expect(sched.interval).to.eql('12h'); + expect(sched.status).to.eql('pending'); + const runAt = moment(currentStart).add(12, 'hours').toISOString(); + expect(sched.run_at).to.eql(runAt); + currentStart = runAt; + }); const backfillId = scheduleResult[0].id; diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts index 318b8f99a61e0..d5a03d3d66cec 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/transform_rule_types/transform_health/rule.ts @@ -23,6 +23,7 @@ import { TRANSFORM_HEALTH_RESULTS } from '@kbn/transform-plugin/common/constants import { FtrProviderContext } from '../../../../../../common/ftr_provider_context'; import { getUrlPrefix, ObjectRemover } from '../../../../../../common/lib'; import { Spaces } from '../../../../../scenarios'; +import { runSoon } from '../../../group3/test_helpers'; const CONNECTOR_TYPE_ID = '.index'; const RULE_TYPE_ID = 'transform_health'; @@ -30,7 +31,7 @@ const ES_TEST_INDEX_SOURCE = 'transform-alert:transform-health'; const ES_TEST_INDEX_REFERENCE = '-na-'; const ES_TEST_OUTPUT_INDEX_NAME = `${ES_TEST_INDEX_NAME}-ts-output`; -const RULE_INTERVAL_SECONDS = 3; +const RULE_INTERVAL_SECONDS = 10000; interface CreateRuleParams { name: string; @@ -80,8 +81,7 @@ export default function ruleTests({ getService }: FtrProviderContext) { `.internal.alerts-transform.health.alerts-default-000001` ); - // Failing: See https://github.com/elastic/kibana/issues/177215 - describe.skip('rule', async () => { + describe('rule', async () => { const objectRemover = new ObjectRemover(supertest); let connectorId: string; const transformId = 'test_transform_01'; @@ -121,6 +121,8 @@ export default function ruleTests({ getService }: FtrProviderContext) { await stopTransform(transformId); + await runSoon({ id: ruleId, supertest, retry }); + log.debug('Checking created alerts...'); const docs = await waitForDocs(1); diff --git a/x-pack/test/api_integration/apis/security/builtin_es_privileges.ts b/x-pack/test/api_integration/apis/security/builtin_es_privileges.ts index 89587fe259683..8087ded821b5b 100644 --- a/x-pack/test/api_integration/apis/security/builtin_es_privileges.ts +++ b/x-pack/test/api_integration/apis/security/builtin_es_privileges.ts @@ -24,7 +24,7 @@ export default function ({ getService }: FtrProviderContext) { const sampleOfExpectedIndexPrivileges = ['create', 'index', 'delete']; const payload = response.body; - expect(Object.keys(payload).sort()).to.eql(['cluster', 'index']); + expect(Object.keys(payload).sort()).to.eql(['cluster', 'index', 'remote_cluster']); sampleOfExpectedClusterPrivileges.forEach((privilege) => expect(payload.cluster).to.contain(privilege) diff --git a/x-pack/test/apm_api_integration/common/config.ts b/x-pack/test/apm_api_integration/common/config.ts index c22fb0325288b..37278fa510bc9 100644 --- a/x-pack/test/apm_api_integration/common/config.ts +++ b/x-pack/test/apm_api_integration/common/config.ts @@ -11,6 +11,7 @@ import { ApmSynthtraceEsClient, ApmSynthtraceKibanaClient, LogsSynthtraceEsClient, + AssetsSynthtraceEsClient, createLogger, LogLevel, } from '@kbn/apm-synthtrace'; @@ -75,6 +76,10 @@ export interface CreateTest { logSynthtraceEsClient: ( context: InheritedFtrProviderContext ) => Promise; + synthtraceEsClient: (context: InheritedFtrProviderContext) => Promise; + assetsSynthtraceEsClient: ( + context: InheritedFtrProviderContext + ) => Promise; apmSynthtraceEsClient: (context: InheritedFtrProviderContext) => Promise; synthtraceKibanaClient: ( context: InheritedFtrProviderContext @@ -121,6 +126,12 @@ export function createTestConfig( logger: createLogger(LogLevel.info), refreshAfterIndex: true, }), + assetsSynthtraceEsClient: (context: InheritedFtrProviderContext) => + new AssetsSynthtraceEsClient({ + client: context.getService('es'), + logger: createLogger(LogLevel.info), + refreshAfterIndex: true, + }), synthtraceKibanaClient: () => synthtraceKibanaClient, apmApiClient: async (context: InheritedFtrProviderContext) => { const { username, password } = servers.kibana; diff --git a/x-pack/test/apm_api_integration/tests/asset_services/asset_services.spec.ts b/x-pack/test/apm_api_integration/tests/asset_services/asset_services.spec.ts new file mode 100644 index 0000000000000..983c2c7ec7c2f --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/asset_services/asset_services.spec.ts @@ -0,0 +1,261 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Readable } from 'stream'; +import { + apm, + timerange, + log, + generateShortId, + Instance, + Serializable, +} from '@kbn/apm-synthtrace-client'; +import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; +import expect from '@kbn/expect'; +import moment from 'moment'; +import { + APIReturnType, + APIClientRequestParamsOf, +} from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import { FtrProviderContext } from '../../common/ftr_provider_context'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const assetsSynthtraceClient = getService('assetsSynthtraceEsClient'); + + const start = new Date(moment().subtract(10, 'minutes').valueOf()).toISOString(); + const end = new Date(moment().valueOf()).toISOString(); + const range = timerange(start, end); + + async function getServiceAssets( + overrides?: RecursivePartial< + APIClientRequestParamsOf<'GET /internal/apm/assets/services'>['params'] + > + ) { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/assets/services', + params: { + query: { + start, + end, + kuery: '', + ...overrides?.query, + }, + }, + }); + return response; + } + + let response: { + status: number; + body: APIReturnType<'GET /internal/apm/assets/services'>; + }; + + registry.when('Asset services when data is not loaded', { config: 'basic', archives: [] }, () => { + it('handles the empty state', async () => { + response = await getServiceAssets({ query: { start, end } }); + expect(response.status).to.be(200); + expect(response.body.services.length).to.be(0); + }); + }); + + registry.when('Asset services when data is loaded', { config: 'basic', archives: [] }, () => { + before(async () => { + const transactionName = '240rpm/75% 1000ms'; + + const successfulTimestamps = range.interval('1m').rate(1); + const failedTimestamps = range.interval('1m').rate(1); + const serviceNames = ['multisignal-service', 'apm-only-service']; + + const instances = serviceNames.map((serviceName) => + apm + .service({ name: serviceName, environment: 'testing', agentName: 'nodejs' }) + .instance('instance') + ); + const instanceSpans = (instance: Instance) => { + const successfulTraceEvents = successfulTimestamps.generator((timestamp) => + instance + .transaction({ transactionName }) + .timestamp(timestamp) + .duration(1000) + .success() + .children( + instance + .span({ + spanName: 'GET apm-*/_search', + spanType: 'db', + spanSubtype: 'elasticsearch', + }) + .duration(1000) + .success() + .destination('elasticsearch') + .timestamp(timestamp), + instance + .span({ spanName: 'custom_operation', spanType: 'custom' }) + .duration(100) + .success() + .timestamp(timestamp) + ) + ); + + const failedTraceEvents = failedTimestamps.generator((timestamp) => + instance + .transaction({ transactionName }) + .timestamp(timestamp) + .duration(1000) + .failure() + .errors( + instance + .error({ + message: '[ResponseError] index_not_found_exception', + type: 'ResponseError', + }) + .timestamp(timestamp + 50) + ) + ); + + const metricsets = range + .interval('30s') + .rate(1) + .generator((timestamp) => + instance + .appMetrics({ + 'system.memory.actual.free': 800, + 'system.memory.total': 1000, + 'system.cpu.total.norm.pct': 0.6, + 'system.process.cpu.total.norm.pct': 0.7, + }) + .timestamp(timestamp) + ); + + return [...successfulTraceEvents, ...failedTraceEvents, ...metricsets]; + }; + + const logEvents = range + .interval('1m') + .rate(1) + .generator((timestamp) => { + return [ + log + .create() + .message('this is a log message') + .service('logs-only-service') + .logLevel('error') + .defaults({ + 'trace.id': generateShortId(), + 'agent.name': 'synth-agent', + }) + .timestamp(timestamp), + log + .create() + .message('this is a log message') + .service('multisignal-service') + .logLevel('error') + .defaults({ + 'trace.id': generateShortId(), + 'agent.name': 'synth-agent', + }) + .timestamp(timestamp), + ]; + }); + + function* createGeneratorFromArray(arr: Array>) { + yield* arr; + } + const traces = instances.flatMap((instance) => instanceSpans(instance)); + const tracesGenAssets = createGeneratorFromArray(traces); + + // + return await assetsSynthtraceClient.index( + Readable.from(Array.from(logEvents).concat(Array.from(tracesGenAssets))) + ); + }); + + after(async () => { + await assetsSynthtraceClient.clean(); + }); + + describe('when no additional filters are applied', () => { + before(async () => { + response = await getServiceAssets({ query: { start, end } }); + }); + + it('returns a successful response', async () => { + expect(response.status).to.be(200); + expect(response.body.services.length).to.be(3); + }); + + it('returns all services', () => { + const multisignal = response.body.services.find( + (item) => item.service.name === 'multisignal-service' + ); + + expect(multisignal?.asset.signalTypes).to.eql({ + 'asset.traces': true, + 'asset.logs': true, + }); + expect(multisignal?.service.environment).to.be('testing'); + + const apmOnly = response.body.services.find( + (item) => item.service.name === 'apm-only-service' + ); + + expect(apmOnly?.asset.signalTypes).to.eql({ 'asset.traces': true }); + expect(apmOnly?.service.environment).to.be('testing'); + + const logsOnly = response.body.services.find( + (item) => item.service.name === 'logs-only-service' + ); + + expect(logsOnly?.asset.signalTypes).to.eql({ 'asset.logs': true }); + expect(logsOnly?.service.environment).not.to.be('testing'); + }); + }); + + describe('when additional filters are applied', () => { + it('returns no services when the time range is outside the data range', async () => { + response = await getServiceAssets({ + query: { start: '2022-10-01T00:00:00.000Z', end: '2022-10-01T01:00:00.000Z' }, + }); + expect(response.status).to.be(200); + expect(response.body.services.length).to.be(0); + }); + + it('returns services when the time range is within the data range', async () => { + response = await getServiceAssets({ + query: { + start: new Date(moment().subtract(2, 'days').valueOf()).toISOString(), + end: new Date(moment().add(1, 'days').valueOf()).toISOString(), + }, + }); + + expect(response.status).to.be(200); + expect(response.body.services.length).to.be(3); + }); + + it('returns services when filtering by service.name', async () => { + response = await getServiceAssets({ + query: { start, end, kuery: 'service.name: "logs-only-*" ' }, + }); + expect(response.status).to.be(200); + const service = response.body.services[0]; + expect(service.service.name).to.be('logs-only-service'); + expect(service.asset.signalTypes['asset.logs']).to.be(true); + }); + + it('returns not services when filtering by a field that does not exist in assets', async () => { + response = await getServiceAssets({ + query: { start, end, kuery: 'transaction.name: "240rpm/75% 1000ms" ' }, + }); + + expect(response.status).to.be(200); + expect(response.body.services.length).to.be(0); + }); + }); + }); +} diff --git a/x-pack/test/apm_api_integration/tests/time_range_metadata/many_apm_server_versions.spec.ts b/x-pack/test/apm_api_integration/tests/time_range_metadata/many_apm_server_versions.spec.ts index 01b4b35530836..6031b7dd8de5b 100644 --- a/x-pack/test/apm_api_integration/tests/time_range_metadata/many_apm_server_versions.spec.ts +++ b/x-pack/test/apm_api_integration/tests/time_range_metadata/many_apm_server_versions.spec.ts @@ -7,11 +7,7 @@ import expect from '@kbn/expect'; import { apm, timerange } from '@kbn/apm-synthtrace-client'; import moment from 'moment'; -import { - addObserverVersionTransform, - ApmSynthtraceEsClient, - deleteSummaryFieldTransform, -} from '@kbn/apm-synthtrace'; +import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { TRANSACTION_DURATION_HISTOGRAM, TRANSACTION_DURATION_SUMMARY, @@ -19,7 +15,7 @@ import { import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; import { LatencyAggregationType } from '@kbn/apm-plugin/common/latency_aggregation_types'; -import { pipeline, Readable } from 'stream'; +import { Readable } from 'stream'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { ApmApiClient } from '../../common/config'; @@ -32,9 +28,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { const baseTime = new Date('2023-10-01T00:00:00.000Z').getTime(); const startLegacy = moment(baseTime).add(0, 'minutes'); const start = moment(baseTime).add(5, 'minutes'); - const end = moment(baseTime).add(10, 'minutes'); + const endLegacy = moment(baseTime).add(10, 'minutes'); + const end = moment(baseTime).add(15, 'minutes'); - // FLAKY: https://github.com/elastic/kibana/issues/177534 registry.when( 'Time range metadata when there are multiple APM Server versions', { config: 'basic', archives: [] }, @@ -44,7 +40,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { await generateTraceDataForService({ serviceName: 'synth-java-legacy', start: startLegacy, - end, + end: endLegacy, isLegacy: true, synthtrace, }); @@ -78,7 +74,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); // @ts-expect-error - expect(res.hits.total.value).to.be(10); + expect(res.hits.total.value).to.be(20); }); it('ingests transaction metrics without transaction.duration.summary', async () => { @@ -95,7 +91,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); // @ts-expect-error - expect(res.hits.total.value).to.be(20); + expect(res.hits.total.value).to.be(10); }); it('has transaction.duration.summary field for every document type', async () => { @@ -103,7 +99,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { endpoint: 'GET /internal/apm/time_range_metadata', params: { query: { - start: start.toISOString(), + start: endLegacy.toISOString(), end: end.toISOString(), enableContinuousRollups: true, enableServiceTransactionMetrics: true, @@ -116,8 +112,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { const allHasSummaryField = response.body.sources .filter( (source) => - source.documentType === ApmDocumentType.TransactionMetric && - source.rollupInterval !== RollupInterval.OneMinute + source.documentType !== ApmDocumentType.TransactionEvent && + source.rollupInterval !== RollupInterval.SixtyMinutes // there is not enough data for 60 minutes ) .every((source) => { return source.hasDurationSummaryField; @@ -132,7 +128,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { params: { query: { start: startLegacy.toISOString(), - end: end.toISOString(), + end: endLegacy.toISOString(), enableContinuousRollups: true, enableServiceTransactionMetrics: true, useSpanName: false, @@ -148,11 +144,35 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(allHasSummaryField).to.eql(false); }); + it('does not support transaction.duration.summary for transactionMetric 1m when not all documents within the range support it ', async () => { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/time_range_metadata', + params: { + query: { + start: startLegacy.toISOString(), + end: end.toISOString(), + enableContinuousRollups: true, + enableServiceTransactionMetrics: true, + useSpanName: false, + kuery: '', + }, + }, + }); + + const hasDurationSummaryField = response.body.sources.find( + (source) => + source.documentType === ApmDocumentType.TransactionMetric && + source.rollupInterval === RollupInterval.OneMinute // there is not enough data for 60 minutes in the timerange defined for the tests + )?.hasDurationSummaryField; + + expect(hasDurationSummaryField).to.eql(false); + }); + it('does not have latency data for synth-java-legacy', async () => { const res = await getLatencyChartForService({ serviceName: 'synth-java-legacy', start, - end, + end: endLegacy, apmApiClient, useDurationSummary: true, }); @@ -171,18 +191,13 @@ export default function ApiTest({ getService }: FtrProviderContext) { const res = await getLatencyChartForService({ serviceName: 'synth-java', start, - end, + end: endLegacy, apmApiClient, useDurationSummary: true, }); expect(res.body.currentPeriod.latencyTimeseries.map(({ y }) => y)).to.eql([ - 1000000, - 1000000, - 1000000, - 1000000, - 1000000, - null, + 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, ]); }); }); @@ -256,21 +271,7 @@ function generateTraceDataForService({ ); const apmPipeline = (base: Readable) => { - const defaultPipeline = synthtrace.getDefaultPipeline()( - base - ) as unknown as NodeJS.ReadableStream; - - return pipeline( - defaultPipeline, - addObserverVersionTransform('8.5.0'), - deleteSummaryFieldTransform(), - (err) => { - if (err) { - // eslint-disable-next-line no-console - console.error(err); - } - } - ); + return synthtrace.getDefaultPipeline({ versionOverride: '8.5.0' })(base); }; return synthtrace.index(events, isLegacy ? apmPipeline : undefined); diff --git a/x-pack/test/apm_api_integration/tests/time_range_metadata/time_range_metadata.spec.ts b/x-pack/test/apm_api_integration/tests/time_range_metadata/time_range_metadata.spec.ts index 43aee07583c18..6e73372f261ae 100644 --- a/x-pack/test/apm_api_integration/tests/time_range_metadata/time_range_metadata.spec.ts +++ b/x-pack/test/apm_api_integration/tests/time_range_metadata/time_range_metadata.spec.ts @@ -11,12 +11,8 @@ import { omit, sortBy } from 'lodash'; import moment, { Moment } from 'moment'; import { ApmDocumentType } from '@kbn/apm-plugin/common/document_type'; import { RollupInterval } from '@kbn/apm-plugin/common/rollup'; -import { - addObserverVersionTransform, - ApmSynthtraceEsClient, - deleteSummaryFieldTransform, -} from '@kbn/apm-synthtrace'; -import { Readable, pipeline } from 'stream'; +import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; +import { Readable } from 'stream'; import { ToolingLog } from '@kbn/tooling-log'; import { FtrProviderContext } from '../../common/ftr_provider_context'; @@ -78,9 +74,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/177541 registry.when( - 'Time range metadata when generating summary data', + 'Time range metadata when generating data with multiple APM server versions', { config: 'basic', archives: [] }, () => { describe('data loaded with and without summary field', () => { @@ -88,7 +83,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const withoutSummaryFieldEnd = moment(withoutSummaryFieldStart).add(2, 'hours'); const withSummaryFieldStart = moment(withoutSummaryFieldEnd); - const withSummaryFieldEnd = moment(withoutSummaryFieldEnd).add(2, 'hours'); + const withSummaryFieldEnd = moment(withSummaryFieldStart).add(2, 'hours'); before(async () => { await getTransactionEvents({ @@ -112,42 +107,161 @@ export default function ApiTest({ getService }: FtrProviderContext) { return apmSynthtraceEsClient.clean(); }); - describe('Values for hasDurationSummaryField for transaction metrics', () => { - it('returns true when summary field is available both inside and outside the range', async () => { + describe('aggregators and summary field support', () => { + it('returns support only for legacy transactionMetrics 1m without duration summary field', async () => { const response = await getTimeRangeMedata({ - start: moment(withSummaryFieldStart).add(1, 'hour'), - end: moment(withSummaryFieldEnd), + start: withoutSummaryFieldStart, + end: withoutSummaryFieldEnd, }); expect( response.sources.filter( - (source) => - source.documentType === ApmDocumentType.TransactionMetric && - source.hasDurationSummaryField - ).length - ).to.eql(3); + (source) => source.documentType !== ApmDocumentType.TransactionEvent + ) + ).to.eql([ + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.TenMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.OneMinute, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.TenMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.OneMinute, + hasDocs: true, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + ]); + }); + + it('returns support for all document types with duration summary field', async () => { + const response = await getTimeRangeMedata({ + start: withSummaryFieldStart, + end: withSummaryFieldEnd, + }); + + expect( + response.sources.filter( + (source) => source.documentType !== ApmDocumentType.TransactionEvent + ) + ).to.eql([ + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.TenMinutes, + hasDocs: true, + hasDurationSummaryField: true, + }, + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.OneMinute, + hasDocs: true, + hasDurationSummaryField: true, + }, + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + hasDocs: true, + hasDurationSummaryField: true, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.TenMinutes, + hasDocs: true, + hasDurationSummaryField: true, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.OneMinute, + hasDocs: true, + hasDurationSummaryField: true, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + hasDocs: true, + hasDurationSummaryField: true, + }, + ]); }); - it('returns false when summary field is available inside but not outside the range', async () => { + it('returns support only for transaction 1m when timerange includes both new and legacy documents', async () => { const response = await getTimeRangeMedata({ - start: moment(withSummaryFieldStart).subtract(30, 'minutes'), - end: moment(withSummaryFieldEnd), + start: withoutSummaryFieldStart, + end: withSummaryFieldEnd, }); expect( response.sources.filter( - (source) => - source.documentType === ApmDocumentType.TransactionMetric && - !source.hasDurationSummaryField - ).length - ).to.eql(2); + (source) => source.documentType !== ApmDocumentType.TransactionEvent + ) + ).to.eql([ + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.TenMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.OneMinute, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.ServiceTransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.TenMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.OneMinute, + hasDocs: true, + hasDurationSummaryField: false, + }, + { + documentType: ApmDocumentType.TransactionMetric, + rollupInterval: RollupInterval.SixtyMinutes, + hasDocs: false, + hasDurationSummaryField: false, + }, + ]); }); }); }); } ); - // FLAKY: https://github.com/elastic/kibana/issues/177601 registry.when( 'Time range metadata when generating data', { config: 'basic', archives: [] }, @@ -400,8 +514,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); describe('when service metrics are only available in the current time range', () => { - before(async () => { - await es.deleteByQuery({ + before(async () => + es.deleteByQuery({ index: 'metrics-apm*', query: { bool: { @@ -414,7 +528,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { { range: { '@timestamp': { - lte: start.toISOString(), + gte: start.toISOString(), }, }, }, @@ -423,8 +537,8 @@ export default function ApiTest({ getService }: FtrProviderContext) { }, refresh: true, expand_wildcards: ['open', 'hidden'], - }); - }); + }) + ); it('marks service transaction metrics as unavailable', async () => { const response = await getTimeRangeMedata({ @@ -495,7 +609,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { documentType: ApmDocumentType.TransactionMetric, rollupInterval: RollupInterval.OneMinute, hasDocs: false, - hasDurationSummaryField: true, + hasDurationSummaryField: false, }, { documentType: ApmDocumentType.TransactionMetric, @@ -561,20 +675,7 @@ function getTransactionEvents({ ]; const apmPipeline = (base: Readable) => { - const defaultPipeline = synthtrace.getDefaultPipeline()( - base - ) as unknown as NodeJS.ReadableStream; - - return pipeline( - defaultPipeline, - addObserverVersionTransform('8.5.0'), - deleteSummaryFieldTransform(), - (err) => { - if (err) { - logger.error(err); - } - } - ); + return synthtrace.getDefaultPipeline({ versionOverride: '8.5.0' })(base); }; return synthtrace.index(events, isLegacy ? apmPipeline : undefined); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/index.js b/x-pack/test/fleet_api_integration/apis/package_policy/index.js index f4f3069922c1d..8cb9cbd66a186 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/index.js +++ b/x-pack/test/fleet_api_integration/apis/package_policy/index.js @@ -19,5 +19,6 @@ export default function loadTests({ loadTestFile, getService }) { loadTestFile(require.resolve('./delete')); loadTestFile(require.resolve('./upgrade')); loadTestFile(require.resolve('./input_package_create_upgrade')); + loadTestFile(require.resolve('./input_package_rollback')); }); } diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts new file mode 100644 index 0000000000000..50c325dac22fb --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts @@ -0,0 +1,136 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { sortBy } from 'lodash'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry } from '../../helpers'; +import { setupFleetAndAgents } from '../agents/services'; +const PACKAGE_NAME = 'input_package_upgrade'; +const START_VERSION = '1.0.0'; + +const expectIdArraysEqual = (arr1: any[], arr2: any[]) => { + expect(sortBy(arr1, 'id')).to.eql(sortBy(arr2, 'id')); +}; +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const uninstallPackage = async (name: string, version: string) => { + await supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); + }; + + const installPackage = async (name: string, version: string) => { + return await supertest + .post(`/api/fleet/epm/packages/${name}/${version}`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }) + .expect(200); + }; + + const getInstallationSavedObject = async (name: string, version: string) => { + const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); + return res.body.item.savedObject.attributes; + }; + + const getPackage = async (name: string, version: string) => { + const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); + return res.body.item; + }; + + const createPackagePolicyWithDataset = async ( + agentPolicyId: string, + dataset: string, + expectStatusCode = 200, + force = false + ) => { + const policy = { + force, + policy_id: agentPolicyId, + package: { + name: PACKAGE_NAME, + version: START_VERSION, + }, + name: 'test-policy-' + dataset, + description: '', + namespace: 'default', + inputs: { + 'logs-logfile': { + enabled: true, + streams: { + 'input_package_upgrade.logs': { + enabled: true, + vars: { + paths: ['/tmp/test/log'], + tags: ['tag1'], + ignore_older: '72h', + 'data_stream.dataset': dataset, + }, + }, + }, + }, + }, + }; + const res = await supertest + .post(`/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send(policy) + .expect(expectStatusCode); + + return res.body.item; + }; + + const createAgentPolicy = async (name = 'Input Package Test 3') => { + const res = await supertest + .post(`/api/fleet/agent_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name, + namespace: 'default', + }) + .expect(200); + return res.body.item; + }; + + const deleteAgentPolicy = async (agentPolicyId: string) => { + if (!agentPolicyId) return; + return supertest + .post(`/api/fleet/agent_policies/delete`) + .set('kbn-xsrf', 'xxxx') + .send({ agentPolicyId }); + }; + + describe('input package policy rollback', async function () { + skipIfNoDockerRegistry(providerContext); + + let agentPolicyId: string; + before(async () => { + const agentPolicy = await createAgentPolicy(); + agentPolicyId = agentPolicy.id; + }); + + after(async () => { + await deleteAgentPolicy(agentPolicyId); + }); + setupFleetAndAgents(providerContext); + + it('should rollback package install on package policy create failure', async () => { + await createPackagePolicyWithDataset(agentPolicyId, 'test*', 400); + + const pkg = await getPackage(PACKAGE_NAME, START_VERSION); + expect(pkg?.status).to.eql('not_installed'); + }); + + it('should not add es references on package policy create failure when package is already installed', async () => { + await installPackage(PACKAGE_NAME, START_VERSION); + await createPackagePolicyWithDataset(agentPolicyId, 'test*', 400); + + const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + expectIdArraysEqual(installation.installed_es, []); + + await uninstallPackage(PACKAGE_NAME, START_VERSION); + }); + }); +} diff --git a/x-pack/test/functional/apps/security/index.ts b/x-pack/test/functional/apps/security/index.ts index 3260e61e67cbf..009c270d3c2a3 100644 --- a/x-pack/test/functional/apps/security/index.ts +++ b/x-pack/test/functional/apps/security/index.ts @@ -17,5 +17,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./field_level_security')); loadTestFile(require.resolve('./user_email')); loadTestFile(require.resolve('./role_mappings')); + loadTestFile(require.resolve('./remote_cluster_security_roles')); }); } diff --git a/x-pack/test/functional/apps/security/remote_cluster_security_roles.ts b/x-pack/test/functional/apps/security/remote_cluster_security_roles.ts new file mode 100644 index 0000000000000..1525406b2fa02 --- /dev/null +++ b/x-pack/test/functional/apps/security/remote_cluster_security_roles.ts @@ -0,0 +1,90 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { keyBy } from 'lodash'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +const EDIT_ROLES_PATH = 'security/roles/edit'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const browser = getService('browser'); + const log = getService('log'); + const security = getService('security'); + const PageObjects = getPageObjects(['security', 'common', 'header', 'discover', 'settings']); + const kibanaServer = getService('kibanaServer'); + + describe('Remote Cluster Privileges', function () { + const customRole = 'rc-custom-role'; + + before('initialize tests', async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/security/dlstest'); + await browser.setWindowSize(1600, 1000); + + await PageObjects.common.navigateToApp('settings'); + await PageObjects.settings.createIndexPattern('dlstest', null); + + await security.testUser.setRoles(['cluster_security_manager', 'kibana_admin']); + await PageObjects.settings.navigateTo(); + await PageObjects.security.clickElasticsearchRoles(); + }); + + it(`should add new role ${customRole} with remote cluster privileges`, async function () { + await PageObjects.security.addRole(customRole, { + elasticsearch: { + indices: [ + { + names: ['dlstest'], + privileges: ['read', 'view_index_metadata'], + }, + ], + remote_cluster: [ + { + clusters: ['cluster1', 'cluster2'], + privileges: ['monitor_enrich'], + }, + ], + }, + }); + const roles = keyBy(await PageObjects.security.getElasticsearchRoles(), 'rolename'); + log.debug('actualRoles = %j', roles); + expect(roles).to.have.key(customRole); + expect(roles[customRole].reserved).to.be(false); + }); + + it(`should update role ${customRole} with remote cluster privileges`, async function () { + await PageObjects.settings.clickLinkText(customRole); + const currentUrl = await browser.getCurrentUrl(); + + expect(currentUrl).to.contain(EDIT_ROLES_PATH); + + const { clusters: currentClusters, privileges: currentPrivileges } = + await PageObjects.security.getRemoteClusterPrivilege(0); + + expect(currentClusters).to.eql(['cluster1', 'cluster2']); + expect(currentPrivileges).to.eql(['monitor_enrich']); + + await PageObjects.security.deleteRemoteClusterPrivilege(0); + + await PageObjects.security.addRemoteClusterPrivilege({ + clusters: ['cluster3', 'cluster4'], + privileges: ['monitor_enrich'], + }); + + await PageObjects.security.saveRole(); + }); + + after('logout', async () => { + // NOTE: Logout needs to happen before anything else to avoid flaky behavior + await PageObjects.security.forceLogout(); + await security.role.delete(customRole); + await security.testUser.restoreDefaults(); + }); + }); +} diff --git a/x-pack/test/functional/apps/slo/embeddables/config.ts b/x-pack/test/functional/apps/slo/embeddables/config.ts new file mode 100644 index 0000000000000..f7fe54a56831d --- /dev/null +++ b/x-pack/test/functional/apps/slo/embeddables/config.ts @@ -0,0 +1,17 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile(require.resolve('../../../config.base.js')); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('./overview_embeddable')], + }; +} diff --git a/x-pack/test/functional/apps/slo/embeddables/overview_embeddable.ts b/x-pack/test/functional/apps/slo/embeddables/overview_embeddable.ts new file mode 100644 index 0000000000000..a9671b6e350d6 --- /dev/null +++ b/x-pack/test/functional/apps/slo/embeddables/overview_embeddable.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { cleanup } from '@kbn/infra-forge'; +import { loadTestData } from '../../../../api_integration/apis/slos/helper/load_test_data'; +import { SloEsClient } from '../../../../api_integration/apis/slos/helper/es'; +import { sloData } from '../../../../api_integration/apis/slos/fixtures/create_slo'; +import { FtrProviderContext } from '../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['common', 'dashboard']); + const esClient = getService('es'); + const sloEsClient = new SloEsClient(esClient); + const logger = getService('log'); + const slo = getService('slo'); + const sloUi = getService('sloUi'); + const dashboardAddPanel = getService('dashboardAddPanel'); + + describe('overview embeddable', function () { + before(async () => { + await loadTestData(getService); + await slo.deleteAllSLOs(); + await slo.create(sloData); + await PageObjects.dashboard.navigateToApp(); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.dashboard.switchToEditMode(); + }); + + after(async () => { + await slo.deleteAllSLOs(); + await cleanup({ esClient, logger }); + await sloEsClient.deleteTestSourceData(); + }); + + describe('Single SLO', function () { + it('should open SLO configuration flyout', async () => { + await dashboardAddPanel.clickEditorMenuButton(); + await dashboardAddPanel.clickEmbeddableFactoryGroupButton('slos'); + await dashboardAddPanel.clickAddNewPanelFromUIActionLink('SLO Overview'); + await sloUi.common.assertSloOverviewConfigurationExists(); + }); + + it('should have an overview mode selector', async () => { + await sloUi.common.assertOverviewModeSelectorExists(); + }); + + it('can select an SLO', async () => { + await sloUi.common.assertOverviewSloSelectorExists(); + await sloUi.common.setComboBoxSloSelection(); + await sloUi.common.clickOverviewCofigurationSaveButton(); + }); + + it('creates an overview panel', async () => { + await sloUi.common.assertSingleOverviewPanelExists(); + await sloUi.common.dismissAllToasts(); + }); + + it('renders SLO card item chart', async () => { + await sloUi.common.assertSingleOverviewPanelContentExists(); + }); + }); + + describe('Group of SLOs', function () { + it('can select Group Overview mode in the Flyout configuration', async () => { + await dashboardAddPanel.clickEditorMenuButton(); + await dashboardAddPanel.clickEmbeddableFactoryGroupButton('slos'); + await dashboardAddPanel.clickAddNewPanelFromUIActionLink('SLO Overview'); + await sloUi.common.clickOverviewMode(); + await sloUi.common.assertSloConfigurationGroupOverviewModeIsSelected(); + }); + + it('can select a group by', async () => { + await sloUi.common.assertGroupOverviewConfigurationGroupByExists(); + }); + + it('can optionally select a group', async () => { + await sloUi.common.assertGroupOverviewConfigurationGroupExists(); + }); + + it('can optionally search for custom query', async () => { + await sloUi.common.assertGroupOverviewConfigurationKqlBarExists(); + }); + + it('creates a group overview panel', async () => { + await sloUi.common.clickOverviewCofigurationSaveButton(); + await sloUi.common.assertGroupOverviewPanelExists(); + await sloUi.common.dismissAllToasts(); + }); + }); + }); +} diff --git a/x-pack/test/functional/page_objects/security_page.ts b/x-pack/test/functional/page_objects/security_page.ts index dc5ee34475ae6..f839bc3e49914 100644 --- a/x-pack/test/functional/page_objects/security_page.ts +++ b/x-pack/test/functional/page_objects/security_page.ts @@ -6,7 +6,7 @@ */ import { adminTestUser } from '@kbn/test'; -import { AuthenticatedUser, Role } from '@kbn/security-plugin/common'; +import { AuthenticatedUser, Role, RoleRemoteClusterPrivilege } from '@kbn/security-plugin/common'; import type { UserFormValues } from '@kbn/security-plugin/public/management/users/edit_user/user_form'; import { Key } from 'selenium-webdriver'; import { FtrService } from '../ftr_provider_context'; @@ -600,9 +600,54 @@ export class SecurityPageObject extends FtrService { return confirmText; } + async addRemoteClusterPrivilege(privilege: RoleRemoteClusterPrivilege, index = 0) { + this.log.debug('addRemoteClusterPrivilege, index = ', index); + + await this.testSubjects.click('addRemoteClusterPrivilegesButton'); + + for (const cluster of privilege.clusters) { + await this.comboBox.setCustom(`remoteClusterClustersInput${index}`, cluster); + } + + for (const clusterPrivilege of privilege.privileges) { + await this.comboBox.setCustom(`remoteClusterPrivilegesInput${index}`, clusterPrivilege); + } + } + + async saveRole() { + this.log.debug('click save button'); + await this.testSubjects.click('roleFormSaveButton'); + + // Signifies that the role management page redirected back to the role grid page, + // and successfully refreshed the grid + await this.testSubjects.existOrFail('roleRow'); + } + + async deleteRemoteClusterPrivilege(index: number) { + this.log.debug('deleteRemoteClusterPrivilege, index = ', index); + + await this.testSubjects.click(`deleteRemoteClusterPrivilegesButton${index}`); + } + + async getRemoteClusterPrivilege(index: number) { + this.log.debug('getRemoteClusterPrivilege, index = ', index); + const clusterOptions = await this.comboBox.getComboBoxSelectedOptions( + `remoteClusterClustersInput${index}` + ); + + const privilegeOptions = await this.comboBox.getComboBoxSelectedOptions( + `remoteClusterPrivilegesInput${index}` + ); + + return { + clusters: clusterOptions, + privileges: privilegeOptions, + }; + } + async addRole( roleName: string, - roleObj: { elasticsearch: Pick } + roleObj: { elasticsearch: Pick } ) { const self = this; @@ -667,12 +712,18 @@ export class SecurityPageObject extends FtrService { await addGrantedField(roleObj.elasticsearch.indices[0].field_security!.grant!); } - this.log.debug('click save button'); - await this.testSubjects.click('roleFormSaveButton'); + if (roleObj.elasticsearch.remote_cluster) { + this.log.debug('adding remote_cluster privileges'); - // Signifies that the role management page redirected back to the role grid page, - // and successfully refreshed the grid - await this.testSubjects.existOrFail('roleRow'); + for (const [ + index, + remoteClusterPrivilege, + ] of roleObj.elasticsearch.remote_cluster.entries()) { + await this.addRemoteClusterPrivilege(remoteClusterPrivilege, index); + } + } + + await this.saveRole(); } async selectRole(role: string) { diff --git a/x-pack/test/functional/page_objects/user_profile_page.ts b/x-pack/test/functional/page_objects/user_profile_page.ts index 3380c10e20677..d777d1c2ffcda 100644 --- a/x-pack/test/functional/page_objects/user_profile_page.ts +++ b/x-pack/test/functional/page_objects/user_profile_page.ts @@ -60,6 +60,14 @@ export function UserProfilePageProvider({ getService }: FtrProviderContext) { return await find.byCssSelector('.euiKeyPadMenu'); }, + async getProfileEmail() { + return await testSubjects.getVisibleText('email'); + }, + + async getProfileFullname() { + return await testSubjects.getVisibleText('full_name'); + }, + async setFullNameInputField(newFullName: string) { return await testSubjects.setValue('userProfileFullName', newFullName); }, diff --git a/x-pack/test/functional/services/index.ts b/x-pack/test/functional/services/index.ts index 03ad1ea2361e3..d7aab70c44cbc 100644 --- a/x-pack/test/functional/services/index.ts +++ b/x-pack/test/functional/services/index.ts @@ -69,7 +69,7 @@ import { RulesServiceProvider } from './rules'; import { AiopsProvider } from './aiops'; import { SampleDataServiceProvider } from './sample_data'; import { DataStreamProvider } from './data_stream'; - +import { SloUiServiceProvider } from './slo'; // define the name and providers for services that should be // available to your tests. If you don't specify anything here // only the built-in services will be available @@ -131,4 +131,7 @@ export const services = { aiops: AiopsProvider, sampleData: SampleDataServiceProvider, dataStreams: DataStreamProvider, + slo: kibanaXPackApiIntegrationServices.slo, + dataViewApi: kibanaXPackApiIntegrationServices.dataViewApi, + sloUi: SloUiServiceProvider, }; diff --git a/x-pack/test/functional/services/ml/alerting.ts b/x-pack/test/functional/services/ml/alerting.ts index 300e009d256fb..74c6eb735ea34 100644 --- a/x-pack/test/functional/services/ml/alerting.ts +++ b/x-pack/test/functional/services/ml/alerting.ts @@ -121,7 +121,7 @@ export function MachineLearningAlertingProvider( }); }, - async assertLookbackInterval(expectedValue: string) { + async assertLookbackInterval(expectedValue: string, expectError = false) { await this.ensureAdvancedSectionOpen(); const actualValue = await testSubjects.getAttribute( 'mlAnomalyAlertLookbackInterval', @@ -131,27 +131,47 @@ export function MachineLearningAlertingProvider( expectedValue, `Expected lookback interval to equal ${expectedValue}, got ${actualValue}` ); + + if (expectError) { + const formRowEl = await testSubjects.find('mlAnomalyAlertAdvancedSettingsLookbackInterval'); + // Assert error state + const labelEl = await formRowEl.findByClassName('euiFormRow__label'); + expect(await labelEl.elementHasClass('euiFormLabel-isInvalid')).to.be(true); + + // Assert error message + const errorEl = await formRowEl.findByClassName('euiFormErrorText'); + const errorMessage = await errorEl.getVisibleText(); + expect(errorMessage).to.eql( + `${expectedValue} is not a valid time interval format e.g. 30s, 10m, 1h, 7d. It also needs to be higher than zero.` + ); + } }, - async assertTopNBuckets(expectedNumberOfBuckets: number) { + async assertTopNBuckets(expectedNumberOfBuckets: number, expectError = false) { await this.ensureAdvancedSectionOpen(); const actualValue = await testSubjects.getAttribute('mlAnomalyAlertTopNBuckets', 'value'); expect(actualValue).to.eql( expectedNumberOfBuckets, `Expected number of buckets to equal ${expectedNumberOfBuckets}, got ${actualValue}` ); + if (expectError) { + const formRowEl = await testSubjects.find('mlAnomalyAlertTopNBucketsFormRow'); + // Assert error state + const labelEl = await formRowEl.findByClassName('euiFormRow__label'); + expect(await labelEl.elementHasClass('euiFormLabel-isInvalid')).to.be(true); + } }, - async setLookbackInterval(interval: string) { + async setLookbackInterval(interval: string, isInvalid = false) { await this.ensureAdvancedSectionOpen(); await testSubjects.setValue('mlAnomalyAlertLookbackInterval', interval); - await this.assertLookbackInterval(interval); + await this.assertLookbackInterval(interval, isInvalid); }, - async setTopNBuckets(numberOfBuckets: number) { + async setTopNBuckets(numberOfBuckets: number, isInvalid = false) { await this.ensureAdvancedSectionOpen(); await testSubjects.setValue('mlAnomalyAlertTopNBuckets', numberOfBuckets.toString()); - await this.assertTopNBuckets(numberOfBuckets); + await this.assertTopNBuckets(numberOfBuckets, isInvalid); }, async isAdvancedSectionOpened() { diff --git a/x-pack/test/functional/services/ml/job_wizard_geo.ts b/x-pack/test/functional/services/ml/job_wizard_geo.ts index 3920212566932..be2848985a6a2 100644 --- a/x-pack/test/functional/services/ml/job_wizard_geo.ts +++ b/x-pack/test/functional/services/ml/job_wizard_geo.ts @@ -46,7 +46,7 @@ export function MachineLearningJobWizardGeoProvider({ getService }: FtrProviderC ); await testSubjects.existOrFail('mlGeoJobWizardMap'); - await testSubjects.existOrFail('mlEmbeddedMapContent'); + await testSubjects.existOrFail('mapContainer'); }, }; } diff --git a/x-pack/test/functional/services/slo/common.ts b/x-pack/test/functional/services/slo/common.ts new file mode 100644 index 0000000000000..b46284c915c3a --- /dev/null +++ b/x-pack/test/functional/services/slo/common.ts @@ -0,0 +1,138 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { sloData } from '../../../api_integration/apis/slos/fixtures/create_slo'; + +const OVERVIEW_MODE_SELECTOR = 'sloOverviewModeSelector'; +const SLO_CONFIRM_BUTTON = 'sloConfirmButton'; +const SINGLE_SLO_SELECTOR = 'singleSloSelector'; +const SLO_SINGLE_OVERVIEW_CONFIGURATION = 'sloSingleOverviewConfiguration'; +const SLO_GROUP_OVERVIEW_CONFIGURATION = 'sloGroupOverviewConfiguration'; +const SLO_GROUP_OVERVIEW_CONFIGURATION_GROUP_BY = 'sloGroupOverviewConfigurationGroupBy'; +const SLO_GROUP_OVERVIEW_CONFIGURATION_GROUP = 'sloGroupOverviewConfigurationGroup'; +const SLO_GROUP_OVERVIEW_CONFIGURATION_KQLBAR = 'sloGroupOverviewConfigurationKqlBar'; +const SLO_SINGLE_OVERVIEW_PANEL = 'sloSingleOverviewPanel'; +const SLO_GROUP_OVERVIEW_PANEL = 'sloGroupOverviewPanel'; + +export function SloUiCommonServiceProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + const comboBox = getService('comboBox'); + const find = getService('find'); + const toasts = getService('toasts'); + const retry = getService('retry'); + + return { + async assertSloOverviewConfigurationExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_SINGLE_OVERVIEW_CONFIGURATION); + }); + }, + async assertOverviewSloSelectorExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SINGLE_SLO_SELECTOR); + }); + }, + async setComboBoxSloSelection() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.click('sloSelector'); + await comboBox.set('sloSelector > comboBoxInput', sloData.name); + }); + }, + async assertOverviewConfigurationSaveButtonIsEnabled(subj: string) { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(subj); + await testSubjects.isEnabled(subj); + }); + }, + async clickOverviewCofigurationSaveButton() { + await retry.tryForTime(60 * 1000, async () => { + await this.assertOverviewConfigurationSaveButtonIsEnabled(SLO_CONFIRM_BUTTON); + await testSubjects.clickWhenNotDisabledWithoutRetry(SLO_CONFIRM_BUTTON); + }); + }, + + async assertOverviewModeSelectorExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(OVERVIEW_MODE_SELECTOR); + }); + }, + + async clickOverviewMode() { + await retry.tryForTime(60 * 1000, async () => { + await this.assertOverviewModeSelectorExists(); + await testSubjects.click(OVERVIEW_MODE_SELECTOR); + }); + }, + + async assertSloConfigurationGroupOverviewModeIsSelected() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_GROUP_OVERVIEW_CONFIGURATION); + }); + }, + + async assertGroupOverviewConfigurationGroupByExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_GROUP_OVERVIEW_CONFIGURATION_GROUP_BY); + }); + }, + + async assertGroupOverviewConfigurationGroupExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_GROUP_OVERVIEW_CONFIGURATION_GROUP); + }); + }, + + async assertGroupOverviewConfigurationKqlBarExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_GROUP_OVERVIEW_CONFIGURATION_KQLBAR); + }); + }, + + async dismissAllToasts() { + await retry.tryForTime(60 * 1000, async () => { + await toasts.dismissAll(); + }); + }, + + async assertSingleOverviewPanelExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_SINGLE_OVERVIEW_PANEL); + }); + }, + + async getSloCardTitle() { + const container = await testSubjects.find(SLO_SINGLE_OVERVIEW_PANEL); + return await (await container.findByClassName('echMetricText__title')).getVisibleText(); + }, + + async assertSingleOverviewPanelContentExists() { + await retry.tryForTime(2000, async () => { + expect( + await find.existsByCssSelector( + `[data-test-subj="${SLO_SINGLE_OVERVIEW_PANEL}"] .echChart` + ) + ).to.eql(true); + + expect( + await find.existsByCssSelector( + `[data-test-subj="${SLO_SINGLE_OVERVIEW_PANEL}"] .echMetricText__title` + ) + ).to.eql(true); + + expect(await this.getSloCardTitle()).to.eql(sloData.name); + }); + }, + + async assertGroupOverviewPanelExists() { + await retry.tryForTime(60 * 1000, async () => { + await testSubjects.existOrFail(SLO_GROUP_OVERVIEW_PANEL); + }); + }, + }; +} diff --git a/x-pack/test/functional/services/slo/index.ts b/x-pack/test/functional/services/slo/index.ts new file mode 100644 index 0000000000000..75339f41dfe3a --- /dev/null +++ b/x-pack/test/functional/services/slo/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; +import { SloUiCommonServiceProvider } from './common'; + +export function SloUiServiceProvider(context: FtrProviderContext) { + return { + common: SloUiCommonServiceProvider(context), + }; +} diff --git a/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/ml/alert_flyout.ts b/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/ml/alert_flyout.ts index 037e33267dfdb..58c72ef9d1a27 100644 --- a/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/ml/alert_flyout.ts +++ b/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/ml/alert_flyout.ts @@ -114,6 +114,14 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await ml.alerting.assertTopNBuckets(1); await ml.alerting.assertLookbackInterval('123m'); + await ml.testExecution.logTestStep( + 'should support updating the advanced settings section with valid values only' + ); + await ml.alerting.setTopNBuckets(0, true); + await ml.alerting.setTopNBuckets(2); + await ml.alerting.setLookbackInterval('invalid_value', true); + await ml.alerting.setLookbackInterval('2h'); + await ml.testExecution.logTestStep('should preview the alert condition'); await ml.alerting.assertPreviewButtonState(false); await ml.alerting.setTestInterval('5y'); diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts b/x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts index 2313a9f1ed7d6..b93bd8d5560eb 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts @@ -84,6 +84,7 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { + await reportingAPI.deleteAllReports(); await esArchiver.unload(archives.ecommerce.data); await kibanaServer.importExport.unload(archives.ecommerce.savedObjects); }); @@ -684,6 +685,7 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { + await reportingAPI.deleteAllReports(); await esArchiver.unload(archives.ecommerce.data); await kibanaServer.importExport.unload(archives.ecommerce.savedObjects); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/exception_comments_serverless.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/exception_comments_serverless.ts index 9fd4433e01f38..cda1ed3ca1517 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/exception_comments_serverless.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/exception_comments_serverless.ts @@ -26,7 +26,8 @@ export default ({ getService }: FtrProviderContext) => { const log = getService('log'); const supertestWithoutAuth = getService('supertestWithoutAuth'); - describe('@serverless exception item comments - serverless specific behavior', () => { + // Skipping in MKI due to roles testing not yet being available + describe('@serverless @skipInServerlessMKI exception item comments - serverless specific behavior', () => { // FLAKY: https://github.com/elastic/kibana/issues/181507 describe.skip('Rule Exceptions', () => { afterEach(async () => { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/prebuilt_rules.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/prebuilt_rules.ts index 7ce1ec3bd5a3f..5ed8d5d66c5dc 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/prebuilt_rules.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/exceptions/workflows/basic_license_essentials_tier/prebuilt_rules.ts @@ -37,7 +37,9 @@ export default ({ getService }: FtrProviderContext) => { const log = getService('log'); const es = getService('es'); - describe('@serverless @ess exceptions workflows for prebuilt rules', () => { + // See https://github.com/elastic/kibana/issues/182889 for details + // on skipping in MKI + describe('@serverless @ess @skipInServerlessMKI exceptions workflows for prebuilt rules', () => { describe('creating rules with exceptions', () => { beforeEach(async () => { await createAlertsIndex(supertest, log); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/perform_bulk_action_ess.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/perform_bulk_action_ess.ts index 7295ebe9b769d..846fd9f7d4204 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/perform_bulk_action_ess.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/rules_management/rule_bulk_actions/trial_license_complete_tier/perform_bulk_action_ess.ts @@ -46,8 +46,7 @@ export default ({ getService }: FtrProviderContext): void => { const createWebHookConnector = () => createConnector(getWebHookAction()); // Failing: See https://github.com/elastic/kibana/issues/173804 - // Failing: See https://github.com/elastic/kibana/issues/182512 - describe.skip('@ess perform_bulk_action - ESS specific logic', () => { + describe('@ess perform_bulk_action - ESS specific logic', () => { beforeEach(async () => { await deleteAllRules(supertest, log); }); @@ -107,7 +106,7 @@ export default ({ getService }: FtrProviderContext): void => { webhookUrl: 'http://localhost:1234', }, }), - createRule(supertest, log, getSimpleRule(ruleId, false)), + createRule(supertest, log, { ...getSimpleRule(ruleId, false), index: ['*'] }), ]); await createLegacyRuleAction(supertest, rule1.id, connector.body.id); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts index 4584c0d5719e5..1c7bb46c4cbc1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules.cy.ts @@ -578,7 +578,8 @@ describe('Detection rules, bulk edit', { tags: ['@ess', '@serverless'] }, () => }); }); - describe('Investigation fields actions', () => { + // https://github.com/elastic/kibana/issues/182834 + describe('Investigation fields actions', { tags: ['@skipInServerlessMKI'] }, () => { it('Add investigation fields to custom rules', () => { getRulesManagementTableRows().then((rows) => { const fieldsToBeAdded = ['source.ip', 'destination.ip']; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/search_bar.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/search_bar.cy.ts index 14afab3600f54..c11878fcc4916 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/search_bar.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/navigation/search_bar.cy.ts @@ -23,7 +23,8 @@ import { getHostIpFilter } from '../../../objects/filter'; import { hostsUrl } from '../../../urls/navigation'; import { waitForAllHostsToBeLoaded } from '../../../tasks/hosts/all_hosts'; -describe('SearchBar', { tags: ['@ess', '@serverless'] }, () => { +// Failing: See https://github.com/elastic/kibana/issues/182932 +describe.skip('SearchBar', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { login(); visitWithTimeRange(hostsUrl('allHosts')); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts b/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts index bd6ca6775c12f..b1849738677a6 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts @@ -52,6 +52,9 @@ export const removeKqlFilter = () => { }; export const fillAddFilterForm = ({ key, operator, value }: SearchBarFilter) => { + // workaround for field input sometimes not focusing correctly + cy.get(ADD_FILTER_FORM_FIELD_INPUT).click(); + // /workaround cy.get(ADD_FILTER_FORM_FIELD_INPUT).type(`${key}{downarrow}{enter}`); cy.get(ADD_FILTER_FORM_OPERATOR_FIELD).type(`${operator}{downarrow}{enter}`); diff --git a/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts b/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts index fc179681388ae..58ffde0d7611f 100644 --- a/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts +++ b/x-pack/test/security_solution_endpoint/apps/integrations/artifact_entries_list.ts @@ -54,7 +54,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { describe('For each artifact list under management', function () { // It's flaky only in Serverless - targetTags(this, ['@ess', '@skipInServerless']); + targetTags(this, ['@ess', '@serverless']); this.timeout(60_000 * 5); let indexedData: IndexedHostsAndAlertsResponse; @@ -155,10 +155,13 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { } else if (formAction.type === 'click') { await testSubjects.click(formAction.selector); } else if (formAction.type === 'input') { - await testSubjects.setValue( - formAction.selector, - (formAction.value || '') + (suffix ? suffix : '') - ); + const newValue = (formAction.value || '') + (suffix ? suffix : ''); + await testSubjects.setValue(formAction.selector, newValue); + await testSubjects.getAttribute(formAction.selector, 'value').then((value) => { + if (value !== newValue) { + return testSubjects.setValue(formAction.selector, newValue); + } + }); } else if (formAction.type === 'clear') { await ( await (await testSubjects.find(formAction.selector)).findByCssSelector('button') diff --git a/x-pack/test_serverless/README.md b/x-pack/test_serverless/README.md index 4a111d23d3790..6fb7551859e5b 100644 --- a/x-pack/test_serverless/README.md +++ b/x-pack/test_serverless/README.md @@ -209,9 +209,45 @@ node scripts/functional_test_runner.js --config test_serverless/api_integration/ ## Run tests on MKI There is no need to start servers locally, you just need to create MKI project and copy urls for Elasticsearch and Kibana. Make sure to update urls with username/password and port 443 for Elasticsearch. FTR has no control over MKI and can't update your projects so make sure your `config.ts` does not specify any custom arguments for Kibana or Elasticsearch. Otherwise, it will be ignored. You can run the tests from the `x-pack` directory: ``` -TEST_CLOUD=1 TEST_ES_URL="https://elastic:PASSWORD@ES_HOSTNAME:443" TEST_KIBANA_URL="https://elastic:PASSWORD@KIBANA_HOSTNAME" node scripts/functional_test_runner --config test_serverless/api_integration/test_suites/search/config.ts --exclude-tag=skipMKI +TEST_CLOUD=1 TEST_CLOUD_HOST_NAME="CLOUD_HOST_NAME" TEST_ES_URL="https://elastic:PASSWORD@ES_HOSTNAME:443" TEST_KIBANA_URL="https://elastic:PASSWORD@KIBANA_HOSTNAME" node scripts/functional_test_runner --config test_serverless/api_integration/test_suites/search/config.ts --exclude-tag=skipMKI ``` +Steps to follow to run on QA environment: +- Go to `CLOUD_HOST_NAME` and create a project. +- Go to `CLOUD_HOST_NAME/account/keys` and create Cloud specific API Key. +- We need the key from step 2 to obtain basic auth credentials for ES and Kibana. + Make a POST request to the following endpoint. + ``` + POST CLOUD_HOST_NAME/api/v1/serverless/projects///_reset-internal-credentials + Authorization: ApiKey + Content-Type: application/json + ``` + + In response you should get credentials. + ``` + { + "password": "testing-internal_pwd", + "username": "testing-internal" + } + ``` + We would use these credentials for `TEST_ES_URL="https://USERNAME:PASSWORD@ES_HOSTNAME:443"` and `TEST_KIBANA_URL="https://USERNAME:PASSWORD@KIBANA_HOSTNAME"` +- Now we need to create a user with the roles we want to test. Go to members page - `CLOUD_HOST_NAME/account/members` and click `[Invite member]`. + - Select the access level you want to grant and your project type. For example, to create a user with viewer role, toggle `[Instanse access]`, select project (should correspond to your project type, i.e Security), select `Viewer` role. + - Create `.ftr/role_users.json` in the root of Kibana repo. Add record for created user. + ``` + { + "viewer": { + "password": "xxxx", + "email": "email_of_the_elastic_cloud_account" + } + } + ``` +- Now run the tests from the `x-pack` directory +``` +TEST_CLOUD=1 TEST_CLOUD_HOST_NAME="CLOUD_HOST_NAME" TEST_ES_URL="https://testing-internal:testing-internal_pwd@ES_HOSTNAME:443" TEST_KIBANA_URL="https://testing-internal:testing-internal_pwd@KIBANA_HOSTNAME:443" node scripts/functional_test_runner.js --config test_serverless/functional/test_suites/security/common_configs/config.group1.ts --exclude-tag=skipMKI +``` + + ## Skipping tests for MKI run The tests that are listed in the the regular `config.ts` generally should work in both Kibana CI and MKI. However some tests might not work properly against MKI projects by design. Tag the tests with `skipMKI` to be excluded for MKI run. It works only for the `describe` block: diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts index fce7e3c7c7a44..b1f26ac562414 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/index_component_templates.ts @@ -15,7 +15,10 @@ export default function ({ getService }: FtrProviderContext) { const log = getService('log'); const indexManagementService = getService('indexManagement'); - describe('component templates', () => { + // Failing: See https://github.com/elastic/kibana/issues/182792 + // Failing: See https://github.com/elastic/kibana/issues/182797 + // Failing: See https://github.com/elastic/kibana/issues/182791 + describe.skip('component templates', () => { // Api methods let getAllComponentTemplates: typeof indexManagementService['componentTemplates']['api']['getAllComponentTemplates']; let getOneComponentTemplate: typeof indexManagementService['componentTemplates']['api']['getOneComponentTemplate']; diff --git a/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts b/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts index 9aafefdff51ce..89e5f5a0de4a7 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/reporting/generate_csv_discover.ts @@ -68,8 +68,6 @@ export default function ({ getService }: FtrProviderContext) { * Tests */ describe('Generate CSV from SearchSource', function () { - // failsOnMKI, see https://github.com/elastic/kibana/issues/179456 - this.tags(['failsOnMKI']); beforeEach(async () => { await kibanaServer.uiSettings.update({ 'csv:quoteValues': true, @@ -84,6 +82,7 @@ export default function ({ getService }: FtrProviderContext) { }); after(async () => { + await reportingAPI.deleteAllReports(); await esArchiver.unload(archives.ecommerce.data); await kibanaServer.importExport.unload(archives.ecommerce.savedObjects); }); diff --git a/x-pack/test_serverless/functional/page_objects/index.ts b/x-pack/test_serverless/functional/page_objects/index.ts index f1604d48508e2..ebc85de7d332c 100644 --- a/x-pack/test_serverless/functional/page_objects/index.ts +++ b/x-pack/test_serverless/functional/page_objects/index.ts @@ -21,6 +21,7 @@ import { SvlRuleDetailsPageProvider } from './svl_rule_details_ui_page'; import { SvlSearchConnectorsPageProvider } from './svl_search_connectors_page'; import { SvlManagementPageProvider } from './svl_management_page'; import { SvlIngestPipelines } from './svl_ingest_pipelines'; +import { SvlPlaygroundPageProvider } from './svl_playground_page'; export const pageObjects = { ...xpackFunctionalPageObjects, @@ -38,4 +39,5 @@ export const pageObjects = { svlRuleDetailsUI: SvlRuleDetailsPageProvider, svlManagementPage: SvlManagementPageProvider, svlIngestPipelines: SvlIngestPipelines, + svlPlaygroundUI: SvlPlaygroundPageProvider, }; diff --git a/x-pack/test_serverless/functional/page_objects/svl_playground_page.ts b/x-pack/test_serverless/functional/page_objects/svl_playground_page.ts new file mode 100644 index 0000000000000..e0c26c031eb50 --- /dev/null +++ b/x-pack/test_serverless/functional/page_objects/svl_playground_page.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../ftr_provider_context'; + +export function SvlPlaygroundPageProvider({ getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); + return { + PlaygrounStartChatPage: { + async expectPlaygroundStartChatPageComponentsToExist() { + await testSubjects.existOrFail('chat-playground-home-page-title'); + await testSubjects.existOrFail('selectIndicesChatPanel'); + await testSubjects.existOrFail('startChatButton'); + }, + + async expectPlaygroundHeaderComponentsToExist() { + await testSubjects.existOrFail('playground-header-actions'); + await testSubjects.existOrFail('playground-documentation-link'); + }, + }, + }; +} diff --git a/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts b/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts index 0bbae5c25cdd5..f710dca081668 100644 --- a/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts +++ b/x-pack/test_serverless/functional/services/deployment_agnostic_services.ts @@ -52,6 +52,7 @@ const deploymentAgnosticFunctionalServices = _.pick(functionalServices, [ 'menuToggle', 'ml', 'monacoEditor', + 'esql', 'pieChart', 'pipelineEditor', 'pipelineList', diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts b/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts new file mode 100644 index 0000000000000..5f051ac77bba0 --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts @@ -0,0 +1,530 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const log = getService('log'); + const dataGrid = getService('dataGrid'); + const testSubjects = getService('testSubjects'); + const monacoEditor = getService('monacoEditor'); + const inspector = getService('inspector'); + const retry = getService('retry'); + const browser = getService('browser'); + const find = getService('find'); + const esql = getService('esql'); + const dashboardAddPanel = getService('dashboardAddPanel'); + const PageObjects = getPageObjects([ + 'svlCommonPage', + 'common', + 'discover', + 'dashboard', + 'header', + 'timePicker', + 'unifiedFieldList', + ]); + + const defaultSettings = { + defaultIndex: 'logstash-*', + }; + + describe('discover esql view', async function () { + before(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + log.debug('load kibana index with default index pattern'); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + // and load a set of makelogs data + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.uiSettings.replace(defaultSettings); + await PageObjects.svlCommonPage.loginAsAdmin(); + await PageObjects.common.navigateToApp('discover'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + }); + + describe('test', () => { + it('should render esql view correctly', async function () { + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await testSubjects.existOrFail('showQueryBarMenu'); + await testSubjects.existOrFail('superDatePickerToggleQuickMenuButton'); + await testSubjects.existOrFail('addFilter'); + await testSubjects.existOrFail('dscViewModeDocumentButton'); + await testSubjects.existOrFail('unifiedHistogramChart'); + await testSubjects.existOrFail('discoverQueryHits'); + await testSubjects.existOrFail('discoverAlertsButton'); + await testSubjects.existOrFail('shareTopNavButton'); + await testSubjects.existOrFail('docTableExpandToggleColumn'); + await testSubjects.existOrFail('dataGridColumnSortingButton'); + await testSubjects.existOrFail('fieldListFiltersFieldSearch'); + await testSubjects.existOrFail('fieldListFiltersFieldTypeFilterToggle'); + await testSubjects.click('field-@message-showDetails'); + await testSubjects.existOrFail('discoverFieldListPanelEdit-@message'); + + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await testSubjects.existOrFail('fieldListFiltersFieldSearch'); + await testSubjects.existOrFail('TextBasedLangEditor'); + await testSubjects.existOrFail('superDatePickerToggleQuickMenuButton'); + + await testSubjects.missingOrFail('showQueryBarMenu'); + await testSubjects.missingOrFail('addFilter'); + await testSubjects.missingOrFail('dscViewModeDocumentButton'); + // when Lens suggests a table, we render an ESQL based histogram + await testSubjects.existOrFail('unifiedHistogramChart'); + await testSubjects.existOrFail('discoverQueryHits'); + await testSubjects.existOrFail('discoverAlertsButton'); + await testSubjects.existOrFail('shareTopNavButton'); + await testSubjects.existOrFail('dataGridColumnSortingButton'); + await testSubjects.existOrFail('docTableExpandToggleColumn'); + await testSubjects.existOrFail('fieldListFiltersFieldTypeFilterToggle'); + await testSubjects.click('field-@message-showDetails'); + await testSubjects.missingOrFail('discoverFieldListPanelEditItem'); + }); + + it('should perform test query correctly', async function () { + await PageObjects.discover.selectTextBaseLang(); + const testQuery = `from logstash-* | limit 10 | stats countB = count(bytes) by geo.dest | sort countB`; + + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + // here Lens suggests a XY so it is rendered + await testSubjects.existOrFail('unifiedHistogramChart'); + await testSubjects.existOrFail('xyVisChart'); + const cell = await dataGrid.getCellElement(0, 2); + expect(await cell.getVisibleText()).to.be('1'); + }); + + it('should render when switching to a time range with no data, then back to a time range with data', async () => { + await PageObjects.discover.selectTextBaseLang(); + const testQuery = `from logstash-* | limit 10 | stats countB = count(bytes) by geo.dest | sort countB`; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + let cell = await dataGrid.getCellElement(0, 2); + expect(await cell.getVisibleText()).to.be('1'); + await PageObjects.timePicker.setAbsoluteRange( + 'Sep 19, 2015 @ 06:31:44.000', + 'Sep 19, 2015 @ 06:31:44.000' + ); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await testSubjects.existOrFail('discoverNoResults'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + cell = await dataGrid.getCellElement(0, 2); + expect(await cell.getVisibleText()).to.be('1'); + }); + + it('should query an index pattern that doesnt translate to a dataview correctly', async function () { + await PageObjects.discover.selectTextBaseLang(); + const testQuery = `from logstash* | limit 10 | stats countB = count(bytes) by geo.dest | sort countB`; + + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + const cell = await dataGrid.getCellElement(0, 2); + expect(await cell.getVisibleText()).to.be('1'); + }); + + it('should render correctly if there are empty fields', async function () { + await PageObjects.discover.selectTextBaseLang(); + const testQuery = `from logstash-* | limit 10 | keep machine.ram_range, bytes`; + + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + const cell = await dataGrid.getCellElement(0, 3); + expect(await cell.getVisibleText()).to.be(' - '); + expect(await dataGrid.getHeaders()).to.eql([ + 'Control column', + 'Select column', + 'Numberbytes', + 'machine.ram_range', + ]); + }); + + it('should work without a FROM statement', async function () { + await PageObjects.discover.selectTextBaseLang(); + const testQuery = `ROW a = 1, b = "two", c = null`; + + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await PageObjects.discover.dragFieldToTable('a'); + const cell = await dataGrid.getCellElement(0, 2); + expect(await cell.getVisibleText()).to.be('1'); + }); + }); + + describe('errors', () => { + it('should show error messages for syntax errors in query', async function () { + await PageObjects.discover.selectTextBaseLang(); + const brokenQueries = [ + 'from logstash-* | limit 10*', + 'from logstash-* | limit A', + 'from logstash-* | where a*', + 'limit 10', + ]; + for (const testQuery of brokenQueries) { + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + // error in fetching documents because of the invalid query + await PageObjects.discover.showsErrorCallout(); + const message = await testSubjects.getVisibleText('discoverErrorCalloutMessage'); + expect(message).to.contain( + "[esql] > Couldn't parse Elasticsearch ES|QL query. Check your query and try again." + ); + expect(message).to.not.contain('undefined'); + if (message.includes('line')) { + expect((await monacoEditor.getCurrentMarkers('kibanaCodeEditor')).length).to.eql(1); + } + } + }); + }); + + describe('switch modal', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + }); + + it('should show switch modal when switching to a data view', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.discover.selectIndexPattern('logstash-*', false); + await retry.try(async () => { + await testSubjects.existOrFail('unifiedSearch_switch_modal'); + }); + }); + + it('should not show switch modal when switching to a data view while a saved search is open', async () => { + await PageObjects.discover.selectTextBaseLang(); + const testQuery = 'from logstash-* | limit 100 | drop @timestamp'; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.discover.selectIndexPattern('logstash-*', false); + await retry.try(async () => { + await testSubjects.existOrFail('unifiedSearch_switch_modal'); + }); + await find.clickByCssSelector( + '[data-test-subj="unifiedSearch_switch_modal"] .euiModal__closeIcon' + ); + await retry.try(async () => { + await testSubjects.missingOrFail('unifiedSearch_switch_modal'); + }); + await PageObjects.discover.saveSearch('esql_test'); + await PageObjects.discover.selectIndexPattern('logstash-*'); + await testSubjects.missingOrFail('unifiedSearch_switch_modal'); + }); + + it('should show switch modal when switching to a data view while a saved search with unsaved changes is open', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.discover.saveSearch('esql_test2'); + const testQuery = 'from logstash-* | limit 100 | drop @timestamp'; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.discover.selectIndexPattern('logstash-*', false); + await retry.try(async () => { + await testSubjects.existOrFail('unifiedSearch_switch_modal'); + }); + }); + }); + + describe('inspector', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + }); + + it('shows Discover and Lens requests in Inspector', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await inspector.open(); + const requestNames = await inspector.getRequestNames(); + expect(requestNames).to.contain('Table'); + expect(requestNames).to.contain('Visualization'); + }); + }); + + describe('query history', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + }); + + it('should see my current query in the history', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await testSubjects.click('TextBasedLangEditor-expand'); + await testSubjects.click('TextBasedLangEditor-toggle-query-history-button'); + const historyItems = await esql.getHistoryItems(); + log.debug(historyItems); + const queryAdded = historyItems.some((item) => { + return item[1] === 'from logstash-* | limit 10'; + }); + + expect(queryAdded).to.be(true); + }); + + it('updating the query should add this to the history', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + const testQuery = 'from logstash-* | limit 100 | drop @timestamp'; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await testSubjects.click('TextBasedLangEditor-expand'); + await testSubjects.click('TextBasedLangEditor-toggle-query-history-button'); + const historyItems = await esql.getHistoryItems(); + log.debug(historyItems); + const queryAdded = historyItems.some((item) => { + return item[1] === 'from logstash-* | limit 100 | drop @timestamp'; + }); + + expect(queryAdded).to.be(true); + }); + + it('should select a query from the history and submit it', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await testSubjects.click('TextBasedLangEditor-expand'); + await testSubjects.click('TextBasedLangEditor-toggle-query-history-button'); + // click a history item + await esql.clickHistoryItem(1); + + const historyItems = await esql.getHistoryItems(); + log.debug(historyItems); + const queryAdded = historyItems.some((item) => { + return item[1] === 'from logstash-* | limit 100 | drop @timestamp'; + }); + + expect(queryAdded).to.be(true); + }); + + it('should add a failed query to the history', async () => { + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + const testQuery = 'from logstash-* | limit 100 | woof and meow'; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + await testSubjects.click('TextBasedLangEditor-expand'); + await testSubjects.click('TextBasedLangEditor-toggle-query-history-button'); + await testSubjects.click('TextBasedLangEditor-queryHistory-runQuery-button'); + const historyItem = await esql.getHistoryItem(0); + await historyItem.findByTestSubject('TextBasedLangEditor-queryHistory-error'); + }); + }); + + describe('sorting', () => { + it('should sort correctly', async () => { + const savedSearchName = 'testSorting'; + + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + const testQuery = 'from logstash-* | sort @timestamp | limit 100'; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await PageObjects.unifiedFieldList.clickFieldListItemAdd('bytes'); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains an initial value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '1,623'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields' + ); + + await dataGrid.clickDocSortDesc('bytes', 'Sort High-Low'); + + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the highest value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n1' + ); + + await PageObjects.discover.saveSearch(savedSearchName); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the same highest value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + }); + + await browser.refresh(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the same highest value after reload', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + }); + + await PageObjects.discover.clickNewSearchButton(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await PageObjects.discover.loadSavedSearch(savedSearchName); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor( + 'first cell contains the same highest value after reopening', + async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + } + ); + + await dataGrid.clickDocSortDesc('bytes', 'Sort Low-High'); + + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the lowest value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '0'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n1' + ); + + await PageObjects.unifiedFieldList.clickFieldListItemAdd('extension'); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await dataGrid.clickDocSortDesc('extension', 'Sort A-Z'); + + await retry.waitFor('first cell contains the lowest value for extension', async () => { + const cell = await dataGrid.getCellElement(0, 3); + const text = await cell.getVisibleText(); + return text === 'css'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n2' + ); + + await browser.refresh(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the same lowest value after reload', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '0'; + }); + + await retry.waitFor( + 'first cell contains the same lowest value for extension after reload', + async () => { + const cell = await dataGrid.getCellElement(0, 3); + const text = await cell.getVisibleText(); + return text === 'css'; + } + ); + + await PageObjects.discover.saveSearch(savedSearchName); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await dashboardAddPanel.clickOpenAddPanel(); + await dashboardAddPanel.addSavedSearch(savedSearchName); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await retry.waitFor( + 'first cell contains the same lowest value as dashboard panel', + async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '0'; + } + ); + + await retry.waitFor( + 'first cell contains the lowest value for extension as dashboard panel', + async () => { + const cell = await dataGrid.getCellElement(0, 3); + const text = await cell.getVisibleText(); + return text === 'css'; + } + ); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n2' + ); + }); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/esql/index.ts b/x-pack/test_serverless/functional/test_suites/common/discover/esql/index.ts new file mode 100644 index 0000000000000..54122d2ca827d --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/common/discover/esql/index.ts @@ -0,0 +1,14 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('discover/esql', function () { + loadTestFile(require.resolve('./_esql_view')); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/group2/_data_grid_doc_table.ts b/x-pack/test_serverless/functional/test_suites/common/discover/group2/_data_grid_doc_table.ts index 3745b1223d615..2ca4c5f856937 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/group2/_data_grid_doc_table.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/group2/_data_grid_doc_table.ts @@ -33,8 +33,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const security = getService('security'); - // FLAKY: https://github.com/elastic/kibana/issues/182125 - describe.skip('discover data grid doc table', function describeIndexTests() { + describe('discover data grid doc table', function describeIndexTests() { before(async function () { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); log.debug('load kibana index with default index pattern'); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/group2/index.ts b/x-pack/test_serverless/functional/test_suites/common/discover/group2/index.ts index be8a043327a7d..658b92845ffca 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/group2/index.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/group2/index.ts @@ -11,8 +11,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const browser = getService('browser'); - // FLAKY: https://github.com/elastic/kibana/issues/182126 - describe.skip('discover/group2', function () { + describe('discover/group2', function () { before(async function () { await browser.setWindowSize(1600, 1200); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/platform_security/user_profiles/user_profiles.ts b/x-pack/test_serverless/functional/test_suites/common/platform_security/user_profiles/user_profiles.ts index 2045f172d3db0..c9c61d5d3a6a9 100644 --- a/x-pack/test_serverless/functional/test_suites/common/platform_security/user_profiles/user_profiles.ts +++ b/x-pack/test_serverless/functional/test_suites/common/platform_security/user_profiles/user_profiles.ts @@ -8,37 +8,44 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; -export default function ({ getPageObjects }: FtrProviderContext) { +const VIEWER_ROLE = 'viewer'; + +export default function ({ getPageObjects, getService }: FtrProviderContext) { + const testSubjects = getService('testSubjects'); const pageObjects = getPageObjects(['svlCommonPage', 'common', 'userProfiles']); + const svlUserManager = getService('svlUserManager'); describe('User Profile Page', async () => { before(async () => { - // TODO: migrate to SAML role when profile page displays the data - await pageObjects.svlCommonPage.login(); + await pageObjects.svlCommonPage.loginWithRole(VIEWER_ROLE); }); after(async () => { await pageObjects.svlCommonPage.forceLogout(); }); - describe('Theme', async () => { - it('should change theme based on the User Profile Theme control', async () => { + describe('User details', async () => { + it('should display correct user details', async () => { await pageObjects.common.navigateToApp('security_account'); - const themeKeyPadMenu = await pageObjects.userProfiles.getThemeKeypadMenu(); - expect(themeKeyPadMenu).not.to.be(null); + const userData = await svlUserManager.getUserData(VIEWER_ROLE); + + const actualFullname = await pageObjects.userProfiles.getProfileFullname(); + const actualEmail = await pageObjects.userProfiles.getProfileEmail(); + + expect(actualFullname).to.be(userData.fullname); + expect(actualEmail).to.be(userData.email); + }); - await pageObjects.userProfiles.changeUserProfileTheme('Dark'); - const darkModeTag = await pageObjects.userProfiles.getThemeTag(); - expect(darkModeTag).to.be('v8dark'); + it('should not have edit actions', async () => { + const fullNameInputField = await testSubjects.findAll('userProfileFullName'); - await pageObjects.userProfiles.changeUserProfileTheme('Light'); - const lightModeTag = await pageObjects.userProfiles.getThemeTag(); - expect(lightModeTag).to.be('v8light'); + const emailInputField = await testSubjects.findAll('userProfileEmail'); + const changePasswordButton = await testSubjects.findAll('openChangePasswordForm'); - await pageObjects.userProfiles.changeUserProfileTheme('Space default'); - const spaceDefaultModeTag = await pageObjects.userProfiles.getThemeTag(); - expect(spaceDefaultModeTag).to.be('v8light'); + expect(fullNameInputField).to.have.length(0); + expect(emailInputField).to.have.length(0); + expect(changePasswordButton).to.have.length(0); }); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts b/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts index 9891e7b8ee488..be9fb04bb40b8 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts @@ -17,6 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('../../common/discover/x_pack'), require.resolve('../../common/discover_ml_uptime/discover'), require.resolve('../../common/context'), + require.resolve('../../common/discover/esql'), ], junit: { reportName: 'Serverless Observability Functional Tests - Common Group 6', diff --git a/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group6.ts b/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group6.ts index 25b3a8802a6f0..78496e3b4aedd 100644 --- a/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group6.ts +++ b/x-pack/test_serverless/functional/test_suites/search/common_configs/config.group6.ts @@ -17,6 +17,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { require.resolve('../../common/discover/x_pack'), require.resolve('../../common/discover_ml_uptime/discover'), require.resolve('../../common/context'), + require.resolve('../../common/discover/esql'), ], junit: { reportName: 'Serverless Search Functional Tests - Common Group 6', diff --git a/x-pack/test_serverless/functional/test_suites/search/index.ts b/x-pack/test_serverless/functional/test_suites/search/index.ts index 2e62cf4fbee38..455acc0404429 100644 --- a/x-pack/test_serverless/functional/test_suites/search/index.ts +++ b/x-pack/test_serverless/functional/test_suites/search/index.ts @@ -20,6 +20,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./advanced_settings')); loadTestFile(require.resolve('./rules/rule_details')); loadTestFile(require.resolve('./console_notebooks')); + loadTestFile(require.resolve('./playground_overview')); loadTestFile(require.resolve('./ml')); }); diff --git a/x-pack/test_serverless/functional/test_suites/search/navigation.ts b/x-pack/test_serverless/functional/test_suites/search/navigation.ts index a8af6692be57f..cfa54657dbeb2 100644 --- a/x-pack/test_serverless/functional/test_suites/search/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/search/navigation.ts @@ -70,6 +70,15 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { await expectNoPageReload(); }); + it('navigate to playground from side nav', async () => { + await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'searchPlayground' }); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Build', 'Playground']); + + await svlCommonNavigation.sidenav.expectLinkActive({ deepLinkId: 'searchPlayground' }); + + expect(await browser.getCurrentUrl()).contain('/app/search_playground/chat'); + }); + it("management apps from the sidenav hide the 'stack management' root from the breadcrumbs", async () => { await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:index_management' }); await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts([ diff --git a/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts b/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts new file mode 100644 index 0000000000000..17d9d81c1014c --- /dev/null +++ b/x-pack/test_serverless/functional/test_suites/search/playground_overview.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getPageObjects }: FtrProviderContext) { + const pageObjects = getPageObjects(['svlCommonPage', 'svlCommonNavigation', 'svlPlaygroundUI']); + describe('Playground', function () { + before(async () => { + await pageObjects.svlCommonPage.login(); + await pageObjects.svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'searchPlayground' }); + }); + + after(async () => { + await pageObjects.svlCommonPage.forceLogout(); + }); + + it('playground app is loaded', async () => { + await pageObjects.svlPlaygroundUI.PlaygrounStartChatPage.expectPlaygroundStartChatPageComponentsToExist(); + await pageObjects.svlPlaygroundUI.PlaygrounStartChatPage.expectPlaygroundHeaderComponentsToExist(); + }); + }); +} diff --git a/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts b/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts index 8ebd1f6958ec7..9c263cf4c198e 100644 --- a/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts +++ b/x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts @@ -19,6 +19,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { // https://github.com/elastic/kibana/issues/172365 // require.resolve('../../common/discover_ml_uptime/discover'), require.resolve('../../common/context'), + require.resolve('../../common/discover/esql'), ], junit: { reportName: 'Serverless Security Functional Tests - Common Group 6', diff --git a/x-pack/test_serverless/shared/services/svl_reporting.ts b/x-pack/test_serverless/shared/services/svl_reporting.ts index 4fc6da28f082e..2f5742b57d07e 100644 --- a/x-pack/test_serverless/shared/services/svl_reporting.ts +++ b/x-pack/test_serverless/shared/services/svl_reporting.ts @@ -109,5 +109,13 @@ export function SvlReportingServiceProvider({ getService }: FtrProviderContext) .auth(username, password); return response.text as unknown; }, + async deleteAllReports() { + log.debug('ReportingAPI.deleteAllReports'); + + // ignores 409 errs and keeps retrying + await retry.tryForTime(5000, async () => { + await supertest.post('/.reporting*/_delete_by_query').send({ query: { match_all: {} } }); + }); + }, }; } diff --git a/yarn.lock b/yarn.lock index ff292b52c7143..7ff3debb76c7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5166,6 +5166,10 @@ version "0.0.0" uid "" +"@kbn/logs-data-access-plugin@link:x-pack/plugins/observability_solution/logs_data_access": + version "0.0.0" + uid "" + "@kbn/logs-explorer-plugin@link:x-pack/plugins/observability_solution/logs_explorer": version "0.0.0" uid "" @@ -7748,15 +7752,17 @@ require-from-string "^2.0.2" uri-js "^4.2.2" -"@redocly/cli@^1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@redocly/cli/-/cli-1.6.0.tgz#d3f6c8d6822eead487c2cb814d131e17d05c961f" - integrity sha512-0naVFJGR2tVcpMIHSFRr2HAoyy70qMqDAP6kXcnOdkGkwLRJ8s/5n1STwsym/yZwNkhrt2M0cKT6KAMlTUeCeg== +"@redocly/cli@^1.12.0": + version "1.12.0" + resolved "https://registry.yarnpkg.com/@redocly/cli/-/cli-1.12.0.tgz#c2191e2d34161cdaf1fcb42d896fd4c5e3313ac8" + integrity sha512-k45WELRAvE0UbYPhEhUPq/T4WOCDx4zoCT3tLokCdnCyeUHgaDzNAzPM2qe5Y8m8k5FUYlNoPdND4PlvUhg9Wg== dependencies: - "@redocly/openapi-core" "1.6.0" + "@redocly/openapi-core" "1.12.0" + abort-controller "^3.0.0" chokidar "^3.5.1" colorette "^1.2.0" core-js "^3.32.1" + form-data "^4.0.0" get-port-please "^3.0.1" glob "^7.1.6" handlebars "^4.7.6" @@ -7770,13 +7776,18 @@ styled-components "^6.0.7" yargs "17.0.1" -"@redocly/openapi-core@1.6.0", "@redocly/openapi-core@^1.0.0-rc.2": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.6.0.tgz#09aee5e21a9cbad08f3230ced16685d043a9b197" - integrity sha512-oao6Aey4peLKfagzWGb6N7OBI6CoDWEP4ka/XjrUNZw+UoKVVg3hVBXW4Vr3CJ2O8j6wEa2i+Lbb92VQQsoxwg== +"@redocly/config@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@redocly/config/-/config-0.2.0.tgz#c61fd0a8ccac330de398e26e8cac1a3fedbf9165" + integrity sha512-r0TqTPVXrxdvhpbOntWnJofOx0rC7u+A+tfC0KFwMtw38QCNb3pwodVjeLa7MT5Uu+fcPxfO119yLBj0QHvBuQ== + +"@redocly/openapi-core@1.12.0", "@redocly/openapi-core@^1.0.0-rc.2": + version "1.12.0" + resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.12.0.tgz#82047a92a138362c7f411046d855fdcde3a946b8" + integrity sha512-2Jfxv3iIk1JUwLSnLyewJ8GAsoxubROVieg13Sjo79TjuWaUBuI49j8GZqC08ljENqyEIp0JHReDjhKs4Snrhg== dependencies: "@redocly/ajv" "^8.11.0" - "@types/node" "^14.11.8" + "@redocly/config" "^0.2.0" colorette "^1.2.0" js-levenshtein "^1.1.6" js-yaml "^4.1.0" @@ -7845,13 +7856,6 @@ resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.6.3.tgz#8205baf6e17ef93be35bf62c37d2d594e9be0dad" integrity sha512-EXJysQ7J3veRECd0kZFQwYYd5sJMcq2O/m60zu1W2l3oVQ9xtub8jTOtYRE0+M2iomyG/W3Ps7+vp2kna0C27Q== -"@samverschueren/stream-to-observable@^0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" - integrity sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg== - dependencies: - any-observable "^0.3.0" - "@searchkit/sdk@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@searchkit/sdk/-/sdk-3.0.0.tgz#63fcec0edcba05d241042b8476be1b86d77142e4" @@ -10082,14 +10086,6 @@ resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-2.1.0.tgz#ea3dd64c4805597311790b61e872cbd1ed2cd806" integrity sha512-Q7DYAOi9O/+cLLhdaSvKdaumWyHbm7HAk/bFwwyTuU0arR5yyCeW5GOoqt4tJTpDRxhpx9Q8kQL6vMpuw9hDSw== -"@types/listr@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@types/listr/-/listr-0.14.0.tgz#55161177ed5043987871bca5f66d87ca0a63a0b7" - integrity sha512-8ZLo3UiyxuzgmbJYc8vMC0kbF3RFaB3ZZOh7xM1nfcGxypFoJZi0P7ndD4MLSYqWW4M4zG6PWvObVkpHjg+45g== - dependencies: - "@types/node" "*" - rxjs "^6.5.1" - "@types/loader-utils@^2.0.3": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/loader-utils/-/loader-utils-2.0.3.tgz#fbc2337358f8f4a7dc532ac0a3646c74275edf2d" @@ -10279,7 +10275,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@20.10.5", "@types/node@>= 8", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@>=18.0.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.11.8", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^18.0.0", "@types/node@^18.11.18": +"@types/node@*", "@types/node@20.10.5", "@types/node@>= 8", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@>=18.0.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^18.0.0", "@types/node@^18.11.18": version "20.10.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.5.tgz#47ad460b514096b7ed63a1dae26fad0914ed3ab2" integrity sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw== @@ -11638,11 +11634,6 @@ ansi-colors@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== -ansi-escapes@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d" @@ -11650,6 +11641,11 @@ ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: dependencies: type-fest "^0.8.1" +ansi-escapes@^6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-6.2.1.tgz#76c54ce9b081dad39acec4b5d53377913825fb0f" + integrity sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig== + ansi-gray@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" @@ -11706,7 +11702,7 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -ansi-styles@^6.1.0: +ansi-styles@^6.0.0, ansi-styles@^6.1.0, ansi-styles@^6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== @@ -11728,11 +11724,6 @@ antlr4@^4.13.1-patch-1: resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.13.1-patch-1.tgz#946176f863f890964a050c4f18c47fd6f7e57602" integrity sha512-OjFLWWLzDMV9rdFhpvroCWR4ooktNg9/nvVYSA5z28wuVpU36QUNuioR1XLnQtcjVlf8npjyz593PxnU/f/Cow== -any-observable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" - integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -13448,7 +13439,7 @@ chalk@4.1.2, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1. ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^1.0.0, chalk@^1.1.3: +chalk@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= @@ -13684,13 +13675,6 @@ cli-boxes@^3.0.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145" integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== -cli-cursor@^2.0.0, cli-cursor@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" - integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - dependencies: - restore-cursor "^2.0.0" - cli-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" @@ -13698,6 +13682,13 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + cli-progress@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-3.12.0.tgz#807ee14b66bcc086258e444ad0f19e7d42577942" @@ -13719,14 +13710,6 @@ cli-table3@^0.6.1, cli-table3@~0.6.1: optionalDependencies: colors "1.4.0" -cli-truncate@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" - integrity sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ= - dependencies: - slice-ansi "0.0.4" - string-width "^1.0.1" - cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -13735,6 +13718,14 @@ cli-truncate@^2.1.0: slice-ansi "^3.0.0" string-width "^4.2.0" +cli-truncate@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-4.0.0.tgz#6cc28a2924fee9e25ce91e973db56c7066e6172a" + integrity sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA== + dependencies: + slice-ansi "^5.0.0" + string-width "^7.0.0" + cli-width@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" @@ -13936,10 +13927,10 @@ colorette@^1.2.0, colorette@^1.2.1, colorette@^1.2.2: resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== -colorette@^2.0.10, colorette@^2.0.14: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== +colorette@^2.0.10, colorette@^2.0.14, colorette@^2.0.20: + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== colors@1.4.0: version "1.4.0" @@ -15067,7 +15058,7 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -date-fns@^1.27.2, date-fns@^1.30.1: +date-fns@^1.30.1: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== @@ -15754,9 +15745,9 @@ domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: domelementtype "^2.3.0" dompurify@^2.2.8: - version "2.4.7" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.7.tgz#277adeb40a2c84be2d42a8bcd45f582bfa4d0cfc" - integrity sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ== + version "2.5.2" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.2.tgz#e02be61d621bea36a76eb2beb23b043f347aa9c7" + integrity sha512-5vSyvxRAb45EoWwAktUT3AYqAwXK4FL7si22Cgj46U6ICsj/YJczCN+Bk7WNABIQmpWRymGfslMhrRUZkQNnqA== domutils@^2.0.0, domutils@^2.5.2, domutils@^2.8.0: version "2.8.0" @@ -16001,11 +15992,6 @@ electron-to-chromium@^1.4.668: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.701.tgz#7335e5761331774b4dea54cd24a1b84861d45cdf" integrity sha512-K3WPQ36bUOtXg/1+69bFlFOvdSm0/0bGqmsfPDLRXLanoKXdA+pIWuf/VbA9b+2CwBFuONgl4NEz4OEm+OJOKA== -elegant-spinner@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" - integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= - element-resize-detector@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/element-resize-detector/-/element-resize-detector-1.2.3.tgz#5078d9b99398fe4c589f8c8df94ff99e5d413ff3" @@ -16041,6 +16027,11 @@ emittery@^0.13.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" integrity sha1-xs0OwbBkLio8Z6ETfvxeeW2k+I4= +emoji-regex@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" + integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -16906,6 +16897,11 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.4, eventemitter3@^4.0.7: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@^1.0.2: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" @@ -17360,21 +17356,6 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== -figures@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" - integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= - dependencies: - escape-string-regexp "^1.0.5" - object-assign "^4.1.0" - -figures@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" - integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= - dependencies: - escape-string-regexp "^1.0.5" - figures@^3.0.0, figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" @@ -18033,6 +18014,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2, get-intrinsic@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" @@ -19314,11 +19300,6 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" -indent-string@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" - integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= - indent-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" @@ -19750,16 +19731,23 @@ is-fullwidth-code-point@^1.0.0: dependencies: number-is-nan "^1.0.0" -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== +is-fullwidth-code-point@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88" + integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ== + +is-fullwidth-code-point@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz#9609efced7c2f97da7b60145ef481c787c7ba704" + integrity sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA== + dependencies: + get-east-asian-width "^1.0.0" + is-function@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" @@ -19889,13 +19877,6 @@ is-object@^1.0.1: resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= -is-observable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" - integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== - dependencies: - symbol-observable "^1.1.0" - is-odd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" @@ -21523,35 +21504,6 @@ listenercount@~1.0.1: resolved "https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937" integrity sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ== -listr-silent-renderer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" - integrity sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4= - -listr-update-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" - integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^2.3.0" - strip-ansi "^3.0.1" - -listr-verbose-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" - integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== - dependencies: - chalk "^2.4.1" - cli-cursor "^2.1.0" - date-fns "^1.27.2" - figures "^2.0.0" - listr2@^3.8.3: version "3.10.0" resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.10.0.tgz#58105a53ed7fa1430d1b738c6055ef7bb006160f" @@ -21565,20 +21517,17 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" -listr@^0.14.1: - version "0.14.3" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" - integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== +listr2@^8.2.1: + version "8.2.1" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.1.tgz#06a1a6efe85f23c5324180d7c1ddbd96b5eefd6d" + integrity sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g== dependencies: - "@samverschueren/stream-to-observable" "^0.3.0" - is-observable "^1.1.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.5.0" - listr-verbose-renderer "^0.5.0" - p-map "^2.0.0" - rxjs "^6.3.3" + cli-truncate "^4.0.0" + colorette "^2.0.20" + eventemitter3 "^5.0.1" + log-update "^6.0.0" + rfdc "^1.3.1" + wrap-ansi "^9.0.0" lmdb@^2.9.2: version "2.9.2" @@ -21822,13 +21771,6 @@ log-symbols@4.1.0, log-symbols@^4.0.0, log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - integrity sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg= - dependencies: - chalk "^1.0.0" - log-symbols@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" @@ -21836,15 +21778,6 @@ log-symbols@^3.0.0: dependencies: chalk "^2.4.2" -log-update@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" - integrity sha1-iDKP19HOeTiykoN0bwsbwSayRwg= - dependencies: - ansi-escapes "^3.0.0" - cli-cursor "^2.0.0" - wrap-ansi "^3.0.1" - log-update@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" @@ -21855,6 +21788,17 @@ log-update@^4.0.0: slice-ansi "^4.0.0" wrap-ansi "^6.2.0" +log-update@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-6.0.0.tgz#0ddeb7ac6ad658c944c1de902993fce7c33f5e59" + integrity sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw== + dependencies: + ansi-escapes "^6.2.0" + cli-cursor "^4.0.0" + slice-ansi "^7.0.0" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + logform@^2.3.2, logform@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/logform/-/logform-2.4.0.tgz#131651715a17d50f09c2a2c1a524ff1a4164bcfe" @@ -22573,11 +22517,6 @@ mime@2.6.0, mime@^2.4.4: resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367" integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -23922,13 +23861,6 @@ one-time@^1.0.0: dependencies: fn.name "1.x.x" -onetime@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" - integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - dependencies: - mimic-fn "^1.0.0" - onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" @@ -27183,14 +27115,6 @@ responselike@^3.0.0: dependencies: lowercase-keys "^3.0.0" -restore-cursor@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" - integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - dependencies: - onetime "^2.0.0" - signal-exit "^3.0.2" - restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -27199,6 +27123,14 @@ restore-cursor@^3.1.0: onetime "^5.1.0" signal-exit "^3.0.2" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + resumer@^0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" @@ -27231,6 +27163,11 @@ rfc4648@^1.5.2: resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.5.2.tgz#cf5dac417dd83e7f4debf52e3797a723c1373383" integrity sha512-tLOizhR6YGovrEBLatX1sdcuhoSCXddw3mqNVAcKxGJ+J0hFeJ+SjeWCv5UPA/WU3YzWPPuCVYgXBKZUPGpKtg== +rfdc@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" + integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== + rgbcolor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/rgbcolor/-/rgbcolor-1.0.1.tgz#d6505ecdb304a6595da26fa4b43307306775945d" @@ -27343,7 +27280,7 @@ rxjs-report-usage@^1.0.4: glob "~7.2.0" prompts "~2.4.2" -rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.1, rxjs@^6.6.0, rxjs@^6.6.7: +rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.7: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -28109,11 +28046,6 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" - integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= - slice-ansi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" @@ -28132,6 +28064,22 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +slice-ansi@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-5.0.0.tgz#b73063c57aa96f9cd881654b15294d95d285c42a" + integrity sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ== + dependencies: + ansi-styles "^6.0.0" + is-fullwidth-code-point "^4.0.0" + +slice-ansi@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-7.1.0.tgz#cd6b4655e298a8d1bdeb04250a433094b347b9a9" + integrity sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg== + dependencies: + ansi-styles "^6.2.1" + is-fullwidth-code-point "^5.0.0" + slide@~1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" @@ -28809,14 +28757,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -28826,6 +28766,15 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" + integrity sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + "string.prototype.matchall@^4.0.0 || ^3.0.1", string.prototype.matchall@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.8.tgz#3bf85722021816dcd1bf38bb714915887ca79fd3" @@ -28931,13 +28880,6 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -29290,7 +29232,7 @@ swrv@1.0.4: resolved "https://registry.yarnpkg.com/swrv/-/swrv-1.0.4.tgz#278b4811ed4acbb1ae46654972a482fd1847e480" integrity sha512-zjEkcP8Ywmj+xOJW3lIT65ciY/4AL4e/Or7Gj0MzU3zBJNMdJiT8geVZhINavnlHRMMCcJLHhraLTAiDOTmQ9g== -symbol-observable@^1.1.0, symbol-observable@^1.2.0: +symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== @@ -31828,14 +31770,6 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrap-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" - integrity sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo= - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -31854,6 +31788,15 @@ wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" +wrap-ansi@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-9.0.0.tgz#1a3dc8b70d85eeb8398ddfb1e4a02cd186e58b3e" + integrity sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q== + dependencies: + ansi-styles "^6.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"