diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index 4ac592cca57ab..43bee5ba27a7d 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -122,6 +122,7 @@ enabled: - test/functional/apps/home/config.ts - test/functional/apps/kibana_overview/config.ts - test/functional/apps/management/config.ts + - test/functional/apps/navigation/config.ts - test/functional/apps/saved_objects_management/config.ts - test/functional/apps/sharing/config.ts - test/functional/apps/status_page/config.ts @@ -446,24 +447,25 @@ enabled: - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group4.ts - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group5.ts - x-pack/test_serverless/functional/test_suites/security/common_configs/config.group6.ts - - x-pack/performance/journeys/ecommerce_dashboard.ts - - x-pack/performance/journeys/ecommerce_dashboard_map_only.ts - - x-pack/performance/journeys/flight_dashboard.ts - - x-pack/performance/journeys/login.ts - - x-pack/performance/journeys/many_fields_discover.ts - - x-pack/performance/journeys/many_fields_lens_editor.ts - - x-pack/performance/journeys/many_fields_transform.ts - - x-pack/performance/journeys/tsdb_logs_data_visualizer.ts - - x-pack/performance/journeys/promotion_tracking_dashboard.ts - - x-pack/performance/journeys/web_logs_dashboard.ts - - x-pack/performance/journeys/data_stress_test_lens.ts - - x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts - - x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts - - x-pack/performance/journeys/dashboard_listing_page.ts - - x-pack/performance/journeys/tags_listing_page.ts - - x-pack/performance/journeys/cloud_security_dashboard.ts - - x-pack/performance/journeys/apm_service_inventory.ts - - x-pack/performance/journeys/infra_hosts_view.ts + - x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard_map_only.ts + - x-pack/performance/journeys_e2e/flight_dashboard.ts + - x-pack/performance/journeys_e2e/login.ts + - x-pack/performance/journeys_e2e/many_fields_discover.ts + - x-pack/performance/journeys_e2e/many_fields_lens_editor.ts + - x-pack/performance/journeys_e2e/many_fields_transform.ts + - x-pack/performance/journeys_e2e/tsdb_logs_data_visualizer.ts + - x-pack/performance/journeys_e2e/promotion_tracking_dashboard.ts + - x-pack/performance/journeys_e2e/web_logs_dashboard.ts + - x-pack/performance/journeys_e2e/data_stress_test_lens.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard_saved_search_only.ts + - x-pack/performance/journeys_e2e/ecommerce_dashboard_tsvb_gauge_only.ts + - x-pack/performance/journeys_e2e/dashboard_listing_page.ts + - x-pack/performance/journeys_e2e/tags_listing_page.ts + - x-pack/performance/journeys_e2e/cloud_security_dashboard.ts + - x-pack/performance/journeys_e2e/apm_service_inventory.ts + - x-pack/performance/journeys_e2e/infra_hosts_view.ts - x-pack/test/custom_branding/config.ts - x-pack/test/profiling_api_integration/cloud/config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/actions/trial_license_complete_tier/configs/ess.config.ts diff --git a/.buildkite/scripts/common/env.sh b/.buildkite/scripts/common/env.sh index 0cdd9451171e8..6243641507a1e 100755 --- a/.buildkite/scripts/common/env.sh +++ b/.buildkite/scripts/common/env.sh @@ -72,6 +72,9 @@ export TEST_BROWSER_HEADLESS=1 export ELASTIC_APM_ENVIRONMENT=ci export ELASTIC_APM_TRANSACTION_SAMPLE_RATE=0.1 +export ELASTIC_APM_SERVER_URL=https://kibana-ci-apm.apm.us-central1.gcp.cloud.es.io +# Not really a secret, if APM supported public auth we would use it and APM requires that we use this name +export ELASTIC_APM_SECRET_TOKEN=7YKhoXsO4MzjhXjx2c if is_pr; then if is_pr_with_label "ci:collect-apm"; then diff --git a/.buildkite/scripts/common/setup_job_env.sh b/.buildkite/scripts/common/setup_job_env.sh index 6b07beebcfa9c..64666d022c976 100644 --- a/.buildkite/scripts/common/setup_job_env.sh +++ b/.buildkite/scripts/common/setup_job_env.sh @@ -122,12 +122,6 @@ EOF SONAR_LOGIN=$(vault_get sonarqube token) export SONAR_LOGIN - - ELASTIC_APM_SERVER_URL=$(vault_get project-kibana-ci-apm apm_server_url) - export ELASTIC_APM_SERVER_URL - - ELASTIC_APM_API_KEY=$(vault_get project-kibana-ci-apm apm_server_api_key) - export ELASTIC_APM_API_KEY } # Set up GCS Service Account for CDN diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 955409c971198..cd392b00be882 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -233,6 +233,7 @@ const uploadPipeline = (pipelineContent: string | object) => { /^x-pack\/packages\/security-solution/, /^x-pack\/packages\/kbn-elastic-assistant/, /^x-pack\/packages\/kbn-elastic-assistant-common/, + /^x-pack\/test\/functional\/es_archives\/security_solution/, /^x-pack\/test\/security_solution_cypress/, ])) || GITHUB_PR_LABELS.includes('ci:all-cypress-suites') @@ -271,6 +272,7 @@ const uploadPipeline = (pipelineContent: string | object) => { /^x-pack\/packages\/security-solution/, /^x-pack\/packages\/kbn-elastic-assistant/, /^x-pack\/packages\/kbn-elastic-assistant-common/, + /^x-pack\/test\/functional\/es_archives\/security_solution/, /^x-pack\/test\/security_solution_cypress/, ])) || GITHUB_PR_LABELS.includes('ci:all-cypress-suites') diff --git a/.buildkite/scripts/steps/functional/performance_playwright.sh b/.buildkite/scripts/steps/functional/performance_playwright.sh index de92e00092b17..d84bf77ed54cf 100644 --- a/.buildkite/scripts/steps/functional/performance_playwright.sh +++ b/.buildkite/scripts/steps/functional/performance_playwright.sh @@ -3,10 +3,30 @@ set -euo pipefail source .buildkite/scripts/common/util.sh +source .buildkite/scripts/common/setup_bazel.sh is_test_execution_step -.buildkite/scripts/bootstrap.sh +run_bootstrap() { + echo "Running yarn kbn bootstrap --force-install" + yarn kbn bootstrap --force-install +} + +echo "--- yarn install and boostrap" +if ! run_bootstrap; then + echo "--- bootstrap failed, trying again in 15 seconds" + sleep 15 + + # Most bootstrap failures will result in a problem inside node_modules that does not get fixed on the next bootstrap + # So, we should just delete node_modules in between attempts + rm -rf node_modules + + run_bootstrap +fi + +if [[ "$DISABLE_BOOTSTRAP_VALIDATION" != "true" ]]; then + check_for_changed_files 'yarn kbn bootstrap' +fi # These tests are running on static workers so we have to make sure we delete previous build of Kibana rm -rf "$KIBANA_BUILD_LOCATION" diff --git a/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh b/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh index ebf9e28d2c9ea..75896c687705d 100755 --- a/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh +++ b/.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh @@ -15,7 +15,7 @@ OUTPUT_DIR="${KIBANA_DIR}/${OUTPUT_REL}" .buildkite/scripts/bootstrap.sh echo "--- Extract APM metrics" -for journey in x-pack/performance/journeys/*; do +for journey in x-pack/performance/journeys_e2e/*; do echo "Looking for journey=${journey} and BUILD_ID=${BUILD_ID} in APM traces" node scripts/extract_performance_testing_dataset \ diff --git a/.eslintrc.js b/.eslintrc.js index 1ec3718ec74bc..dca6267b02c09 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -875,6 +875,7 @@ module.exports = { 'x-pack/plugins/observability_solution/observability/**/*.{js,mjs,ts,tsx}', 'x-pack/plugins/observability_solution/exploratory_view/**/*.{js,mjs,ts,tsx}', 'x-pack/plugins/observability_solution/ux/**/*.{js,mjs,ts,tsx}', + 'x-pack/plugins/observability_solution/slo/**/*.{js,mjs,ts,tsx}', ], rules: { 'no-console': ['warn', { allow: ['error'] }], @@ -897,6 +898,7 @@ module.exports = { 'x-pack/plugins/observability_solution/apm/**/*.stories.*', 'x-pack/plugins/observability_solution/observability/**/*.stories.*', 'x-pack/plugins/observability_solution/exploratory_view/**/*.stories.*', + 'x-pack/plugins/observability_solution/slo/**/*.stories.*', ], rules: { 'react/function-component-definition': [ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 460d8e5094af1..60165edc03aa6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,15 +6,16 @@ #### x-pack/test/alerting_api_integration/common/plugins/aad @elastic/response-ops -packages/kbn-ace @elastic/platform-deployment-management +packages/kbn-ace @elastic/kibana-management x-pack/plugins/actions @elastic/response-ops x-pack/test/alerting_api_integration/common/plugins/actions_simulators @elastic/response-ops packages/kbn-actions-types @elastic/response-ops -src/plugins/advanced_settings @elastic/appex-sharedux @elastic/platform-deployment-management +src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management src/plugins/ai_assistant_management/observability @elastic/obs-knowledge-team src/plugins/ai_assistant_management/selection @elastic/obs-knowledge-team x-pack/packages/ml/aiops_components @elastic/ml-ui x-pack/plugins/aiops @elastic/ml-ui +x-pack/packages/ml/aiops_test_utils @elastic/ml-ui x-pack/packages/ml/aiops_utils @elastic/ml-ui x-pack/test/alerting_api_integration/packages/helpers @elastic/response-ops x-pack/test/alerting_api_integration/common/plugins/alerts @elastic/response-ops @@ -91,7 +92,7 @@ packages/kbn-coloring @elastic/kibana-visualizations packages/kbn-config @elastic/kibana-core packages/kbn-config-mocks @elastic/kibana-core packages/kbn-config-schema @elastic/kibana-core -src/plugins/console @elastic/platform-deployment-management +src/plugins/console @elastic/kibana-management packages/content-management/content_editor @elastic/appex-sharedux examples/content_management_examples @elastic/appex-sharedux src/plugins/content_management @elastic/appex-sharedux @@ -312,7 +313,7 @@ packages/core/usage-data/core-usage-data-server-mocks @elastic/kibana-core packages/core/user-settings/core-user-settings-server @elastic/kibana-security packages/core/user-settings/core-user-settings-server-internal @elastic/kibana-security packages/core/user-settings/core-user-settings-server-mocks @elastic/kibana-security -x-pack/plugins/cross_cluster_replication @elastic/platform-deployment-management +x-pack/plugins/cross_cluster_replication @elastic/kibana-management packages/kbn-crypto @elastic/kibana-security packages/kbn-crypto-browser @elastic/kibana-core x-pack/plugins/custom_branding @elastic/appex-sharedux @@ -337,19 +338,19 @@ x-pack/plugins/data_visualizer @elastic/ml-ui x-pack/plugins/observability_solution/dataset_quality @elastic/obs-ux-logs-team packages/kbn-datemath @elastic/kibana-data-discovery packages/deeplinks/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations -packages/deeplinks/devtools @elastic/platform-deployment-management -packages/deeplinks/management @elastic/platform-deployment-management +packages/deeplinks/devtools @elastic/kibana-management +packages/deeplinks/management @elastic/kibana-management packages/deeplinks/ml @elastic/ml-ui packages/deeplinks/observability @elastic/obs-ux-logs-team packages/deeplinks/search @elastic/enterprise-search-frontend packages/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations -packages/default-nav/devtools @elastic/platform-deployment-management -packages/default-nav/management @elastic/platform-deployment-management +packages/default-nav/devtools @elastic/kibana-management +packages/default-nav/management @elastic/kibana-management packages/default-nav/ml @elastic/ml-ui packages/kbn-dev-cli-errors @elastic/kibana-operations packages/kbn-dev-cli-runner @elastic/kibana-operations packages/kbn-dev-proc-runner @elastic/kibana-operations -src/plugins/dev_tools @elastic/platform-deployment-management +src/plugins/dev_tools @elastic/kibana-management packages/kbn-dev-utils @elastic/kibana-operations examples/developer_examples @elastic/appex-sharedux examples/discover_customization_examples @elastic/kibana-data-discovery @@ -381,7 +382,7 @@ packages/kbn-es-archiver @elastic/kibana-operations @elastic/appex-qa packages/kbn-es-errors @elastic/kibana-core packages/kbn-es-query @elastic/kibana-data-discovery packages/kbn-es-types @elastic/kibana-core @elastic/obs-knowledge-team -src/plugins/es_ui_shared @elastic/platform-deployment-management +src/plugins/es_ui_shared @elastic/kibana-management packages/kbn-eslint-config @elastic/kibana-operations packages/kbn-eslint-plugin-disable @elastic/kibana-operations packages/kbn-eslint-plugin-eslint @elastic/kibana-operations @@ -441,7 +442,7 @@ packages/kbn-ftr-screenshot-filename @elastic/kibana-operations @elastic/appex-q x-pack/test/functional_with_es_ssl/plugins/cases @elastic/response-ops x-pack/examples/gen_ai_streaming_response_example @elastic/response-ops packages/kbn-generate @elastic/kibana-operations -packages/kbn-generate-console-definitions @elastic/platform-deployment-management +packages/kbn-generate-console-definitions @elastic/kibana-management packages/kbn-generate-csv @elastic/appex-sharedux packages/kbn-get-repo-files @elastic/kibana-operations x-pack/plugins/global_search_bar @elastic/appex-sharedux @@ -449,7 +450,7 @@ x-pack/plugins/global_search @elastic/appex-sharedux x-pack/plugins/global_search_providers @elastic/appex-sharedux x-pack/test/plugin_functional/plugins/global_search_test @elastic/kibana-core x-pack/plugins/graph @elastic/kibana-visualizations -x-pack/plugins/grokdebugger @elastic/platform-deployment-management +x-pack/plugins/grokdebugger @elastic/kibana-management packages/kbn-guided-onboarding @elastic/platform-onboarding examples/guided_onboarding_example @elastic/platform-onboarding src/plugins/guided_onboarding @elastic/platform-onboarding @@ -467,12 +468,12 @@ x-pack/test/functional_embedded/plugins/iframe_embedded @elastic/kibana-core src/plugins/image_embeddable @elastic/appex-sharedux packages/kbn-import-locator @elastic/kibana-operations packages/kbn-import-resolver @elastic/kibana-operations -x-pack/plugins/index_lifecycle_management @elastic/platform-deployment-management -x-pack/plugins/index_management @elastic/platform-deployment-management +x-pack/plugins/index_lifecycle_management @elastic/kibana-management +x-pack/plugins/index_management @elastic/kibana-management test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team x-pack/plugins/observability_solution/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team -x-pack/plugins/ingest_pipelines @elastic/platform-deployment-management +x-pack/plugins/ingest_pipelines @elastic/kibana-management src/plugins/input_control_vis @elastic/kibana-presentation src/plugins/inspector @elastic/kibana-presentation src/plugins/interactive_setup @elastic/kibana-security @@ -500,8 +501,8 @@ packages/kbn-lens-embeddable-utils @elastic/obs-ux-infra_services-team @elastic/ packages/kbn-lens-formula-docs @elastic/kibana-visualizations x-pack/examples/lens_embeddable_inline_editing_example @elastic/kibana-visualizations x-pack/plugins/lens @elastic/kibana-visualizations -x-pack/plugins/license_api_guard @elastic/platform-deployment-management -x-pack/plugins/license_management @elastic/platform-deployment-management +x-pack/plugins/license_api_guard @elastic/kibana-management +x-pack/plugins/license_management @elastic/kibana-management x-pack/plugins/licensing @elastic/kibana-core src/plugins/links @elastic/kibana-presentation packages/kbn-lint-packages-cli @elastic/kibana-operations @@ -517,20 +518,20 @@ x-pack/plugins/logstash @elastic/logstash packages/kbn-managed-content-badge @elastic/kibana-visualizations packages/kbn-managed-vscode-config @elastic/kibana-operations packages/kbn-managed-vscode-config-cli @elastic/kibana-operations -packages/kbn-management/cards_navigation @elastic/platform-deployment-management -src/plugins/management @elastic/platform-deployment-management -packages/kbn-management/settings/application @elastic/platform-deployment-management -packages/kbn-management/settings/components/field_category @elastic/platform-deployment-management -packages/kbn-management/settings/components/field_input @elastic/platform-deployment-management -packages/kbn-management/settings/components/field_row @elastic/platform-deployment-management -packages/kbn-management/settings/components/form @elastic/platform-deployment-management -packages/kbn-management/settings/field_definition @elastic/platform-deployment-management -packages/kbn-management/settings/setting_ids @elastic/appex-sharedux @elastic/platform-deployment-management -packages/kbn-management/settings/section_registry @elastic/appex-sharedux @elastic/platform-deployment-management -packages/kbn-management/settings/types @elastic/platform-deployment-management -packages/kbn-management/settings/utilities @elastic/platform-deployment-management -packages/kbn-management/storybook/config @elastic/platform-deployment-management -test/plugin_functional/plugins/management_test_plugin @elastic/platform-deployment-management +packages/kbn-management/cards_navigation @elastic/kibana-management +src/plugins/management @elastic/kibana-management +packages/kbn-management/settings/application @elastic/kibana-management +packages/kbn-management/settings/components/field_category @elastic/kibana-management +packages/kbn-management/settings/components/field_input @elastic/kibana-management +packages/kbn-management/settings/components/field_row @elastic/kibana-management +packages/kbn-management/settings/components/form @elastic/kibana-management +packages/kbn-management/settings/field_definition @elastic/kibana-management +packages/kbn-management/settings/setting_ids @elastic/appex-sharedux @elastic/kibana-management +packages/kbn-management/settings/section_registry @elastic/appex-sharedux @elastic/kibana-management +packages/kbn-management/settings/types @elastic/kibana-management +packages/kbn-management/settings/utilities @elastic/kibana-management +packages/kbn-management/storybook/config @elastic/kibana-management +test/plugin_functional/plugins/management_test_plugin @elastic/kibana-management packages/kbn-mapbox-gl @elastic/kibana-gis x-pack/examples/third_party_maps_source_example @elastic/kibana-gis src/plugins/maps_ems @elastic/kibana-gis @@ -596,7 +597,7 @@ packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations packages/kbn-osquery-io-ts-types @elastic/security-asset-management x-pack/plugins/osquery @elastic/security-defend-workflows examples/partial_results_example @elastic/kibana-data-discovery -x-pack/plugins/painless_lab @elastic/platform-deployment-management +x-pack/plugins/painless_lab @elastic/kibana-management packages/kbn-panel-loader @elastic/kibana-presentation packages/kbn-peggy @elastic/kibana-operations packages/kbn-peggy-loader @elastic/kibana-operations @@ -623,7 +624,7 @@ packages/react/kibana_context/root @elastic/appex-sharedux packages/react/kibana_context/styled @elastic/appex-sharedux packages/react/kibana_context/theme @elastic/appex-sharedux packages/react/kibana_mount @elastic/appex-sharedux -x-pack/plugins/remote_clusters @elastic/platform-deployment-management +x-pack/plugins/remote_clusters @elastic/kibana-management test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core packages/kbn-repo-file-maps @elastic/kibana-operations packages/kbn-repo-info @elastic/kibana-operations @@ -649,13 +650,13 @@ examples/resizable_layout_examples @elastic/kibana-data-discovery x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution examples/response_stream @elastic/ml-ui packages/kbn-rison @elastic/kibana-operations -x-pack/plugins/rollup @elastic/platform-deployment-management +x-pack/plugins/rollup @elastic/kibana-management packages/kbn-router-utils @elastic/obs-ux-logs-team examples/routing_example @elastic/kibana-core packages/kbn-rrule @elastic/response-ops packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team -x-pack/plugins/runtime_fields @elastic/platform-deployment-management +x-pack/plugins/runtime_fields @elastic/kibana-management packages/kbn-safer-lodash-set @elastic/kibana-security x-pack/test/security_api_integration/plugins/saml_provider @elastic/kibana-security x-pack/test/plugin_api_integration/plugins/sample_task_plugin @elastic/response-ops @@ -681,7 +682,7 @@ packages/kbn-search-errors @elastic/kibana-data-discovery examples/search_examples @elastic/kibana-data-discovery packages/kbn-search-index-documents @elastic/enterprise-search-frontend packages/kbn-search-response-warnings @elastic/kibana-data-discovery -x-pack/plugins/searchprofiler @elastic/platform-deployment-management +x-pack/plugins/searchprofiler @elastic/kibana-management x-pack/test/security_api_integration/packages/helpers @elastic/kibana-security packages/kbn-security-hardening @elastic/kibana-security x-pack/plugins/security @elastic/kibana-security @@ -719,13 +720,13 @@ packages/kbn-securitysolution-utils @elastic/security-detection-engine packages/kbn-server-http-tools @elastic/kibana-core packages/kbn-server-route-repository @elastic/obs-knowledge-team x-pack/plugins/serverless @elastic/appex-sharedux -packages/serverless/settings/common @elastic/appex-sharedux @elastic/platform-deployment-management +packages/serverless/settings/common @elastic/appex-sharedux @elastic/kibana-management x-pack/plugins/serverless_observability @elastic/appex-sharedux @elastic/obs-ux-management-team -packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team +packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team packages/serverless/project_switcher @elastic/appex-sharedux x-pack/plugins/serverless_search @elastic/enterprise-search-frontend -packages/serverless/settings/search_project @elastic/enterprise-search-frontend @elastic/platform-deployment-management -packages/serverless/settings/security_project @elastic/security-solution @elastic/platform-deployment-management +packages/serverless/settings/search_project @elastic/enterprise-search-frontend @elastic/kibana-management +packages/serverless/settings/security_project @elastic/security-solution @elastic/kibana-management packages/serverless/storybook/config @elastic/appex-sharedux packages/serverless/types @elastic/appex-sharedux test/plugin_functional/plugins/session_notifications @elastic/kibana-core @@ -782,17 +783,20 @@ packages/shared-ux/router/types @elastic/appex-sharedux packages/shared-ux/storybook/config @elastic/appex-sharedux packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/kbn-shared-ux-utility @elastic/appex-sharedux +x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team -x-pack/plugins/snapshot_restore @elastic/platform-deployment-management +x-pack/plugins/snapshot_restore @elastic/kibana-management +packages/solution-nav/es @elastic/appex-sharedux +packages/solution-nav/oblt @elastic/appex-sharedux packages/kbn-some-dev-log @elastic/kibana-operations packages/kbn-sort-package-json @elastic/kibana-operations packages/kbn-sort-predicates @elastic/kibana-visualizations x-pack/plugins/spaces @elastic/kibana-security x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security -packages/kbn-spec-to-console @elastic/platform-deployment-management +packages/kbn-spec-to-console @elastic/kibana-management x-pack/plugins/stack_alerts @elastic/response-ops x-pack/plugins/stack_connectors @elastic/response-ops -x-pack/test/usage_collection/plugins/stack_management_usage_test @elastic/platform-deployment-management +x-pack/test/usage_collection/plugins/stack_management_usage_test @elastic/kibana-management examples/state_containers_examples @elastic/appex-sharedux test/server_integration/plugins/status_plugin_a @elastic/kibana-core test/server_integration/plugins/status_plugin_b @elastic/kibana-core @@ -852,7 +856,7 @@ examples/unified_field_list_examples @elastic/kibana-data-discovery src/plugins/unified_histogram @elastic/kibana-data-discovery src/plugins/unified_search @elastic/kibana-visualizations packages/kbn-unsaved-changes-badge @elastic/kibana-data-discovery -x-pack/plugins/upgrade_assistant @elastic/platform-deployment-management +x-pack/plugins/upgrade_assistant @elastic/kibana-management x-pack/plugins/observability_solution/uptime @elastic/obs-ux-infra_services-team x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux src/plugins/url_forwarding @elastic/kibana-visualizations @@ -884,7 +888,7 @@ src/plugins/vis_types/xy @elastic/kibana-visualizations packages/kbn-visualization-ui-components @elastic/kibana-visualizations packages/kbn-visualization-utils @elastic/kibana-visualizations src/plugins/visualizations @elastic/kibana-visualizations -x-pack/plugins/watcher @elastic/platform-deployment-management +x-pack/plugins/watcher @elastic/kibana-management packages/kbn-web-worker-stub @elastic/kibana-operations packages/kbn-whereis-pkg-cli @elastic/kibana-operations packages/kbn-xstate-utils @elastic/obs-ux-logs-team @@ -1259,8 +1263,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib /x-pack/plugins/enterprise_search/public/applications/shared/doc_links @elastic/ent-search-docs-team # Management Experience - Deployment Management -/x-pack/test_serverless/functional/test_suites/common/index_management/ @elastic/platform-deployment-management -#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/platform-deployment-management +/x-pack/test_serverless/functional/test_suites/common/index_management/ @elastic/kibana-management +#CC# /x-pack/plugins/cross_cluster_replication/ @elastic/kibana-management # Security Solution /x-pack/test/functional/es_archives/endpoint/ @elastic/security-solution diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 0d1df4e70b1cd..a9e84c0336ed4 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-03-14 +date: 2024-03-19 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 0b1434aee6274..faa7e3b397845 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; -Contact [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. +Contact [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/ai_assistant_management_observability.mdx b/api_docs/ai_assistant_management_observability.mdx index 8b30df9989fa5..e4e877ea0769c 100644 --- a/api_docs/ai_assistant_management_observability.mdx +++ b/api_docs/ai_assistant_management_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementObservability title: "aiAssistantManagementObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementObservability plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementObservability'] --- import aiAssistantManagementObservabilityObj from './ai_assistant_management_observability.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index e3ae3972f4aa6..f57be832f46f7 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-03-14 +date: 2024-03-19 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 46869e2f96762..d4fe6e99480c5 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-03-14 +date: 2024-03-19 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 908e6c3ecf416..d09289f198f03 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index ee2a6977cfd79..b75f2f1ccc8b3 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 22c02127a3613..277728406c033 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-03-14 +date: 2024-03-19 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 bfb1b86f772dc..8b611cecdbb78 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 87b18e579b32a..c834317e4d6c6 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-03-14 +date: 2024-03-19 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 390b1d9d91fce..77b48d1eef511 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-03-14 +date: 2024-03-19 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 f7b2063726395..8e608f722b2b2 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-03-14 +date: 2024-03-19 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 15742ab6537c8..d749f433adec4 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-03-14 +date: 2024-03-19 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 bf4b83de088a5..39979d77051bb 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.devdocs.json b/api_docs/cloud.devdocs.json index 4af8f790c6d87..45d59c8e30f69 100644 --- a/api_docs/cloud.devdocs.json +++ b/api_docs/cloud.devdocs.json @@ -71,6 +71,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudConfigType.deployments_url", + "type": "string", + "tags": [], + "label": "deployments_url", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/plugin.tsx", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "cloud", "id": "def-public.CloudConfigType.deployment_url", @@ -287,6 +301,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "cloud", + "id": "def-public.CloudStart.deploymentsUrl", + "type": "string", + "tags": [], + "label": "deploymentsUrl", + "description": [ + "\nThis is the path to the Cloud deployments management page. The value is already prepended with `baseUrl`.\n" + ], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/cloud/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "cloud", "id": "def-public.CloudStart.deploymentUrl", diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 95de0d41546e9..e42f38e21a19f 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.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 | |-------------------|-----------|------------------------|-----------------| -| 72 | 0 | 16 | 0 | +| 74 | 0 | 17 | 0 | ## Client diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index a9f0b6c6fd7d7..8538582014e24 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-03-14 +date: 2024-03-19 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 408ba2801a21d..ccb40249fbe20 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-03-14 +date: 2024-03-19 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 b36674ff45557..8327e1b87eb66 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-03-14 +date: 2024-03-19 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 cb02470119cb3..8d0e6dfd3bef5 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-03-14 +date: 2024-03-19 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 fbee19bcef498..e24c5a2d9b99f 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index ad87189fbb3c1..4400d0cba4af3 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-03-14 +date: 2024-03-19 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 688b20447bfd6..d1e68040e7247 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-03-14 +date: 2024-03-19 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 ed814953b7003..365b51374b3dd 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-03-14 +date: 2024-03-19 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 01fcb69b8a2f9..bb7b6e100c934 100644 --- a/api_docs/dashboard.devdocs.json +++ b/api_docs/dashboard.devdocs.json @@ -209,8 +209,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & ", { @@ -225,8 +225,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, ">>>, options: ", { @@ -263,8 +263,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & ", { @@ -279,8 +279,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, ">>>" ], @@ -689,8 +689,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & ", { diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 8481cfc576f31..61aaaa20ab667 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index c646df4a32285..6b4ee8db068d8 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index e6936e2024e5e..8d7f2e02ad9cc 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index e43bb95583d04..642ab16b19cc3 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 4a605c11c427d..e1011773f1058 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -1518,9 +1518,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1578,9 +1578,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1644,9 +1644,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1696,9 +1696,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1739,9 +1739,9 @@ "SearchSessionStatusDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1791,9 +1791,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1842,9 +1842,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1902,9 +1902,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -1968,9 +1968,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2020,9 +2020,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2078,9 +2078,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2130,9 +2130,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2173,9 +2173,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2209,9 +2209,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2252,9 +2252,9 @@ "SearchSessionDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2288,9 +2288,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2331,9 +2331,9 @@ "SearchSessionStatusDependencies", ", user: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -2375,9 +2375,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 1270374b34e79..a46137cbafea8 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 652ff38ef832f..fb7ed292fcadc 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-03-14 +date: 2024-03-19 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 86a1098302153..8a2e79f8ea161 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-03-14 +date: 2024-03-19 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 202932c0e2cc3..dd497b574ada8 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-03-14 +date: 2024-03-19 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 8758c2e25979e..71d0f09c4589f 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-03-14 +date: 2024-03-19 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 b6491ffec4823..2806ea5956048 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-03-14 +date: 2024-03-19 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 03066cf144f23..4fda5f302efbd 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-03-14 +date: 2024-03-19 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 c44c198a12ba2..1ad4d240965dd 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -204,6 +204,7 @@ Safe to remove. | | savedObjects | | | serverless | | | taskManager | +| | taskManager | | | @kbn/core-saved-objects-api-browser | | | @kbn/core-saved-objects-api-browser | | | @kbn/storybook | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 3d32a95b0b436..e5986fd73027a 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 0368b89f8f41e..5a9f3a2c0cc1b 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -57,6 +57,16 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] +## @elastic/kibana-management + +| Plugin | Deprecated API | Reference location(s) | Remove By | +| --------|-------|-----------|-----------| +| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 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 | +| indexLifecycleManagement | | [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/painless_lab/server/services/license.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/rollup/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), [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 | + + + ## @elastic/kibana-presentation | Plugin | Deprecated API | Reference location(s) | Remove By | @@ -132,16 +142,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ -## @elastic/platform-deployment-management - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| -| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 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 | -| indexLifecycleManagement | | [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/painless_lab/server/services/license.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/rollup/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), [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 | - - - ## @elastic/response-ops | Plugin | Deprecated API | Reference location(s) | Remove By | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index ce4d22f278365..fb51140162db6 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index f8e7ffc5a388f..3fc419e689ff7 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-03-14 +date: 2024-03-19 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 cb8e66beae420..2a3ac76df7428 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 4af9784c7a951..0d0569a126baf 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-03-14 +date: 2024-03-19 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 25d0147d6c08a..8b5fb0eaaf332 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index febbd7add4a41..c400ec63a8b1c 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -3039,10 +3039,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.localQuery", + "id": "def-public.Embeddable.query$", "type": "Object", "tags": [], - "label": "localQuery", + "label": "query$", "description": [], "signature": [ "{ readonly value: ", @@ -3931,10 +3931,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.localFilters", + "id": "def-public.Embeddable.filters$", "type": "Object", "tags": [], - "label": "localFilters", + "label": "filters$", "description": [], "signature": [ "{ readonly value: ", @@ -4868,10 +4868,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.localTimeRange", + "id": "def-public.Embeddable.timeRange$", "type": "Object", "tags": [], - "label": "localTimeRange", + "label": "timeRange$", "description": [], "signature": [ "{ readonly value: ", @@ -5768,10 +5768,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.setLocalTimeRange", + "id": "def-public.Embeddable.setTimeRange", "type": "Function", "tags": [], - "label": "setLocalTimeRange", + "label": "setTimeRange", "description": [], "signature": [ "(timeRange: ", @@ -5791,7 +5791,7 @@ "children": [ { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.setLocalTimeRange.$1", + "id": "def-public.Embeddable.setTimeRange.$1", "type": "Object", "tags": [], "label": "timeRange", @@ -5806,7 +5806,7 @@ }, " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false } @@ -5927,32 +5927,10 @@ }, { "parentPluginId": "embeddable", - "id": "def-public.Embeddable.getFallbackTimeRange", + "id": "def-public.Embeddable.isCompatibleWithUnifiedSearch", "type": "Function", "tags": [], - "label": "getFallbackTimeRange", - "description": [], - "signature": [ - "(() => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) | undefined" - ], - "path": "src/plugins/embeddable/public/lib/embeddables/embeddable.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "embeddable", - "id": "def-public.Embeddable.isCompatibleWithLocalUnifiedSearch", - "type": "Function", - "tags": [], - "label": "isCompatibleWithLocalUnifiedSearch", + "label": "isCompatibleWithUnifiedSearch", "description": [], "signature": [ "(() => boolean) | undefined" diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 55c1335017004..2962d058acd79 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.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 | |-------------------|-----------|------------------------|-----------------| -| 554 | 1 | 452 | 9 | +| 553 | 1 | 451 | 9 | ## Client diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 333d983d39bce..269a5ab09817e 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-03-14 +date: 2024-03-19 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 18b79a936b7c6..b0c7624e966c0 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-03-14 +date: 2024-03-19 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 6c610787cc9ce..44640b38dfa6e 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-03-14 +date: 2024-03-19 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 b69e64c04c600..fc1bba8a4e11b 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 9e84c26e50494..5cda3ceadd70c 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-03-14 +date: 2024-03-19 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 e4c62c9f10dea..92985935d0d01 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.devdocs.json b/api_docs/event_log.devdocs.json index bca42cae2f777..8030033ffeb6d 100644 --- a/api_docs/event_log.devdocs.json +++ b/api_docs/event_log.devdocs.json @@ -1450,7 +1450,7 @@ "label": "data", "description": [], "signature": [ - "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; code?: string | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" + "(Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; prepare_to_run_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; code?: string | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined)[]" ], "path": "x-pack/plugins/event_log/server/es/cluster_client_adapter.ts", "deprecated": false, @@ -1470,7 +1470,7 @@ "label": "IEvent", "description": [], "signature": [ - "DeepPartial | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; code?: string | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" + "DeepPartial | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; prepare_to_run_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; code?: string | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}>>> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, @@ -1485,7 +1485,7 @@ "label": "IValidatedEvent", "description": [], "signature": [ - "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; code?: string | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined" + "Readonly<{ log?: Readonly<{ logger?: string | undefined; level?: string | undefined; } & {}> | undefined; error?: Readonly<{ type?: string | undefined; id?: string | undefined; message?: string | undefined; code?: string | undefined; stack_trace?: string | undefined; } & {}> | undefined; '@timestamp'?: string | undefined; message?: string | undefined; tags?: string[] | undefined; rule?: Readonly<{ id?: string | undefined; name?: string | undefined; license?: string | undefined; uuid?: string | undefined; version?: string | undefined; category?: string | undefined; description?: string | undefined; reference?: string | undefined; author?: string[] | undefined; ruleset?: string | undefined; } & {}> | undefined; kibana?: Readonly<{ action?: Readonly<{ id?: string | undefined; name?: string | undefined; execution?: Readonly<{ source?: string | undefined; uuid?: string | undefined; gen_ai?: Readonly<{ usage?: Readonly<{ prompt_tokens?: string | number | undefined; completion_tokens?: string | number | undefined; total_tokens?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; } & {}> | undefined; alerting?: Readonly<{ outcome?: string | undefined; summary?: Readonly<{ recovered?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; new?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; ongoing?: Readonly<{ count?: string | number | undefined; } & {}> | undefined; } & {}> | undefined; status?: string | undefined; instance_id?: string | undefined; action_group_id?: string | undefined; action_subgroup?: string | undefined; } & {}> | undefined; alert?: Readonly<{ rule?: Readonly<{ consumer?: string | undefined; revision?: string | number | undefined; execution?: Readonly<{ uuid?: string | undefined; status?: string | undefined; metrics?: Readonly<{ total_search_duration_ms?: string | number | undefined; total_indexing_duration_ms?: string | number | undefined; number_of_triggered_actions?: string | number | undefined; number_of_generated_actions?: string | number | undefined; alert_counts?: Readonly<{ recovered?: string | number | undefined; active?: string | number | undefined; new?: string | number | undefined; } & {}> | undefined; number_of_delayed_alerts?: string | number | undefined; number_of_searches?: string | number | undefined; es_search_duration_ms?: string | number | undefined; execution_gap_duration_s?: string | number | undefined; rule_type_run_duration_ms?: string | number | undefined; process_alerts_duration_ms?: string | number | undefined; trigger_actions_duration_ms?: string | number | undefined; process_rule_duration_ms?: string | number | undefined; claim_to_start_duration_ms?: string | number | undefined; persist_alerts_duration_ms?: string | number | undefined; prepare_rule_duration_ms?: string | number | undefined; prepare_to_run_duration_ms?: string | number | undefined; total_run_duration_ms?: string | number | undefined; total_enrichment_duration_ms?: string | number | undefined; } & {}> | undefined; status_order?: string | number | undefined; } & {}> | undefined; rule_type_id?: string | undefined; } & {}> | undefined; uuid?: string | undefined; flapping?: boolean | undefined; maintenance_window_ids?: string[] | undefined; } & {}> | undefined; version?: string | undefined; server_uuid?: string | undefined; task?: Readonly<{ id?: string | undefined; schedule_delay?: string | number | undefined; scheduled?: string | undefined; } & {}> | undefined; saved_objects?: Readonly<{ type?: string | undefined; id?: string | undefined; namespace?: string | undefined; rel?: string | undefined; type_id?: string | undefined; space_agnostic?: boolean | undefined; } & {}>[] | undefined; space_ids?: string[] | undefined; } & {}> | undefined; event?: Readonly<{ type?: string[] | undefined; reason?: string | undefined; action?: string | undefined; id?: string | undefined; start?: string | undefined; end?: string | undefined; outcome?: string | undefined; category?: string[] | undefined; duration?: string | number | undefined; timezone?: string | undefined; risk_score?: number | undefined; severity?: string | number | undefined; code?: string | undefined; url?: string | undefined; created?: string | undefined; dataset?: string | undefined; hash?: string | undefined; ingested?: string | undefined; kind?: string | undefined; module?: string | undefined; original?: string | undefined; provider?: string | undefined; reference?: string | undefined; risk_score_norm?: number | undefined; sequence?: string | number | undefined; } & {}> | undefined; ecs?: Readonly<{ version?: string | undefined; } & {}> | undefined; user?: Readonly<{ id?: string | undefined; name?: string | undefined; } & {}> | undefined; } & {}> | undefined" ], "path": "x-pack/plugins/event_log/generated/schemas.ts", "deprecated": false, diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 1eea551480319..b653f961293ee 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-03-14 +date: 2024-03-19 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 66318c7b3a4cc..d31b476bf90c7 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-03-14 +date: 2024-03-19 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 7968f72ce797b..922385ca7faf3 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-03-14 +date: 2024-03-19 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 f685815f0bb51..66c23b0a3abd1 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-03-14 +date: 2024-03-19 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 87d8de330c575..f358fff553b5d 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-03-14 +date: 2024-03-19 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 e4aba6688e9ca..23dfeef42261f 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-03-14 +date: 2024-03-19 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 eb90c327bf75d..4dbd8453fc2c5 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-03-14 +date: 2024-03-19 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 c14e8822d2c56..66d633313b7cf 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-03-14 +date: 2024-03-19 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 00878d4a3d421..0e72c899d7011 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-03-14 +date: 2024-03-19 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 8913807c8235e..76855e80588dc 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-03-14 +date: 2024-03-19 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 04c00d3ff9bf6..eab10d5e42ccf 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-03-14 +date: 2024-03-19 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 9a863c0d18d2d..11b8e7c8dc03a 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-03-14 +date: 2024-03-19 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 35012879aaa75..e0b2fd5f3c9ff 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-03-14 +date: 2024-03-19 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 68c8e8bfdc624..91a9571985590 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-03-14 +date: 2024-03-19 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 b9e9bcec48343..3fc402bef3717 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-03-14 +date: 2024-03-19 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 6ab649c340f3d..eea95259c2b50 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-03-14 +date: 2024-03-19 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 7336cbd59a103..10e42a0843373 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-03-14 +date: 2024-03-19 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 5535cbc3c0861..5242e82286f8b 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-03-14 +date: 2024-03-19 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 9a49305b45fd0..0ff310a6c8514 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-03-14 +date: 2024-03-19 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 89337cccc42e5..b5cd68f1920b8 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-03-14 +date: 2024-03-19 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 742ce29e5a61b..3c779788a370d 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 04d57b352912c..53a9fcb9c8df4 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -7414,9 +7414,9 @@ }, ", options?: { spaceId?: string | undefined; id?: string | undefined; user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7571,9 +7571,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7837,9 +7837,9 @@ "NewPackagePolicyWithId", "[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7953,9 +7953,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8047,9 +8047,9 @@ }, "[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8161,9 +8161,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8650,9 +8650,9 @@ }, ", options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8768,9 +8768,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8854,9 +8854,9 @@ }, ", ids: string[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -8967,9 +8967,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -9082,9 +9082,9 @@ }, ", ids: string[], options?: { user?: ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -9187,9 +9187,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -19757,6 +19757,23 @@ "path": "x-pack/plugins/fleet/common/types/models/agent.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.FleetServerAgent.unhealthy_reason", + "type": "Array", + "tags": [], + "label": "unhealthy_reason", + "description": [ + "\nUnhealthy reason: input, output, other" + ], + "signature": [ + "UnhealthyReason", + "[] | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index c94caf2592e98..3768729f50ab4 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1232 | 3 | 1113 | 56 | +| 1233 | 3 | 1113 | 57 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 26ef0e58cad51..4a969de5dd212 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-03-14 +date: 2024-03-19 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 f98f498aa9af4..e4a162b34145c 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-03-14 +date: 2024-03-19 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 3a958aee3849a..7cd2ffa2d5b53 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-03-14 +date: 2024-03-19 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 e7b136dbc2fd8..308bbc6061fca 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-03-14 +date: 2024-03-19 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 2a3035f6c2d83..25433efc1a513 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index e7450112d67c3..35b706d7ae0cc 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 30b47148fe685..a6104aa84373f 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-03-14 +date: 2024-03-19 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 0ef428d64aa44..9774279dd0991 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 4f15db0c80c71..e0a8d878bdf0c 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-03-14 +date: 2024-03-19 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 3cb08b6a5b1a6..26db0886146d2 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-03-14 +date: 2024-03-19 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 2c1e881e17639..7685fe3956557 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index fe21ce47905ec..a02acd5a31e76 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-03-14 +date: 2024-03-19 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 702e27480eec5..691e0c40ab3bf 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index c6b0821ce85b0..5cfe1d8427693 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index a6d950a1fec7c..f782596b3fe25 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-03-14 +date: 2024-03-19 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 ea89e10b66026..e321a2409bfbf 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-03-14 +date: 2024-03-19 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 fdb236b5c526c..6b48c8444c7fb 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-03-14 +date: 2024-03-19 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 a34c5acf27261..b2642a57be564 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-03-14 +date: 2024-03-19 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 aa9daad2f7b7d..bb2c25b8de388 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-03-14 +date: 2024-03-19 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 93f298c086b89..97c9270d8a46c 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-03-14 +date: 2024-03-19 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 ce42d38de2afb..f8ce48b23b743 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-03-14 +date: 2024-03-19 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 6372319e0f4ea..81d34a784ba4d 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-03-14 +date: 2024-03-19 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 926b9d4a27411..bce17d4f65bbe 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-03-14 +date: 2024-03-19 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 13dbe01c369e3..4302d8743e793 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-03-14 +date: 2024-03-19 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 f3ef5eb5349f8..017f59a4ea69e 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-03-14 +date: 2024-03-19 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 f11ae0a293933..cb80732f18a78 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-03-14 +date: 2024-03-19 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 438af1a4ef6d6..87b56965e0f91 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-03-14 +date: 2024-03-19 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_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 8c7ff9030af54..a3305ee2473c2 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 8ce006936c4ba..13d34d7a8df5d 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-03-14 +date: 2024-03-19 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 0d5b1f6a0f516..80eb12e6650da 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-03-14 +date: 2024-03-19 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 245919f2765e3..471912cfca1c4 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-03-14 +date: 2024-03-19 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 3262bae922c9a..74f0b08ceba4a 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-03-14 +date: 2024-03-19 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 e0596eb20f7ad..efd6e3c5a89ea 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-03-14 +date: 2024-03-19 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 aab359a55ef8a..274c603e561c9 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-03-14 +date: 2024-03-19 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 33a009c7ef825..a50d6dfa02c0d 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-03-14 +date: 2024-03-19 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 4bccb8c27f83d..8631dbf275eca 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-03-14 +date: 2024-03-19 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 c67de8349a7f9..9b637fa15d387 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-03-14 +date: 2024-03-19 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 20646642c1c6f..c1bd9e3567d08 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-03-14 +date: 2024-03-19 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 b5e4c6eb739e7..7076bff6bc1a6 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-03-14 +date: 2024-03-19 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 30ea301b880ce..fa53e1fda500b 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-03-14 +date: 2024-03-19 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 34c665b79d2f7..3886a0310b455 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-03-14 +date: 2024-03-19 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 bfc203fb042ff..ff40e79fd2195 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-03-14 +date: 2024-03-19 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 855102d2c086f..34e3940de9406 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-03-14 +date: 2024-03-19 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 0a68dacd66704..2a8b84a532db6 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-03-14 +date: 2024-03-19 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 6165257de3d9b..0d10be9ceeb7b 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-03-14 +date: 2024-03-19 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 5f92e9e171b1e..090c1be97f174 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-03-14 +date: 2024-03-19 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 d53df61bcddf7..3d8b3483a60f0 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-03-14 +date: 2024-03-19 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 87adcee005518..305366412fc70 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index be264f7d119ef..310468a1bc17a 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-03-14 +date: 2024-03-19 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 f7a6cb88004f1..8b7e4467ada5f 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-03-14 +date: 2024-03-19 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 5c909737f7eff..289b53d0715d3 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-03-14 +date: 2024-03-19 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 f6d5b9c53879c..b9d34d0802cfc 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-03-14 +date: 2024-03-19 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 8c37383256e62..c0905cb3b6709 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-03-14 +date: 2024-03-19 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 b054e4b3cf9a8..97d545b9a0dfc 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-03-14 +date: 2024-03-19 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 093f0cdb9774b..b3618652206d6 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-03-14 +date: 2024-03-19 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 84079b9e329e2..d6596b7e7d079 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-03-14 +date: 2024-03-19 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 10d9ae1eb525b..d6d502221b4e6 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-03-14 +date: 2024-03-19 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 53d39fcf1cbe1..94318f5c3c3bc 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-03-14 +date: 2024-03-19 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 1632d0f19f466..9685b3d88a0c6 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-03-14 +date: 2024-03-19 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 6346b3a127bef..638ec4debdd73 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-03-14 +date: 2024-03-19 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 9d65175555301..fe98a37f626af 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-03-14 +date: 2024-03-19 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 cf84a3dae1cda..61715e2c8d392 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-03-14 +date: 2024-03-19 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 86df6be4f9e64..e9c5c589d3d90 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-03-14 +date: 2024-03-19 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 08b7631da3d42..d88cc676b9a0b 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-03-14 +date: 2024-03-19 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 de4f036978341..e0733dd2c2734 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-03-14 +date: 2024-03-19 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 38f43598a7163..51de816753bd2 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-03-14 +date: 2024-03-19 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 139e8d27444a6..daedf6e488a65 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-03-14 +date: 2024-03-19 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 0067354ad56b0..5141485e0c1fa 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_core_base_browser_mocks.devdocs.json index 26da0985adf56..f11f066ebf54e 100644 --- a/api_docs/kbn_core_base_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_base_browser_mocks.devdocs.json @@ -43,7 +43,16 @@ "description": [], "signature": [ "({ production }?: { production?: boolean | undefined; }) => ", - "CoreContext" + "CoreContext", + " & { logger: ", + { + "pluginId": "@kbn/logging-mocks", + "scope": "common", + "docId": "kibKbnLoggingMocksPluginApi", + "section": "def-common.MockedLogger", + "text": "MockedLogger" + }, + "; }" ], "path": "packages/core/base/core-base-browser-mocks/src/core_context.mock.ts", "deprecated": false, diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 9c022d8b6f090..6f3a4f1c5e3cb 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-03-14 +date: 2024-03-19 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 295bc671cc9ef..ac386390b7507 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-03-14 +date: 2024-03-19 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 19f3d5b057f94..6f17c53dbf05d 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-03-14 +date: 2024-03-19 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 ee3e1e97ce12d..2f4afb9a0779c 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-03-14 +date: 2024-03-19 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 57d565779f55b..98935ee39aa0e 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-03-14 +date: 2024-03-19 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 03c340b05bb99..5cfeb2993b6d2 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-03-14 +date: 2024-03-19 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 daa9d998a84c2..5df3f6f11f2bd 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-03-14 +date: 2024-03-19 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 898cb2a664398..347518b111b38 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json index a016432daa68d..f8bfcffadc9e9 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -2868,6 +2868,20 @@ "deprecated": false, "trackAdoption": false, "children": [ + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.CloudURLs.baseUrl", + "type": "string", + "tags": [], + "label": "baseUrl", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.CloudURLs.billingUrl", @@ -2882,6 +2896,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.CloudURLs.deploymentsUrl", + "type": "string", + "tags": [], + "label": "deploymentsUrl", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.CloudURLs.deploymentUrl", @@ -2896,6 +2924,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.CloudURLs.projectsUrl", + "type": "string", + "tags": [], + "label": "projectsUrl", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.CloudURLs.performanceUrl", @@ -3475,6 +3517,16 @@ "tags": [], "label": "SolutionNavigationDefinition", "description": [], + "signature": [ + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.SolutionNavigationDefinition", + "text": "SolutionNavigationDefinition" + }, + "" + ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, "trackAdoption": false, @@ -3505,6 +3557,31 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-chrome-browser", + "id": "def-common.SolutionNavigationDefinition.navigationTree$", + "type": "Object", + "tags": [], + "label": "navigationTree$", + "description": [ + "The navigation tree definition" + ], + "signature": [ + "Observable", + "<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.NavigationTreeDefinition", + "text": "NavigationTreeDefinition" + }, + ">" + ], + "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.SolutionNavigationDefinition.icon", @@ -3512,7 +3589,7 @@ "tags": [], "label": "icon", "description": [ - "Optional icon for the solution navigation." + "Optional icon for the solution navigation to render in the select dropdown." ], "signature": [ "IconType", @@ -3524,13 +3601,14 @@ }, { "parentPluginId": "@kbn/core-chrome-browser", - "id": "def-common.SolutionNavigationDefinition.sideNavComponentGetter", - "type": "Function", + "id": "def-common.SolutionNavigationDefinition.sideNavComponent", + "type": "CompoundType", "tags": [], - "label": "sideNavComponentGetter", - "description": [], + "label": "sideNavComponent", + "description": [ + "React component to render in the side nav for the navigation" + ], "signature": [ - "(() => ", { "pluginId": "@kbn/core-chrome-browser", "scope": "common", @@ -3538,32 +3616,23 @@ "section": "def-common.SideNavComponent", "text": "SideNavComponent" }, - ") | undefined" + " | undefined" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] + "trackAdoption": false }, { "parentPluginId": "@kbn/core-chrome-browser", "id": "def-common.SolutionNavigationDefinition.homePage", - "type": "CompoundType", + "type": "Uncategorized", "tags": [], "label": "homePage", "description": [ "The page to navigate to when switching to this solution navigation." ], "signature": [ - { - "pluginId": "@kbn/core-chrome-browser", - "scope": "common", - "docId": "kibKbnCoreChromeBrowserPluginApi", - "section": "def-common.AppDeepLinkId", - "text": "AppDeepLinkId" - }, - " | undefined" + "LinkId | undefined" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, @@ -3588,7 +3657,7 @@ "id": "def-common.SolutionNavigationDefinitions.Unnamed", "type": "IndexSignature", "tags": [], - "label": "[id: string]: SolutionNavigationDefinition", + "label": "[id: string]: SolutionNavigationDefinition", "description": [], "signature": [ "[id: string]: ", @@ -3598,7 +3667,16 @@ "docId": "kibKbnCoreChromeBrowserPluginApi", "section": "def-common.SolutionNavigationDefinition", "text": "SolutionNavigationDefinition" - } + }, + "<", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.AppDeepLinkId", + "text": "AppDeepLinkId" + }, + ">" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, @@ -3815,7 +3893,7 @@ "label": "CloudLinkId", "description": [], "signature": [ - "\"userAndRoles\" | \"performance\" | \"billingAndSub\" | \"deployment\"" + "\"projects\" | \"userAndRoles\" | \"performance\" | \"billingAndSub\" | \"deployment\" | \"deployments\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, @@ -3830,7 +3908,15 @@ "label": "CloudLinks", "description": [], "signature": [ - "{ userAndRoles?: ", + "{ projects?: ", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.CloudLink", + "text": "CloudLink" + }, + " | undefined; userAndRoles?: ", { "pluginId": "@kbn/core-chrome-browser", "scope": "common", @@ -3862,6 +3948,14 @@ "section": "def-common.CloudLink", "text": "CloudLink" }, + " | undefined; deployments?: ", + { + "pluginId": "@kbn/core-chrome-browser", + "scope": "common", + "docId": "kibKbnCoreChromeBrowserPluginApi", + "section": "def-common.CloudLink", + "text": "CloudLink" + }, " | undefined; }" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index b017559be8dc1..47405f026ef61 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 200 | 0 | 97 | 0 | +| 204 | 0 | 99 | 0 | ## Common diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 0aff8f33b4e2e..15b2d4aba1a3d 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-03-14 +date: 2024-03-19 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 ffd4d74124852..3fc36735a9253 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-03-14 +date: 2024-03-19 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 d526c52a2ef30..a565a5793a85f 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-03-14 +date: 2024-03-19 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 b14c322d9f725..a4e0c07295012 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-03-14 +date: 2024-03-19 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 6bba46b0ca297..308fee51d2091 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-03-14 +date: 2024-03-19 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 16af2929347fe..38ae4c3504559 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-03-14 +date: 2024-03-19 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 09a735c3c95a8..444809c2ad561 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-03-14 +date: 2024-03-19 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 5f351b274e1df..364284bee0df6 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-03-14 +date: 2024-03-19 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 a99c5b15d3e19..51148df5d813f 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-03-14 +date: 2024-03-19 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 cc5ca77997f76..c9a16aa11642d 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-03-14 +date: 2024-03-19 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 cf8fdbf745e92..d73ab073e376d 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-03-14 +date: 2024-03-19 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 8782d697aeb28..697157febb612 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-03-14 +date: 2024-03-19 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 30fe9a755ed9b..15854b6294e7f 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-03-14 +date: 2024-03-19 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 f6691a284e8fa..5c8351e0c14c3 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-03-14 +date: 2024-03-19 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 0cda4787c1daa..c7a46be89d9ff 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-03-14 +date: 2024-03-19 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 7c3525269b1a2..980b83ce9774f 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-03-14 +date: 2024-03-19 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 648a88571b9f5..b7ca66a8cd647 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-03-14 +date: 2024-03-19 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 f5bf8d686c929..b19b95e598afd 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-03-14 +date: 2024-03-19 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 73214319ec975..251159ff25162 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-03-14 +date: 2024-03-19 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 608fcec8c7858..b84cfe4d2ef60 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-03-14 +date: 2024-03-19 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 d12a5acf4fed5..fdf55eb286f9f 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-03-14 +date: 2024-03-19 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 fee49ee24f6a8..d63725d2f293f 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-03-14 +date: 2024-03-19 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 b704a0c6f30e3..c6d0fd6aacfe3 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 09d5d7b2243f4..a640e1cdb0cca 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-03-14 +date: 2024-03-19 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 a146e4e269662..d899f8950091d 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-03-14 +date: 2024-03-19 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 df218f5ecab1d..f60dd8e443596 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-03-14 +date: 2024-03-19 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 423949eccc0c6..cf8953e571a55 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-03-14 +date: 2024-03-19 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 6baf08158e89c..f208714fe8b90 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-03-14 +date: 2024-03-19 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 cd81e64879724..4f3b5fdef0314 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-03-14 +date: 2024-03-19 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 0647ce73d7743..44c5df081e7c1 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-03-14 +date: 2024-03-19 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 c6bb2ec325a22..79973ebd5f158 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-03-14 +date: 2024-03-19 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 0449280cfef57..516318ab3d07f 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-03-14 +date: 2024-03-19 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 2f1d39d7c1f39..8f22b3c61c6f7 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-03-14 +date: 2024-03-19 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 3d060f861c8f3..75815be275c09 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-03-14 +date: 2024-03-19 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 70cead99e4a7b..8b6b50fee40dc 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-03-14 +date: 2024-03-19 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 17cc6492b0ccb..fb1d11cd99cbc 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-03-14 +date: 2024-03-19 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 1a28bf6353102..7741c448a6a85 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-03-14 +date: 2024-03-19 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 df624c1948ecd..5feefb619708f 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-03-14 +date: 2024-03-19 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 c11e625b0c610..f3fbd42b08b90 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-03-14 +date: 2024-03-19 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 a9abab6dc2e9c..f23d5fdfbb778 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-03-14 +date: 2024-03-19 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 7e4624d41e005..c699f180ebff0 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_core_http_request_handler_context_server.devdocs.json index f65d2dcfff8d7..674a7dcbe6794 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.devdocs.json +++ b/api_docs/kbn_core_http_request_handler_context_server.devdocs.json @@ -112,6 +112,26 @@ "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-request-handler-context-server", + "id": "def-common.CoreRequestHandlerContext.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityRequestHandlerContext", + "text": "SecurityRequestHandlerContext" + } + ], + "path": "packages/core/http/core-http-request-handler-context-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false 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 90874640cf948..e3dfe5a868150 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_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 | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 11 | 0 | +| 15 | 0 | 12 | 0 | ## Common diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 98006b79730a6..6a552970cb26e 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-03-14 +date: 2024-03-19 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 a49d349f844d8..ff775c9dd6536 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-03-14 +date: 2024-03-19 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 30c25f2b08692..3e68177b9aff5 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index f14599993d399..83bf55920b950 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 872fc7536fe68..abface5242c9c 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-03-14 +date: 2024-03-19 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 10ff999cb24e2..96e9e4e47287d 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -4080,6 +4080,10 @@ "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts" }, + { + "plugin": "enterpriseSearch", + "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts" + }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/crawler/crawler_multiple_schedules.ts" @@ -13162,6 +13166,10 @@ "plugin": "@kbn/core-http-router-server-mocks", "path": "packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts" }, + { + "plugin": "bfetch", + "path": "src/plugins/bfetch/server/plugin.ts" + }, { "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/public/runtime_fields/get_runtime_field.ts" @@ -13202,10 +13210,6 @@ "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/internal/fields.ts" }, - { - "plugin": "bfetch", - "path": "src/plugins/bfetch/server/plugin.ts" - }, { "plugin": "data", "path": "src/plugins/data/server/search/routes/session.ts" @@ -14193,6 +14197,10 @@ "plugin": "@kbn/core-http-router-server-mocks", "path": "packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts" }, + { + "plugin": "bfetch", + "path": "src/plugins/bfetch/server/plugin.ts" + }, { "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/public/runtime_fields/put_runtime_field.ts" @@ -14205,10 +14213,6 @@ "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts" }, - { - "plugin": "bfetch", - "path": "src/plugins/bfetch/server/plugin.ts" - }, { "plugin": "data", "path": "src/plugins/data/server/search/routes/session.ts" @@ -14468,6 +14472,10 @@ "plugin": "@kbn/core-http-router-server-mocks", "path": "packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts" }, + { + "plugin": "bfetch", + "path": "src/plugins/bfetch/server/plugin.ts" + }, { "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/public/fields/update_fields.ts" @@ -14508,10 +14516,6 @@ "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/internal/fields_for.ts" }, - { - "plugin": "bfetch", - "path": "src/plugins/bfetch/server/plugin.ts" - }, { "plugin": "data", "path": "src/plugins/data/server/search/routes/session.ts" @@ -15574,6 +15578,10 @@ "plugin": "@kbn/core-http-router-server-mocks", "path": "packages/core/http/core-http-router-server-mocks/src/versioned_router.mock.ts" }, + { + "plugin": "bfetch", + "path": "src/plugins/bfetch/server/plugin.ts" + }, { "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/public/runtime_fields/delete_runtime_field.ts" @@ -15586,10 +15594,6 @@ "plugin": "dataViews", "path": "src/plugins/data_views/server/rest_api_routes/public/delete_data_view.ts" }, - { - "plugin": "bfetch", - "path": "src/plugins/bfetch/server/plugin.ts" - }, { "plugin": "data", "path": "src/plugins/data/server/search/routes/session.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index c3f87daf2dda3..4c10263c89f3b 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 183956bab88a6..adf02f3a6019c 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_core_http_server_mocks.mdx index cf1b689a2238d..57d064c10efcb 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-03-14 +date: 2024-03-19 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 3c01b4393ec22..d9d121989f7b8 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-03-14 +date: 2024-03-19 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 91aadf13572e2..7d215748b9d42 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-03-14 +date: 2024-03-19 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 8f16c41fc82ff..5a55b11879147 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-03-14 +date: 2024-03-19 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 f0f3dc14b084c..61f3da3c0e32f 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-03-14 +date: 2024-03-19 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 752f0ed489118..9538c37c295ba 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-03-14 +date: 2024-03-19 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 17b2bb63c2611..22482ffe22ebf 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-03-14 +date: 2024-03-19 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 53c5efb2aeea9..0e4306df363f6 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-03-14 +date: 2024-03-19 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 9ce5d02a49b7b..ee13773c9325c 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_core_lifecycle_browser.devdocs.json index 13a073fb2437c..9a08f80a601b1 100644 --- a/api_docs/kbn_core_lifecycle_browser.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser.devdocs.json @@ -339,6 +339,28 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/core-lifecycle-browser", + "id": "def-common.CoreSetup.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceSetup}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_setup.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/core-lifecycle-browser", "id": "def-common.CoreSetup.getStartServices", @@ -844,6 +866,28 @@ "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-lifecycle-browser", + "id": "def-common.CoreStart.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-browser/src/core_start.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 4847b11078c94..dac48974857bd 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.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 | |-------------------|-----------|------------------------|-----------------| -| 32 | 0 | 0 | 0 | +| 34 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json index 9c0e60e2cd942..547c6390aa72a 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_lifecycle_browser_mocks.devdocs.json @@ -244,6 +244,14 @@ "section": "def-common.FatalErrorsSetup", "text": "FatalErrorsSetup" }, + ">; security: jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, ">; plugins: { onStart: jest.Mock; }; }, any, any]>, [], any>; http: ", { "pluginId": "@kbn/core-http-browser-mocks", @@ -300,6 +308,14 @@ "section": "def-common.ThemeServiceSetup", "text": "ThemeServiceSetup" }, + ">; security: jest.Mocked<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, ">; plugins: { onSetup: jest.Mock; onStart: jest.Mock; }; }" ], "path": "packages/core/lifecycle/core-lifecycle-browser-mocks/src/index.ts", @@ -489,6 +505,14 @@ "section": "def-common.FatalErrorsSetup", "text": "FatalErrorsSetup" }, + ">; security: jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, ">; plugins: { onStart: jest.Mock; }; }" ], "path": "packages/core/lifecycle/core-lifecycle-browser-mocks/src/index.ts", diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index f7ea3eafb0b50..661cc9b6b4671 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_core_lifecycle_server.devdocs.json index 330fbe8c4e162..a514499ccd655 100644 --- a/api_docs/kbn_core_lifecycle_server.devdocs.json +++ b/api_docs/kbn_core_lifecycle_server.devdocs.json @@ -654,6 +654,28 @@ "path": "packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-lifecycle-server", + "id": "def-common.CoreSetup.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceSetup}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-server/src/core_setup.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -924,6 +946,28 @@ "path": "packages/core/lifecycle/core-lifecycle-server/src/core_start.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-lifecycle-server", + "id": "def-common.CoreStart.security", + "type": "Object", + "tags": [], + "label": "security", + "description": [ + "{@link SecurityServiceStart}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/lifecycle/core-lifecycle-server/src/core_start.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 1f3c92fc72205..c980b0ebaaa6c 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_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 | |-------------------|-----------|------------------------|-----------------| -| 36 | 0 | 0 | 0 | +| 38 | 0 | 0 | 0 | ## Common diff --git a/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json b/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json index 3eb3da50099db..dd259b586305c 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json +++ b/api_docs/kbn_core_lifecycle_server_mocks.devdocs.json @@ -184,7 +184,15 @@ "IExecutionContext", ">; coreUsageData: jest.Mocked<", "InternalCoreUsageDataSetup", - ">; customBranding: { register: jest.Mock; getBrandingFor: jest.Mock; }; userSettings: { setUserProfileSettings: jest.Mock; getUserSettingDarkMode: jest.Mock; }; }" + ">; customBranding: { register: jest.Mock; getBrandingFor: jest.Mock; }; userSettings: { setUserProfileSettings: jest.Mock; getUserSettingDarkMode: jest.Mock; }; security: jest.Mocked<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">; }" ], "path": "packages/core/lifecycle/core-lifecycle-server-mocks/src/index.ts", "deprecated": false, @@ -282,7 +290,15 @@ "section": "def-common.InternalDeprecationsServiceStart", "text": "InternalDeprecationsServiceStart" }, - ">; customBranding: {}; }" + ">; customBranding: {}; security: jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">; }" ], "path": "packages/core/lifecycle/core-lifecycle-server-mocks/src/index.ts", "deprecated": false, diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 00038b3c7006f..5757ad36deb8d 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-03-14 +date: 2024-03-19 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 26fd6070f5099..e2fab696cfd24 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-03-14 +date: 2024-03-19 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 c66f5fafe1d79..1ecc0936e56f1 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_core_logging_server.mdx index 43941aa661ee2..2a92bd34d1c5c 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index 276e9555b3543..05448d23dd739 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-03-14 +date: 2024-03-19 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 6435c1b18972d..5199ca5c16797 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-03-14 +date: 2024-03-19 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 0b5f819f29264..dafe1d7e1d3ed 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-03-14 +date: 2024-03-19 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 64ffcb1159717..e5383bac6e04b 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-03-14 +date: 2024-03-19 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 763ee22bccea9..8f6b943367336 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-03-14 +date: 2024-03-19 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 f193ddf6026e4..a0ad70c56f63c 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-03-14 +date: 2024-03-19 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 d73c987f21ec4..6445bdb1e660e 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-03-14 +date: 2024-03-19 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 fd7013c2203e4..f7abc377e778a 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-03-14 +date: 2024-03-19 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 d6878fb6ba473..56f89b8d24348 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-03-14 +date: 2024-03-19 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 edc0d2958b3f4..cf0d8180812ee 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-03-14 +date: 2024-03-19 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 b8fb953d7f4b7..018458d509c00 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-03-14 +date: 2024-03-19 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 c0fb201676967..a2310d3a4a6ee 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-03-14 +date: 2024-03-19 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 9c23d65096450..6cb60e3490608 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-03-14 +date: 2024-03-19 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 70927a986171a..794d0dfa6761a 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-03-14 +date: 2024-03-19 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 09133d75098cc..cc1017dd6785e 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-03-14 +date: 2024-03-19 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 d34013334efeb..a9ff1d64372ea 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-03-14 +date: 2024-03-19 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 227dbc71bd024..068769f556176 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-03-14 +date: 2024-03-19 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 b9ff06d511383..b41f27bac8375 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-03-14 +date: 2024-03-19 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 0633894375c94..bfb293dc5c014 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-03-14 +date: 2024-03-19 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 dc15ccaf7a339..f0d459a9b5f95 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-03-14 +date: 2024-03-19 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 b48fb2d69a094..afc5cc8b867d8 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_core_plugins_server.mdx index 5cd2a1446c86f..3b682af4d5fa5 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-03-14 +date: 2024-03-19 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 dcfd4a0b75a93..918a80d1a9d4c 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-03-14 +date: 2024-03-19 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 1d9fe12e4480b..538eeedbe4d1d 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-03-14 +date: 2024-03-19 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 c7eb9ee97e32b..d86bebabedb06 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-03-14 +date: 2024-03-19 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 5aef6b34661a7..97efb85ae7bce 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-03-14 +date: 2024-03-19 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 fd722ba629bfa..c00139fb7ebca 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-03-14 +date: 2024-03-19 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 1d7ae962bde9b..1b7fcbe30ab47 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-03-14 +date: 2024-03-19 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 9408c834913aa..7d2ccb40fa9c6 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-03-14 +date: 2024-03-19 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 3115740aade67..c8ca49db854d5 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-03-14 +date: 2024-03-19 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 0fa95f9432432..350c844f680c8 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-03-14 +date: 2024-03-19 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 20db7e31bfe30..c50699530ce51 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-03-14 +date: 2024-03-19 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 1172d66979306..ea5b3fdbeb354 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-03-14 +date: 2024-03-19 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 a17775897e866..d64ed1d38e303 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-03-14 +date: 2024-03-19 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 3dd6394023551..a0b6426d090b6 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-03-14 +date: 2024-03-19 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 6177e425c525f..d9374bb98a1e2 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-03-14 +date: 2024-03-19 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 7e21ac3a4dc56..7570bf42da2d3 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-03-14 +date: 2024-03-19 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 fb9c145ce9be0..c5b78a69b0afd 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-03-14 +date: 2024-03-19 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 33a80b013d8eb..2a7872d4b7353 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-03-14 +date: 2024-03-19 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 80e74050d900f..52e83d493bb6d 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-03-14 +date: 2024-03-19 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 fad0d4002eca2..93962a4a7b772 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-03-14 +date: 2024-03-19 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 9689e23d7492d..3713c5c5a299c 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-03-14 +date: 2024-03-19 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 d064e7f6ed824..1887d1cdeb2db 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-03-14 +date: 2024-03-19 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 cb5ea3a6b7f70..fdbefe211efbd 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-03-14 +date: 2024-03-19 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 c688cc4cda921..748e959e6718a 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-03-14 +date: 2024-03-19 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 98ac7f3d3c998..a506be7076d91 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_core_security_browser.devdocs.json new file mode 100644 index 0000000000000..868b3b9c39522 --- /dev/null +++ b/api_docs/kbn_core_security_browser.devdocs.json @@ -0,0 +1,230 @@ +{ + "id": "@kbn/core-security-browser", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreAuthenticationService", + "type": "Interface", + "tags": [], + "label": "CoreAuthenticationService", + "description": [ + "\nCore's authentication service\n" + ], + "path": "packages/core/security/core-security-browser/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreAuthenticationService.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nReturns currently authenticated user\nand throws if current user isn't authenticated." + ], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + ">" + ], + "path": "packages/core/security/core-security-browser/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreSecurityContract", + "type": "Interface", + "tags": [], + "label": "CoreSecurityContract", + "description": [ + "\nThe contract exposed by the security provider for Core to\nconsume and re-expose via its security service.\n" + ], + "path": "packages/core/security/core-security-browser/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.CoreSecurityContract.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-browser/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceSetup", + "type": "Interface", + "tags": [], + "label": "SecurityServiceSetup", + "description": [ + "\nSetup contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceSetup.registerSecurityApi", + "type": "Function", + "tags": [], + "label": "registerSecurityApi", + "description": [ + "\nRegister the security implementation that then will be used and re-exposed by Core.\n" + ], + "signature": [ + "(api: ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + }, + ") => void" + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceSetup.registerSecurityApi.$1", + "type": "Object", + "tags": [], + "label": "api", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + } + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceStart", + "type": "Interface", + "tags": [], + "label": "SecurityServiceStart", + "description": [ + "\nStart contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.SecurityServiceStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nThe {@link CoreAuthenticationService | authentication service}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-browser", + "id": "def-common.AuthenticationServiceContract", + "type": "Type", + "tags": [], + "label": "AuthenticationServiceContract", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-browser/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx new file mode 100644 index 0000000000000..27d481e7bf30e --- /dev/null +++ b/api_docs/kbn_core_security_browser.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: kibKbnCoreSecurityBrowserPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] +--- +import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 10 | 0 | 3 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_browser_internal.devdocs.json b/api_docs/kbn_core_security_browser_internal.devdocs.json new file mode 100644 index 0000000000000..a813bdc65d11c --- /dev/null +++ b/api_docs/kbn_core_security_browser_internal.devdocs.json @@ -0,0 +1,207 @@ +{ + "id": "@kbn/core-security-browser-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService", + "type": "Class", + "tags": [], + "label": "SecurityService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser-internal", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserInternalPluginApi", + "section": "def-common.SecurityService", + "text": "SecurityService" + }, + " implements ", + "CoreService", + "<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ", ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "coreContext", + "description": [], + "signature": [ + "CoreContext" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.SecurityService.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/security/core-security-browser-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.InternalSecurityServiceSetup", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceSetup", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-browser-internal", + "id": "def-common.InternalSecurityServiceStart", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceStart", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-browser-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx new file mode 100644 index 0000000000000..241058f25d2a6 --- /dev/null +++ b/api_docs/kbn_core_security_browser_internal.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: kibKbnCoreSecurityBrowserInternalPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] +--- +import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 8 | 0 | 8 | 0 | + +## Common + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_browser_mocks.devdocs.json b/api_docs/kbn_core_security_browser_mocks.devdocs.json new file mode 100644 index 0000000000000..9d1edf7048bca --- /dev/null +++ b/api_docs/kbn_core_security_browser_mocks.devdocs.json @@ -0,0 +1,154 @@ +{ + "id": "@kbn/core-security-browser-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock", + "type": "Object", + "tags": [], + "label": "securityServiceMock", + "description": [], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => { setup: jest.Mock; start: jest.Mock; stop: jest.Mock; }" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createSetup", + "type": "Function", + "tags": [], + "label": "createSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createStart", + "type": "Function", + "tags": [], + "label": "createStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createInternalSetup", + "type": "Function", + "tags": [], + "label": "createInternalSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-browser-mocks", + "id": "def-common.securityServiceMock.createInternalStart", + "type": "Function", + "tags": [], + "label": "createInternalStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-browser-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx new file mode 100644 index 0000000000000..a005d6085be68 --- /dev/null +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -0,0 +1,30 @@ +--- +#### +#### 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: kibKbnCoreSecurityBrowserMocksPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] +--- +import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_security_common.devdocs.json b/api_docs/kbn_core_security_common.devdocs.json new file mode 100644 index 0000000000000..af196d5e34931 --- /dev/null +++ b/api_docs/kbn_core_security_common.devdocs.json @@ -0,0 +1,347 @@ +{ + "id": "@kbn/core-security-common", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser", + "type": "Interface", + "tags": [], + "label": "AuthenticatedUser", + "description": [ + "\nRepresents the currently authenticated user." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " extends ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.User", + "text": "User" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.authentication_realm", + "type": "Object", + "tags": [], + "label": "authentication_realm", + "description": [ + "\nThe name and type of the Realm that has authenticated the user." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.UserRealm", + "text": "UserRealm" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.lookup_realm", + "type": "Object", + "tags": [], + "label": "lookup_realm", + "description": [ + "\nThe name and type of the Realm where the user information were retrieved from." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.UserRealm", + "text": "UserRealm" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.authentication_provider", + "type": "Object", + "tags": [], + "label": "authentication_provider", + "description": [ + "\nThe authentication provider that used to authenticate user." + ], + "signature": [ + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticationProvider", + "text": "AuthenticationProvider" + } + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.authentication_type", + "type": "string", + "tags": [], + "label": "authentication_type", + "description": [ + "\nThe AuthenticationType used by ES to authenticate the user.\n" + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.elastic_cloud_user", + "type": "boolean", + "tags": [], + "label": "elastic_cloud_user", + "description": [ + "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticatedUser.profile_uid", + "type": "string", + "tags": [], + "label": "profile_uid", + "description": [ + "\nUser profile ID of this user." + ], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticationProvider", + "type": "Interface", + "tags": [], + "label": "AuthenticationProvider", + "description": [ + "\nType and name tuple to identify provider used to authenticate user." + ], + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticationProvider.type", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "\nType of the Kibana authentication provider." + ], + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.AuthenticationProvider.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nName of the Kibana authentication provider (arbitrary string)." + ], + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User", + "type": "Interface", + "tags": [], + "label": "User", + "description": [ + "\nA set of fields describing Kibana user." + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.username", + "type": "string", + "tags": [], + "label": "username", + "description": [], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.email", + "type": "string", + "tags": [], + "label": "email", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.full_name", + "type": "string", + "tags": [], + "label": "full_name", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.roles", + "type": "Object", + "tags": [], + "label": "roles", + "description": [], + "signature": [ + "readonly string[]" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.User.metadata", + "type": "Object", + "tags": [], + "label": "metadata", + "description": [], + "signature": [ + "{ _reserved: boolean; _deprecated?: boolean | undefined; _deprecated_reason?: string | undefined; } | undefined" + ], + "path": "packages/core/security/core-security-common/src/authentication/user.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.UserRealm", + "type": "Interface", + "tags": [], + "label": "UserRealm", + "description": [ + "\nAn Elasticsearch realm that was used to resolve and authenticate the user." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.UserRealm.name", + "type": "string", + "tags": [], + "label": "name", + "description": [ + "\nArbitrary name of the security realm." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-common", + "id": "def-common.UserRealm.type", + "type": "string", + "tags": [], + "label": "type", + "description": [ + "\nType of the security realm (file, native, saml etc.)." + ], + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx new file mode 100644 index 0000000000000..1ff7178e56d1b --- /dev/null +++ b/api_docs/kbn_core_security_common.mdx @@ -0,0 +1,30 @@ +--- +#### +#### 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: kibKbnCoreSecurityCommonPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] +--- +import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 20 | 0 | 6 | 0 | + +## Common + +### Interfaces + + diff --git a/api_docs/kbn_core_security_server.devdocs.json b/api_docs/kbn_core_security_server.devdocs.json new file mode 100644 index 0000000000000..6e06a416514b6 --- /dev/null +++ b/api_docs/kbn_core_security_server.devdocs.json @@ -0,0 +1,335 @@ +{ + "id": "@kbn/core-security-server", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext", + "type": "Interface", + "tags": [], + "label": "AuthcRequestHandlerContext", + "description": [], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthcRequestHandlerContext.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService", + "type": "Interface", + "tags": [], + "label": "CoreAuthenticationService", + "description": [ + "\nCore's authentication service\n" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.getCurrentUser", + "type": "Function", + "tags": [], + "label": "getCurrentUser", + "description": [ + "\nRetrieve the user bound to the provided request, or null if\nno user is authenticated.\n" + ], + "signature": [ + "(request: ", + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + ") => ", + { + "pluginId": "@kbn/core-security-common", + "scope": "common", + "docId": "kibKbnCoreSecurityCommonPluginApi", + "section": "def-common.AuthenticatedUser", + "text": "AuthenticatedUser" + }, + " | null" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreAuthenticationService.getCurrentUser.$1", + "type": "Object", + "tags": [], + "label": "request", + "description": [ + "The request to retrieve the authenticated user for." + ], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server/src/authc.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityContract", + "type": "Interface", + "tags": [], + "label": "CoreSecurityContract", + "description": [ + "\nThe contract exposed by the security provider for Core to\nconsume and re-expose via its security service.\n" + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.CoreSecurityContract.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityRequestHandlerContext", + "type": "Interface", + "tags": [], + "label": "SecurityRequestHandlerContext", + "description": [], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityRequestHandlerContext.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" + } + ], + "path": "packages/core/security/core-security-server/src/request_handler_context.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceSetup", + "type": "Interface", + "tags": [], + "label": "SecurityServiceSetup", + "description": [ + "\nSetup contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceSetup.registerSecurityApi", + "type": "Function", + "tags": [], + "label": "registerSecurityApi", + "description": [ + "\nRegister the security implementation that then will be used and re-exposed by Core.\n" + ], + "signature": [ + "(api: ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + }, + ") => void" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceSetup.registerSecurityApi.$1", + "type": "Object", + "tags": [], + "label": "api", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreSecurityContract", + "text": "CoreSecurityContract" + } + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceStart", + "type": "Interface", + "tags": [], + "label": "SecurityServiceStart", + "description": [ + "\nStart contract for Core's security service.\n" + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.SecurityServiceStart.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [ + "\nThe {@link CoreAuthenticationService | authentication service}" + ], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-server", + "id": "def-common.AuthenticationServiceContract", + "type": "Type", + "tags": [], + "label": "AuthenticationServiceContract", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.CoreAuthenticationService", + "text": "CoreAuthenticationService" + } + ], + "path": "packages/core/security/core-security-server/src/api_provider.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx new file mode 100644 index 0000000000000..6e16a5836317a --- /dev/null +++ b/api_docs/kbn_core_security_server.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: kibKbnCoreSecurityServerPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] +--- +import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 15 | 0 | 7 | 0 | + +## Common + +### Interfaces + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_server_internal.devdocs.json b/api_docs/kbn_core_security_server_internal.devdocs.json new file mode 100644 index 0000000000000..ad646e17ccfa2 --- /dev/null +++ b/api_docs/kbn_core_security_server_internal.devdocs.json @@ -0,0 +1,339 @@ +{ + "id": "@kbn/core-security-server-internal", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext", + "type": "Class", + "tags": [], + "label": "CoreSecurityRouteHandlerContext", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server-internal", + "scope": "common", + "docId": "kibKbnCoreSecurityServerInternalPluginApi", + "section": "def-common.CoreSecurityRouteHandlerContext", + "text": "CoreSecurityRouteHandlerContext" + }, + " implements ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityRequestHandlerContext", + "text": "SecurityRequestHandlerContext" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.authc", + "type": "Object", + "tags": [], + "label": "#authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" + }, + " | undefined" + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "securityStart", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "request", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-server", + "scope": "common", + "docId": "kibKbnCoreHttpServerPluginApi", + "section": "def-common.KibanaRequest", + "text": "KibanaRequest" + }, + "" + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.CoreSecurityRouteHandlerContext.authc", + "type": "Object", + "tags": [], + "label": "authc", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.AuthcRequestHandlerContext", + "text": "AuthcRequestHandlerContext" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_route_handler_context.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService", + "type": "Class", + "tags": [], + "label": "SecurityService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server-internal", + "scope": "common", + "docId": "kibKbnCoreSecurityServerInternalPluginApi", + "section": "def-common.SecurityService", + "text": "SecurityService" + }, + " implements ", + "CoreService", + "<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ", ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.Unnamed.$1", + "type": "Object", + "tags": [], + "label": "coreContext", + "description": [], + "signature": [ + "CoreContext" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.setup", + "type": "Function", + "tags": [], + "label": "setup", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.start", + "type": "Function", + "tags": [], + "label": "start", + "description": [], + "signature": [ + "() => ", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.SecurityService.stop", + "type": "Function", + "tags": [], + "label": "stop", + "description": [], + "signature": [ + "() => void" + ], + "path": "packages/core/security/core-security-server-internal/src/security_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.InternalSecurityServiceSetup", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceSetup", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + } + ], + "path": "packages/core/security/core-security-server-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-security-server-internal", + "id": "def-common.InternalSecurityServiceStart", + "type": "Type", + "tags": [], + "label": "InternalSecurityServiceStart", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + } + ], + "path": "packages/core/security/core-security-server-internal/src/internal_contracts.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx new file mode 100644 index 0000000000000..cc3f276c432b2 --- /dev/null +++ b/api_docs/kbn_core_security_server_internal.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: kibKbnCoreSecurityServerInternalPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] +--- +import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 14 | 0 | 14 | 0 | + +## Common + +### Classes + + +### Consts, variables and types + + diff --git a/api_docs/kbn_core_security_server_mocks.devdocs.json b/api_docs/kbn_core_security_server_mocks.devdocs.json new file mode 100644 index 0000000000000..8f3b32bc57004 --- /dev/null +++ b/api_docs/kbn_core_security_server_mocks.devdocs.json @@ -0,0 +1,178 @@ +{ + "id": "@kbn/core-security-server-mocks", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock", + "type": "Object", + "tags": [], + "label": "securityServiceMock", + "description": [], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.create", + "type": "Function", + "tags": [], + "label": "create", + "description": [], + "signature": [ + "() => { setup: jest.Mock; start: jest.Mock; stop: jest.Mock; }" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createSetup", + "type": "Function", + "tags": [], + "label": "createSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createStart", + "type": "Function", + "tags": [], + "label": "createStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createInternalSetup", + "type": "Function", + "tags": [], + "label": "createInternalSetup", + "description": [], + "signature": [ + "() => jest.Mocked<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceSetup", + "text": "SecurityServiceSetup" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createInternalStart", + "type": "Function", + "tags": [], + "label": "createInternalStart", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + }, + { + "parentPluginId": "@kbn/core-security-server-mocks", + "id": "def-common.securityServiceMock.createRequestHandlerContext", + "type": "Function", + "tags": [], + "label": "createRequestHandlerContext", + "description": [], + "signature": [ + "() => jest.MockedObjectDeep<", + { + "pluginId": "@kbn/core-security-server", + "scope": "common", + "docId": "kibKbnCoreSecurityServerPluginApi", + "section": "def-common.SecurityRequestHandlerContext", + "text": "SecurityRequestHandlerContext" + }, + ">" + ], + "path": "packages/core/security/core-security-server-mocks/src/security_service.mock.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [] + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx new file mode 100644 index 0000000000000..b1935c0199f7e --- /dev/null +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -0,0 +1,30 @@ +--- +#### +#### 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: kibKbnCoreSecurityServerMocksPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] +--- +import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; + + + +Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 7 | 0 | 7 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 622b1d8225d91..b5910cda93e2b 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-03-14 +date: 2024-03-19 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 2a45511bdca24..3e1a8c23dcb53 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-03-14 +date: 2024-03-19 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 50c325c10745c..e6e0b391238ba 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-03-14 +date: 2024-03-19 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 dcb22acb8586d..6bac28909c582 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-03-14 +date: 2024-03-19 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 0f1d50d38daeb..9a0ba2e1692aa 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-03-14 +date: 2024-03-19 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 540bbaf117fe5..b9c47cdba2414 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-03-14 +date: 2024-03-19 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 b6b63a30f82c8..0c9a5cea4f5f3 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-03-14 +date: 2024-03-19 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 565aa665bbb62..e4688e87854a7 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-03-14 +date: 2024-03-19 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 b27472d2f496d..189e9adca8431 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-03-14 +date: 2024-03-19 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 48ace24d47da5..6dd2a1dff5142 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-03-14 +date: 2024-03-19 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 a55bb832b7c42..2b0fbbacfe964 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-03-14 +date: 2024-03-19 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 ab3c3ace1cbfa..60307df4a78ea 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-03-14 +date: 2024-03-19 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 643a156a65fcc..a08f41b58b4dc 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-03-14 +date: 2024-03-19 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 c65e73a91965b..5917712b70f51 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-03-14 +date: 2024-03-19 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 e2bc520c52800..d9a8a24c50171 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-03-14 +date: 2024-03-19 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 b2a8216754284..ad8ecefe80d7a 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-03-14 +date: 2024-03-19 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 bd3a99a0786ba..970481541524a 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-03-14 +date: 2024-03-19 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 16b67dbba67cd..48c3bde2ec0c3 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-03-14 +date: 2024-03-19 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 2810fb9edae1b..17388cdc3a8c8 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-03-14 +date: 2024-03-19 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 a549faca8460a..41e78ed448943 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-03-14 +date: 2024-03-19 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 58722e6f744e3..529426dccdd39 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-03-14 +date: 2024-03-19 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 a240bd1c2887f..6ce86ec6a7ba0 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-03-14 +date: 2024-03-19 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 98f26c5abd13f..e440607df0a21 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-03-14 +date: 2024-03-19 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_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 96ccf2ba3936b..d45cde1735658 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-03-14 +date: 2024-03-19 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_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index d09e8c3b34b0d..8ce771d4da09f 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.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 bd7b395c7fe92..947c45372e4da 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-03-14 +date: 2024-03-19 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 47fe6e85dd155..b6333581c41a5 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-03-14 +date: 2024-03-19 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 10feccc37a741..bb20f743042f2 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-03-14 +date: 2024-03-19 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 8f369742a14b7..389afaf8f647d 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-03-14 +date: 2024-03-19 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 ba78557be7a77..aed0d8a27c95a 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-03-14 +date: 2024-03-19 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 55d280c4b9670..1d991fc86ca19 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-03-14 +date: 2024-03-19 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 0d4bfaec67308..e23414b3a8db2 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-03-14 +date: 2024-03-19 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 fa5722138add2..90b7b0218c6e7 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-03-14 +date: 2024-03-19 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 763b76ed8436f..fa987e9fce856 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-03-14 +date: 2024-03-19 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 3d4649f966fe5..84032bf0076ce 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-03-14 +date: 2024-03-19 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 e5d877b0054c8..78746d2e52da6 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-03-14 +date: 2024-03-19 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 1937639733ca7..07286327c4383 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-03-14 +date: 2024-03-19 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 12764e709a55f..6955eddf7db7b 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 9196b57047599..d5fff89c1a6e6 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index d4c7afe4630ff..e7db68fbb204f 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-03-14 +date: 2024-03-19 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 c3216c3753cc0..420008e669e95 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-03-14 +date: 2024-03-19 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 1e72a57498b06..7e9fb5fa3025f 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 6b81fa687eccf..7038745ff3700 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-03-14 +date: 2024-03-19 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 802d82c17f4eb..106635738ef0d 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 9d1f8c064675b..8c550f21c57d5 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index 8a431c1c51e8d..6ef65e218402c 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-03-14 +date: 2024-03-19 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 0734ab2527557..f64a597c0236d 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-03-14 +date: 2024-03-19 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 2f8630ffa0340..cf447e7231587 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-03-14 +date: 2024-03-19 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 5a204f589d9fa..e29eb65c4091c 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-03-14 +date: 2024-03-19 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 d3893449c5f0e..f2adeee776136 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-03-14 +date: 2024-03-19 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 83f5a0c5261ae..446f32bae5f24 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-03-14 +date: 2024-03-19 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 d8642e858128e..87eed2f0c5a36 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-03-14 +date: 2024-03-19 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 f338cc81b7ad3..49f5f77052f2a 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-03-14 +date: 2024-03-19 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 a17365e6733d1..905aae28c4998 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-03-14 +date: 2024-03-19 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 3d1fd833801eb..671d2d0276cb1 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-03-14 +date: 2024-03-19 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 2a78ef32d1834..d8f62be44b3c5 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-03-14 +date: 2024-03-19 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 9bb3e57b6a6b7..ab58f16de258e 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-03-14 +date: 2024-03-19 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 6f47519964e8a..06cfb7587043e 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-03-14 +date: 2024-03-19 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 fc5f0af987fe3..3ba639016bc16 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-03-14 +date: 2024-03-19 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 6f61eb157ebcb..2567376186c81 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-03-14 +date: 2024-03-19 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 9f47d4fc92ad4..8f2a647bda602 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-03-14 +date: 2024-03-19 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 ef106420e4abf..cf82538e048a6 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-03-14 +date: 2024-03-19 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 e11a45427d28d..a8d356e7d5dca 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.devdocs.json b/api_docs/kbn_es_types.devdocs.json index 5ace284b455cf..3d53027e6d33c 100644 --- a/api_docs/kbn_es_types.devdocs.json +++ b/api_docs/kbn_es_types.devdocs.json @@ -20,100 +20,6 @@ "classes": [], "functions": [], "interfaces": [ - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails", - "type": "Interface", - "tags": [], - "label": "ClusterDetails", - "description": [], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.status", - "type": "CompoundType", - "tags": [], - "label": "status", - "description": [], - "signature": [ - "\"running\" | \"failed\" | \"partial\" | \"skipped\" | \"successful\"" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.indices", - "type": "string", - "tags": [], - "label": "indices", - "description": [], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.took", - "type": "number", - "tags": [], - "label": "took", - "description": [], - "signature": [ - "number | undefined" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.timed_out", - "type": "boolean", - "tags": [], - "label": "timed_out", - "description": [], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails._shards", - "type": "Object", - "tags": [], - "label": "_shards", - "description": [], - "signature": [ - "ShardStatistics", - " | undefined" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/es-types", - "id": "def-common.ClusterDetails.failures", - "type": "Array", - "tags": [], - "label": "failures", - "description": [], - "signature": [ - "ShardFailure", - "[] | undefined" - ], - "path": "packages/kbn-es-types/src/search.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/es-types", "id": "def-common.ESQLColumn", diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index a3c14718a0ef6..f92b69c6106d2 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.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 | |-------------------|-----------|------------------------|-----------------| -| 32 | 0 | 32 | 0 | +| 25 | 0 | 25 | 0 | ## Common diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 4a9f0ada96654..c8b10f54633a5 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-03-14 +date: 2024-03-19 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_utils.mdx b/api_docs/kbn_esql_utils.mdx index c0aaf097f4ef2..a5d17dbcb29d8 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 63bad35f98560..20766edd39443 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-03-14 +date: 2024-03-19 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 50bc08d089185..0dc489ee3327a 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-03-14 +date: 2024-03-19 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 5b15c779f1416..9c77eb74f7c2c 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-03-14 +date: 2024-03-19 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 c6593b98bcc70..01af8bf0fd20f 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 709a0cd23233e..db1be7ba7ffd9 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 0e47a6b750ca7..08d624e5d7dc5 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-03-14 +date: 2024-03-19 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 95ecac6e3ed69..591d45573529a 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-03-14 +date: 2024-03-19 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 f98f991f4b649..25d6b580ae30a 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-03-14 +date: 2024-03-19 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 c39096c5446b9..fb9aeadda29a7 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-03-14 +date: 2024-03-19 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 62393b50058ab..b984258378f91 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-03-14 +date: 2024-03-19 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 6ef6f30d6af35..b6733cd40bc6b 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 224400c5e0be9..92f8fdd4ed02f 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-03-14 +date: 2024-03-19 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 c45cda32a774c..59f5900836b38 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-03-14 +date: 2024-03-19 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 fd5aab7f0f4d6..62e6511861bf8 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-03-14 +date: 2024-03-19 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 e5fc1e75a73a3..7609028a21008 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-03-14 +date: 2024-03-19 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 ce63f1806bdd3..fd68bd72dca51 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-03-14 +date: 2024-03-19 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 14c28154e37c9..3c224276f27a5 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-03-14 +date: 2024-03-19 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 207579071c989..6430c49c65be0 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-03-14 +date: 2024-03-19 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 b28a10ef0a7e6..95d0d6efd46b8 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-03-14 +date: 2024-03-19 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 a27ddfe9c77fb..625649116b62b 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-03-14 +date: 2024-03-19 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 83713d8a5f77b..d81483c3559c4 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index f262f0b460f0e..4c355928e6ce1 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-03-14 +date: 2024-03-19 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 201b39ee12016..43c83818cb21f 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-03-14 +date: 2024-03-19 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 95e92127274f1..c84278615f677 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index e311b7662ed62..0be54e72ca5f8 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.devdocs.json b/api_docs/kbn_journeys.devdocs.json index fe8ff4a3f4d5e..41f6843945731 100644 --- a/api_docs/kbn_journeys.devdocs.json +++ b/api_docs/kbn_journeys.devdocs.json @@ -184,7 +184,7 @@ "tags": [], "label": "Constructor", "description": [ - "\nCreate a Journey which should be exported from a file in the\nx-pack/performance/journeys directory." + "\nCreate a Journey which should be exported from a file in the\nx-pack/performance/journeys_e2e directory." ], "signature": [ "any" @@ -664,6 +664,22 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "@kbn/journeys", + "id": "def-common.JourneyConfig.getSynthtraceConfig", + "type": "Function", + "tags": [], + "label": "getSynthtraceConfig", + "description": [], + "signature": [ + "() => JourneySynthtrace | undefined" + ], + "path": "packages/kbn-journeys/journey/journey_config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index e04184db9920f..79f9a7f65a74d 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 85 | 0 | 77 | 6 | +| 86 | 0 | 78 | 6 | ## Common diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index fa759df213b55..df046d0ceec59 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-03-14 +date: 2024-03-19 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 52ebe951bd79f..ea63ce48d93e1 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-03-14 +date: 2024-03-19 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 16c456ccdc447..04467a437d8da 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-03-14 +date: 2024-03-19 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 ba27cca5caa31..22478bfa2f2ab 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-03-14 +date: 2024-03-19 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 27310a1e5127e..977cbe5c0a6ea 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-03-14 +date: 2024-03-19 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 2f7f6b3f52e66..8f86c2ef51cdb 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-03-14 +date: 2024-03-19 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 1fbf4c3a73cff..d5bcad2f08750 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-03-14 +date: 2024-03-19 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 2afcd65e6c956..62a10cce7e906 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-03-14 +date: 2024-03-19 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 745314c310931..9f6acf4ef50b2 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-03-14 +date: 2024-03-19 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 582f4ddc97f78..ccbfddb7e8f8f 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 935ed9a2d3e18..1ef80f561b6d4 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index 72e3431f9392a..603b8b3c14ff9 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index ffc4d2381a0f7..277a0bfb79e71 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 5379ede06b2c0..c809928a1e65c 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index ab622cbf4fc43..0e70755c656f7 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 85d41b1e402c4..95541ea1f2747 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 870d5000e489e..c0bb658e33f81 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; -Contact [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. +Contact [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index a3d08c8347266..b4cb79aaa99ee 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; -Contact [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. +Contact [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index c098c9f154900..e846091c325e0 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 06651602ba32b..b7976b885410f 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 4a8bd5589b548..a31612bf594a2 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 75707300e452b..ef898d70ea918 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-03-14 +date: 2024-03-19 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 92806e7e6a6be..ed7472079d434 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-03-14 +date: 2024-03-19 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 c3d942a0e51d3..5777b319e3ab2 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-03-14 +date: 2024-03-19 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 2d9aa4ed113dc..8ee998c2552e0 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_ml_cancellable_search.mdx index 4cf38f7f4f6dd..d3bbb8b5774ed 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index 67d6c52663024..1d2605077b2dc 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 7869028dbacb8..80ca517dd54ba 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index 9ed3da52686a2..7fd05bbc4e182 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index a3637203139a4..95bafdea39274 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 4901717d7f167..678ada8da92e9 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 206af9cac855e..db075b077b06c 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index a4da7e162cd69..1c0c47b9aad41 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 51db0b85707c1..84267db70e245 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 6615addc1f786..f980df33cbfb8 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index e223f7c2b1ecd..d60ef5440f36c 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 7b999c97b92a9..9d9425f74e7f0 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index c07d088dff738..50158aefbbc95 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 7a8ebdb3fb039..20bbed43294ca 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index da6bcee578767..2f2293f878eb7 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 259ddff3d8428..a6fabd8828e22 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index 9b2e8849ba2d1..72f5bb2aa5ef8 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 5edc461022701..70d446c364b4d 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 60f51c1a5a17d..ecb9ea65b1e9a 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 90eab3f56b44b..9bcd22bb28c04 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 8f40a5b448037..f7b242e519c10 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index 3b0ae203911a9..e735259eb3c91 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 765aa08bd0cd2..a29b18c0fc339 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 9c84ec70e0ebd..80db3b0585ee5 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index d045b537c7a46..d278f67c5f541 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 18b895720d07c..45f40ccc9eaf6 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index 9e9db73b0971f..2362458525f65 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-03-14 +date: 2024-03-19 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 d54fd2a6046a1..7032053fb79ea 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-03-14 +date: 2024-03-19 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 4b445aedad4b7..8907e19350086 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-03-14 +date: 2024-03-19 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 c4379f4da7c8a..2b55cabb4e51b 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-03-14 +date: 2024-03-19 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 c49ce314bdbd5..0d29a93801817 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-03-14 +date: 2024-03-19 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 ee57347a886e2..c80594d111113 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-03-14 +date: 2024-03-19 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 8be5dbb894214..765ef2de58b62 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-03-14 +date: 2024-03-19 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 b1f208dcc4418..422d2dc490b0f 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-03-14 +date: 2024-03-19 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 369b2229a3130..3dbadd7e082f8 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-03-14 +date: 2024-03-19 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 a1bfa04749f45..8d09b6c38371d 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-03-14 +date: 2024-03-19 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 76086adacabc1..6b3c3f5462754 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-03-14 +date: 2024-03-19 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 3b2c0a275c3c9..4774d2adb2593 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-03-14 +date: 2024-03-19 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 45ffd7a2b9d08..e2ea209b81139 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-03-14 +date: 2024-03-19 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 42a229f112524..08b6e8f80a9b2 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_library.mdx b/api_docs/kbn_presentation_library.mdx index 96081612e065b..fd55d752c0fe5 100644 --- a/api_docs/kbn_presentation_library.mdx +++ b/api_docs/kbn_presentation_library.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-library title: "@kbn/presentation-library" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-library plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-library'] --- import kbnPresentationLibraryObj from './kbn_presentation_library.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index a76ada0e36efb..2269fdb93fdbe 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -483,46 +483,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesLocalUnifiedSearch", - "type": "Function", - "tags": [], - "label": "apiPublishesLocalUnifiedSearch", - "description": [], - "signature": [ - "(unknownApi: unknown) => unknownApi is ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - } - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesLocalUnifiedSearch.$1", - "type": "Unknown", - "tags": [], - "label": "unknownApi", - "description": [], - "signature": [ - "unknown" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.apiPublishesPanelDescription", @@ -605,10 +565,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesPartialLocalUnifiedSearch", + "id": "def-common.apiPublishesPartialUnifiedSearch", "type": "Function", "tags": [], - "label": "apiPublishesPartialLocalUnifiedSearch", + "label": "apiPublishesPartialUnifiedSearch", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is Partial<", @@ -616,18 +576,18 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, ">" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesPartialLocalUnifiedSearch.$1", + "id": "def-common.apiPublishesPartialUnifiedSearch.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -635,7 +595,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -726,6 +686,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiPublishesUnifiedSearch", + "type": "Function", + "tags": [], + "label": "apiPublishesUnifiedSearch", + "description": [], + "signature": [ + "(unknownApi: unknown) => unknownApi is ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" + } + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.apiPublishesUnifiedSearch.$1", + "type": "Unknown", + "tags": [], + "label": "unknownApi", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.apiPublishesUnsavedChanges", @@ -810,10 +810,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritableLocalUnifiedSearch", + "id": "def-common.apiPublishesWritablePanelDescription", "type": "Function", "tags": [], - "label": "apiPublishesWritableLocalUnifiedSearch", + "label": "apiPublishesWritablePanelDescription", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is ", @@ -821,17 +821,17 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesWritableLocalUnifiedSearch", - "text": "PublishesWritableLocalUnifiedSearch" + "section": "def-common.PublishesWritablePanelDescription", + "text": "PublishesWritablePanelDescription" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritableLocalUnifiedSearch.$1", + "id": "def-common.apiPublishesWritablePanelDescription.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -839,7 +839,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -850,10 +850,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelDescription", + "id": "def-common.apiPublishesWritablePanelTitle", "type": "Function", "tags": [], - "label": "apiPublishesWritablePanelDescription", + "label": "apiPublishesWritablePanelTitle", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is ", @@ -861,17 +861,17 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesWritablePanelDescription", - "text": "PublishesWritablePanelDescription" + "section": "def-common.PublishesWritablePanelTitle", + "text": "PublishesWritablePanelTitle" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelDescription.$1", + "id": "def-common.apiPublishesWritablePanelTitle.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -879,7 +879,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -890,10 +890,10 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelTitle", + "id": "def-common.apiPublishesWritableUnifiedSearch", "type": "Function", "tags": [], - "label": "apiPublishesWritablePanelTitle", + "label": "apiPublishesWritableUnifiedSearch", "description": [], "signature": [ "(unknownApi: unknown) => unknownApi is ", @@ -901,17 +901,17 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesWritablePanelTitle", - "text": "PublishesWritablePanelTitle" + "section": "def-common.PublishesWritableUnifiedSearch", + "text": "PublishesWritableUnifiedSearch" } ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.apiPublishesWritablePanelTitle.$1", + "id": "def-common.apiPublishesWritableUnifiedSearch.$1", "type": "Unknown", "tags": [], "label": "unknownApi", @@ -919,7 +919,7 @@ "signature": [ "unknown" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -1644,191 +1644,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalFilters", - "type": "Function", - "tags": [], - "label": "useLocalFilters", - "description": [ - "\nA hook that gets this API's local filters as a reactive variable which will cause re-renders on change." - ], - "signature": [ - "(api: Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined) => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalFilters.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalQuery", - "type": "Function", - "tags": [], - "label": "useLocalQuery", - "description": [ - "\nA hook that gets this API's local query as a reactive variable which will cause re-renders on change." - ], - "signature": [ - "(api: Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined) => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalQuery.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalTimeRange", - "type": "Function", - "tags": [], - "label": "useLocalTimeRange", - "description": [ - "\nA hook that gets this API's local time range as a reactive variable which will cause re-renders on change." - ], - "signature": [ - "(api: Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined) => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useLocalTimeRange.$1", - "type": "Object", - "tags": [], - "label": "api", - "description": [], - "signature": [ - "Partial<", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - "> | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.usePanelDescription", @@ -3506,120 +3321,40 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch", + "id": "def-common.PublishesPanelDescription", "type": "Interface", "tags": [], - "label": "PublishesLocalUnifiedSearch", + "label": "PublishesPanelDescription", "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.isCompatibleWithLocalUnifiedSearch", - "type": "Function", + "id": "def-common.PublishesPanelDescription.panelDescription", + "type": "Object", "tags": [], - "label": "isCompatibleWithLocalUnifiedSearch", + "label": "panelDescription", "description": [], "signature": [ - "(() => boolean) | undefined" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.localTimeRange", - "type": "Object", - "tags": [], - "label": "localTimeRange", - "description": [], - "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; source: ", + "{ readonly value: string | undefined; source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void): Promise; (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined; pipe: { (): ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; (op1: ", + "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>): ", + "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3627,15 +3362,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3645,15 +3372,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3665,15 +3384,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3687,15 +3398,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3711,15 +3414,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3737,15 +3432,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3765,15 +3452,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -3795,219 +3474,86 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined, R>) => ", + ") => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; operator: ", + "; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>> | ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void) | undefined): ", + "> | ((value: string | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined>; }; }" + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.getFallbackTimeRange", - "type": "Function", + "id": "def-common.PublishesPanelDescription.defaultPanelDescription", + "type": "Object", "tags": [], - "label": "getFallbackTimeRange", + "label": "defaultPanelDescription", "description": [], "signature": [ - "(() => ", { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/presentation-publishing", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" }, - " | undefined) | undefined" + " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] - }, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesPanelTitle", + "type": "Interface", + "tags": [], + "label": "PublishesPanelTitle", + "description": [], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.localFilters", + "id": "def-common.PublishesPanelTitle.panelTitle", "type": "Object", "tags": [], - "label": "localFilters", + "label": "panelTitle", "description": [], "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; source: ", + "{ readonly value: string | undefined; source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void): Promise; (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined; pipe: { (): ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (op1: ", + "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>): ", + "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4015,15 +3561,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4033,15 +3571,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4053,15 +3583,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4075,15 +3597,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4099,15 +3613,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4125,15 +3631,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4153,15 +3651,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4183,259 +3673,51 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined, R>) => ", + ") => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; operator: ", + "; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>> | ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void) | undefined): ", + "> | ((value: string | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (PromiseCtor: PromiseConstructor): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined>; }; }" + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesLocalUnifiedSearch.localQuery", + "id": "def-common.PublishesPanelTitle.hidePanelTitle", "type": "Object", "tags": [], - "label": "localQuery", + "label": "hidePanelTitle", "description": [], "signature": [ - "{ readonly value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined; source: ", + "{ readonly value: boolean | undefined; source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void): Promise; (next: (value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined; pipe: { (): ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; (op1: ", + "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>): ", + "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4443,23 +3725,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4469,23 +3735,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4497,23 +3747,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4527,23 +3761,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4559,23 +3777,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4593,23 +3795,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4629,23 +3815,7 @@ "Observable", "; (op1: ", "OperatorFunction", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, A>, op2: ", + ", op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4667,183 +3837,44 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined, R>) => ", + ") => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; operator: ", + "; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>> | ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void) | undefined): ", + "> | ((value: boolean | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: boolean | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" - }, - " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" - }, - " | ", + "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesPanelTitle.defaultPanelTitle", + "type": "Object", + "tags": [], + "label": "defaultPanelTitle", + "description": [], + "signature": [ { - "pluginId": "@kbn/es-query", + "pluginId": "@kbn/presentation-publishing", "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.AggregateQuery", - "text": "AggregateQuery" + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" }, - " | undefined>; }; }" + " | undefined" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false } @@ -4852,40 +3883,104 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelDescription", + "id": "def-common.PublishesPhaseEvents", "type": "Interface", "tags": [], - "label": "PublishesPanelDescription", + "label": "PublishesPhaseEvents", "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelDescription.panelDescription", + "id": "def-common.PublishesPhaseEvents.onPhaseChange", "type": "Object", "tags": [], - "label": "panelDescription", + "label": "onPhaseChange", "description": [], "signature": [ - "{ readonly value: string | undefined; source: ", + "{ readonly value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined; source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void): Promise; (next: (value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined; pipe: { (): ", "Observable", - "; (op1: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; (op1: ", "OperatorFunction", - "): ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4893,7 +3988,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4903,7 +4006,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4915,7 +4026,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4929,7 +4048,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4945,7 +4072,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4963,7 +4098,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -4983,7 +4126,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5005,44 +4156,103 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - ") => ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "; operator: ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "> | ((value: string | undefined) => void) | undefined): ", + "<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>> | ((value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelDescription.defaultPanelDescription", - "type": "Object", - "tags": [], - "label": "defaultPanelDescription", - "description": [], - "signature": [ + "; }; toPromise: { (): Promise<", { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishingSubject", - "text": "PublishingSubject" + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" }, - " | undefined" + " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PhaseEvent", + "text": "PhaseEvent" + }, + " | undefined>; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", "deprecated": false, "trackAdoption": false } @@ -5051,21 +4261,23 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle", + "id": "def-common.PublishesSavedObjectId", "type": "Interface", "tags": [], - "label": "PublishesPanelTitle", - "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "label": "PublishesSavedObjectId", + "description": [ + "\nThis API publishes a saved object id which can be used to determine which saved object this API is linked to." + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_saved_object_id.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle.panelTitle", + "id": "def-common.PublishesSavedObjectId.savedObjectId", "type": "Object", "tags": [], - "label": "panelTitle", + "label": "savedObjectId", "description": [], "signature": [ "{ readonly value: string | undefined; source: ", @@ -5220,35 +4432,129 @@ "Subscription", "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_saved_object_id.ts", "deprecated": false, "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesUnifiedSearch", + "type": "Interface", + "tags": [], + "label": "PublishesUnifiedSearch", + "description": [], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesUnifiedSearch.isCompatibleWithUnifiedSearch", + "type": "Function", + "tags": [], + "label": "isCompatibleWithUnifiedSearch", + "description": [], + "signature": [ + "(() => boolean) | undefined" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle.hidePanelTitle", + "id": "def-common.PublishesUnifiedSearch.timeRange$", "type": "Object", "tags": [], - "label": "hidePanelTitle", + "label": "timeRange$", "description": [], "signature": [ - "{ readonly value: boolean | undefined; source: ", + "{ readonly value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined; source: ", "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: boolean | undefined) => void): Promise; (next: (value: boolean | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => boolean | undefined; pipe: { (): ", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void): Promise; (next: (value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined; pipe: { (): ", "Observable", - "; (op1: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>; (op1: ", "OperatorFunction", - "): ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5256,7 +4562,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5266,7 +4580,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5278,7 +4600,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5292,7 +4622,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5308,7 +4646,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5326,7 +4672,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5346,7 +4700,15 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5368,136 +4730,181 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - ") => ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "; operator: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "> | ((value: boolean | undefined) => void) | undefined): ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>> | ((value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: boolean | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPanelTitle.defaultPanelTitle", - "type": "Object", - "tags": [], - "label": "defaultPanelTitle", - "description": [], - "signature": [ + "; }; toPromise: { (): Promise<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishingSubject", - "text": "PublishingSubject" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" }, - " | undefined" + " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined>; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPhaseEvents", - "type": "Interface", - "tags": [], - "label": "PublishesPhaseEvents", - "description": [], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesPhaseEvents.onPhaseChange", + "id": "def-common.PublishesUnifiedSearch.filters$", "type": "Object", "tags": [], - "label": "onPhaseChange", + "label": "filters$", "description": [], "signature": [ "{ readonly value: ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined; source: ", + "[] | undefined; source: ", "Observable", " | undefined; error: (err: any) => void; forEach: { (next: (value: ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined) => void): Promise; (next: (value: ", + "[] | undefined) => void): Promise; (next: (value: ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + "[] | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined; pipe: { (): ", + "[] | undefined; pipe: { (): ", "Observable", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined>; (op1: ", + "[] | undefined>; (op1: ", "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>): ", + "[] | undefined, A>): ", "Observable", "; (op1: ", "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", @@ -5505,13 +4912,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5521,13 +4928,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5539,13 +4946,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5559,13 +4966,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5581,13 +4988,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5605,13 +5012,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5631,13 +5038,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5659,13 +5066,13 @@ "OperatorFunction", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, A>, op2: ", + "[] | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5689,145 +5096,257 @@ "Observer", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "[] | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined, R>) => ", + "[] | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" }, - " | undefined>; operator: ", + "[] | undefined>; operator: ", "Operator", " | undefined; subscribe: { (observerOrNext?: Partial<", + "Observer", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>> | ((value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined) => void) | undefined): ", + "Subscription", + "; (next?: ((value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "Subscription", + "; }; toPromise: { (): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined>; }; }" + ], + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.PublishesUnifiedSearch.query$", + "type": "Object", + "tags": [], + "label": "query$", + "description": [], + "signature": [ + "{ readonly value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined; source: ", + "Observable", + " | undefined; error: (err: any) => void; forEach: { (next: (value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined) => void): Promise; (next: (value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined> | undefined; subscribe: { (observerOrNext?: Partial<", - "Observer", + " | undefined; pipe: { (): ", + "Observable", "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - " | undefined>> | ((value: ", + " | ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined) => void) | undefined): ", - "Subscription", - "; (next?: ((value: ", + " | undefined>; (op1: ", + "OperatorFunction", + "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", - "Subscription", - "; }; toPromise: { (): Promise<", + " | ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + " | undefined, A>): ", + "Observable", + "; (op1: ", + "OperatorFunction", + "<", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" }, - " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + " | ", { - "pluginId": "@kbn/presentation-publishing", + "pluginId": "@kbn/es-query", "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PhaseEvent", - "text": "PhaseEvent" + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" }, - " | undefined>; }; }" - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_phase_events.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesSavedObjectId", - "type": "Interface", - "tags": [], - "label": "PublishesSavedObjectId", - "description": [ - "\nThis API publishes a saved object id which can be used to determine which saved object this API is linked to." - ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_saved_object_id.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesSavedObjectId.savedObjectId", - "type": "Object", - "tags": [], - "label": "savedObjectId", - "description": [], - "signature": [ - "{ readonly value: string | undefined; source: ", - "Observable", - " | undefined; error: (err: any) => void; forEach: { (next: (value: string | undefined) => void): Promise; (next: (value: string | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => string | undefined; pipe: { (): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - ", op2: ", + " | undefined, A>, op2: ", "OperatorFunction", "): ", "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5835,7 +5354,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5845,7 +5380,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5857,7 +5408,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5871,7 +5438,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5887,7 +5470,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5905,7 +5504,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5925,7 +5540,23 @@ "Observable", "; (op1: ", "OperatorFunction", - ", op2: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, A>, op2: ", "OperatorFunction", ", op3: ", "OperatorFunction", @@ -5947,23 +5578,183 @@ "Observable", "; }; complete: () => void; closed: boolean; observers: ", "Observer", - "[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", "Operator", - ") => ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined, R>) => ", "Observable", "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", "Observable", - "; operator: ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; operator: ", "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", + " | undefined; subscribe: { (observerOrNext?: Partial<", "Observer", - "> | ((value: string | undefined) => void) | undefined): ", + "<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>> | ((value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined) => void) | undefined): ", "Subscription", - "; (next?: ((value: string | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", + "; (next?: ((value: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", "Subscription", - "; }; toPromise: { (): Promise; (PromiseCtor: PromiseConstructor): Promise; (PromiseCtor: PromiseConstructorLike): Promise; }; }" + "; }; toPromise: { (): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; (PromiseCtor: PromiseConstructor): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.AggregateQuery", + "text": "AggregateQuery" + }, + " | undefined>; }; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_saved_object_id.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false } @@ -6607,90 +6398,90 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesWritableLocalUnifiedSearch", + "id": "def-common.PublishesWritablePanelDescription", "type": "Type", "tags": [], - "label": "PublishesWritableLocalUnifiedSearch", + "label": "PublishesWritablePanelDescription", "description": [], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" - }, - " & { setLocalTimeRange: (timeRange: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) => void; setLocalFilters: (filters: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[] | undefined) => void; setLocalQuery: (query: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Query", - "text": "Query" + "section": "def-common.PublishesPanelDescription", + "text": "PublishesPanelDescription" }, - " | undefined) => void; }" + " & { setPanelDescription: (newTitle: string | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_local_unified_search.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesWritablePanelDescription", + "id": "def-common.PublishesWritablePanelTitle", "type": "Type", "tags": [], - "label": "PublishesWritablePanelDescription", + "label": "PublishesWritablePanelTitle", "description": [], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelDescription", - "text": "PublishesPanelDescription" + "section": "def-common.PublishesPanelTitle", + "text": "PublishesPanelTitle" }, - " & { setPanelDescription: (newTitle: string | undefined) => void; }" + " & { setPanelTitle: (newTitle: string | undefined) => void; setHidePanelTitle: (hide: boolean | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_description.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.PublishesWritablePanelTitle", + "id": "def-common.PublishesWritableUnifiedSearch", "type": "Type", "tags": [], - "label": "PublishesWritablePanelTitle", + "label": "PublishesWritableUnifiedSearch", "description": [], "signature": [ { "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesPanelTitle", - "text": "PublishesPanelTitle" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, - " & { setPanelTitle: (newTitle: string | undefined) => void; setHidePanelTitle: (hide: boolean | undefined) => void; }" + " & { setTimeRange: (timeRange: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.TimeRange", + "text": "TimeRange" + }, + " | undefined) => void; setFilters: (filters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[] | undefined) => void; setQuery: (query: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Query", + "text": "Query" + }, + " | undefined) => void; }" ], - "path": "packages/presentation/presentation_publishing/interfaces/publishes_panel_title.ts", + "path": "packages/presentation/presentation_publishing/interfaces/publishes_unified_search.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index fc4cdd3b73943..dc8b9759d1921 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.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 | |-------------------|-----------|------------------------|-----------------| -| 156 | 0 | 120 | 3 | +| 149 | 0 | 116 | 3 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 58aa77c62634e..7205c3b59ee0b 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-03-14 +date: 2024-03-19 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 713374e4b77ef..5154d8b3f9a98 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-03-14 +date: 2024-03-19 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 5c545134e7e99..9328213c72736 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 8adb3e7a7bd37..adc64679ec97d 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-03-14 +date: 2024-03-19 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 8b769a52db6c4..5319ee4e96f7b 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-03-14 +date: 2024-03-19 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 659e5901385f7..28a033f6a6970 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-03-14 +date: 2024-03-19 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 3f77da61c7fe2..71dee48c48918 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-03-14 +date: 2024-03-19 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 bd0f46fd57b49..54e25137e2c59 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-03-14 +date: 2024-03-19 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 6534a8ed7eecc..ee43b1abc1f1a 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-03-14 +date: 2024-03-19 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 5cab1d1e272bd..317abe363f225 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-03-14 +date: 2024-03-19 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 a63781a642323..2fdec1585f720 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-03-14 +date: 2024-03-19 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 381d65a6b81b8..4b11291b75fd4 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-03-14 +date: 2024-03-19 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 c467131789fab..766ee98e140cb 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_reporting_common.devdocs.json index 650eb8ce60835..7139afb78c24e 100644 --- a/api_docs/kbn_reporting_common.devdocs.json +++ b/api_docs/kbn_reporting_common.devdocs.json @@ -1006,25 +1006,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/reporting-common", - "id": "def-common.getRedirectAppPath", - "type": "Function", - "tags": [], - "label": "getRedirectAppPath", - "description": [ - "\nA way to get the client side route for the reporting redirect app.\n\nTODO: Add a job ID and a locator to use so that we can redirect without expecting state to\nbe injected to the page" - ], - "signature": [ - "() => string" - ], - "path": "packages/kbn-reporting/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/reporting-common", "id": "def-common.numberToDuration", @@ -1123,36 +1104,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/reporting-common", - "id": "def-common.API_USAGE_COUNTER_TYPE", - "type": "string", - "tags": [], - "label": "API_USAGE_COUNTER_TYPE", - "description": [], - "signature": [ - "\"reportingApi\"" - ], - "path": "packages/kbn-reporting/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/reporting-common", - "id": "def-common.API_USAGE_ERROR_TYPE", - "type": "string", - "tags": [], - "label": "API_USAGE_ERROR_TYPE", - "description": [], - "signature": [ - "\"reportingApiError\"" - ], - "path": "packages/kbn-reporting/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/reporting-common", "id": "def-common.ILM_POLICY_NAME", @@ -1273,21 +1224,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/reporting-common", - "id": "def-common.PLUGIN_ID", - "type": "string", - "tags": [], - "label": "PLUGIN_ID", - "description": [], - "signature": [ - "\"reporting\"" - ], - "path": "packages/kbn-reporting/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/reporting-common", "id": "def-common.REPORT_TABLE_ID", @@ -1335,28 +1271,13 @@ }, { "parentPluginId": "@kbn/reporting-common", - "id": "def-common.REPORTING_REDIRECT_LOCATOR_STORE_KEY", - "type": "string", - "tags": [], - "label": "REPORTING_REDIRECT_LOCATOR_STORE_KEY", - "description": [], - "signature": [ - "\"__REPORTING_REDIRECT_LOCATOR_STORE_KEY__\"" - ], - "path": "packages/kbn-reporting/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/reporting-common", - "id": "def-common.REPORTING_SYSTEM_INDEX", + "id": "def-common.REPORTING_REDIRECT_APP", "type": "string", "tags": [], - "label": "REPORTING_SYSTEM_INDEX", + "label": "REPORTING_REDIRECT_APP", "description": [], "signature": [ - "\".reporting\"" + "\"/app/reportingRedirect\"" ], "path": "packages/kbn-reporting/common/constants.ts", "deprecated": false, @@ -1365,13 +1286,13 @@ }, { "parentPluginId": "@kbn/reporting-common", - "id": "def-common.REPORTING_TRANSACTION_TYPE", + "id": "def-common.REPORTING_REDIRECT_LOCATOR_STORE_KEY", "type": "string", "tags": [], - "label": "REPORTING_TRANSACTION_TYPE", + "label": "REPORTING_REDIRECT_LOCATOR_STORE_KEY", "description": [], "signature": [ - "\"reporting\"" + "\"__REPORTING_REDIRECT_LOCATOR_STORE_KEY__\"" ], "path": "packages/kbn-reporting/common/constants.ts", "deprecated": false, @@ -1422,21 +1343,6 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/reporting-common", - "id": "def-common.UNVERSIONED_VERSION", - "type": "string", - "tags": [], - "label": "UNVERSIONED_VERSION", - "description": [], - "signature": [ - "\"7.14.0\"" - ], - "path": "packages/kbn-reporting/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 697a6ec0d9ad3..381444b3ab857 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 102 | 0 | 91 | 13 | +| 96 | 0 | 86 | 13 | ## Common diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 48fa924c7e25c..e33f009c887ce 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-03-14 +date: 2024-03-19 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 4a78ec5bea6a8..a80deb2b2b3d5 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-03-14 +date: 2024-03-19 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 81790640a6a10..c87e80614f180 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-03-14 +date: 2024-03-19 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 2127149f9f796..f9e2dcc314218 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-03-14 +date: 2024-03-19 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 2fd179c02115d..c962c91c6592a 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-03-14 +date: 2024-03-19 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 ca70b491beb48..9acff4d60ac6f 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-03-14 +date: 2024-03-19 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 de7270428025e..5e4b205e4a41f 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-03-14 +date: 2024-03-19 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 7e6ccf7b4c1e9..483fa88b2b343 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.devdocs.json b/api_docs/kbn_reporting_server.devdocs.json index ba3aa4ff9e65d..669e6b1b6fbb3 100644 --- a/api_docs/kbn_reporting_server.devdocs.json +++ b/api_docs/kbn_reporting_server.devdocs.json @@ -1385,8 +1385,63 @@ "initialIsOpen": false } ], - "enums": [], + "enums": [ + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.EventType", + "type": "Enum", + "tags": [], + "label": "EventType", + "description": [], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.FieldType", + "type": "Enum", + "tags": [], + "label": "FieldType", + "description": [], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], "misc": [ + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.API_USAGE_COUNTER_TYPE", + "type": "string", + "tags": [], + "label": "API_USAGE_COUNTER_TYPE", + "description": [], + "signature": [ + "\"reportingApi\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.API_USAGE_ERROR_TYPE", + "type": "string", + "tags": [], + "label": "API_USAGE_ERROR_TYPE", + "description": [], + "signature": [ + "\"reportingApiError\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/reporting-server", "id": "def-server.CreateJobFn", @@ -1493,6 +1548,51 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.PLUGIN_ID", + "type": "string", + "tags": [], + "label": "PLUGIN_ID", + "description": [], + "signature": [ + "\"reporting\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.REPORTING_SYSTEM_INDEX", + "type": "string", + "tags": [], + "label": "REPORTING_SYSTEM_INDEX", + "description": [], + "signature": [ + "\".reporting\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.REPORTING_TRANSACTION_TYPE", + "type": "string", + "tags": [], + "label": "REPORTING_TRANSACTION_TYPE", + "description": [], + "signature": [ + "\"reporting\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/reporting-server", "id": "def-server.ReportingConfigType", @@ -1620,6 +1720,21 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/reporting-server", + "id": "def-server.UNVERSIONED_VERSION", + "type": "string", + "tags": [], + "label": "UNVERSIONED_VERSION", + "description": [], + "signature": [ + "\"7.14.0\"" + ], + "path": "packages/kbn-reporting/server/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [ diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 48dd688da503f..2f4a92f663cc1 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 80 | 0 | 79 | 0 | +| 88 | 0 | 87 | 0 | ## Server @@ -37,6 +37,9 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh ### Interfaces +### Enums + + ### Consts, variables and types diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index b7d6e67ad01c5..154a7c72cac67 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-03-14 +date: 2024-03-19 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 f99ccafc74145..df8577b44b137 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index a62fd3a8edfae..d8fd471a19f28 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-03-14 +date: 2024-03-19 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 e3c87a55ae86a..16f243b9a8385 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-03-14 +date: 2024-03-19 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 12b4343ecc2e9..b39e4175a23e7 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-03-14 +date: 2024-03-19 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 21eddeca3ac3b..e9b7640269000 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_search_api_panels.devdocs.json index c6fd706ade36f..0b85e3ba827ee 100644 --- a/api_docs/kbn_search_api_panels.devdocs.json +++ b/api_docs/kbn_search_api_panels.devdocs.json @@ -524,7 +524,7 @@ "label": "SelectClientPanel", "description": [], "signature": [ - "({ docLinks, children, http, isPanelLeft, overviewPanelProps, callout, }: React.PropsWithChildren<", + "({ docLinks, children, isPanelLeft, overviewPanelProps, callout, application, consolePlugin, sharePlugin, }: React.PropsWithChildren<", { "pluginId": "@kbn/search-api-panels", "scope": "common", @@ -543,7 +543,7 @@ "id": "def-common.SelectClientPanel.$1", "type": "CompoundType", "tags": [], - "label": "{\n docLinks,\n children,\n http,\n isPanelLeft = true,\n overviewPanelProps,\n callout,\n}", + "label": "{\n docLinks,\n children,\n isPanelLeft = true,\n overviewPanelProps,\n callout,\n application,\n consolePlugin,\n sharePlugin,\n}", "description": [], "signature": [ "React.PropsWithChildren<", @@ -573,7 +573,7 @@ "label": "TryInConsoleButton", "description": [], "signature": [ - "({ request, application, consolePlugin, sharePlugin, }: ", + "({ request, application, consolePlugin, sharePlugin, content, showIcon, link, }: ", { "pluginId": "@kbn/search-api-panels", "scope": "common", @@ -592,7 +592,7 @@ "id": "def-common.TryInConsoleButton.$1", "type": "Object", "tags": [], - "label": "{\n request,\n application,\n consolePlugin,\n sharePlugin,\n}", + "label": "{\n request,\n application,\n consolePlugin,\n sharePlugin,\n content,\n showIcon = true,\n link = false,\n}", "description": [], "signature": [ { @@ -1090,26 +1090,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "@kbn/search-api-panels", - "id": "def-common.SelectClientPanelProps.http", - "type": "Object", - "tags": [], - "label": "http", - "description": [], - "signature": [ - { - "pluginId": "@kbn/core-http-browser", - "scope": "common", - "docId": "kibKbnCoreHttpBrowserPluginApi", - "section": "def-common.HttpSetup", - "text": "HttpSetup" - } - ], - "path": "packages/kbn-search-api-panels/components/select_client.tsx", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "@kbn/search-api-panels", "id": "def-common.SelectClientPanelProps.isPanelLeft", @@ -1167,6 +1147,88 @@ "path": "packages/kbn-search-api-panels/components/select_client.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-api-panels", + "id": "def-common.SelectClientPanelProps.application", + "type": "Object", + "tags": [], + "label": "application", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-application-browser", + "scope": "common", + "docId": "kibKbnCoreApplicationBrowserPluginApi", + "section": "def-common.ApplicationStart", + "text": "ApplicationStart" + }, + " | undefined" + ], + "path": "packages/kbn-search-api-panels/components/select_client.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-api-panels", + "id": "def-common.SelectClientPanelProps.consolePlugin", + "type": "Object", + "tags": [], + "label": "consolePlugin", + "description": [], + "signature": [ + { + "pluginId": "console", + "scope": "public", + "docId": "kibConsolePluginApi", + "section": "def-public.ConsolePluginStart", + "text": "ConsolePluginStart" + }, + " | undefined" + ], + "path": "packages/kbn-search-api-panels/components/select_client.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-api-panels", + "id": "def-common.SelectClientPanelProps.sharePlugin", + "type": "CompoundType", + "tags": [], + "label": "sharePlugin", + "description": [], + "signature": [ + "{ toggleShareContextMenu: (options: ", + { + "pluginId": "share", + "scope": "public", + "docId": "kibSharePluginApi", + "section": "def-public.ShowShareMenuOptions", + "text": "ShowShareMenuOptions" + }, + ") => void; } & { url: ", + { + "pluginId": "share", + "scope": "public", + "docId": "kibSharePluginApi", + "section": "def-public.BrowserUrlService", + "text": "BrowserUrlService" + }, + "; navigate(options: ", + "RedirectOptions", + "<", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + }, + ">): void; }" + ], + "path": "packages/kbn-search-api-panels/components/select_client.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1189,6 +1251,9 @@ "tags": [], "label": "request", "description": [], + "signature": [ + "string | undefined" + ], "path": "packages/kbn-search-api-panels/components/try_in_console_button.tsx", "deprecated": false, "trackAdoption": false @@ -1274,6 +1339,48 @@ "path": "packages/kbn-search-api-panels/components/try_in_console_button.tsx", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-api-panels", + "id": "def-common.TryInConsoleButtonProps.content", + "type": "CompoundType", + "tags": [], + "label": "content", + "description": [], + "signature": [ + "string | React.ReactElement> | undefined" + ], + "path": "packages/kbn-search-api-panels/components/try_in_console_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-api-panels", + "id": "def-common.TryInConsoleButtonProps.showIcon", + "type": "CompoundType", + "tags": [], + "label": "showIcon", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-api-panels/components/try_in_console_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/search-api-panels", + "id": "def-common.TryInConsoleButtonProps.link", + "type": "CompoundType", + "tags": [], + "label": "link", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-search-api-panels/components/try_in_console_button.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1298,9 +1405,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 24b2663f1b345..3d78b41b0d9dd 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 76 | 0 | 76 | 0 | +| 81 | 0 | 81 | 0 | ## Common diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index f9a052b1314f7..70c5b86ce80fb 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 55a9735e1e520..043bc77ee4d8b 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-03-14 +date: 2024-03-19 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 3cf4d2ba11297..dc03ab4845886 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-03-14 +date: 2024-03-19 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 9505d8198ccb4..f589967eaf124 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index 084f63822890b..b0eccef020539 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_security_plugin_types_common.devdocs.json index 5aa76efd27dd6..ccad352a0b18e 100644 --- a/api_docs/kbn_security_plugin_types_common.devdocs.json +++ b/api_docs/kbn_security_plugin_types_common.devdocs.json @@ -31,22 +31,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -61,14 +61,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -83,14 +83,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -105,14 +105,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -125,7 +125,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -138,7 +138,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -154,7 +154,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -170,7 +170,7 @@ "description": [ "\nType and name tuple to identify provider used to authenticate user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -183,7 +183,7 @@ "description": [ "\nType of the Kibana authentication provider." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false }, @@ -196,7 +196,7 @@ "description": [ "\nName of the Kibana authentication provider (arbitrary string)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false } @@ -898,7 +898,7 @@ "description": [ "\nA set of fields describing Kibana user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -909,7 +909,7 @@ "tags": [], "label": "username", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -923,7 +923,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -937,7 +937,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -951,7 +951,7 @@ "signature": [ "readonly string[]" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -962,7 +962,7 @@ "tags": [], "label": "enabled", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -976,7 +976,7 @@ "signature": [ "{ _reserved: boolean; _deprecated?: boolean | undefined; _deprecated_reason?: string | undefined; } | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false } @@ -1293,7 +1293,7 @@ "description": [ "\nAn Elasticsearch realm that was used to resolve and authenticate the user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -1306,7 +1306,7 @@ "description": [ "\nArbitrary name of the security realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -1319,7 +1319,7 @@ "description": [ "\nType of the security realm (file, native, saml etc.)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index e66cfebc89c5c..9d26a3f05e21a 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_security_plugin_types_public.devdocs.json index e37a5f5d84829..53b647c267b51 100644 --- a/api_docs/kbn_security_plugin_types_public.devdocs.json +++ b/api_docs/kbn_security_plugin_types_public.devdocs.json @@ -27,9 +27,9 @@ "signature": [ "() => Promise<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -118,9 +118,9 @@ }, " & Pick<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index 876bbcdaa250e..9f911a153cef7 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_security_plugin_types_server.devdocs.json index 13541b8552790..ddb99a73cc172 100644 --- a/api_docs/kbn_security_plugin_types_server.devdocs.json +++ b/api_docs/kbn_security_plugin_types_server.devdocs.json @@ -1490,9 +1490,9 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 002cce7772841..a85cac3073036 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-03-14 +date: 2024-03-19 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 a10adf5626f54..025146375649e 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-03-14 +date: 2024-03-19 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 ef1358a180e14..0c6ce3979c665 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-03-14 +date: 2024-03-19 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 69b60fafe53ee..a9b29507c5695 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-03-14 +date: 2024-03-19 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 85cc0114dae8d..c216913eb4d81 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-03-14 +date: 2024-03-19 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 f842b6fc189d2..4a263b60a555c 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-03-14 +date: 2024-03-19 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 72bcd63a9e41f..f92349bcbfa98 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-03-14 +date: 2024-03-19 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 b1a1422aa8d4a..8da8ed3a93ade 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-03-14 +date: 2024-03-19 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 9b7deda9478a3..9bab656cc93db 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-03-14 +date: 2024-03-19 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 8776735ff1512..ed13e9f8b9edd 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-03-14 +date: 2024-03-19 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 3e6e285858c16..fb15272680f4b 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-03-14 +date: 2024-03-19 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 f5244d18ce78e..178edfd154164 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-03-14 +date: 2024-03-19 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 bea0dfc14a96b..4071b810cc818 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-03-14 +date: 2024-03-19 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 2cf2f11632571..d4fda4a36f43d 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-03-14 +date: 2024-03-19 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 5e5d976496096..48d75bad2fa32 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-03-14 +date: 2024-03-19 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 9386b65f03f98..9e0d2b8ef098d 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-03-14 +date: 2024-03-19 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 fc363b6e843f2..14070d78ebe86 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-03-14 +date: 2024-03-19 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 32ffcc4a7c608..271dd61e4f12e 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-03-14 +date: 2024-03-19 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 39477ebf164a2..995994c1bfae3 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-03-14 +date: 2024-03-19 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 6d0acbd0c30c5..bb59470b195a3 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-03-14 +date: 2024-03-19 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 2237aa9cc7774..70955ec873541 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-03-14 +date: 2024-03-19 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 0073f2b334668..b91ab0d27f0bc 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-03-14 +date: 2024-03-19 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 9c6e9abfab89f..e176b08f2ac96 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-03-14 +date: 2024-03-19 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 94b4a19171d4b..80b3b3d99f526 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-03-14 +date: 2024-03-19 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 0a814875bc74a..28a8500aa0953 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-03-14 +date: 2024-03-19 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 7c32b82cf4245..246274f1d9d3a 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; -Contact [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. +Contact [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index fc0429fa898b3..6e101a4da8f42 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; -Contact [@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. +Contact [@elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 50a16e6219db2..5101a7f61e20f 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-03-14 +date: 2024-03-19 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 f170204c224f5..f00d6d6b85ea4 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; -Contact [@elastic/enterprise-search-frontend @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/enterprise-search-frontend ) for questions regarding this plugin. +Contact [@elastic/enterprise-search-frontend @elastic/kibana-management](https://github.com/orgs/elastic/teams/enterprise-search-frontend ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 2cfe1315db242..ea01c8b0d20c8 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,14 +8,14 @@ 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; -Contact [@elastic/security-solution @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/security-solution ) for questions regarding this plugin. +Contact [@elastic/security-solution @elastic/kibana-management](https://github.com/orgs/elastic/teams/security-solution ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 9d1dc60ee068f..5b7e43f7af376 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-03-14 +date: 2024-03-19 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 48f6206ba57c4..28c01b8260f3c 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-03-14 +date: 2024-03-19 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 c0b28c9e27e32..1f7acd5038491 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-03-14 +date: 2024-03-19 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 dd268b8bea536..ae939296b683f 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-03-14 +date: 2024-03-19 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 a8c5560d8ece9..0d3917f717590 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-03-14 +date: 2024-03-19 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 538f01776ab8f..4e45387060e6a 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-03-14 +date: 2024-03-19 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 9c154c8d2344a..e45440d7faca4 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-03-14 +date: 2024-03-19 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 f686e93107e4c..d4ace87986378 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-03-14 +date: 2024-03-19 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 ec68127a304e6..08aae04b1f2d9 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-03-14 +date: 2024-03-19 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 0b05cdffba099..d1370b8ba4f81 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-03-14 +date: 2024-03-19 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 90b2a9d102df6..4053313eb0879 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-03-14 +date: 2024-03-19 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 efdb4de59545d..2fa04f76086ac 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-03-14 +date: 2024-03-19 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 75312e65f3c0d..b20e239e0ce30 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-03-14 +date: 2024-03-19 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 ca165663d73a3..5bf54c9bae56b 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-03-14 +date: 2024-03-19 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 c2d11431dcd24..cd800421ea7fd 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-03-14 +date: 2024-03-19 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 fcadcee9d246e..d93c4e24d1f89 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-03-14 +date: 2024-03-19 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 a16a4368b261d..4a9b708bca288 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-03-14 +date: 2024-03-19 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 7a40d1c4ae5d7..9b67d750cf6d8 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-03-14 +date: 2024-03-19 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 68f0350f2b42e..1c210008caccd 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-03-14 +date: 2024-03-19 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 0824ff2b8b78d..9e5893eae1a67 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-03-14 +date: 2024-03-19 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 a44c8cbbcf28b..05f005f37476c 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-03-14 +date: 2024-03-19 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 70ef115b3440f..b00626b1c13d5 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-03-14 +date: 2024-03-19 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 7b54efa0e7999..bf180df9f1fcb 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-03-14 +date: 2024-03-19 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 31f9a1d5d2e4c..c2f023f6b051a 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-03-14 +date: 2024-03-19 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 926b91596cbd2..df997b624bcc8 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-03-14 +date: 2024-03-19 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 ef140ee8ab8be..794ad0344b19e 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-03-14 +date: 2024-03-19 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 97d9e3ac47b7b..18812e8fa5b44 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-03-14 +date: 2024-03-19 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 ac4f5fc6aa885..8a873cd01653c 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-03-14 +date: 2024-03-19 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 e7ff1dafff85b..4b5316cce7d36 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-03-14 +date: 2024-03-19 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 982ffb65ae034..e45eb23bd63e5 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-03-14 +date: 2024-03-19 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 2f54a805171ef..65c81c1f4c2bb 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-03-14 +date: 2024-03-19 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 f58fcfc86bef2..a7571ad5b3b3f 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-03-14 +date: 2024-03-19 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 1b55763f58258..99a04f0a90356 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-03-14 +date: 2024-03-19 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 25a781503d91b..1aad56fbb3c91 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-03-14 +date: 2024-03-19 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 9d1b8e6315693..eef3828d3ddf7 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-03-14 +date: 2024-03-19 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 0d5f63a4aac5a..070177d679b0d 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-03-14 +date: 2024-03-19 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 3243404465d1f..60d0b510a32d0 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-03-14 +date: 2024-03-19 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 7a4b5963116d9..c1ad1a30c3bfb 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-03-14 +date: 2024-03-19 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 e65f28fbbce11..72037742c9f59 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-03-14 +date: 2024-03-19 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_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 0e69c220029e4..c2a28b12dd467 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-03-14 +date: 2024-03-19 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 ad405c1e806ca..1ae8770ec591c 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-03-14 +date: 2024-03-19 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.devdocs.json b/api_docs/kbn_solution_nav_es.devdocs.json new file mode 100644 index 0000000000000..ec64bd598c13e --- /dev/null +++ b/api_docs/kbn_solution_nav_es.devdocs.json @@ -0,0 +1,106 @@ +{ + "id": "@kbn/solution-nav-es", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/solution-nav-es", + "id": "def-common.definition", + "type": "Object", + "tags": [], + "label": "definition", + "description": [], + "path": "packages/solution-nav/es/definition.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/solution-nav-es", + "id": "def-common.definition.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/solution-nav/es/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-es", + "id": "def-common.definition.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "packages/solution-nav/es/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-es", + "id": "def-common.definition.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "path": "packages/solution-nav/es/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-es", + "id": "def-common.definition.homePage", + "type": "string", + "tags": [], + "label": "homePage", + "description": [], + "signature": [ + "\"dev_tools\"" + ], + "path": "packages/solution-nav/es/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-es", + "id": "def-common.definition.navigationTree$", + "type": "Object", + "tags": [], + "label": "navigationTree$", + "description": [], + "signature": [ + "Observable", + "<{ body: { type: \"navGroup\"; id: string; title: string; icon: string; defaultIsCollapsed: false; isCollapsible: false; breadcrumbStatus: \"hidden\"; children: { id: string; title: string; link: \"dev_tools:console\"; getIsActive: ({ pathNameSerialized, prepend }: { pathNameSerialized: string; location: ", + "Location", + "; prepend: (path: string) => string; }) => boolean; spaceBefore: \"m\"; }[]; }[]; }>" + ], + "path": "packages/solution-nav/es/definition.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_solution_nav_es.mdx b/api_docs/kbn_solution_nav_es.mdx new file mode 100644 index 0000000000000..27da59f7a21bd --- /dev/null +++ b/api_docs/kbn_solution_nav_es.mdx @@ -0,0 +1,30 @@ +--- +#### +#### 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: kibKbnSolutionNavEsPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-es'] +--- +import kbnSolutionNavEsObj from './kbn_solution_nav_es.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_solution_nav_oblt.devdocs.json b/api_docs/kbn_solution_nav_oblt.devdocs.json new file mode 100644 index 0000000000000..8fb82277806e8 --- /dev/null +++ b/api_docs/kbn_solution_nav_oblt.devdocs.json @@ -0,0 +1,104 @@ +{ + "id": "@kbn/solution-nav-oblt", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [ + { + "parentPluginId": "@kbn/solution-nav-oblt", + "id": "def-common.definition", + "type": "Object", + "tags": [], + "label": "definition", + "description": [], + "path": "packages/solution-nav/oblt/definition.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/solution-nav-oblt", + "id": "def-common.definition.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/solution-nav/oblt/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-oblt", + "id": "def-common.definition.title", + "type": "string", + "tags": [], + "label": "title", + "description": [], + "path": "packages/solution-nav/oblt/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-oblt", + "id": "def-common.definition.icon", + "type": "string", + "tags": [], + "label": "icon", + "description": [], + "path": "packages/solution-nav/oblt/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-oblt", + "id": "def-common.definition.homePage", + "type": "string", + "tags": [], + "label": "homePage", + "description": [], + "signature": [ + "\"discover\"" + ], + "path": "packages/solution-nav/oblt/definition.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/solution-nav-oblt", + "id": "def-common.definition.navigationTree$", + "type": "Object", + "tags": [], + "label": "navigationTree$", + "description": [], + "signature": [ + "Observable", + "<{ body: { type: \"navGroup\"; id: string; title: string; icon: string; defaultIsCollapsed: false; isCollapsible: false; breadcrumbStatus: \"hidden\"; children: { link: \"discover\"; spaceBefore: \"m\"; }[]; }[]; }>" + ], + "path": "packages/solution-nav/oblt/definition.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_solution_nav_oblt.mdx b/api_docs/kbn_solution_nav_oblt.mdx new file mode 100644 index 0000000000000..90ebf29c6a9e2 --- /dev/null +++ b/api_docs/kbn_solution_nav_oblt.mdx @@ -0,0 +1,30 @@ +--- +#### +#### 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: kibKbnSolutionNavObltPluginApi +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-03-19 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-oblt'] +--- +import kbnSolutionNavObltObj from './kbn_solution_nav_oblt.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Common + +### Objects + + diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 662c66dd6bb10..8e7b47e0d559f 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-03-14 +date: 2024-03-19 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 8cb46e2f7eac3..dcdd69df2dbe4 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-03-14 +date: 2024-03-19 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 bcf3fc716d9aa..ab1226b996b7f 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-03-14 +date: 2024-03-19 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 d3f5ce571c72b..345b736a1e0e8 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-03-14 +date: 2024-03-19 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 894fc2d6ed5b0..4589f9e7c2800 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-03-14 +date: 2024-03-19 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 23e118a4d6be1..4b155f2287ecf 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-03-14 +date: 2024-03-19 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 dcb8429cb443b..5f2db405141bb 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 1e2f0cdee7db1..99421875979e4 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index c4f93ab3013b3..d1e549d3ba1cf 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-03-14 +date: 2024-03-19 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 f25788c7d80dc..95deb8a952585 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-03-14 +date: 2024-03-19 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 ac2dc3ce96121..20daa5e6e3a5a 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-03-14 +date: 2024-03-19 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 cb6ed8f40a7ed..347385b8de342 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-03-14 +date: 2024-03-19 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 c95bf52fae79b..857683a8bab49 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-03-14 +date: 2024-03-19 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 bc57aee383aab..f249207a3c736 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-03-14 +date: 2024-03-19 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 74bb1b5e5c1a4..49d5fece4caa1 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-03-14 +date: 2024-03-19 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 ae7227d6a6c66..4489761cf9faa 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-03-14 +date: 2024-03-19 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 d704ec8a3f229..e4e0b0e400972 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-03-14 +date: 2024-03-19 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 94381ad4525e3..429f2bde9881f 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-03-14 +date: 2024-03-19 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 b9830d5563621..17a9f819ba7c0 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-03-14 +date: 2024-03-19 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.mdx b/api_docs/kbn_unified_data_table.mdx index c876eb7c52279..6339184f6ce51 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index e748951c10035..eb90934b85c65 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 0a8ebc4d2a6d4..4a8ffa2ea6faa 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-03-14 +date: 2024-03-19 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 020bc9f8aa1e1..eab8ffc586181 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-03-14 +date: 2024-03-19 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 214e8441d5433..6cabea849607e 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-03-14 +date: 2024-03-19 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 bdd864449b6ed..f871c8fc5429a 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-03-14 +date: 2024-03-19 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 c1782b8820d92..a1952d7ecc253 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-03-14 +date: 2024-03-19 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 6b0eb35b7df14..62aee8c949707 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-03-14 +date: 2024-03-19 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 1271e076cbf84..97863d041172e 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-03-14 +date: 2024-03-19 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 c9614f8cde5fb..360a20de54a95 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-03-14 +date: 2024-03-19 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 a01f0b25e3567..7754bc0e37f1a 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-03-14 +date: 2024-03-19 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 3a4eac06cdff2..e78a49d3b4284 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-03-14 +date: 2024-03-19 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 d42cf462fe7c5..2b8673851e82d 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-03-14 +date: 2024-03-19 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 a992566d54218..f3421dab522f0 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-03-14 +date: 2024-03-19 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 2bf8af5897e29..62e6d0f6c3607 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-03-14 +date: 2024-03-19 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 b7aff2e5df3b7..81a8e8e470626 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -4932,6 +4932,14 @@ "section": "def-common.PluginsServiceStart", "text": "PluginsServiceStart" }, + " | undefined; security?: ", + { + "pluginId": "@kbn/core-security-browser", + "scope": "common", + "docId": "kibKbnCoreSecurityBrowserPluginApi", + "section": "def-common.SecurityServiceStart", + "text": "SecurityServiceStart" + }, " | undefined; }" ], "path": "src/plugins/kibana_react/public/context/types.ts", diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index 8ed5cd86da985..d616195a11cd8 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-03-14 +date: 2024-03-19 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 b343fddb418e0..088eb4d2b8db9 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-03-14 +date: 2024-03-19 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 256401c66ee36..67686d548eb94 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index 0249b720ea6aa..2b0a7a454e993 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -10952,8 +10952,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & Partial<", { diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index b16bedc8ba367..0c4cfc3f036c9 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-03-14 +date: 2024-03-19 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 30769e795e018..018078dd92151 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index e5bd582bb96f2..94f1b7b99c311 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 8946f3c9774de..5b0e19049dd66 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index a1ed6e53465cd..890e94105fb1b 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-03-14 +date: 2024-03-19 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 e87f842b9022d..53f3355271ac5 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-03-14 +date: 2024-03-19 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 a030e5a1d8ae8..3b9faa647c125 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-03-14 +date: 2024-03-19 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 eccf59ec2142d..0eec298c5a0fb 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-03-14 +date: 2024-03-19 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 d4d18252eb176..43e9291d4cc32 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/maps.devdocs.json b/api_docs/maps.devdocs.json index 832647b97e456..46fa7bfaaab12 100644 --- a/api_docs/maps.devdocs.json +++ b/api_docs/maps.devdocs.json @@ -4006,8 +4006,8 @@ "pluginId": "@kbn/presentation-publishing", "scope": "common", "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.PublishesLocalUnifiedSearch", - "text": "PublishesLocalUnifiedSearch" + "section": "def-common.PublishesUnifiedSearch", + "text": "PublishesUnifiedSearch" }, " & Partial<", { diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index 1c60e1697138f..35506de546794 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index bb0021cc6cf47..afe11b081a3c2 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-03-14 +date: 2024-03-19 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 2e3b088de57fc..514afb89a444a 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-03-14 +date: 2024-03-19 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 0f21eb498b535..29f67dfc86d70 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-03-14 +date: 2024-03-19 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 22f9dde6882c8..df1eb52ef0ae2 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-03-14 +date: 2024-03-19 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 da9e103c89a02..5c359cd253275 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-03-14 +date: 2024-03-19 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 7869abd59676b..2a2d92b68323a 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.devdocs.json b/api_docs/navigation.devdocs.json index ecc60820f0485..4e3ed7bcd9564 100644 --- a/api_docs/navigation.devdocs.json +++ b/api_docs/navigation.devdocs.json @@ -47,7 +47,7 @@ "NavigationPublicStartDependencies", ">" ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -61,7 +61,7 @@ "signature": [ "any" ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -84,7 +84,7 @@ "ConfigSchema", ">" ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -117,7 +117,7 @@ "text": "NavigationPublicSetup" } ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -138,7 +138,7 @@ }, "" ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -162,7 +162,7 @@ "section": "def-common.CoreStart", "text": "CoreStart" }, - ", { unifiedSearch, cloud }: ", + ", depsStart: ", "NavigationPublicStartDependencies", ") => ", { @@ -173,7 +173,7 @@ "text": "NavigationPublicStart" } ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -193,7 +193,7 @@ "text": "CoreStart" } ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -203,12 +203,12 @@ "id": "def-public.NavigationPublicPlugin.start.$2", "type": "Object", "tags": [], - "label": "{ unifiedSearch, cloud }", + "label": "depsStart", "description": [], "signature": [ "NavigationPublicStartDependencies" ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "isRequired": true @@ -226,7 +226,7 @@ "signature": [ "() => void" ], - "path": "src/plugins/navigation/public/plugin.ts", + "path": "src/plugins/navigation/public/plugin.tsx", "deprecated": false, "trackAdoption": false, "children": [], @@ -1099,6 +1099,26 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "navigation", + "id": "def-public.NavigationPublicStart.isSolutionNavigationEnabled", + "type": "Function", + "tags": [], + "label": "isSolutionNavigationEnabled", + "description": [ + "\nUse this handler verify if the solution navigation is enabled." + ], + "signature": [ + "() => boolean" + ], + "path": "src/plugins/navigation/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [ + "true if the solution navigation is enabled, false otherwise." + ] } ], "lifecycle": "start", diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 3c1296bc22a76..d41aee195b86e 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 49 | 0 | 48 | 5 | +| 50 | 0 | 48 | 5 | ## Client diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 5fa3e83fa0bd6..f296d182f3be9 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-03-14 +date: 2024-03-19 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 347e46a6173c5..8729ec2abda56 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-03-14 +date: 2024-03-19 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 780226f523c93..7ad7c22c0b44e 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-03-14 +date: 2024-03-19 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 b5a6511f38d47..bfc14055942a1 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-03-14 +date: 2024-03-19 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 12712e215a06f..ea0f0db1e6688 100644 --- a/api_docs/observability_a_i_assistant.devdocs.json +++ b/api_docs/observability_a_i_assistant.devdocs.json @@ -237,6 +237,59 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.createScreenContextAction", + "type": "Function", + "tags": [], + "label": "createScreenContextAction", + "description": [], + "signature": [ + "(definition: TActionDefinition, respond: ", + "ScreenContextActionRespondFunction", + ") => ", + "ScreenContextActionDefinition", + "" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.createScreenContextAction.$1", + "type": "Uncategorized", + "tags": [], + "label": "definition", + "description": [], + "signature": [ + "TActionDefinition" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.createScreenContextAction.$2", + "type": "Function", + "tags": [], + "label": "respond", + "description": [], + "signature": [ + "ScreenContextActionRespondFunction", + "" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "observabilityAIAssistant", "id": "def-public.createStorybookChatService", @@ -1068,7 +1121,7 @@ "label": "complete", "description": [], "signature": [ - "(options: { screenContexts: ", + "(options: { getScreenContexts: () => ", "ObservabilityAIAssistantScreenContext", "[]; conversationId?: string | undefined; connectorId: string; messages: ", { @@ -1107,18 +1160,21 @@ "children": [ { "parentPluginId": "observabilityAIAssistant", - "id": "def-public.ObservabilityAIAssistantChatService.complete.$1.screenContexts", - "type": "Array", + "id": "def-public.ObservabilityAIAssistantChatService.complete.$1.getScreenContexts", + "type": "Function", "tags": [], - "label": "screenContexts", + "label": "getScreenContexts", "description": [], "signature": [ + "() => ", "ObservabilityAIAssistantScreenContext", "[]" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "children": [], + "returnComment": [] }, { "parentPluginId": "observabilityAIAssistant", @@ -1241,9 +1297,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]" + "[]" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", "deprecated": false, @@ -1752,9 +1806,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -1921,9 +1973,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -1947,7 +1999,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -1985,14 +2037,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -2006,7 +2062,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2266,9 +2322,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2435,9 +2489,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -2461,7 +2515,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -2499,14 +2553,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -2520,7 +2578,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2753,6 +2811,48 @@ "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantService.navigate", + "type": "Function", + "tags": [], + "label": "navigate", + "description": [], + "signature": [ + "(callback: () => void) => Promise<", + "Observable", + "<", + { + "pluginId": "observabilityAIAssistant", + "scope": "common", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-common.MessageAddEvent", + "text": "MessageAddEvent" + }, + ">>" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantService.navigate.$1", + "type": "Function", + "tags": [], + "label": "callback", + "description": [], + "signature": [ + "() => void" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false @@ -3281,9 +3381,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -3450,9 +3548,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -3476,7 +3574,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -3514,14 +3612,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -3535,7 +3637,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -3898,9 +4000,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4067,9 +4167,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -4093,7 +4193,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -4131,14 +4231,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -4152,7 +4256,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4705,6 +4809,108 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction", + "type": "Function", + "tags": [], + "label": "createScreenContextAction", + "description": [], + "signature": [ + ", \"respond\">, TResponse = ReturnOf>(definition: TActionDefinition, respond: ", + "ScreenContextActionRespondFunction", + ") => ", + "ScreenContextActionDefinition", + "" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction.$1", + "type": "Uncategorized", + "tags": [], + "label": "definition", + "description": [], + "signature": [ + "TActionDefinition" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction.$2", + "type": "Function", + "tags": [], + "label": "respond", + "description": [], + "signature": [ + "({}: { args: TResponse; signal: AbortSignal; connectorId: string; client: Pick<", + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantChatService", + "text": "ObservabilityAIAssistantChatService" + }, + ", \"complete\" | \"chat\">; messages: ", + { + "pluginId": "observabilityAIAssistant", + "scope": "common", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-common.Message", + "text": "Message" + }, + "[]; }) => Promise<", + "FunctionResponse", + ">" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "observabilityAIAssistant", + "id": "def-public.ObservabilityAIAssistantPublicStart.createScreenContextAction.$2.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ args: TArguments; signal: AbortSignal; connectorId: string; client: Pick<", + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantChatService", + "text": "ObservabilityAIAssistantChatService" + }, + ", \"complete\" | \"chat\">; messages: ", + { + "pluginId": "observabilityAIAssistant", + "scope": "common", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-common.Message", + "text": "Message" + }, + "[]; }" + ], + "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] } ], "lifecycle": "start", @@ -4973,9 +5179,7 @@ "section": "def-common.FunctionDefinition", "text": "FunctionDefinition" }, - "<", - "CompatibleJSONSchema", - ">[]; contextDefinitions: ", + "[]; contextDefinitions: ", "ContextDefinition", "[]; }>; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -5142,9 +5346,9 @@ "<", "Type", "<", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", ", unknown>>; connectorId: ", "StringC", "; persist: ", @@ -5168,7 +5372,7 @@ "text": "Message" }, "[]; screenContexts: ", - "ObservabilityAIAssistantScreenContext", + "ObservabilityAIAssistantScreenContextRequest", "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", @@ -5206,14 +5410,18 @@ "; functions: ", "ArrayC", "<", + "IntersectionC", + "<[", "TypeC", "<{ name: ", "StringC", "; description: ", "StringC", - "; parameters: ", + "; }>, ", + "PartialC", + "<{ parameters: ", "AnyC", - "; }>>; }>, ", + "; }>]>>; }>, ", "PartialC", "<{ functionCall: ", "StringC", @@ -5227,7 +5435,7 @@ "section": "def-common.Message", "text": "Message" }, - "[]; connectorId: string; functions: { name: string; description: string; parameters: any; }[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; functions: ({ name: string; description: string; } & { parameters?: any; })[]; } & { functionCall?: string | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -5894,7 +6102,7 @@ "label": "parameters", "description": [], "signature": [ - "TParameters" + "TParameters | undefined" ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts", "deprecated": false, @@ -6397,16 +6605,16 @@ "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.ChatCompletionChunkEvent", - "text": "ChatCompletionChunkEvent" + "section": "def-common.MessageAddEvent", + "text": "MessageAddEvent" }, " | ", { "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.MessageAddEvent", - "text": "MessageAddEvent" + "section": "def-common.ChatCompletionChunkEvent", + "text": "ChatCompletionChunkEvent" }, " | ", { @@ -6450,16 +6658,16 @@ "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.ChatCompletionChunkEvent", - "text": "ChatCompletionChunkEvent" + "section": "def-common.MessageAddEvent", + "text": "MessageAddEvent" }, " | ", { "pluginId": "observabilityAIAssistant", "scope": "common", "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-common.MessageAddEvent", - "text": "MessageAddEvent" + "section": "def-common.ChatCompletionChunkEvent", + "text": "ChatCompletionChunkEvent" } ], "path": "x-pack/plugins/observability_solution/observability_ai_assistant/common/conversation_complete.ts", diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 1b54dc5641c08..b1eff5b79e9d7 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 218 | 1 | 216 | 21 | +| 227 | 1 | 225 | 24 | ## Client diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index e41e11cf83850..a80ed625d8596 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 36296d9ebaf40..f291c37fa9017 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-03-14 +date: 2024-03-19 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 f0ebbc4133927..37b42dd88fbaa 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-03-14 +date: 2024-03-19 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 ecb972cb9848f..6cf9718d3b301 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 8cabd5148f016..111b680f31f88 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-03-14 +date: 2024-03-19 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 9e92390092106..096c2d40085fc 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index f164d3c7b04dc..5916a6626450c 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,20 +15,20 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 754 | 646 | 40 | +| 763 | 655 | 40 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 45798 | 233 | 34711 | 1775 | +| 45901 | 233 | 34781 | 1779 | ## Plugin Directory | Plugin name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 281 | 0 | 275 | 31 | -| | [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 2 | 0 | 2 | 0 | +| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 69 | 0 | 4 | 1 | @@ -41,7 +41,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | The Case management system in Kibana | 115 | 0 | 95 | 27 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 268 | 2 | 253 | 10 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 72 | 0 | 16 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 74 | 0 | 17 | 0 | | cloudChat | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Chat available on Elastic Cloud deployments for quicker assistance. | 0 | 0 | 0 | 0 | | | [@elastic/platform-onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Static migration page where self-managed users can see text/copy about migrating to Elastic Cloud | 8 | 0 | 8 | 1 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | Defend for containers (D4C) | 52 | 0 | 43 | 2 | @@ -49,10 +49,10 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | cloudFullStory | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | When Kibana runs on Elastic Cloud, this plugin registers FullStory as a shipper for telemetry. | 0 | 0 | 0 | 0 | | cloudLinks | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | Adds the links to the Elastic Cloud console | 0 | 0 | 0 | 0 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | The cloud security posture plugin | 14 | 0 | 2 | 2 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 32 | 0 | 24 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 32 | 0 | 24 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Content management app | 149 | 0 | 125 | 6 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Controls Plugin contains embeddable components intended to create a simple query interface for end users, and a powerful editing suite that allows dashboard authors to build controls | 340 | 0 | 332 | 20 | -| crossClusterReplication | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | +| 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 | 108 | 0 | 105 | 12 | @@ -64,16 +64,16 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | 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. | 955 | 0 | 288 | 4 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 31 | 3 | 25 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin introduces the concept of dataset quality, where users can easily get an overview on the datasets they have. | 10 | 0 | 10 | 5 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 15 | 0 | 9 | 2 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 15 | 0 | 9 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 156 | 0 | 108 | 27 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 35 | 0 | 33 | 2 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | APIs used to assess the quality of data in Elasticsearch indexes | 2 | 0 | 0 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | Server APIs for the Elastic AI Assistant | 45 | 0 | 31 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 554 | 1 | 452 | 9 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 553 | 1 | 451 | 9 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 18 | 0 | 18 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 53 | 0 | 46 | 1 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 99 | 3 | 97 | 3 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 99 | 3 | 97 | 3 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 201 | 0 | 201 | 6 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The listing page for event annotations. | 15 | 0 | 15 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 112 | 0 | 112 | 11 | @@ -97,20 +97,20 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 84 | 0 | 84 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 240 | 0 | 24 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 0 | 2 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1232 | 3 | 1113 | 56 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1233 | 3 | 1113 | 57 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 72 | 0 | 14 | 5 | | globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | | globalSearchProviders | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | | graph | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 0 | 0 | 0 | 0 | -| grokdebugger | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | +| grokdebugger | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/platform-onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 59 | 0 | 58 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 151 | 0 | 111 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 3 | 0 | 3 | 1 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 224 | 0 | 219 | 3 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 224 | 0 | 219 | 3 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 37 | 0 | 34 | 6 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | | inputControlVis | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Input Control visualization to Kibana | 0 | 0 | 0 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 127 | 2 | 100 | 4 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides UI and APIs for the interactive setup mode. | 28 | 0 | 18 | 0 | @@ -120,15 +120,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 609 | 3 | 416 | 9 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 5 | 0 | 5 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Visualization editor allowing to quickly and easily configure compelling visualizations to use on dashboards and canvas workpads. Exposes components to embed visualizations and link into the Lens editor from within other apps in Kibana. | 665 | 0 | 564 | 61 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 8 | 0 | 8 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 1 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | A dashboard panel for creating links to dashboards or external links. | 57 | 0 | 57 | 6 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 226 | 0 | 97 | 52 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogsExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 121 | 4 | 121 | 23 | | | [@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. | 302 | 0 | 276 | 32 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 45 | 0 | 45 | 7 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 45 | 0 | 45 | 7 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 264 | 0 | 263 | 28 | | | [@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 | @@ -136,27 +136,27 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 15 | 3 | 13 | 1 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 9 | 0 | 9 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 49 | 0 | 48 | 5 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 50 | 0 | 48 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [@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) | - | 651 | 2 | 642 | 17 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 218 | 1 | 216 | 21 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 227 | 1 | 225 | 24 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 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 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 14 | 0 | 14 | 0 | | | [@elastic/observability-ui](https://github.com/orgs/elastic/teams/observability-ui) | - | 330 | 1 | 325 | 20 | | | [@elastic/security-defend-workflows](https://github.com/orgs/elastic/teams/security-defend-workflows) | - | 23 | 0 | 23 | 7 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 2 | 0 | 2 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds a standardized Presentation panel which allows any forward ref component to interface with various Kibana systems. | 11 | 0 | 11 | 4 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 220 | 2 | 165 | 11 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 16 | 1 | 16 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 22 | 0 | 22 | 7 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 23 | 0 | 23 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 23 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 9 | 0 | 2 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 21 | 0 | 21 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 21 | 0 | 21 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 272 | 0 | 243 | 14 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 24 | 0 | 19 | 2 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 19 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 129 | 2 | 118 | 4 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 164 | 0 | 150 | 2 | @@ -165,7 +165,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the definition and helper methods around saved searches, used by discover and visualizations. | 79 | 0 | 78 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 0 | 13 | 0 | | | [@elastic/kibana-reporting-services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 32 | 0 | 8 | 4 | -| searchprofiler | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | +| searchprofiler | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 404 | 0 | 198 | 2 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 193 | 0 | 123 | 37 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 | @@ -175,12 +175,12 @@ 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 | 120 | 0 | 61 | 11 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 22 | 1 | 22 | 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. | 256 | 0 | 65 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 23 | 0 | 23 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 0 | | synthetics | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 108 | 0 | 64 | 5 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 104 | 0 | 61 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 45 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 31 | 0 | 26 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 1 | 0 | @@ -196,7 +196,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains services reliant on the plugin lifecycle for the unified doc viewer component (see @kbn/unified-doc-viewer). | 10 | 0 | 7 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | The `unifiedHistogram` plugin provides UI components to create a layout including a resizable histogram and a main display. | 55 | 0 | 23 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 152 | 2 | 113 | 23 | -| upgradeAssistant | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | +| upgradeAssistant | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | | urlDrilldown | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds drilldown implementations to Kibana | 0 | 0 | 0 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 12 | 0 | 12 | 0 | @@ -216,13 +216,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the vislib visualizations. These are the classical area/line/bar, gauge/goal and heatmap charts. We want to replace them with elastic-charts. | 1 | 0 | 1 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the new xy-axis chart using the elastic-charts library, which will eventually replace the vislib xy-axis charts including bar, area, and line. | 52 | 0 | 50 | 5 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the shared architecture among all the legacy visualizations, e.g. the visualization type registry or the visualization embeddable. | 841 | 12 | 810 | 19 | -| watcher | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | +| watcher | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | ## Package Directory | Package name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 11 | 5 | 11 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 11 | 5 | 11 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 5 | 0 | 5 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 35 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 20 | 0 | 0 | 0 | @@ -288,7 +288,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 200 | 0 | 97 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 204 | 0 | 99 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | @@ -330,7 +330,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 16 | 0 | 16 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 9 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 1 | 10 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 11 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 12 | 0 | | | [@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 | @@ -347,9 +347,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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) | - | 2 | 0 | 2 | 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) | - | 32 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 34 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 5 | 0 | 5 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 0 | 0 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 38 | 0 | 0 | 0 | | | [@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 | @@ -400,6 +400,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 69 | 0 | 69 | 4 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 14 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 36 | 0 | 6 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 0 | 3 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 6 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 6 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 15 | 0 | 7 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 14 | 0 | 14 | 0 | +| | [@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) | - | 12 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 21 | 0 | 20 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 20 | 0 | 3 | 0 | @@ -437,14 +444,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 6 | 0 | 6 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 5 | 0 | 5 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 5 | 0 | 5 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 40 | 0 | 29 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 8 | 0 | 8 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 8 | 0 | 8 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 8 | 0 | 8 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 8 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 1 | 9 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 102 | 0 | 86 | 0 | @@ -463,7 +470,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 3 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 263 | 1 | 202 | 15 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 32 | 0 | 32 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 25 | 0 | 25 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 17 | 0 | 15 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 39 | 0 | @@ -476,7 +483,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 31 | 0 | 31 | 1 | | | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 551 | 6 | 511 | 3 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 0 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 1 | 0 | 1 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 26 | 0 | 26 | 1 | | | [@elastic/platform-onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | - | 49 | 0 | 47 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 33 | 3 | 24 | 6 | @@ -491,7 +498,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 12 | 43 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 59 | 0 | 59 | 4 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 0 | 13 | 0 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 85 | 0 | 77 | 6 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 86 | 0 | 78 | 6 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 35 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 108 | 0 | 107 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 7 | 0 | 5 | 0 | @@ -501,18 +508,18 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 1 | 1 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 11 | 0 | 10 | 2 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 9 | 0 | 6 | 2 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 24 | 0 | 4 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 24 | 1 | 9 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 23 | 0 | 7 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 8 | 0 | 2 | 3 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 45 | 0 | 0 | 0 | -| | [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 135 | 0 | 132 | 0 | -| | [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 20 | 0 | 11 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 88 | 0 | 10 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 56 | 0 | 6 | 0 | -| | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 2 | 0 | 0 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 11 | 0 | 10 | 2 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 9 | 0 | 6 | 2 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 4 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 1 | 9 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 7 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 8 | 0 | 2 | 3 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 45 | 0 | 0 | 0 | +| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 135 | 0 | 132 | 0 | +| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 20 | 0 | 11 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 88 | 0 | 10 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 56 | 0 | 6 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 2 | 0 | 0 | 0 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 592 | 1 | 1 | 0 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 2 | 0 | 2 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 95 | 2 | 0 | 0 | @@ -558,7 +565,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 46 | 0 | 44 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 10 | 0 | 10 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 156 | 0 | 120 | 3 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 149 | 0 | 116 | 3 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 161 | 0 | 48 | 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 | @@ -572,7 +579,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 40 | 0 | 38 | 5 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 0 | 9 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 6 | 1 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 102 | 0 | 91 | 13 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 96 | 0 | 86 | 13 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 52 | 0 | 52 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 25 | 0 | 22 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 34 | 0 | 33 | 0 | @@ -581,14 +588,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 13 | 0 | 11 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 110 | 0 | 104 | 2 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 80 | 0 | 79 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 88 | 0 | 87 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | A component for creating resizable layouts containing a fixed width panel and a flexible panel, with support for horizontal and vertical layouts. | 18 | 0 | 5 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 2 | 8 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 2 | 0 | 1 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 16 | 0 | 16 | 1 | | | [@elastic/security-detections-response](https://github.com/orgs/elastic/teams/security-detections-response) | - | 123 | 0 | 120 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | -| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 76 | 0 | 76 | 0 | +| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 81 | 0 | 81 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 3177 | 0 | 3177 | 0 | | | [@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 | @@ -621,11 +628,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 48 | 0 | 43 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 62 | 0 | 58 | 1 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 31 | 0 | 30 | 1 | -| | [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | -| | [@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | +| | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | +| | [@elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 7 | 1 | -| | [@elastic/enterprise-search-frontend @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/enterprise-search-frontend ) | - | 1 | 0 | 1 | 0 | -| | [@elastic/security-solution @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/security-solution ) | - | 1 | 0 | 1 | 0 | +| | [@elastic/enterprise-search-frontend @elastic/kibana-management](https://github.com/orgs/elastic/teams/enterprise-search-frontend ) | - | 1 | 0 | 1 | 0 | +| | [@elastic/security-solution @elastic/kibana-management](https://github.com/orgs/elastic/teams/security-solution ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 0 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 2 | 2 | @@ -667,6 +674,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 15 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 16 | 0 | 6 | 0 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 165 | 0 | 165 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 20 | 0 | 12 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 102 | 2 | 65 | 1 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 2a266795e7522..35abdf35b6a01 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-03-14 +date: 2024-03-19 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 37f750f228d5d..5f211bb2a1cbb 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-03-14 +date: 2024-03-19 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 c648eabf12e7e..781ab7e164856 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-03-14 +date: 2024-03-19 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 e230e1b2d3d96..47de33181be38 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-03-14 +date: 2024-03-19 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 1bc823db93f2a..6c39c1e727638 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index 88ab92dd6bed7..5bb88e22e5323 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-03-14 +date: 2024-03-19 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 39f81cb4b3eea..016cd8e92bdb4 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 10b5b038609cf..4e7dcb9248e0a 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-03-14 +date: 2024-03-19 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 4e7855399fe2a..a5c55769e987f 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 2b0818faa9e5f..89306e1217505 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-03-14 +date: 2024-03-19 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 fa034b9adb55c..3b4634dbe11bd 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-03-14 +date: 2024-03-19 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 427f80e47ab0c..d112c2a0f2326 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-03-14 +date: 2024-03-19 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 070203d393777..01c198d7f2425 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-03-14 +date: 2024-03-19 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 120e731b7390d..38847ce423113 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 8baf2ceef750e..46cf487b16e9e 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-03-14 +date: 2024-03-19 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 715e7300549d7..8e1f8e1d2b242 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-03-14 +date: 2024-03-19 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 3805f08ca9044..a3ca9f829f402 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 338ba677b1ad2..4896f68d424a5 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -15,22 +15,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -45,14 +45,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -67,14 +67,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -89,14 +89,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -109,7 +109,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -122,7 +122,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -138,7 +138,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -168,9 +168,9 @@ "signature": [ "() => Promise<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -223,9 +223,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" } @@ -257,9 +257,9 @@ "description": [], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" } @@ -2649,22 +2649,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2679,14 +2679,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2701,14 +2701,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2723,14 +2723,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2743,7 +2743,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2756,7 +2756,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -2772,7 +2772,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -2830,9 +2830,9 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -5299,9 +5299,9 @@ }, ") => ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -5633,22 +5633,22 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -5663,14 +5663,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5685,14 +5685,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.UserRealm", "text": "UserRealm" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5707,14 +5707,14 @@ ], "signature": [ { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticationProvider", "text": "AuthenticationProvider" } ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5727,7 +5727,7 @@ "description": [ "\nThe AuthenticationType used by ES to authenticate the user.\n" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5740,7 +5740,7 @@ "description": [ "\nIndicates whether user is authenticated via Elastic Cloud built-in SAML realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -5756,7 +5756,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } @@ -5772,7 +5772,7 @@ "description": [ "\nType and name tuple to identify provider used to authenticate user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -5785,7 +5785,7 @@ "description": [ "\nType of the Kibana authentication provider." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false }, @@ -5798,7 +5798,7 @@ "description": [ "\nName of the Kibana authentication provider (arbitrary string)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authentication_provider.ts", + "path": "packages/core/security/core-security-common/src/authentication/authentication_provider.ts", "deprecated": false, "trackAdoption": false } @@ -5864,9 +5864,9 @@ }, " extends ", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.User", "text": "User" } @@ -6053,9 +6053,9 @@ }, " & Pick<", { - "pluginId": "@kbn/security-plugin-types-common", + "pluginId": "@kbn/core-security-common", "scope": "common", - "docId": "kibKbnSecurityPluginTypesCommonPluginApi", + "docId": "kibKbnCoreSecurityCommonPluginApi", "section": "def-common.AuthenticatedUser", "text": "AuthenticatedUser" }, @@ -7067,7 +7067,7 @@ "description": [ "\nA set of fields describing Kibana user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -7078,7 +7078,7 @@ "tags": [], "label": "username", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7092,7 +7092,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7106,7 +7106,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7120,7 +7120,7 @@ "signature": [ "readonly string[]" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7131,7 +7131,7 @@ "tags": [], "label": "enabled", "description": [], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false }, @@ -7145,7 +7145,7 @@ "signature": [ "{ _reserved: boolean; _deprecated?: boolean | undefined; _deprecated_reason?: string | undefined; } | undefined" ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/user.ts", + "path": "packages/core/security/core-security-common/src/authentication/user.ts", "deprecated": false, "trackAdoption": false } @@ -7462,7 +7462,7 @@ "description": [ "\nAn Elasticsearch realm that was used to resolve and authenticate the user." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -7475,7 +7475,7 @@ "description": [ "\nArbitrary name of the security realm." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false }, @@ -7488,7 +7488,7 @@ "description": [ "\nType of the security realm (file, native, saml etc.)." ], - "path": "x-pack/packages/security/plugin_types_common/src/authentication/authenticated_user.ts", + "path": "packages/core/security/core-security-common/src/authentication/authenticated_user.ts", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/security.mdx b/api_docs/security.mdx index ff3879a505ff2..6c930239cc47f 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index b36793fdbbfd7..5d43bd50b917f 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-03-14 +date: 2024-03-19 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 8c5b1e9327508..572c69d887bb0 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-03-14 +date: 2024-03-19 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 8b4bfac09c133..03710fb9b71ae 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-03-14 +date: 2024-03-19 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 3aa05dc5085ae..0b3adeca27fc5 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-03-14 +date: 2024-03-19 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 e9565e65c6e64..90062b5d945be 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-03-14 +date: 2024-03-19 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 40416cef52276..8ae2cbdc1f827 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-03-14 +date: 2024-03-19 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 167a7a5540820..9ad9cfd238381 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-03-14 +date: 2024-03-19 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 1c2186eb9ecd5..7502d70f7b08f 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index a949c54ab5fa2..efe6b0dd572fd 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; -Contact [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) for questions regarding this plugin. +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index 139b10f72e7c4..026482a48912d 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-03-14 +date: 2024-03-19 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 960bfb8a82e24..811ba8c6c735c 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-03-14 +date: 2024-03-19 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 dc00600a47ff2..6658a8544f8f6 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.devdocs.json b/api_docs/task_manager.devdocs.json index fd3ad76b48311..ae929b293a877 100644 --- a/api_docs/task_manager.devdocs.json +++ b/api_docs/task_manager.devdocs.json @@ -336,46 +336,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.createSkipError", - "type": "Function", - "tags": [], - "label": "createSkipError", - "description": [], - "signature": [ - "(error: Error) => ", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.DecoratedError", - "text": "DecoratedError" - } - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "taskManager", - "id": "def-server.createSkipError.$1", - "type": "Object", - "tags": [], - "label": "error", - "description": [], - "signature": [ - "Error" - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "taskManager", "id": "def-server.createTaskRunError", @@ -481,54 +441,6 @@ "returnComment": [], "initialIsOpen": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.isSkipError", - "type": "Function", - "tags": [], - "label": "isSkipError", - "description": [], - "signature": [ - "(error: Error | ", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.DecoratedError", - "text": "DecoratedError" - }, - ") => boolean" - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "taskManager", - "id": "def-server.isSkipError.$1", - "type": "CompoundType", - "tags": [], - "label": "error", - "description": [], - "signature": [ - "Error | ", - { - "pluginId": "taskManager", - "scope": "server", - "docId": "kibTaskManagerPluginApi", - "section": "def-server.DecoratedError", - "text": "DecoratedError" - } - ], - "path": "x-pack/plugins/task_manager/server/task_running/errors.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true - } - ], - "returnComment": [], - "initialIsOpen": false - }, { "parentPluginId": "taskManager", "id": "def-server.isUnrecoverableError", @@ -783,6 +695,23 @@ "trackAdoption": false, "references": [] }, + { + "parentPluginId": "taskManager", + "id": "def-server.ConcreteTaskInstance.numSkippedRuns", + "type": "number", + "tags": [ + "deprecated" + ], + "label": "numSkippedRuns", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/task_manager/server/task.ts", + "deprecated": true, + "trackAdoption": false, + "references": [] + }, { "parentPluginId": "taskManager", "id": "def-server.ConcreteTaskInstance.version", @@ -1363,22 +1292,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.TaskInstance.numSkippedRuns", - "type": "number", - "tags": [], - "label": "numSkippedRuns", - "description": [ - "\nIndicates the number of skipped executions." - ], - "signature": [ - "number | undefined" - ], - "path": "x-pack/plugins/task_manager/server/task.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "taskManager", "id": "def-server.TaskInstance.timeoutOverride", diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 24215271d95f9..42ce1e5098c6b 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 108 | 0 | 64 | 5 | +| 104 | 0 | 61 | 5 | ## Server diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index e153126e4e543..5848ca055885f 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-03-14 +date: 2024-03-19 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 e3d0cec42c3c6..3c21bf8a0b4f8 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-03-14 +date: 2024-03-19 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 afac70ef7e8fc..458ea6f53d9aa 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-03-14 +date: 2024-03-19 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 3878b6e5edb82..4860926c206d9 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-03-14 +date: 2024-03-19 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 6a671eb976c69..3460d5d0e11a6 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-03-14 +date: 2024-03-19 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 03d72d59d2170..7ab7701c7e2de 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 7350e95bd0a9f..5f3c0958175eb 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index da5a153bd624d..fd418ba38e6af 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-03-14 +date: 2024-03-19 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 32dcf41adbd0a..5389a3c55f646 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-03-14 +date: 2024-03-19 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 92ac05f60b2ba..abc011ab5f8c9 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-03-14 +date: 2024-03-19 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 b26f37372e041..9bfa9add57520 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-03-14 +date: 2024-03-19 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 501825fe58d6b..37c2c95bc2f2a 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-03-14 +date: 2024-03-19 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 8fa88930c0561..a79f43d88b53f 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 0916dfcec266e..edf647637845f 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-03-14 +date: 2024-03-19 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 65a559a5af1c1..a69a1a129469a 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-03-14 +date: 2024-03-19 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 89a09945da493..cac5fa5b0f7f5 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-03-14 +date: 2024-03-19 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 99176a0f206e9..f939b40777660 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-03-14 +date: 2024-03-19 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 ec5d85cff2ddc..2b453693627c5 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-03-14 +date: 2024-03-19 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 ebaf9bfcd124f..357c2b393344d 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-03-14 +date: 2024-03-19 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 ea7fa3f4a46d8..e4c1a437a5684 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-03-14 +date: 2024-03-19 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 993c72caf8392..ec261e82bbd1f 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-03-14 +date: 2024-03-19 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 6648b2f792383..c9f5948dd27cb 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-03-14 +date: 2024-03-19 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 b69e075b13f6a..1fad275e0ea16 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-03-14 +date: 2024-03-19 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 29a9117a22451..571d23d87ec7f 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-03-14 +date: 2024-03-19 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 750961c2e8073..8d83f98d6286e 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-03-14 +date: 2024-03-19 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 053b0a14b5e4d..96947491ad89c 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-03-14 +date: 2024-03-19 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 758dc642e7c49..d971bf762be3a 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-03-14 +date: 2024-03-19 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 b8a3a5738a9e1..19a16f8a3009c 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-03-14 +date: 2024-03-19 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 f41e852b20eae..003fc6cafc937 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index 4d2f5f9c25b49..f4bc522911136 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -6904,7 +6904,7 @@ "section": "def-common.PublishingSubject", "text": "PublishingSubject" }, - "; localTimeRange: ", + "; timeRange$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6920,7 +6920,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined>; setLocalTimeRange: (timeRange: ", + " | undefined>; setTimeRange: (timeRange: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -6928,15 +6928,7 @@ "section": "def-common.TimeRange", "text": "TimeRange" }, - " | undefined) => void; getFallbackTimeRange: (() => ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.TimeRange", - "text": "TimeRange" - }, - " | undefined) | undefined; isCompatibleWithLocalUnifiedSearch: (() => boolean) | undefined; canLinkToLibrary: (() => Promise) | undefined; linkToLibrary: (() => Promise) | undefined; canUnlinkFromLibrary: (() => Promise) | undefined; unlinkFromLibrary: (() => Promise) | undefined; viewMode: ", + " | undefined) => void; isCompatibleWithUnifiedSearch: (() => boolean) | undefined; canLinkToLibrary: (() => Promise) | undefined; linkToLibrary: (() => Promise) | undefined; canUnlinkFromLibrary: (() => Promise) | undefined; unlinkFromLibrary: (() => Promise) | undefined; viewMode: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6968,7 +6960,7 @@ "section": "def-public.VisualizeInput", "text": "VisualizeInput" }, - "; getDescription: () => string; localFilters: ", + "; getDescription: () => string; filters$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", @@ -6984,7 +6976,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[] | undefined>; localQuery: ", + "[] | undefined>; query$: ", { "pluginId": "@kbn/presentation-publishing", "scope": "common", diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 3879bf9381888..d229b6386d4dc 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-03-14 +date: 2024-03-19 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/config/serverless.oblt.yml b/config/serverless.oblt.yml index f011e198f5208..a2e7d8d4eeb97 100644 --- a/config/serverless.oblt.yml +++ b/config/serverless.oblt.yml @@ -7,11 +7,14 @@ xpack.infra.enabled: true xpack.uptime.enabled: true xpack.securitySolution.enabled: false +## Enable the slo plugin +xpack.slo.enabled: true + ## Cloud settings xpack.cloud.serverless.project_type: observability ## Enable the Serverless Observability plugin -xpack.serverless.observability.enabled: true +xpack.serverless.observability.enabled: true ## Configure plugins diff --git a/dev_docs/tutorials/performance/adding_performance_journey.mdx b/dev_docs/tutorials/performance/adding_performance_journey.mdx index 77bb7d6f39e53..2f7f37452c285 100644 --- a/dev_docs/tutorials/performance/adding_performance_journey.mdx +++ b/dev_docs/tutorials/performance/adding_performance_journey.mdx @@ -8,6 +8,7 @@ tags: ['kibana', 'onboarding', 'setup', 'performance', 'development'] --- ## Overview + In order to achieve our goal of creating best user experience in Kibana, it is important to keep track on its features performance. To make things easier, we introduced performance journeys, that mimics end-user experience with Kibana. @@ -19,11 +20,12 @@ Journeys core is [kbn-journeys](packages/kbn-journeys/README.mdx) package. It is by [Playwright](https://playwright.dev/) end-to-end testing tool. ### Adding a new performance journey + Let's assume we instrumented dashboard with load time metrics and want to track sample data flights dashboard performance. Journey supports loading test data with esArchiver or kbnArchiver. Similar to functional tests, it might require to implement custom wait for UI rendering to be completed. -Simply create a new file in `x-pack/performance/journeys` with the following code: +Simply create a new file in `x-pack/performance/journeys_e2e` with the following code: ``` export const journey = new Journey({ @@ -42,18 +44,36 @@ export const journey = new Journey({ }); ``` +Alternative to archives is to use Synthtrace ES client: + +``` +export const journey = new Journey({ + synthtrace: { + type: 'apm', + generator: generateApmData, + options: { + from: new Date(Date.now() - 1000 * 60 * 15), + to: new Date(Date.now() + 1000 * 60 * 15), + }, + }, +}) +``` + In oder to get correct and consistent metrics, it is important to design journey properly: -- use archives to generate test data + +- use archives or synthtrace to generate test data - decouple complex scenarios into multiple simple journeys - use waiting for page loading / UI component rendering - test locally and check if journey is stable. - make sure performance metrics are collected on every run. ### Running performance journey locally for troubleshooting purposes + Use the Node script: - `node scripts/run_performance.js --journey-path x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts` +`node scripts/run_performance.js --journey-path x-pack/performance/journeys_e2e/$YOUR_JOURNEY_NAME.ts` Scripts steps include: + - start Elasticsearch - start Kibana and run journey first time (warmup) only APM metrics being reported - start Kibana and run journey second time (test): both EBT and APM metrics being reported @@ -65,6 +85,7 @@ Since the tests are run on a local machine, there is also realistic throttling a simulate real life internet connection. This means that all requests have a fixed latency and limited bandwidth. ### Benchmarking performance on CI + In order to keep track on performance metrics stability, journeys are run on main branch with a scheduled interval. Bare metal machine is used to produce results as stable and reproducible as possible. @@ -77,9 +98,8 @@ RAM: 128 GB SSD: 1.92 TB Data center Gen4 NVMe #### Track performance results + APM metrics are reported to [kibana-ops-e2e-perf](https://kibana-ops-e2e-perf.kb.us-central1.gcp.cloud.es.io/) cluster. You can filter transactions using labels, e.g. `labels.journeyName : "flight_dashboard"` Custom metrics reported with EBT are available in [Telemetry Staging](https://telemetry-v2-staging.elastic.dev/) cluster, `kibana-performance` space. - - diff --git a/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx b/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx index 6ab160ac93328..4711984dd247a 100644 --- a/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx +++ b/dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx @@ -108,7 +108,7 @@ export TEST_CLOUD=1 Run your journey with the command: ``` -node scripts/functional_test_runner.js --config x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts` +node scripts/functional_test_runner.js --config x-pack/performance/journeys_e2e/$YOUR_JOURNEY_NAME.ts` ``` APM & Telemetry labels will be updated on the fly and metrics/traces should be available in Telemetry Staging and kibana-ops-e2e-perf cluster. diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index f8c4e8644e5d0..241dcd5f73648 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -794,6 +794,10 @@ It leverages universal configuration and other APIs in the serverless plugin to |Session View is meant to provide a visualization into what is going on in a particular Linux environment where the agent is running. It looks likes a terminal emulator; however, it is a tool for introspecting process activity and understanding user and service behaviour in your Linux servers and infrastructure. It is a time-ordered series of process executions displayed in a tree over time. +|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/slo/README.md[slo] +|A Kibana plugin + + |{kib-repo}blob/{branch}/x-pack/plugins/snapshot_restore/README.md[snapshotRestore] |or diff --git a/package.json b/package.json index 161bf56a9e883..77731b36c08d4 100644 --- a/package.json +++ b/package.json @@ -143,6 +143,7 @@ "@kbn/ai-assistant-management-plugin": "link:src/plugins/ai_assistant_management/selection", "@kbn/aiops-components": "link:x-pack/packages/ml/aiops_components", "@kbn/aiops-plugin": "link:x-pack/plugins/aiops", + "@kbn/aiops-test-utils": "link:x-pack/packages/ml/aiops_test_utils", "@kbn/aiops-utils": "link:x-pack/packages/ml/aiops_utils", "@kbn/alerting-api-integration-test-plugin": "link:x-pack/test/alerting_api_integration/common/plugins/alerts", "@kbn/alerting-example-plugin": "link:x-pack/examples/alerting_example", @@ -784,8 +785,11 @@ "@kbn/shared-ux-storybook-config": "link:packages/shared-ux/storybook/config", "@kbn/shared-ux-storybook-mock": "link:packages/shared-ux/storybook/mock", "@kbn/shared-ux-utility": "link:packages/kbn-shared-ux-utility", + "@kbn/slo-plugin": "link:x-pack/plugins/observability_solution/slo", "@kbn/slo-schema": "link:x-pack/packages/kbn-slo-schema", "@kbn/snapshot-restore-plugin": "link:x-pack/plugins/snapshot_restore", + "@kbn/solution-nav-es": "link:packages/solution-nav/es", + "@kbn/solution-nav-oblt": "link:packages/solution-nav/oblt", "@kbn/sort-predicates": "link:packages/kbn-sort-predicates", "@kbn/spaces-plugin": "link:x-pack/plugins/spaces", "@kbn/spaces-test-plugin": "link:x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin", @@ -910,7 +914,6 @@ "@turf/helpers": "6.0.1", "@turf/length": "^6.0.2", "@xstate/react": "^3.2.2", - "JSONStream": "1.3.5", "adm-zip": "^0.5.9", "ajv": "^8.12.0", "ansi-regex": "^6.0.1", @@ -974,7 +977,6 @@ "font-awesome": "4.7.0", "formik": "^2.4.5", "fp-ts": "^2.3.1", - "geojson-vt": "^3.2.1", "get-port": "^5.0.0", "getopts": "^2.2.5", "getos": "^3.1.0", @@ -1018,7 +1020,6 @@ "load-json-file": "^6.2.0", "lodash": "^4.17.21", "lru-cache": "^4.1.5", - "luxon": "^2.5.2", "lz-string": "^1.4.4", "mapbox-gl-draw-rectangle-mode": "1.0.4", "maplibre-gl": "3.1.0", @@ -1028,7 +1029,6 @@ "mime": "^2.4.4", "mime-types": "^2.1.27", "minimatch": "^3.1.2", - "mocha-multi-reporters": "^1.5.1", "moment": "^2.29.4", "moment-duration-format": "^2.3.2", "moment-timezone": "^0.5.43", @@ -1054,7 +1054,6 @@ "pdfjs-dist": "^2.13.216", "pdfmake": "^0.2.7", "peggy": "^1.2.0", - "pluralize": "3.1.0", "polished": "^3.7.2", "pretty-ms": "6.0.0", "prop-types": "^15.8.1", @@ -1066,7 +1065,6 @@ "re2": "1.20.9", "react": "^17.0.2", "react-ace": "^7.0.5", - "react-color": "^2.13.8", "react-diff-view": "^3.2.0", "react-dom": "^17.0.2", "react-dropzone": "^4.2.9", @@ -1076,7 +1074,6 @@ "react-intl": "^2.8.0", "react-is": "^17.0.2", "react-markdown": "^6.0.3", - "react-moment-proptypes": "^1.7.0", "react-monaco-editor": "^0.54.0", "react-popper-tooltip": "^3.1.1", "react-recompose": "^0.33.0", @@ -1335,12 +1332,10 @@ "@kbn/yarn-lock-validator": "link:packages/kbn-yarn-lock-validator", "@mapbox/vector-tile": "1.3.1", "@octokit/rest": "^16.35.0", - "@openpgp/web-stream-tools": "^0.0.10", "@parcel/watcher": "^2.1.0", "@redocly/cli": "^1.6.0", "@storybook/addon-a11y": "^6.5.16", "@storybook/addon-actions": "^6.5.16", - "@storybook/addon-controls": "^6.5.16", "@storybook/addon-docs": "^6.5.16", "@storybook/addon-essentials": "^6.5.16", "@storybook/addon-knobs": "^6.4.0", @@ -1390,7 +1385,6 @@ "@types/dagre": "^0.7.47", "@types/dedent": "^0.7.0", "@types/deep-freeze-strict": "^1.1.0", - "@types/delete-empty": "^2.0.0", "@types/diff": "^5.0.8", "@types/ejs": "^3.0.6", "@types/enzyme": "^3.10.12", @@ -1494,7 +1488,6 @@ "@types/supertest": "^2.0.12", "@types/tapable": "^1.0.6", "@types/tar": "^6.1.5", - "@types/tempy": "^0.2.0", "@types/testing-library__jest-dom": "^5.14.7", "@types/textarea-caret": "^3.0.1", "@types/tinycolor2": "^1.4.1", @@ -1540,7 +1533,6 @@ "cli-progress": "^3.12.0", "cli-table3": "^0.6.1", "content-security-policy-parser": "^0.6.0", - "copy-webpack-plugin": "^6.0.2", "cpy": "^8.1.1", "css-loader": "^3.4.2", "cssnano": "^5.1.12", @@ -1554,15 +1546,12 @@ "cypress-recurse": "^1.35.2", "date-fns": "^2.29.3", "debug": "^2.6.9", - "delete-empty": "^2.0.0", "dependency-check": "^4.1.0", - "dpdm": "3.9.0", "ejs": "^3.1.8", "enzyme": "^3.11.0", "enzyme-to-json": "^3.6.2", "eslint": "^8.46.0", "eslint-config-prettier": "^9.0.0", - "eslint-module-utils": "^2.8.0", "eslint-plugin-ban": "^1.6.0", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-eslint-comments": "^3.2.0", @@ -1588,15 +1577,12 @@ "geckodriver": "^4.3.3", "gulp-brotli": "^3.0.0", "gulp-postcss": "^9.0.1", - "gulp-sourcemaps": "2.6.5", "gulp-terser": "^2.1.0", "has-ansi": "^3.0.0", - "hdr-histogram-js": "^1.2.0", "html": "1.0.0", "html-loader": "^1.3.2", "http-proxy": "^1.18.1", "ignore": "^5.3.0", - "is-path-inside": "^3.0.2", "jest": "^29.6.1", "jest-axe": "^5.0.0", "jest-canvas-mock": "^2.5.2", @@ -1655,7 +1641,6 @@ "q": "^1.5.1", "raw-loader": "^3.1.0", "react-test-renderer": "^17.0.2", - "react-textarea-autosize": "^8.3.4", "regenerate": "^1.4.0", "resolve": "^1.22.0", "rxjs-marbles": "^7.0.1", @@ -1667,18 +1652,15 @@ "sinon": "^7.4.2", "sort-package-json": "^1.53.1", "source-map": "^0.7.4", - "spec-change": "^1.7.1", "string-replace-loader": "^2.2.0", "style-loader": "^1.1.3", "stylelint": "^14.9.1", "stylelint-scss": "^4.3.0", "superagent": "^8.1.2", "supertest": "^6.3.3", - "supports-color": "^7.0.0", "svgo": "^2.8.0", "table": "^6.8.1", "tape": "^5.0.1", - "tempy": "^0.3.0", "terser": "^5.29.1", "terser-webpack-plugin": "^4.2.3", "tough-cookie": "^4.1.3", diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index e00afdf7ee833..0e248a069e326 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -34,7 +34,6 @@ import type { ChromeSetProjectBreadcrumbsParams, NavigationTreeDefinition, AppDeepLinkId, - CloudURLs, } from '@kbn/core-chrome-browser'; import type { CustomBrandingStart } from '@kbn/core-custom-branding-browser'; import type { @@ -213,6 +212,7 @@ export class ChromeService { }; const setChromeStyle = (style: ChromeStyle) => { + if (style === chromeStyle$.getValue()) return; chromeStyle$.next(style); }; @@ -283,12 +283,9 @@ export class ChromeService { LinkId extends AppDeepLinkId = AppDeepLinkId, Id extends string = string, ChildrenId extends string = Id - >( - navigationTree$: Observable>, - deps: { cloudUrls: CloudURLs } - ) { + >(navigationTree$: Observable>) { validateChromeStyle(); - projectNavigation.initNavigation(navigationTree$, deps); + projectNavigation.initNavigation(navigationTree$); } const setProjectBreadcrumbs = ( @@ -303,21 +300,11 @@ export class ChromeService { projectNavigation.setProjectHome(homeHref); }; - const setProjectsUrl = (projectsUrl: string) => { - validateChromeStyle(); - projectNavigation.setProjectsUrl(projectsUrl); - }; - const setProjectName = (projectName: string) => { validateChromeStyle(); projectNavigation.setProjectName(projectName); }; - const setProjectUrl = (projectUrl: string) => { - validateChromeStyle(); - projectNavigation.setProjectUrl(projectUrl); - }; - const isIE = () => { const ua = window.navigator.userAgent; const msie = ua.indexOf('MSIE '); // IE 10 or older @@ -543,8 +530,7 @@ export class ChromeService { getIsSideNavCollapsed$: () => this.isSideNavCollapsed$.asObservable(), project: { setHome: setProjectHome, - setProjectsUrl, - setProjectUrl, + setCloudUrls: projectNavigation.setCloudUrls.bind(projectNavigation), setProjectName, initNavigation: initProjectNavigation, getNavigationTreeUi$: () => projectNavigation.getNavigationTreeUi$(), 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 089613939c833..39a7a25424d6f 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 @@ -6,37 +6,49 @@ * Side Public License, v 1. */ +import React from 'react'; import { EuiContextMenuPanel, EuiContextMenuItem } from '@elastic/eui'; -import { +import type { AppDeepLinkId, ChromeProjectBreadcrumb, ChromeProjectNavigationNode, ChromeSetProjectBreadcrumbsParams, ChromeBreadcrumb, + SolutionNavigationDefinitions, + CloudLinks, } from '@kbn/core-chrome-browser'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import React from 'react'; + +import { getSolutionNavSwitcherBreadCrumb } from '../ui/solution_nav_switcher_breadcrumbs'; export function buildBreadcrumbs({ - projectsUrl, projectName, - projectUrl, + cloudLinks, projectBreadcrumbs, activeNodes, chromeBreadcrumbs, + solutionNavigations, }: { - projectsUrl?: string; projectName?: string; - projectUrl?: string; projectBreadcrumbs: { breadcrumbs: ChromeProjectBreadcrumb[]; params: ChromeSetProjectBreadcrumbsParams; }; chromeBreadcrumbs: ChromeBreadcrumb[]; + cloudLinks: CloudLinks; activeNodes: ChromeProjectNavigationNode[][]; + solutionNavigations?: { + definitions: SolutionNavigationDefinitions; + activeId: string; + onChange: (id: string, options?: { redirect?: boolean }) => void; + }; }): ChromeProjectBreadcrumb[] { - const rootCrumb = buildRootCrumb({ projectsUrl, projectName, projectUrl }); + const rootCrumb = buildRootCrumb({ + projectName, + solutionNavigations, + cloudLinks, + }); if (projectBreadcrumbs.params.absolute) { return [rootCrumb, ...projectBreadcrumbs.breadcrumbs]; @@ -86,14 +98,30 @@ export function buildBreadcrumbs({ } function buildRootCrumb({ - projectsUrl, projectName, - projectUrl, + solutionNavigations, + cloudLinks, }: { - projectsUrl?: string; projectName?: string; - projectUrl?: string; + cloudLinks: CloudLinks; + solutionNavigations?: { + definitions: SolutionNavigationDefinitions; + activeId: string; + onChange: (id: string, options?: { redirect?: boolean }) => void; + }; }): ChromeProjectBreadcrumb { + if (solutionNavigations) { + // if there are solution navigations, it means that we are in Kibana stateful and not + // in serverless with projects. + const { definitions, activeId, onChange } = solutionNavigations; + return getSolutionNavSwitcherBreadCrumb({ + definitions, + onChange, + activeId, + cloudLinks, + }); + } + return { text: projectName ?? @@ -106,13 +134,13 @@ function buildRootCrumb({ + , - + { }; const parseCloudURLs = (cloudLinks: CloudLinks): CloudLinks => { - const { userAndRoles, billingAndSub, deployment, performance } = cloudLinks; + const { userAndRoles, billingAndSub, deployment, deployments, performance } = cloudLinks; // We remove potential trailing forward slash ("/") at the end of the URL // because it breaks future navigation in Cloud console once we navigate there. @@ -27,12 +27,20 @@ const parseCloudURLs = (cloudLinks: CloudLinks): CloudLinks => { userAndRoles: parseLink(userAndRoles), billingAndSub: parseLink(billingAndSub), deployment: parseLink(deployment), + deployments: parseLink(deployments), performance: parseLink(performance), }; }; export const getCloudLinks = (cloud: CloudURLs): CloudLinks => { - const { billingUrl, deploymentUrl, performanceUrl, usersAndRolesUrl } = cloud; + const { + billingUrl, + deploymentsUrl, + deploymentUrl, + projectsUrl, + performanceUrl, + usersAndRolesUrl, + } = cloud; const links: CloudLinks = {}; @@ -72,5 +80,23 @@ export const getCloudLinks = (cloud: CloudURLs): CloudLinks => { }; } + if (deploymentsUrl) { + links.deployments = { + title: i18n.translate('core.ui.chrome.sideNavigation.cloudLinks.allDeploymentsLinkText', { + defaultMessage: 'View all deployments', + }), + href: deploymentsUrl, + }; + } + + if (projectsUrl) { + links.projects = { + title: i18n.translate('core.ui.chrome.sideNavigation.cloudLinks.allProjectsLinkText', { + defaultMessage: 'View all projects', + }), + href: projectsUrl, + }; + } + return parseCloudURLs(links); }; 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 ffb8a87b06c5f..1089d1ba46209 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 @@ -7,7 +7,7 @@ */ import { createMemoryHistory } from 'history'; -import { firstValueFrom, lastValueFrom, take, BehaviorSubject, of } from 'rxjs'; +import { firstValueFrom, lastValueFrom, take, BehaviorSubject, of, type Observable } from 'rxjs'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { applicationServiceMock } from '@kbn/core-application-browser-mocks'; import { loggerMock } from '@kbn/logging-mocks'; @@ -23,6 +23,14 @@ import type { } from '@kbn/core-chrome-browser'; import { ProjectNavigationService } from './project_navigation_service'; +jest.mock('rxjs', () => { + const original = jest.requireActual('rxjs'); + return { + ...original, + debounceTime: () => (source: Observable) => source, + }; +}); + const getNavLink = (partial: Partial = {}): ChromeNavLink => ({ id: 'kibana', title: 'Kibana', @@ -36,7 +44,7 @@ const getNavLink = (partial: Partial = {}): ChromeNavLink => ({ const getNavLinksService = (ids: Readonly = []) => { const navLinks = ids.map((id) => getNavLink({ id, title: id.toUpperCase() })); - const navLinksMock: ChromeNavLinks = { + const navLinksMock: jest.Mocked = { getNavLinks$: jest.fn().mockReturnValue(of(navLinks)), has: jest.fn(), get: jest.fn(), @@ -58,18 +66,23 @@ const setup = ({ navLinkIds?: Readonly; setChromeStyle?: () => void; } = {}) => { - const history = createMemoryHistory(); + const history = createMemoryHistory({ + initialEntries: [locationPathName], + }); history.replace(locationPathName); const projectNavigationService = new ProjectNavigationService(); const chromeBreadcrumbs$ = new BehaviorSubject([]); const navLinksService = getNavLinksService(navLinkIds); - + const application = { + ...applicationServiceMock.createInternalStartContract(), + history, + }; + application.navigateToUrl.mockImplementation(async (url) => { + history.push(url); + }); const projectNavigation = projectNavigationService.start({ - application: { - ...applicationServiceMock.createInternalStartContract(), - history, - }, + application, navLinksService, http: httpServiceMock.createStartContract(), chromeBreadcrumbs$, @@ -77,7 +90,7 @@ const setup = ({ setChromeStyle, }); - return { projectNavigation, history, chromeBreadcrumbs$ }; + return { projectNavigation, history, chromeBreadcrumbs$, navLinksService, application }; }; describe('initNavigation()', () => { @@ -135,8 +148,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); }); @@ -185,8 +197,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); const treeDefinition = await getNavTree(); const [node] = treeDefinition.body as [ChromeProjectNavigationNode]; @@ -210,8 +221,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); expect(logger.error).toHaveBeenCalledWith( @@ -390,8 +400,7 @@ describe('initNavigation()', () => { children: [{ link: 'foo' }], }, ], - }), - { cloudUrls: {} } + }) ); // 3. getNavigationTreeUi$() is resolved @@ -402,6 +411,13 @@ describe('initNavigation()', () => { test('should add the Cloud links to the navigation tree', async () => { const { projectNavigation } = setup(); + projectNavigation.setCloudUrls({ + usersAndRolesUrl: 'https://cloud.elastic.co/userAndRoles/', // trailing slash should be removed! + performanceUrl: 'https://cloud.elastic.co/performance/', + billingUrl: 'https://cloud.elastic.co/billing/', + deploymentUrl: 'https://cloud.elastic.co/deployment/', + }); + projectNavigation.initNavigation( // @ts-expect-error - We pass a non valid cloudLink that is not TS valid of({ @@ -418,15 +434,7 @@ describe('initNavigation()', () => { ], }, ], - }), - { - cloudUrls: { - usersAndRolesUrl: 'https://cloud.elastic.co/userAndRoles/', // trailing slash should be removed! - performanceUrl: 'https://cloud.elastic.co/performance/', - billingUrl: 'https://cloud.elastic.co/billing/', - deploymentUrl: 'https://cloud.elastic.co/deployment/', - }, - } + }) ); const treeDefinition = await lastValueFrom( @@ -516,7 +524,7 @@ describe('breadcrumbs', () => { const obs = subj.asObservable(); if (initiateNavigation) { - projectNavigation.initNavigation(obs, { cloudUrls: {} }); + projectNavigation.initNavigation(obs); } return { @@ -729,7 +737,7 @@ describe('breadcrumbs', () => { { text: 'custom1', href: '/custom1' }, { text: 'custom2', href: '/custom1/custom2' }, ]); - projectNavigation.initNavigation(of(mockNavigation), { cloudUrls: {} }); // init navigation + projectNavigation.initNavigation(of(mockNavigation)); // init navigation const breadcrumbs = await firstValueFrom(projectNavigation.getProjectBreadcrumbs$()); expect(breadcrumbs).toHaveLength(4); @@ -781,8 +789,7 @@ describe('getActiveNodes$()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); activeNodes = await lastValueFrom(projectNavigation.getActiveNodes$().pipe(take(1))); @@ -838,8 +845,7 @@ describe('getActiveNodes$()', () => { ], }, ], - }), - { cloudUrls: {} } + }) ); activeNodes = await lastValueFrom(projectNavigation.getActiveNodes$().pipe(take(1))); @@ -877,26 +883,29 @@ describe('getActiveNodes$()', () => { }); describe('solution navigations', () => { - const solution1: SolutionNavigationDefinition = { + const solution1: SolutionNavigationDefinition = { id: 'solution1', title: 'Solution 1', icon: 'logoSolution1', homePage: 'discover', + navigationTree$: of({ body: [{ type: 'navItem', link: 'app1' }] }), }; - const solution2: SolutionNavigationDefinition = { + const solution2: SolutionNavigationDefinition = { id: 'solution2', title: 'Solution 2', icon: 'logoSolution2', - homePage: 'discover', - sideNavComponentGetter: () => () => null, + homePage: 'app2', + navigationTree$: of({ body: [{ type: 'navItem', link: 'app2' }] }), + sideNavComponent: () => null, }; - const solution3: SolutionNavigationDefinition = { + const solution3: SolutionNavigationDefinition = { id: 'solution3', title: 'Solution 3', icon: 'logoSolution3', homePage: 'discover', + navigationTree$: of({ body: [{ type: 'navItem', link: 'app3' }] }), }; const localStorageGetItem = jest.fn(); @@ -973,9 +982,10 @@ describe('solution navigations', () => { const activeSolution = await lastValueFrom( projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1)) ); + expect(activeSolution).not.toBeNull(); // sideNavComponentGetter should not be exposed to consumers - expect('sideNavComponentGetter' in activeSolution!).toBe(false); - const { sideNavComponentGetter, ...rest } = solution2; + expect('sideNavComponent' in activeSolution!).toBe(false); + const { sideNavComponent, ...rest } = solution2; expect(activeSolution).toEqual(rest); } @@ -993,11 +1003,10 @@ describe('solution navigations', () => { const { projectNavigation } = setup(); projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2 }); - projectNavigation.changeActiveSolutionNavigation('3'); expect(() => { - return lastValueFrom(projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1))); - }).rejects.toThrowErrorMatchingInlineSnapshot( + projectNavigation.changeActiveSolutionNavigation('3'); + }).toThrowErrorMatchingInlineSnapshot( `"Solution navigation definition with id \\"3\\" does not exist."` ); }); @@ -1009,7 +1018,7 @@ describe('solution navigations', () => { expect(setChromeStyle).not.toHaveBeenCalled(); projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2 }); - expect(setChromeStyle).toHaveBeenCalledWith('classic'); // No active solution yet, we are still on classic Kibana + expect(setChromeStyle).not.toHaveBeenCalled(); projectNavigation.changeActiveSolutionNavigation('2'); expect(setChromeStyle).toHaveBeenCalledWith('project'); // We have an active solution nav, we should switch to project style @@ -1017,4 +1026,38 @@ describe('solution navigations', () => { projectNavigation.changeActiveSolutionNavigation(null); expect(setChromeStyle).toHaveBeenCalledWith('classic'); // No active solution, we should switch back to classic Kibana }); + + it('should change the active solution if no node match the current Location', async () => { + const { projectNavigation, navLinksService } = setup({ + locationPathName: '/app/app3', // we are on app3 which only exists in solution3 + navLinkIds: ['app1', 'app2', 'app3'], + }); + + const getActiveDefinition = () => + lastValueFrom(projectNavigation.getActiveSolutionNavDefinition$().pipe(take(1))); + + projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2, 3: solution3 }); + + { + const definition = await getActiveDefinition(); + expect(definition).toBe(null); // No active solution id yet + } + + // Change to solution 2, but we are still on '/app/app3' which only exists in solution3 + projectNavigation.changeActiveSolutionNavigation('2'); + + { + const definition = await getActiveDefinition(); + expect(definition?.id).toBe('solution3'); // The solution3 was activated as it matches the "/app/app3" location + } + + 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 b25df903d7ee4..15ebb6f499d42 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 @@ -17,11 +17,11 @@ import type { NavigationTreeDefinition, SolutionNavigationDefinitions, ChromeStyle, + CloudLinks, } from '@kbn/core-chrome-browser'; import type { InternalHttpStart } from '@kbn/core-http-browser-internal'; import { BehaviorSubject, - Observable, combineLatest, map, takeUntil, @@ -30,8 +30,13 @@ import { distinctUntilChanged, skipWhile, filter, + of, + type Observable, + type Subscription, + take, + debounceTime, } from 'rxjs'; -import type { Location } from 'history'; +import { type Location, createLocation } from 'history'; import deepEqual from 'react-fast-compare'; import { @@ -61,9 +66,7 @@ export class ProjectNavigationService { current: SideNavComponent | null; }>({ current: null }); private projectHome$ = new BehaviorSubject(undefined); - private projectsUrl$ = new BehaviorSubject(undefined); private projectName$ = new BehaviorSubject(undefined); - private projectUrl$ = new BehaviorSubject(undefined); private navigationTree$ = new BehaviorSubject( undefined ); @@ -80,8 +83,13 @@ export class ProjectNavigationService { private readonly stop$ = new ReplaySubject(1); private readonly solutionNavDefinitions$ = new BehaviorSubject({}); 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 navigationChangeSubscription?: Subscription; private unlistenHistory?: () => void; private setChromeStyle: StartDeps['setChromeStyle'] = () => {}; @@ -94,6 +102,7 @@ export class ProjectNavigationService { setChromeStyle, }: StartDeps) { this.application = application; + this.navLinksService = navLinksService; this.http = http; this.logger = logger; this.onHistoryLocationChange(application.history.location); @@ -101,7 +110,16 @@ export class ProjectNavigationService { this.setChromeStyle = setChromeStyle; this.handleActiveNodesChange(); - this.handleSolutionNavDefinitionsChange(); + this.handleEmptyActiveNodes(); + + this.deepLinksMap$ = navLinksService.getNavLinks$().pipe( + map((navLinks) => { + return navLinks.reduce((acc, navLink) => { + acc[navLink.id] = navLink; + return acc; + }, {} as Record); + }) + ); return { setProjectHome: (homeHref: string) => { @@ -110,11 +128,11 @@ export class ProjectNavigationService { getProjectHome$: () => { return this.projectHome$.asObservable(); }, - setProjectsUrl: (projectsUrl: string) => { - this.projectsUrl$.next(projectsUrl); - }, - getProjectsUrl$: () => { - return this.projectsUrl$.asObservable(); + setCloudUrls: (cloudUrls: CloudURLs) => { + // Cloud links never change, so we only need to parse them once + if (Object.keys(this.cloudLinks$.getValue()).length > 0) return; + + this.cloudLinks$.next(getCloudLinks(cloudUrls)); }, setProjectName: (projectName: string) => { this.projectName$.next(projectName); @@ -122,14 +140,10 @@ export class ProjectNavigationService { getProjectName$: () => { return this.projectName$.asObservable(); }, - setProjectUrl: (projectUrl: string) => { - this.projectUrl$.next(projectUrl); - }, initNavigation: ( - navTreeDefinition: Observable>, - { cloudUrls }: { cloudUrls: CloudURLs } + navTreeDefinition: Observable> ) => { - this.initNavigation(navTreeDefinition, { navLinksService, cloudUrls }); + this.initNavigation(navTreeDefinition); }, getNavigationTreeUi$: this.getNavigationTreeUi$.bind(this), getActiveNodes$: () => { @@ -153,26 +167,38 @@ export class ProjectNavigationService { this.projectBreadcrumbs$, this.activeNodes$, chromeBreadcrumbs$, - this.projectsUrl$, - this.projectUrl$, this.projectName$, + this.solutionNavDefinitions$, + this.activeSolutionNavDefinitionId$, + this.cloudLinks$, ]).pipe( map( ([ projectBreadcrumbs, activeNodes, chromeBreadcrumbs, - projectsUrl, - projectUrl, projectName, + solutionNavDefinitions, + activeSolutionNavDefinitionId, + cloudLinks, ]) => { + const solutionNavigations = + Object.keys(solutionNavDefinitions).length > 0 && + activeSolutionNavDefinitionId !== null + ? { + definitions: solutionNavDefinitions, + activeId: activeSolutionNavDefinitionId, + onChange: this.changeActiveSolutionNavigation.bind(this), + } + : undefined; + return buildBreadcrumbs({ - projectUrl, projectName, - projectsUrl, projectBreadcrumbs, activeNodes, chromeBreadcrumbs, + solutionNavigations, + cloudLinks, }); } ) @@ -189,28 +215,30 @@ export class ProjectNavigationService { }; } + /** + * Initialize a "serverless style" navigation. For stateful deployments (not serverless), this + * handler initialize one of the solution navigations registered. + * + * @param navTreeDefinition$ The navigation tree definition + * @param location Optional location to use to detect the active node in the new navigation tree + */ private initNavigation( - navTreeDefinition: Observable, - { navLinksService, cloudUrls }: { navLinksService: ChromeNavLinks; cloudUrls: CloudURLs } + navTreeDefinition$: Observable, + location?: Location ) { - if (this.navigationTree$.getValue() !== undefined) { - throw new Error('Project navigation has already been initiated.'); + if (this.navigationChangeSubscription) { + this.navigationChangeSubscription.unsubscribe(); } - const deepLinksMap$ = navLinksService.getNavLinks$().pipe( - map((navLinks) => { - return navLinks.reduce((acc, navLink) => { - acc[navLink.id] = navLink; - return acc; - }, {} as Record); - }) - ); - - const cloudLinks = getCloudLinks(cloudUrls); - - combineLatest([navTreeDefinition.pipe(takeUntil(this.stop$)), deepLinksMap$]) + this.projectNavigationNavTreeFlattened = {}; + this.navigationChangeSubscription = combineLatest([ + navTreeDefinition$, + this.deepLinksMap$, + this.cloudLinks$, + ]) .pipe( - map(([def, deepLinksMap]) => { + takeUntil(this.stop$), + map(([def, deepLinksMap, cloudLinks]) => { return parseNavigationTree(def, { deepLinks: deepLinksMap, cloudLinks, @@ -223,7 +251,7 @@ export class ProjectNavigationService { this.navigationTreeUi$.next(navigationTreeUI); this.projectNavigationNavTreeFlattened = flattenNav(navigationTree); - this.setActiveProjectNavigationNodes(); + this.updateActiveProjectNavigationNodes(location); }, error: (err) => { this.logger?.error(err); @@ -237,9 +265,15 @@ export class ProjectNavigationService { .pipe(filter((v): v is NavigationTreeDefinitionUI => v !== null)); } - private setActiveProjectNavigationNodes(_location?: Location) { - if (!this.application) return; - if (!Object.keys(this.projectNavigationNavTreeFlattened).length) return; + private findActiveNodes({ + location: _location, + flattendTree = this.projectNavigationNavTreeFlattened, + }: { + location?: Location; + flattendTree?: Record; + } = {}): ChromeProjectNavigationNode[][] { + if (!this.application) return []; + if (!Object.keys(this.projectNavigationNavTreeFlattened).length) return []; const location = _location ?? this.application.history.location; let currentPathname = this.http?.basePath.prepend(location.pathname) ?? location.pathname; @@ -248,13 +282,17 @@ export class ProjectNavigationService { // e.g. /app/kibana#/management currentPathname = stripQueryParams(`${currentPathname}${location.hash}`); - const activeNodes = findActiveNodes( - currentPathname, - this.projectNavigationNavTreeFlattened, - location, - this.http?.basePath.prepend - ); + return findActiveNodes(currentPathname, flattendTree, location, this.http?.basePath.prepend); + } + /** + * Find the active nodes in the navigation tree based on the current location (or a location passed in params) + * and update the activeNodes$ Observable. + * + * @param location Optional location to use to detect the active node in the new navigation tree, if not set the current location is used + */ + private updateActiveProjectNavigationNodes(location?: Location) { + 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 @@ -267,7 +305,8 @@ export class ProjectNavigationService { } private onHistoryLocationChange(location: Location) { - this.setActiveProjectNavigationNodes(location); + this.location$.next(location); + this.updateActiveProjectNavigationNodes(location); } private handleActiveNodesChange() { @@ -292,20 +331,116 @@ export class ProjectNavigationService { }); } - private handleSolutionNavDefinitionsChange() { - combineLatest([this.solutionNavDefinitions$, this.activeSolutionNavDefinitionId$]) - .pipe(takeUntil(this.stop$)) - .subscribe(this.onSolutionNavDefinitionsChange.bind(this)); + /** + * When we are in stateful Kibana with multiple solution navigations, it is possible that a user + * 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; + } + + // 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; + + Object.entries(definitions).forEach(([id, definition]) => { + combineLatest([definition.navigationTree$, this.deepLinksMap$, this.cloudLinks$]) + .pipe( + take(1), + map(([def, deepLinksMap, cloudLinks]) => + parseNavigationTree(def, { + deepLinks: deepLinksMap, + cloudLinks, + }) + ) + ) + .subscribe(({ navigationTree }) => { + if (found) return; + + const maybeActiveNodes = this.findActiveNodes({ + location, + flattendTree: flattenNav(navigationTree), + }); + + if (maybeActiveNodes.length > 0) { + found = true; + this.changeActiveSolutionNavigation(id); + } + }); + }); + }); } private setSideNavComponent(component: SideNavComponent | null) { this.customProjectSideNavComponent$.next({ current: component }); } - private changeActiveSolutionNavigation(id: string | null, { onlyIfNotSet = false } = {}) { + 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.setChromeStyle('classic'); + this.navigationTree$.next(undefined); + } else { + const definition = definitions[id]; + if (!definition) { + throw new Error(`Solution navigation definition with id "${id}" does not exist.`); + } + + this.setChromeStyle('project'); + + const { sideNavComponent } = definition; + if (sideNavComponent) { + this.setSideNavComponent(sideNavComponent); + } + + 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); + } + } + + // We want to pass the upcoming location where we are going to navigate to + // so we can immediately set the active nodes based on the new location and we + // don't have to wait for the location change event to be triggered. + this.initNavigation(definition.navigationTree$, location); + } + } + this.activeSolutionNavDefinitionId$.next(id); } @@ -322,8 +457,8 @@ export class ProjectNavigationService { if (!definitions[id]) { throw new Error(`Solution navigation definition with id "${id}" does not exist.`); } - // We strip out the sideNavComponentGetter from the definition as it should only be used internally - const { sideNavComponentGetter, ...definition } = definitions[id]; + // We strip out the sideNavComponent from the definition as it should only be used internally + const { sideNavComponent, ...definition } = definitions[id]; return definition; }) ); @@ -343,33 +478,6 @@ export class ProjectNavigationService { } } - private onSolutionNavDefinitionsChange([definitions, id]: [ - SolutionNavigationDefinitions, - string | 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) return; - - if (id === null) { - this.setChromeStyle('classic'); - this.navigationTree$.next(undefined); - } else { - const definition = definitions[id]; - if (!definition) { - throw new Error(`Solution navigation definition with id "${id}" does not exist.`); - } - - this.setChromeStyle('project'); - const { sideNavComponentGetter } = definition; - - if (sideNavComponentGetter) { - this.setSideNavComponent(sideNavComponentGetter()); - } - } - } - 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 f1947e05c5301..5497234cce31b 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/types.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/types.ts @@ -49,10 +49,10 @@ export interface InternalChromeStart extends ChromeStart { setHome(homeHref: string): void; /** - * Sets the cloud's projects page. - * @param projectsUrl + * Sets the cloud's URLs. + * @param cloudUrls */ - setProjectsUrl(projectsUrl: string): void; + setCloudUrls(cloudUrls: CloudURLs): void; /** * Sets the project name. @@ -60,19 +60,12 @@ export interface InternalChromeStart extends ChromeStart { */ setProjectName(projectName: string): void; - /** - * Sets the project url. - * @param projectUrl - */ - setProjectUrl(projectUrl: string): void; - initNavigation< LinkId extends AppDeepLinkId = AppDeepLinkId, Id extends string = string, ChildrenId extends string = Id >( - navigationTree$: Observable>, - deps: { cloudUrls: CloudURLs } + navigationTree$: Observable> ): void; getNavigationTreeUi$: () => Observable; @@ -119,6 +112,14 @@ 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?: { onlyIfNotSet?: boolean }): void; + 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; }; } 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 new file mode 100644 index 0000000000000..da9b105b7355b --- /dev/null +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/solution_nav_switcher_breadcrumbs.tsx @@ -0,0 +1,93 @@ +/* + * 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 { EuiListGroup, EuiListGroupItem, EuiTitle, EuiSpacer, EuiButtonEmpty } from '@elastic/eui'; +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import type { + ChromeProjectBreadcrumb, + SolutionNavigationDefinitions, + CloudLinks, +} from '@kbn/core-chrome-browser'; + +export const getSolutionNavSwitcherBreadCrumb = ({ + definitions, + activeId, + onChange, + cloudLinks, +}: { + definitions: SolutionNavigationDefinitions; + activeId: string; + onChange: (id: string, options?: { redirect?: boolean }) => void; + cloudLinks: CloudLinks; +}): ChromeProjectBreadcrumb => { + const text = Object.values(definitions).find(({ id }) => id === activeId)?.title; + return { + text, + 'data-test-subj': 'solutionNavSwitcher', + popoverContent: ( + <> + +

+ {i18n.translate('core.ui.primaryNav.cloud.breadCrumbDropdown.title', { + defaultMessage: 'Solution view', + })} +

+
+ + + {Object.values(definitions).map(({ id, title, icon = 'gear' }) => [ + { + onChange(id, { redirect: true }); + }} + />, + ])} + + + + + {cloudLinks.deployment && ( + + {i18n.translate('core.ui.primaryNav.cloud.breadCrumbDropdown.manageDeploymentLabel', { + defaultMessage: 'Manage this deployment', + })} + + )} + + {cloudLinks.deployments && ( + + {cloudLinks.deployments.title} + + )} + + ), + popoverProps: { + panelPaddingSize: 'm', + zIndex: 6000, + panelStyle: { width: 260 }, + panelProps: { + 'data-test-subj': 'solutionNavSwitcherPanel', + }, + }, + }; +}; diff --git a/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts index 68fbd2c92a65b..8fdea6e33070d 100644 --- a/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts +++ b/packages/core/chrome/core-chrome-browser-mocks/src/chrome_service.mock.ts @@ -70,8 +70,7 @@ const createStartContractMock = () => { setChromeStyle: jest.fn(), project: { setHome: jest.fn(), - setProjectsUrl: jest.fn(), - setProjectUrl: jest.fn(), + setCloudUrls: jest.fn(), setProjectName: jest.fn(), initNavigation: jest.fn(), setSideNavComponent: jest.fn(), diff --git a/packages/core/chrome/core-chrome-browser/src/project_navigation.ts b/packages/core/chrome/core-chrome-browser/src/project_navigation.ts index 78d169d4c41fb..463bb473ee7ae 100644 --- a/packages/core/chrome/core-chrome-browser/src/project_navigation.ts +++ b/packages/core/chrome/core-chrome-browser/src/project_navigation.ts @@ -49,11 +49,20 @@ export type AppDeepLinkId = | ObservabilityLink; /** @public */ -export type CloudLinkId = 'userAndRoles' | 'performance' | 'billingAndSub' | 'deployment'; +export type CloudLinkId = + | 'userAndRoles' + | 'performance' + | 'billingAndSub' + | 'deployment' + | 'deployments' + | 'projects'; export interface CloudURLs { + baseUrl?: string; billingUrl?: string; + deploymentsUrl?: string; deploymentUrl?: string; + projectsUrl?: string; performanceUrl?: string; usersAndRolesUrl?: string; } @@ -383,16 +392,19 @@ export interface NavigationTreeDefinitionUI { * for the side navigation evolution to align with the Serverless UX. */ -export interface SolutionNavigationDefinition { +export interface SolutionNavigationDefinition { /** Unique id for the solution navigation. */ id: string; /** Title for the solution navigation. */ title: string; - /** Optional icon for the solution navigation. */ + /** The navigation tree definition */ + navigationTree$: Observable>; + /** Optional icon for the solution navigation to render in the select dropdown. */ icon?: IconType; - sideNavComponentGetter?: () => SideNavComponent; + /** React component to render in the side nav for the navigation */ + sideNavComponent?: SideNavComponent; /** The page to navigate to when switching to this solution navigation. */ - homePage?: AppDeepLinkId; + homePage?: LinkId; } export interface SolutionNavigationDefinitions { diff --git a/packages/core/http/core-http-resources-server-internal/src/get_apm_config.test.ts b/packages/core/http/core-http-resources-server-internal/src/get_apm_config.test.ts index 5e4e7b9b9525c..04644790092d0 100644 --- a/packages/core/http/core-http-resources-server-internal/src/get_apm_config.test.ts +++ b/packages/core/http/core-http-resources-server-internal/src/get_apm_config.test.ts @@ -66,6 +66,16 @@ describe('getApmConfig', () => { expect(config).not.toHaveProperty('secretToken'); }); + it('omits apiKey', () => { + getConfigurationMock.mockReturnValue({ + ...defaultApmConfig, + apiKey: 'smurfs', + }); + const config = getApmConfig('/some-other-path'); + + expect(config).not.toHaveProperty('apiKey'); + }); + it('enhance the configuration with values from the current server-side transaction', () => { agentMock.currentTransaction = { sampled: 'sampled', diff --git a/packages/core/http/core-http-resources-server-internal/src/get_apm_config.ts b/packages/core/http/core-http-resources-server-internal/src/get_apm_config.ts index 8168d3c22b483..b0acebe8984dd 100644 --- a/packages/core/http/core-http-resources-server-internal/src/get_apm_config.ts +++ b/packages/core/http/core-http-resources-server-internal/src/get_apm_config.ts @@ -9,7 +9,12 @@ import agent, { AgentConfigOptions } from 'elastic-apm-node'; import { getConfiguration, shouldInstrumentClient } from '@kbn/apm-config-loader'; -const OMIT_APM_CONFIG: Array = ['secretToken']; +const OMIT_APM_CONFIG: Array = [ + 'secretToken', + 'apiKey', + 'captureSpanStackTraces', + 'metricsInterval', +]; export const getApmConfig = (requestPath: string) => { const baseConfig = getConfiguration('kibana-frontend') || {}; diff --git a/packages/deeplinks/devtools/kibana.jsonc b/packages/deeplinks/devtools/kibana.jsonc index 8ea511e08fdf7..df03b80bca7dc 100644 --- a/packages/deeplinks/devtools/kibana.jsonc +++ b/packages/deeplinks/devtools/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/deeplinks-devtools", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/deeplinks/management/kibana.jsonc b/packages/deeplinks/management/kibana.jsonc index 7613cebb5ae7c..d88dfb3df2340 100644 --- a/packages/deeplinks/management/kibana.jsonc +++ b/packages/deeplinks/management/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/deeplinks-management", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/deeplinks/observability/constants.ts b/packages/deeplinks/observability/constants.ts index 1c44778cda28a..b17e2736a25b4 100644 --- a/packages/deeplinks/observability/constants.ts +++ b/packages/deeplinks/observability/constants.ts @@ -19,3 +19,5 @@ export const APM_APP_ID = 'apm'; export const SYNTHETICS_APP_ID = 'synthetics'; export const OBSERVABILITY_ONBOARDING_APP_ID = 'observabilityOnboarding'; + +export const SLO_APP_ID = 'slo'; diff --git a/packages/deeplinks/observability/deep_links.ts b/packages/deeplinks/observability/deep_links.ts index 305e9c0c56c28..7912d4e391a5c 100644 --- a/packages/deeplinks/observability/deep_links.ts +++ b/packages/deeplinks/observability/deep_links.ts @@ -14,6 +14,7 @@ import { OBSERVABILITY_ONBOARDING_APP_ID, OBSERVABILITY_OVERVIEW_APP_ID, SYNTHETICS_APP_ID, + SLO_APP_ID, } from './constants'; type LogsApp = typeof LOGS_APP_ID; @@ -23,6 +24,7 @@ type MetricsApp = typeof METRICS_APP_ID; type ApmApp = typeof APM_APP_ID; type SyntheticsApp = typeof SYNTHETICS_APP_ID; type ObservabilityOnboardingApp = typeof OBSERVABILITY_ONBOARDING_APP_ID; +type SLO_APP = typeof SLO_APP_ID; export type AppId = | LogsApp @@ -31,7 +33,8 @@ export type AppId = | ObservabilityOnboardingApp | ApmApp | MetricsApp - | SyntheticsApp; + | SyntheticsApp + | SLO_APP; export type LogsLinkId = 'log-categories' | 'settings' | 'anomalies' | 'stream'; @@ -40,8 +43,7 @@ export type ObservabilityOverviewLinkId = | 'cases' | 'cases_configure' | 'cases_create' - | 'rules' - | 'slos'; + | 'rules'; export type MetricsLinkId = | 'inventory' @@ -61,12 +63,15 @@ export type ApmLinkId = export type SyntheticsLinkId = 'certificates' | 'overview'; +export type SLOLinkId = 'slo'; + export type LinkId = | LogsLinkId | ObservabilityOverviewLinkId | MetricsLinkId | ApmLinkId - | SyntheticsLinkId; + | SyntheticsLinkId + | SLOLinkId; export type DeepLinkId = | AppId diff --git a/packages/default-nav/devtools/kibana.jsonc b/packages/default-nav/devtools/kibana.jsonc index 6c3a5b98e7425..7ed8bd537b28d 100644 --- a/packages/default-nav/devtools/kibana.jsonc +++ b/packages/default-nav/devtools/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/default-nav-devtools", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/default-nav/management/kibana.jsonc b/packages/default-nav/management/kibana.jsonc index a13f222fa81cf..f5d49d9029829 100644 --- a/packages/default-nav/management/kibana.jsonc +++ b/packages/default-nav/management/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/default-nav-management", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-ace/kibana.jsonc b/packages/kbn-ace/kibana.jsonc index 8c5e29f19b54a..0a01d96a6b1c6 100644 --- a/packages/kbn-ace/kibana.jsonc +++ b/packages/kbn-ace/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/ace", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-babel-preset/styled_components_files.js b/packages/kbn-babel-preset/styled_components_files.js index 26dd151028d3f..92b888b4ea9b2 100644 --- a/packages/kbn-babel-preset/styled_components_files.js +++ b/packages/kbn-babel-preset/styled_components_files.js @@ -14,7 +14,7 @@ module.exports = { USES_STYLED_COMPONENTS: [ /packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/, /src[\/\\]plugins[\/\\](kibana_react)[\/\\]/, - /x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|cases|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, + /x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|cases|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|observability_solution\/slo|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/, /x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/, /x-pack[\/\\]packages[\/\\]elastic_assistant[\/\\]/, /x-pack[\/\\]packages[\/\\]security-solution[\/\\]ecs_data_quality_dashboard[\/\\]/, diff --git a/packages/kbn-config/src/__fixtures__/en_var_ref_config_nested.yml b/packages/kbn-config/src/__fixtures__/en_var_ref_config_nested.yml new file mode 100644 index 0000000000000..b0dfc99d1ed46 --- /dev/null +++ b/packages/kbn-config/src/__fixtures__/en_var_ref_config_nested.yml @@ -0,0 +1,5 @@ +foo: 1 + +nested_list: + - id: "a" + values: ["${KBN_ENV_VAR1}", "${KBN_ENV_VAR2}"] diff --git a/packages/kbn-config/src/__fixtures__/unsplittable_1.yml b/packages/kbn-config/src/__fixtures__/unsplittable_1.yml new file mode 100644 index 0000000000000..6fdeceb19b323 --- /dev/null +++ b/packages/kbn-config/src/__fixtures__/unsplittable_1.yml @@ -0,0 +1,6 @@ +foo: 1 +bar: 3 +'[foo.bar]': "foobar" +nested: + str1: "foo" + '[a.b]': "ab" diff --git a/packages/kbn-config/src/__fixtures__/unsplittable_2.yml b/packages/kbn-config/src/__fixtures__/unsplittable_2.yml new file mode 100644 index 0000000000000..df84542aa2da2 --- /dev/null +++ b/packages/kbn-config/src/__fixtures__/unsplittable_2.yml @@ -0,0 +1,6 @@ + +'[foo.bar]': "foobar" +list: + - id: "id1" + '[a.b]': ['foo', 'bar'] + diff --git a/packages/kbn-config/src/raw/__snapshots__/read_config.test.ts.snap b/packages/kbn-config/src/raw/__snapshots__/read_config.test.ts.snap index 4ad36abc1b481..d29eeb06900eb 100644 --- a/packages/kbn-config/src/raw/__snapshots__/read_config.test.ts.snap +++ b/packages/kbn-config/src/raw/__snapshots__/read_config.test.ts.snap @@ -114,6 +114,21 @@ Object { } `; +exports[`should inject an environment variable in a nested list of objects 1`] = ` +Object { + "foo": 1, + "nested_list": Array [ + Object { + "id": "a", + "values": Array [ + "val1", + "val2", + ], + }, + ], +} +`; + exports[`should inject an environment variable value when setting a value with \${ENV_VAR} 1`] = ` Object { "bar": "pre-val1-mid-val2-post", diff --git a/packages/kbn-config/src/raw/read_config.test.ts b/packages/kbn-config/src/raw/read_config.test.ts index 0fdacd99d46cf..750d10940e5ce 100644 --- a/packages/kbn-config/src/raw/read_config.test.ts +++ b/packages/kbn-config/src/raw/read_config.test.ts @@ -41,6 +41,18 @@ test('should inject an environment variable value when setting a value with ${EN expect(config).toMatchSnapshot(); }); +test('should inject an environment variable in a nested list of objects', () => { + process.env.KBN_ENV_VAR1 = 'val1'; + process.env.KBN_ENV_VAR2 = 'val2'; + + const config = getConfigFromFiles([fixtureFile('/en_var_ref_config_nested.yml')]); + + delete process.env.KBN_ENV_VAR1; + delete process.env.KBN_ENV_VAR2; + + expect(config).toMatchSnapshot(); +}); + test('should throw an exception when referenced environment variable in a config value does not exist', () => { expect(() => getConfigFromFiles([fixtureFile('/en_var_ref_config.yml')]) @@ -50,13 +62,13 @@ test('should throw an exception when referenced environment variable in a config test('throws parsing a config with forbidden paths', () => { expect(() => getConfigFromFiles([fixtureFile('forbidden_1.yml')]) - ).toThrowErrorMatchingInlineSnapshot(`"Forbidden path detected: test.aaa.__proto__.hello"`); + ).toThrowErrorMatchingInlineSnapshot(`"Forbidden path detected: test.aaa['__proto__.hello']"`); }); test('throws parsing another config with forbidden paths', () => { expect(() => getConfigFromFiles([fixtureFile('forbidden_2.yml')]) - ).toThrowErrorMatchingInlineSnapshot(`"Forbidden path detected: test.hello.__proto__"`); + ).toThrowErrorMatchingInlineSnapshot(`"Forbidden path detected: test.hello.__proto__.dolly"`); }); test('merging two configs', () => { @@ -83,3 +95,38 @@ describe('different cwd()', () => { expect(() => getConfigFromFiles([relativePath])).toThrowError(/ENOENT/); }); }); + +test('supports unsplittable key syntax', () => { + const config = getConfigFromFiles([fixtureFile('/unsplittable_1.yml')]); + + expect(config).toMatchInlineSnapshot(` + Object { + "bar": 3, + "foo": 1, + "foo.bar": "foobar", + "nested": Object { + "a.b": "ab", + "str1": "foo", + }, + } + `); +}); + +test('supports unsplittable key syntax on nested list', () => { + const config = getConfigFromFiles([fixtureFile('/unsplittable_2.yml')]); + + expect(config).toMatchInlineSnapshot(` + Object { + "foo.bar": "foobar", + "list": Array [ + Object { + "a.b": Array [ + "foo", + "bar", + ], + "id": "id1", + }, + ], + } + `); +}); diff --git a/packages/kbn-config/src/raw/read_config.ts b/packages/kbn-config/src/raw/read_config.ts index eb8f8df4c8815..52ffcaa1bd190 100644 --- a/packages/kbn-config/src/raw/read_config.ts +++ b/packages/kbn-config/src/raw/read_config.ts @@ -8,10 +8,10 @@ import { readFileSync } from 'fs'; import { safeLoad } from 'js-yaml'; - import { set } from '@kbn/safer-lodash-set'; import { isPlainObject } from 'lodash'; -import { ensureDeepObject } from '@kbn/std'; +import { ensureValidObjectPath } from '@kbn/std'; +import { splitKey, getUnsplittableKey } from './utils'; const readYaml = (path: string) => safeLoad(readFileSync(path, 'utf8')); @@ -26,40 +26,72 @@ function replaceEnvVarRefs(val: string) { }); } -function merge(target: Record, value: any, key?: string) { - if (isPlainObject(value) && Object.keys(value).length > 0) { - for (const [subKey, subVal] of Object.entries(value)) { - merge(target, subVal, key ? `${key}.${subKey}` : subKey); +interface YamlEntry { + path: string[]; + value: any; +} + +const listEntries = (root: Record): YamlEntry[] => { + const entries: YamlEntry[] = []; + + const recursiveListEntries = (currentLevel: any, currentPath: string[]) => { + if (isPlainObject(currentLevel) && Object.keys(currentLevel).length > 0) { + for (const [subKey, subVal] of Object.entries(currentLevel)) { + const subKeySplits = splitKey(subKey); + recursiveListEntries(subVal, [...currentPath, ...subKeySplits]); + } + } else if (currentPath.length) { + entries.push({ + path: currentPath, + value: processEntryValue(currentLevel), + }); } - } else if (key !== undefined) { - set(target, key, recursiveReplaceEnvVar(value)); - } + }; - return target; -} + recursiveListEntries(root, []); + return entries; +}; -function recursiveReplaceEnvVar(value: any) { +const mergeEntries = (entries: YamlEntry[]): Record => { + const root = {}; + + entries.forEach((entry) => { + set(root, entry.path, entry.value); + }); + + return root; +}; + +function processEntryValue(value: any) { if (isPlainObject(value) || Array.isArray(value)) { for (const [subKey, subVal] of Object.entries(value)) { - set(value, subKey, recursiveReplaceEnvVar(subVal)); + const unsplitKey = getUnsplittableKey(subKey); + if (unsplitKey) { + delete value[subKey]; + set(value, [unsplitKey], processEntryValue(subVal)); + } else { + set(value, subKey, processEntryValue(subVal)); + } } - } - if (typeof value === 'string') { + } else if (typeof value === 'string') { return replaceEnvVarRefs(value); } return value; } -/** @internal */ export const getConfigFromFiles = (configFiles: readonly string[]) => { - let mergedYaml = {}; + const yamlEntries: YamlEntry[] = []; for (const configFile of configFiles) { const yaml = readYaml(configFile); if (yaml !== null) { - mergedYaml = merge(mergedYaml, yaml); + yamlEntries.push(...listEntries(yaml)); } } - return ensureDeepObject(mergedYaml); + for (const entry of yamlEntries) { + ensureValidObjectPath(entry.path); + } + + return mergeEntries(yamlEntries); }; diff --git a/packages/kbn-config/src/raw/utils.test.ts b/packages/kbn-config/src/raw/utils.test.ts new file mode 100644 index 0000000000000..26ecba09d9a98 --- /dev/null +++ b/packages/kbn-config/src/raw/utils.test.ts @@ -0,0 +1,35 @@ +/* + * 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 { splitKey, getUnsplittableKey } from './utils'; + +describe('splitKey', () => { + it('correctly splits on the dot delimiter', () => { + expect(splitKey('hello')).toEqual(['hello']); + expect(splitKey('hello.dolly')).toEqual(['hello', 'dolly']); + expect(splitKey('foo.bar.lala')).toEqual(['foo', 'bar', 'lala']); + }); + + it('identifies the unsplittable key pattern', () => { + expect(splitKey('[hello]')).toEqual(['hello']); + expect(splitKey('[foo.bar]')).toEqual(['foo.bar']); + }); +}); + +describe('getUnsplittableKey', () => { + it('returns the correct key when matching', () => { + expect(getUnsplittableKey('[hello]')).toEqual('hello'); + expect(getUnsplittableKey('[foo.bar]')).toEqual('foo.bar'); + }); + + it('returns undefined when not matching', () => { + expect(getUnsplittableKey('[foo.bar')).toEqual(undefined); + expect(getUnsplittableKey('foo.bar]')).toEqual(undefined); + expect(getUnsplittableKey('foo.bar')).toEqual(undefined); + }); +}); diff --git a/packages/kbn-config/src/raw/utils.ts b/packages/kbn-config/src/raw/utils.ts new file mode 100644 index 0000000000000..b44a3c14477aa --- /dev/null +++ b/packages/kbn-config/src/raw/utils.ts @@ -0,0 +1,21 @@ +/* + * 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 const splitKey = (rawKey: string): string[] => { + if (rawKey.startsWith('[') && rawKey.endsWith(']')) { + return [rawKey.substring(1, rawKey.length - 1)]; + } + return rawKey.split('.'); +}; + +export const getUnsplittableKey = (rawKey: string): string | undefined => { + if (rawKey.startsWith('[') && rawKey.endsWith(']')) { + return rawKey.substring(1, rawKey.length - 1); + } + return undefined; +}; diff --git a/packages/kbn-generate-console-definitions/kibana.jsonc b/packages/kbn-generate-console-definitions/kibana.jsonc index 25efdbcd3947b..1ec3c82923f33 100644 --- a/packages/kbn-generate-console-definitions/kibana.jsonc +++ b/packages/kbn-generate-console-definitions/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/generate-console-definitions", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-journeys/journey/journey.ts b/packages/kbn-journeys/journey/journey.ts index bf3de796265f9..f43bb45959945 100644 --- a/packages/kbn-journeys/journey/journey.ts +++ b/packages/kbn-journeys/journey/journey.ts @@ -88,7 +88,7 @@ export class Journey { /** * Create a Journey which should be exported from a file in the - * x-pack/performance/journeys directory. + * x-pack/performance/journeys_e2e directory. */ constructor(opts?: JourneyConfigOptions) { const path = callsites().at(1)?.getFileName(); diff --git a/packages/kbn-journeys/journey/journey_config.ts b/packages/kbn-journeys/journey/journey_config.ts index 2587a4dcbe522..98b39b8ce37ab 100644 --- a/packages/kbn-journeys/journey/journey_config.ts +++ b/packages/kbn-journeys/journey/journey_config.ts @@ -10,7 +10,16 @@ import Path from 'path'; import { REPO_ROOT } from '@kbn/repo-info'; +import { SynthtraceGenerator } from '@kbn/apm-synthtrace-client/src/types'; +import { Readable } from 'stream'; import { BaseStepCtx } from './journey'; +import { SynthtraceClientType } from '../services/synthtrace'; + +interface JourneySynthtrace { + type: SynthtraceClientType; + generator: (options: O) => Readable | SynthtraceGenerator; + options: O; +} export interface RampConcurrentUsersAction { action: 'rampConcurrentUsers'; @@ -69,7 +78,7 @@ export interface ScalabilitySetup { test: ScalabilityAction[]; } -export interface JourneyConfigOptions { +export interface JourneyConfigOptions { /** * Relative path to FTR config file. Use to override the default ones: * 'x-pack/test/functional/config.base.js', 'test/functional/config.base.js' @@ -116,9 +125,23 @@ export interface JourneyConfigOptions { extendContext?: (ctx: BaseStepCtx) => CtxExt; /** * Use this to define actions that will be executed after Kibana & ES were started, - * but before archives are loaded. APM traces are not collected for this hook. + * but before archives are loaded or synthtrace is run. APM traces are not collected for this hook. */ beforeSteps?: (ctx: BaseStepCtx & CtxExt) => Promise; + /** + * Use to setup ES data ingestion with APM Synthtrace + * + * synthtrace: { + * type: 'infra', + * generator: generateHostsData, + * options: { + * from: new Date(Date.now() - 1000 * 60 * 10), + * to: new Date(), + * count: 1000, + * }, + * }, + */ + synthtrace?: JourneySynthtrace; } export class JourneyConfig { @@ -192,4 +215,8 @@ export class JourneyConfig { new Promise((resolve) => resolve()); } } + + getSynthtraceConfig() { + return this.#opts.synthtrace; + } } diff --git a/packages/kbn-journeys/journey/journey_ftr_harness.ts b/packages/kbn-journeys/journey/journey_ftr_harness.ts index 4b1a69757067e..a2657646954a8 100644 --- a/packages/kbn-journeys/journey/journey_ftr_harness.ts +++ b/packages/kbn-journeys/journey/journey_ftr_harness.ts @@ -29,9 +29,11 @@ import type { Step, AnyStep } from './journey'; import type { JourneyConfig } from './journey_config'; import { JourneyScreenshots } from './journey_screenshots'; import { getNewPageObject } from '../services/page'; +import { getSynthtraceClient } from '../services/synthtrace'; export class JourneyFtrHarness { private readonly screenshots: JourneyScreenshots; + private readonly kbnUrl: KibanaUrl; constructor( private readonly log: ToolingLog, @@ -44,6 +46,15 @@ export class JourneyFtrHarness { private readonly journeyConfig: JourneyConfig ) { this.screenshots = new JourneyScreenshots(this.journeyConfig.getName()); + this.kbnUrl = new KibanaUrl( + new URL( + Url.format({ + protocol: this.config.get('servers.kibana.protocol'), + hostname: this.config.get('servers.kibana.hostname'), + port: this.config.get('servers.kibana.port'), + }) + ) + ); } private browser: ChromiumBrowser | undefined; @@ -61,6 +72,7 @@ export class JourneyFtrHarness { // journey can be run to collect EBT/APM metrics or just as a functional test // TEST_PERFORMANCE_PHASE is defined via scripts/run_perfomance.js run only private readonly isPerformanceRun = process.env.TEST_PERFORMANCE_PHASE || false; + private readonly isWarmupPhase = process.env.TEST_PERFORMANCE_PHASE === 'WARMUP'; // Update the Telemetry and APM global labels to link traces with journey private async updateTelemetryAndAPMLabels(labels: { [k: string]: string }) { @@ -158,16 +170,54 @@ export class JourneyFtrHarness { await this.interceptBrowserRequests(this.page); } + private async runSynthtrace() { + const config = this.journeyConfig.getSynthtraceConfig(); + if (config) { + const client = await getSynthtraceClient(config.type, { + log: this.log, + es: this.es, + auth: this.auth, + kbnUrl: this.kbnUrl, + }); + const generator = config.generator(config.options); + await client.index(generator); + } + } + + /** + * onSetup is part of high level 'before' hook and does the following sequentially: + * 1. Start browser + * 2. Load test data (opt-in) + * 3. Run BeforeSteps (opt-in) + * 4. Setup APM + */ private async onSetup() { // We start browser and init page in the first place await this.setupBrowserAndPage(); - // We allow opt-in beforeSteps hook to manage Kibana/ES state + + // We allow opt-in beforeSteps hook to manage Kibana/ES after start, install integrations, etc. await this.journeyConfig.getBeforeStepsFn(this.getCtx()); - // Loading test data + + /** + * Loading test data, optionally but following the order: + * 1. Synthtrace client + * 2. ES archives + * 3. Kbn archives (Saved objects) + */ + + // To insure we ingest data with synthtrace only once during performance run + if (!this.isPerformanceRun || this.isWarmupPhase) { + await this.runSynthtrace(); + } + await Promise.all([ asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => { if (this.isPerformanceRun) { - // we start Elasticsearch only once and keep ES data persisitent. + // + /** + * During performance run we ingest data to ES before WARMUP phase, and avoid re-indexing + * before TEST phase by insuring index already exists + */ await this.esArchiver.loadIfNeeded(esArchive); } else { await this.esArchiver.load(esArchive); @@ -242,7 +292,9 @@ export class JourneyFtrHarness { await this.teardownApm(); await Promise.all([ asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => { - // Keep ES data when journey is run twice (avoid unload after "Warmup" phase) + /** + * Keep ES data after WARMUP phase to avoid re-indexing + */ if (!this.isPerformanceRun) { await this.esArchiver.unload(esArchive); } diff --git a/packages/kbn-journeys/kibana.jsonc b/packages/kbn-journeys/kibana.jsonc index b90e3b548d1ef..227c4b20cf080 100644 --- a/packages/kbn-journeys/kibana.jsonc +++ b/packages/kbn-journeys/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "test-helper", "id": "@kbn/journeys", "owner": ["@elastic/kibana-operations", "@elastic/appex-qa"], "devOnly": true diff --git a/packages/kbn-journeys/services/synthtrace.ts b/packages/kbn-journeys/services/synthtrace.ts new file mode 100644 index 0000000000000..ffb4f06f20007 --- /dev/null +++ b/packages/kbn-journeys/services/synthtrace.ts @@ -0,0 +1,123 @@ +/* + * 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 { + ApmSynthtraceEsClient, + ApmSynthtraceKibanaClient, + InfraSynthtraceEsClient, + InfraSynthtraceKibanaClient, +} from '@kbn/apm-synthtrace'; +import { ToolingLog } from '@kbn/tooling-log'; +import Url from 'url'; +import { Logger } from '@kbn/apm-synthtrace/src/lib/utils/create_logger'; +import { Auth, Es } from '.'; +import { KibanaUrl } from './kibana_url'; + +export interface SynthtraceClientOptions { + kbnUrl: KibanaUrl; + auth: Auth; + es: Es; + log: ToolingLog; +} +export type SynthtraceClient = InfraSynthtraceEsClient | ApmSynthtraceEsClient; +export type SynthtraceClientType = 'infra' | 'apm'; + +export async function getSynthtraceClient( + type: SynthtraceClientType, + options: SynthtraceClientOptions +): Promise { + if (type === 'infra') { + return initInfraSynthtraceClient(options); + } else { + return initApmSynthtraceClient(options); + } +} + +// Adapting ToolingLog instance to Logger interface +class LoggerAdapter implements Logger { + private log: ToolingLog; + private joiner = ', '; + + constructor(log: ToolingLog) { + this.log = log; + } + + debug(...args: any[]): void { + this.log.debug(args.join(this.joiner)); + } + + info(...args: any[]): void { + this.log.info(args.join(this.joiner)); + } + + error(arg: string | Error): void { + this.log.error(arg); + } + + perf(name: string, cb: () => T): T { + const startTime = Date.now(); + const result = cb(); + const duration = Date.now() - startTime; + const durationInSeconds = duration / 1000; + const formattedTime = durationInSeconds.toFixed(3) + 's'; + this.log.info(`${name} took ${formattedTime}.`); + return result; + } +} + +async function initInfraSynthtraceClient(options: SynthtraceClientOptions) { + const { log, es, auth, kbnUrl } = options; + const logger: Logger = new LoggerAdapter(log); + + const synthKbnClient = new InfraSynthtraceKibanaClient({ + logger, + target: kbnUrl.get(), + username: auth.getUsername(), + password: auth.getPassword(), + }); + const pkgVersion = await synthKbnClient.fetchLatestSystemPackageVersion(); + await synthKbnClient.installSystemPackage(pkgVersion); + + const synthEsClient = new InfraSynthtraceEsClient({ + logger, + client: es, + refreshAfterIndex: true, + }); + + return synthEsClient; +} + +async function initApmSynthtraceClient(options: SynthtraceClientOptions) { + const { log, es, auth, kbnUrl } = options; + const logger: Logger = new LoggerAdapter(log); + const kibanaUrl = new URL(kbnUrl.get()); + const kibanaUrlWithAuth = Url.format({ + protocol: kibanaUrl.protocol, + hostname: kibanaUrl.hostname, + port: kibanaUrl.port, + auth: `${auth.getUsername()}:${auth.getPassword()}`, + }); + + const synthKbnClient = new ApmSynthtraceKibanaClient({ + logger, + target: kibanaUrlWithAuth, + }); + const packageVersion = await synthKbnClient.fetchLatestApmPackageVersion(); + await synthKbnClient.installApmPackage(packageVersion); + + const synthEsClient = new ApmSynthtraceEsClient({ + client: es, + logger, + refreshAfterIndex: true, + version: packageVersion, + }); + + synthEsClient.pipeline(synthEsClient.getDefaultPipeline(false)); + + return synthEsClient; +} diff --git a/packages/kbn-journeys/tsconfig.json b/packages/kbn-journeys/tsconfig.json index 7917081cb1847..93165418b575a 100644 --- a/packages/kbn-journeys/tsconfig.json +++ b/packages/kbn-journeys/tsconfig.json @@ -19,6 +19,8 @@ "@kbn/std", "@kbn/test-subj-selector", "@kbn/core-http-common", + "@kbn/apm-synthtrace-client", + "@kbn/apm-synthtrace", ], "exclude": [ "target/**/*", diff --git a/packages/kbn-management/cards_navigation/kibana.jsonc b/packages/kbn-management/cards_navigation/kibana.jsonc index 9e83acc2ae5df..3c43395c3e055 100644 --- a/packages/kbn-management/cards_navigation/kibana.jsonc +++ b/packages/kbn-management/cards_navigation/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-cards-navigation", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-management/settings/application/kibana.jsonc b/packages/kbn-management/settings/application/kibana.jsonc index ab9c47c87f60d..f50463a894a07 100644 --- a/packages/kbn-management/settings/application/kibana.jsonc +++ b/packages/kbn-management/settings/application/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-application", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-management/settings/components/field_category/kibana.jsonc b/packages/kbn-management/settings/components/field_category/kibana.jsonc index ac8859b05df4b..4a893b35daa5c 100644 --- a/packages/kbn-management/settings/components/field_category/kibana.jsonc +++ b/packages/kbn-management/settings/components/field_category/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-components-field-category", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-management/settings/components/field_input/kibana.jsonc b/packages/kbn-management/settings/components/field_input/kibana.jsonc index afd721741627b..e5d091cb8b0f2 100644 --- a/packages/kbn-management/settings/components/field_input/kibana.jsonc +++ b/packages/kbn-management/settings/components/field_input/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-components-field-input", - "owner": "@elastic/platform-deployment-management" -} \ No newline at end of file + "owner": "@elastic/kibana-management" +} diff --git a/packages/kbn-management/settings/components/field_row/kibana.jsonc b/packages/kbn-management/settings/components/field_row/kibana.jsonc index f931d719df741..8b30b47dca8fc 100644 --- a/packages/kbn-management/settings/components/field_row/kibana.jsonc +++ b/packages/kbn-management/settings/components/field_row/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-components-field-row", - "owner": "@elastic/platform-deployment-management" -} \ No newline at end of file + "owner": "@elastic/kibana-management" +} diff --git a/packages/kbn-management/settings/components/form/kibana.jsonc b/packages/kbn-management/settings/components/form/kibana.jsonc index 5db9d203e37f3..177e93fd1f066 100644 --- a/packages/kbn-management/settings/components/form/kibana.jsonc +++ b/packages/kbn-management/settings/components/form/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-components-form", - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-management/settings/field_definition/kibana.jsonc b/packages/kbn-management/settings/field_definition/kibana.jsonc index 43e2f19c5363f..8d4215c7b561c 100644 --- a/packages/kbn-management/settings/field_definition/kibana.jsonc +++ b/packages/kbn-management/settings/field_definition/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-field-definition", - "owner": "@elastic/platform-deployment-management" -} \ No newline at end of file + "owner": "@elastic/kibana-management" +} diff --git a/packages/kbn-management/settings/section_registry/kibana.jsonc b/packages/kbn-management/settings/section_registry/kibana.jsonc index 86e242165a8e8..d9937aa3e8d87 100644 --- a/packages/kbn-management/settings/section_registry/kibana.jsonc +++ b/packages/kbn-management/settings/section_registry/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-section-registry", - "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management" -} \ No newline at end of file + "owner": "@elastic/appex-sharedux @elastic/kibana-management" +} diff --git a/packages/kbn-management/settings/setting_ids/kibana.jsonc b/packages/kbn-management/settings/setting_ids/kibana.jsonc index 934b0dd5baaac..62b1f89566d58 100644 --- a/packages/kbn-management/settings/setting_ids/kibana.jsonc +++ b/packages/kbn-management/settings/setting_ids/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-ids", - "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management" + "owner": "@elastic/appex-sharedux @elastic/kibana-management" } diff --git a/packages/kbn-management/settings/types/kibana.jsonc b/packages/kbn-management/settings/types/kibana.jsonc index 2a8c86bd31196..291616c13e049 100644 --- a/packages/kbn-management/settings/types/kibana.jsonc +++ b/packages/kbn-management/settings/types/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-types", - "owner": "@elastic/platform-deployment-management" -} \ No newline at end of file + "owner": "@elastic/kibana-management" +} diff --git a/packages/kbn-management/settings/utilities/kibana.jsonc b/packages/kbn-management/settings/utilities/kibana.jsonc index ebafaeba6d884..d3c9c86a0f3d2 100644 --- a/packages/kbn-management/settings/utilities/kibana.jsonc +++ b/packages/kbn-management/settings/utilities/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/management-settings-utilities", - "owner": "@elastic/platform-deployment-management" -} \ No newline at end of file + "owner": "@elastic/kibana-management" +} diff --git a/packages/kbn-management/storybook/config/kibana.jsonc b/packages/kbn-management/storybook/config/kibana.jsonc index 0af9dae356b6b..fa0fde7347f75 100644 --- a/packages/kbn-management/storybook/config/kibana.jsonc +++ b/packages/kbn-management/storybook/config/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "shared-common", "id": "@kbn/management-storybook-config", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "devOnly": true } diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 05b613ab4b222..5b89972d34ea3 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -103,7 +103,7 @@ pageLoadAssetSize: navigation: 37269 newsfeed: 42228 noDataPage: 5000 - observability: 115443 + observability: 167673 observabilityAIAssistant: 58230 observabilityAIAssistantApp: 27680 observabilityLogsExplorer: 46650 @@ -136,6 +136,7 @@ pageLoadAssetSize: serverlessSearch: 72995 sessionView: 77750 share: 71239 + slo: 37039 snapshotRestore: 79032 spaces: 57868 stackAlerts: 58316 diff --git a/packages/kbn-performance-testing-dataset-extractor/kibana.jsonc b/packages/kbn-performance-testing-dataset-extractor/kibana.jsonc index 1363aaa66d61f..e60de9931231e 100644 --- a/packages/kbn-performance-testing-dataset-extractor/kibana.jsonc +++ b/packages/kbn-performance-testing-dataset-extractor/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "test-helper", "id": "@kbn/performance-testing-dataset-extractor", "devOnly": true, "owner": "@elastic/kibana-performance-testing" diff --git a/packages/kbn-repo-source-classifier/src/config.ts b/packages/kbn-repo-source-classifier/src/config.ts index 283ca70b20c6d..67eb9e97ca390 100644 --- a/packages/kbn-repo-source-classifier/src/config.ts +++ b/packages/kbn-repo-source-classifier/src/config.ts @@ -53,6 +53,7 @@ export const TEST_DIR = new Set([ 'stub', 'e2e', 'ftr_e2e', + 'journeys_e2e', 'storybook', '.storybook', 'integration_tests', diff --git a/packages/kbn-reporting/common/constants.ts b/packages/kbn-reporting/common/constants.ts index 185c1fc8c4392..4620b46e8cab6 100644 --- a/packages/kbn-reporting/common/constants.ts +++ b/packages/kbn-reporting/common/constants.ts @@ -6,8 +6,6 @@ * Side Public License, v 1. */ -export const PLUGIN_ID = 'reporting'; - export const ALLOWED_JOB_CONTENT_TYPES = [ 'application/json', 'application/pdf', @@ -16,16 +14,18 @@ export const ALLOWED_JOB_CONTENT_TYPES = [ 'text/plain', ]; -// APM -export const REPORTING_TRANSACTION_TYPE = PLUGIN_ID; - -export const REPORTING_REDIRECT_LOCATOR_STORE_KEY = '__REPORTING_REDIRECT_LOCATOR_STORE_KEY__'; +/* + * UI Settings + */ export const UI_SETTINGS_SEARCH_INCLUDE_FROZEN = 'search:includeFrozen'; export const UI_SETTINGS_CUSTOM_PDF_LOGO = 'xpackReporting:customPdfLogo'; export const UI_SETTINGS_DATEFORMAT_TZ = 'dateFormat:tz'; -// Licenses +/* + * Licenses + */ + export const LICENSE_TYPE_TRIAL = 'trial' as const; export const LICENSE_TYPE_BASIC = 'basic' as const; export const LICENSE_TYPE_CLOUD_STANDARD = 'standard' as const; @@ -33,30 +33,30 @@ export const LICENSE_TYPE_GOLD = 'gold' as const; export const LICENSE_TYPE_PLATINUM = 'platinum' as const; export const LICENSE_TYPE_ENTERPRISE = 'enterprise' as const; -export const REPORTING_SYSTEM_INDEX = '.reporting'; +/* + * Notifications + */ export const JOB_COMPLETION_NOTIFICATIONS_SESSION_KEY = 'xpack.reporting.jobCompletionNotifications'; -/** - * A way to get the client side route for the reporting redirect app. - * - * TODO: Add a job ID and a locator to use so that we can redirect without expecting state to - * be injected to the page +/* + * Client-side paths */ -export const getRedirectAppPath = () => { - return '/app/reportingRedirect'; -}; -export const ILM_POLICY_NAME = 'kibana-reporting'; - -// Usage counter types -export const API_USAGE_COUNTER_TYPE = 'reportingApi'; -export const API_USAGE_ERROR_TYPE = 'reportingApiError'; +// Redirection URL used to load app state for screenshotting +export const REPORTING_REDIRECT_APP = '/app/reportingRedirect'; +export const REPORTING_REDIRECT_LOCATOR_STORE_KEY = '__REPORTING_REDIRECT_LOCATOR_STORE_KEY__'; // Management UI route export const REPORTING_MANAGEMENT_HOME = '/app/management/insightsAndAlerting/reporting'; +/* + * ILM + */ + +export const ILM_POLICY_NAME = 'kibana-reporting'; + /* * JobStatus: * - Begins as 'pending' @@ -72,11 +72,10 @@ export enum JOB_STATUS { WARNINGS = 'completed_with_warnings', } -// Job params require a `version` field as of 7.15.0. For older jobs set with -// automation that have no version value in the job params, we assume the -// intended version is 7.14.0 -export const UNVERSIONED_VERSION = '7.14.0'; +/* + * Test Subjects + */ -// Test Subjects +// Management app subjects export const REPORT_TABLE_ID = 'reportJobListing'; export const REPORT_TABLE_ROW_ID = 'reportJobRow'; diff --git a/packages/kbn-reporting/export_types/pdf/printable_pdf.ts b/packages/kbn-reporting/export_types/pdf/printable_pdf.ts index 0aaa5cbe59e20..113f5035e19e2 100644 --- a/packages/kbn-reporting/export_types/pdf/printable_pdf.ts +++ b/packages/kbn-reporting/export_types/pdf/printable_pdf.ts @@ -19,7 +19,6 @@ import { LICENSE_TYPE_GOLD, LICENSE_TYPE_PLATINUM, LICENSE_TYPE_TRIAL, - REPORTING_TRANSACTION_TYPE, } from '@kbn/reporting-common'; import { TaskInstanceFields, TaskRunResult } from '@kbn/reporting-common/types'; import { @@ -27,7 +26,7 @@ import { PDF_JOB_TYPE, TaskPayloadPDF, } from '@kbn/reporting-export-types-pdf-common'; -import { ExportType, decryptJobHeaders } from '@kbn/reporting-server'; +import { ExportType, REPORTING_TRANSACTION_TYPE, decryptJobHeaders } from '@kbn/reporting-server'; import { getCustomLogo } from './get_custom_logo'; import { getFullUrls } from './get_full_urls'; diff --git a/packages/kbn-reporting/export_types/pdf/printable_pdf_v2.ts b/packages/kbn-reporting/export_types/pdf/printable_pdf_v2.ts index ad513ec006acb..c4c4a88798985 100644 --- a/packages/kbn-reporting/export_types/pdf/printable_pdf_v2.ts +++ b/packages/kbn-reporting/export_types/pdf/printable_pdf_v2.ts @@ -20,8 +20,8 @@ import { LICENSE_TYPE_PLATINUM, LICENSE_TYPE_TRIAL, REPORTING_REDIRECT_LOCATOR_STORE_KEY, - REPORTING_TRANSACTION_TYPE, } from '@kbn/reporting-common'; +import { REPORTING_TRANSACTION_TYPE } from '@kbn/reporting-server'; import type { TaskInstanceFields, TaskRunResult } from '@kbn/reporting-common/types'; import type { TaskPayloadPDFV2 } from '@kbn/reporting-export-types-pdf-common'; import { diff --git a/packages/kbn-reporting/export_types/png/png_v2.ts b/packages/kbn-reporting/export_types/png/png_v2.ts index b8ced55f0993c..204c6bd5ab5e2 100644 --- a/packages/kbn-reporting/export_types/png/png_v2.ts +++ b/packages/kbn-reporting/export_types/png/png_v2.ts @@ -29,7 +29,6 @@ import { LICENSE_TYPE_PLATINUM, LICENSE_TYPE_TRIAL, REPORTING_REDIRECT_LOCATOR_STORE_KEY, - REPORTING_TRANSACTION_TYPE, } from '@kbn/reporting-common'; import type { TaskInstanceFields, TaskRunResult } from '@kbn/reporting-common/types'; import { @@ -38,7 +37,12 @@ import { PNG_REPORT_TYPE_V2, TaskPayloadPNGV2, } from '@kbn/reporting-export-types-png-common'; -import { decryptJobHeaders, ExportType, getFullRedirectAppUrl } from '@kbn/reporting-server'; +import { + decryptJobHeaders, + ExportType, + getFullRedirectAppUrl, + REPORTING_TRANSACTION_TYPE, +} from '@kbn/reporting-server'; export class PngExportType extends ExportType { id = PNG_REPORT_TYPE_V2; diff --git a/packages/kbn-reporting/public/reporting_api_client.ts b/packages/kbn-reporting/public/reporting_api_client.ts index 9086a013f1c76..814e5822b747b 100644 --- a/packages/kbn-reporting/public/reporting_api_client.ts +++ b/packages/kbn-reporting/public/reporting_api_client.ts @@ -15,7 +15,7 @@ import { PUBLIC_ROUTES, REPORTING_MANAGEMENT_HOME, buildKibanaPath, - getRedirectAppPath, + REPORTING_REDIRECT_APP, } from '@kbn/reporting-common'; import { BaseParams, JobId, ManagementLinkFn, ReportApiJSON } from '@kbn/reporting-common/types'; import rison from '@kbn/rison'; @@ -83,7 +83,7 @@ export class ReportingAPIClient implements IReportingAPI { const path = buildKibanaPath({ basePath: this.http.basePath.serverBasePath, spaceId: job.spaceId, - appPath: getRedirectAppPath(), + appPath: REPORTING_REDIRECT_APP, }); const href = `${path}?${searchParams}`; diff --git a/packages/kbn-reporting/server/constants.ts b/packages/kbn-reporting/server/constants.ts new file mode 100644 index 0000000000000..a625aefcf3904 --- /dev/null +++ b/packages/kbn-reporting/server/constants.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 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 const PLUGIN_ID = 'reporting'; + +/* + * Storage + */ + +export const REPORTING_SYSTEM_INDEX = '.reporting'; + +/* + * Telemetry + */ + +// API Counters +export const API_USAGE_COUNTER_TYPE = 'reportingApi'; +export const API_USAGE_ERROR_TYPE = 'reportingApiError'; + +// Event-Based Counters +export enum EventType { + REPORT_CREATION = 'report_creation', + REPORT_CLAIM = 'report_claim', + REPORT_COMPLETION_CSV = 'report_completion_csv', + REPORT_COMPLETION_SCREENSHOT = 'report_completion_screenshot', + REPORT_ERROR = 'report_error', + REPORT_DOWNLOAD = 'report_download', + REPORT_DELETION = 'report_deletion', +} +export enum FieldType { + REPORT_ID = 'report_id', + EXPORT_TYPE = 'export_type', + OBJECT_TYPE = 'object_type', + IS_DEPRECATED = 'is_deprecated', + IS_PUBLIC_API = 'is_public_api', + DURATION_MS = 'duration_ms', + ERROR_CODE = 'error_code', + ERROR_MESSAGE = 'error_message', + BYTE_SIZE = 'byte_size', + NUM_PAGES = 'num_pages', + SCREENSHOT_PIXELS = 'screenshot_pixels', + SCREENSHOT_LAYOUT = 'screenshot_layout', + CSV_ROWS = 'csv_rows', + CSV_COLUMNS = 'csv_columns', +} + +/* + * APM + */ + +export const REPORTING_TRANSACTION_TYPE = PLUGIN_ID; + +/* + * Job versioning + */ + +// Job params require a `version` field as of 7.15.0. For older jobs set with +// automation that have no version value in the job params, we assume the +// intended version is 7.14.0 +export const UNVERSIONED_VERSION = '7.14.0'; diff --git a/packages/kbn-reporting/server/get_full_redirect_app_url.ts b/packages/kbn-reporting/server/get_full_redirect_app_url.ts index e09f7b8ceed9d..dd35d9d90da49 100644 --- a/packages/kbn-reporting/server/get_full_redirect_app_url.ts +++ b/packages/kbn-reporting/server/get_full_redirect_app_url.ts @@ -8,7 +8,7 @@ import { format } from 'url'; -import { buildKibanaPath, getRedirectAppPath } from '@kbn/reporting-common'; +import { buildKibanaPath, REPORTING_REDIRECT_APP } from '@kbn/reporting-common'; import type { ReportingServerInfo } from '@kbn/reporting-common/types'; import type { ReportingConfigType } from '.'; @@ -24,7 +24,7 @@ export function getFullRedirectAppUrl( const path = buildKibanaPath({ basePath: serverInfo.basePath, spaceId, - appPath: getRedirectAppPath(), + appPath: REPORTING_REDIRECT_APP, }); return format({ diff --git a/packages/kbn-reporting/server/index.ts b/packages/kbn-reporting/server/index.ts index 08240bc28fe0a..d6d82decd52c1 100644 --- a/packages/kbn-reporting/server/index.ts +++ b/packages/kbn-reporting/server/index.ts @@ -15,4 +15,5 @@ export { getFieldFormats, setFieldFormats } from './services'; export type { BaseExportTypeSetupDeps, BaseExportTypeStartDeps } from './export_type'; export { ConfigSchema } from './config_schema'; +export * from './constants'; export * from './types'; diff --git a/packages/kbn-search-api-panels/components/select_client.tsx b/packages/kbn-search-api-panels/components/select_client.tsx index 8328a32bca75b..59377d384e9d2 100644 --- a/packages/kbn-search-api-panels/components/select_client.tsx +++ b/packages/kbn-search-api-panels/components/select_client.tsx @@ -12,7 +12,6 @@ import { EuiCallOut, EuiFlexGroup, EuiFlexItem, - EuiLink, EuiPanelProps, EuiSpacer, EuiText, @@ -20,25 +19,32 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import type { HttpStart } from '@kbn/core-http-browser'; +import type { ApplicationStart } from '@kbn/core-application-browser'; +import type { SharePluginStart } from '@kbn/share-plugin/public'; +import type { ConsolePluginStart } from '@kbn/console-plugin/public'; import { OverviewPanel } from './overview_panel'; import './select_client.scss'; +import { TryInConsoleButton } from './try_in_console_button'; export interface SelectClientPanelProps { docLinks: { elasticsearchClients: string; kibanaRunApiInConsole: string }; - http: HttpStart; isPanelLeft?: boolean; overviewPanelProps?: Partial; callout?: React.ReactNode; + application?: ApplicationStart; + consolePlugin?: ConsolePluginStart; + sharePlugin: SharePluginStart; } export const SelectClientPanel: React.FC = ({ docLinks, children, - http, isPanelLeft = true, overviewPanelProps, callout, + application, + consolePlugin, + sharePlugin, }) => { const panelContent = ( <> @@ -73,11 +79,14 @@ export const SelectClientPanel: React.FC = ({ })} - - {i18n.translate('searchApiPanels.welcomeBanner.selectClient.callout.link', { + + />

@@ -92,14 +101,18 @@ export const SelectClientPanel: React.FC = ({ defaultMessage="Elastic builds and maintains clients in several popular languages and our community has contributed many more. Select your favorite language client or dive into the {console} to get started." values={{ console: ( - - {i18n.translate( + + link + /> ), }} /> diff --git a/packages/kbn-search-api-panels/components/try_in_console_button.tsx b/packages/kbn-search-api-panels/components/try_in_console_button.tsx index 7007c306a2cd6..17ea35bf6c9d1 100644 --- a/packages/kbn-search-api-panels/components/try_in_console_button.tsx +++ b/packages/kbn-search-api-panels/components/try_in_console_button.tsx @@ -8,7 +8,7 @@ import React from 'react'; -import { EuiButtonEmpty } from '@elastic/eui'; +import { EuiButtonEmpty, EuiLink } from '@elastic/eui'; import type { ApplicationStart } from '@kbn/core-application-browser'; import type { SharePluginStart } from '@kbn/share-plugin/public'; import type { ConsolePluginStart } from '@kbn/console-plugin/public'; @@ -17,26 +17,34 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { compressToEncodedURIComponent } from 'lz-string'; export interface TryInConsoleButtonProps { - request: string; + request?: string; application?: ApplicationStart; consolePlugin?: ConsolePluginStart; sharePlugin: SharePluginStart; + content?: string | React.ReactElement; + showIcon?: boolean; + link?: boolean; } export const TryInConsoleButton = ({ request, application, consolePlugin, sharePlugin, + content, + showIcon = true, + link = false, }: TryInConsoleButtonProps) => { const { url } = sharePlugin; const canShowDevtools = !!application?.capabilities?.dev_tools?.show; if (!canShowDevtools || !url) return null; - const devToolsDataUri = compressToEncodedURIComponent(request); + const devToolsDataUri = request ? compressToEncodedURIComponent(request) : null; const consolePreviewLink = url.locators.get('CONSOLE_APP_LOCATOR')?.useUrl( - { - loadFrom: `data:text/plain,${devToolsDataUri}`, - }, + devToolsDataUri + ? { + loadFrom: `data:text/plain,${devToolsDataUri}`, + } + : {}, undefined, [request] ); @@ -54,12 +62,31 @@ export const TryInConsoleButton = ({ } }; + if (link) { + return ( + + {content ? ( + content + ) : ( + + )} + + ); + } + return ( - - + + {content ? ( + content + ) : ( + + )} ); }; diff --git a/packages/kbn-search-api-panels/tsconfig.json b/packages/kbn-search-api-panels/tsconfig.json index 92083d5989a83..ace7672996696 100644 --- a/packages/kbn-search-api-panels/tsconfig.json +++ b/packages/kbn-search-api-panels/tsconfig.json @@ -17,7 +17,6 @@ ], "kbn_references": [ "@kbn/i18n", - "@kbn/core-http-browser", "@kbn/core-application-browser", "@kbn/share-plugin", "@kbn/i18n-react", diff --git a/packages/kbn-spec-to-console/kibana.jsonc b/packages/kbn-spec-to-console/kibana.jsonc index 8138406cbeaa5..3cb4ef3763a33 100644 --- a/packages/kbn-spec-to-console/kibana.jsonc +++ b/packages/kbn-spec-to-console/kibana.jsonc @@ -2,5 +2,5 @@ "type": "shared-common", "id": "@kbn/spec-to-console", "devOnly": true, - "owner": "@elastic/platform-deployment-management" + "owner": "@elastic/kibana-management" } diff --git a/packages/kbn-std/index.ts b/packages/kbn-std/index.ts index 2a39de500cb25..3ee605cbf98fa 100644 --- a/packages/kbn-std/index.ts +++ b/packages/kbn-std/index.ts @@ -27,6 +27,6 @@ export { asyncForEach, asyncForEachWithLimit, } from './src/iteration'; -export { ensureDeepObject } from './src/ensure_deep_object'; +export { ensureDeepObject, ensureValidObjectPath } from './src/ensure_deep_object'; export { Semaphore } from './src/semaphore'; export { stripVersionQualifier } from './src/strip_version_qualifier'; diff --git a/packages/kbn-std/src/ensure_deep_object.ts b/packages/kbn-std/src/ensure_deep_object.ts index d93252010d278..42550bd09436f 100644 --- a/packages/kbn-std/src/ensure_deep_object.ts +++ b/packages/kbn-std/src/ensure_deep_object.ts @@ -17,7 +17,7 @@ const separator = '.'; * @returns Same object instance with expanded properties. */ export function ensureDeepObject(obj: any, path: string[] = []): any { - assertValidPath(path); + ensureValidObjectPath(path); if (obj == null || typeof obj !== 'object') { return obj; @@ -41,7 +41,7 @@ export function ensureDeepObject(obj: any, path: string[] = []): any { } function walk(obj: any, keys: string[], value: any, path: string[]) { - assertValidPath([...path, ...keys]); + ensureValidObjectPath([...path, ...keys]); const key = keys.shift()!; if (keys.length === 0) { @@ -56,7 +56,7 @@ function walk(obj: any, keys: string[], value: any, path: string[]) { walk(obj[key], keys, ensureDeepObject(value, [...path, key, ...keys]), [...path, key]); } -const assertValidPath = (path: string[]) => { +export const ensureValidObjectPath = (path: string[]) => { const flat = path.join('.'); FORBIDDEN_PATTERNS.forEach((pattern) => { if (flat.includes(pattern)) { diff --git a/packages/kbn-unified-data-table/src/components/source_document.tsx b/packages/kbn-unified-data-table/src/components/source_document.tsx index 15924fc02521e..3726159a6b2ea 100644 --- a/packages/kbn-unified-data-table/src/components/source_document.tsx +++ b/packages/kbn-unified-data-table/src/components/source_document.tsx @@ -66,7 +66,7 @@ export function SourceDocument({ {pairs.map(([fieldDisplayName, value, fieldName]) => { // temporary solution for text based mode. As there are a lot of unsupported fields we want to // hide the empty one from the Document view - if (isPlainRecord && fieldName && !row.flattened[fieldName]) return null; + if (isPlainRecord && fieldName && (row.flattened[fieldName] ?? null) === null) return null; return ( diff --git a/packages/serverless/settings/common/kibana.jsonc b/packages/serverless/settings/common/kibana.jsonc index ee4ea591c85c5..57e57b4a5d828 100644 --- a/packages/serverless/settings/common/kibana.jsonc +++ b/packages/serverless/settings/common/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/serverless-common-settings", - "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management" + "owner": "@elastic/appex-sharedux @elastic/kibana-management" } diff --git a/packages/serverless/settings/observability_project/kibana.jsonc b/packages/serverless/settings/observability_project/kibana.jsonc index e2db00d894bcf..316786b21dc67 100644 --- a/packages/serverless/settings/observability_project/kibana.jsonc +++ b/packages/serverless/settings/observability_project/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/serverless-observability-settings", - "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team" + "owner": "@elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team" } diff --git a/packages/serverless/settings/search_project/kibana.jsonc b/packages/serverless/settings/search_project/kibana.jsonc index f73b63503ae4d..bcefb7f213dae 100644 --- a/packages/serverless/settings/search_project/kibana.jsonc +++ b/packages/serverless/settings/search_project/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/serverless-search-settings", - "owner": "@elastic/enterprise-search-frontend @elastic/platform-deployment-management" + "owner": "@elastic/enterprise-search-frontend @elastic/kibana-management" } diff --git a/packages/serverless/settings/security_project/kibana.jsonc b/packages/serverless/settings/security_project/kibana.jsonc index 818e3068d704c..fdf4f2d206f0d 100644 --- a/packages/serverless/settings/security_project/kibana.jsonc +++ b/packages/serverless/settings/security_project/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/serverless-security-settings", - "owner": "@elastic/security-solution @elastic/platform-deployment-management" + "owner": "@elastic/security-solution @elastic/kibana-management" } diff --git a/packages/shared-ux/code_editor/impl/index.tsx b/packages/shared-ux/code_editor/impl/index.tsx index 31c5e09bc20e3..3bfc8300aedaf 100644 --- a/packages/shared-ux/code_editor/impl/index.tsx +++ b/packages/shared-ux/code_editor/impl/index.tsx @@ -13,6 +13,7 @@ import { EuiSkeletonText, EuiFormControlLayout, EuiErrorBoundary, + useEuiTheme, } from '@elastic/eui'; import type { CodeEditorProps } from './code_editor'; export type { CodeEditorProps } from './code_editor'; @@ -56,8 +57,11 @@ export const CodeEditor: React.FunctionComponent = (props) => { * Renders a Monaco code editor in the same style as other EUI form fields. */ export const CodeEditorField: React.FunctionComponent = (props) => { - const { width, height, options, fullWidth, useDarkTheme } = props; + const { width, height, options, fullWidth, useDarkTheme: useDarkThemeProp } = props; + const { colorMode } = useEuiTheme(); + const useDarkTheme = useDarkThemeProp ?? colorMode === 'DARK'; const theme = useDarkTheme ? darkTheme : lightTheme; + const style = { width, height, diff --git a/packages/solution-nav/es/README.md b/packages/solution-nav/es/README.md new file mode 100644 index 0000000000000..02c517e04ced5 --- /dev/null +++ b/packages/solution-nav/es/README.md @@ -0,0 +1,3 @@ +# @kbn/solution-nav-es + +## This package contains the navigation definition for the Search solution in Kibana stateful. diff --git a/packages/solution-nav/es/definition.ts b/packages/solution-nav/es/definition.ts new file mode 100644 index 0000000000000..e539fe71efdba --- /dev/null +++ b/packages/solution-nav/es/definition.ts @@ -0,0 +1,42 @@ +/* + * 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 { SolutionNavigationDefinition } from '@kbn/core-chrome-browser'; +import { of } from 'rxjs'; + +export const definition: SolutionNavigationDefinition = { + id: 'es', + title: 'Search', + icon: 'logoElasticsearch', + homePage: 'dev_tools', // Temp. Wil be updated when all links are registered + navigationTree$: of({ + body: [ + // Temp. In future work this will be loaded from a package + { + type: 'navGroup', + id: 'search_project_nav', + title: 'Search', + icon: 'logoElasticsearch', + defaultIsCollapsed: false, + isCollapsible: false, + breadcrumbStatus: 'hidden', + children: [ + { + id: 'dev_tools', + title: 'Dev Tools', + link: 'dev_tools:console', + getIsActive: ({ pathNameSerialized, prepend }) => { + return pathNameSerialized.startsWith(prepend('/app/dev_tools')); + }, + spaceBefore: 'm', + }, + ], + }, + ], + }), +}; diff --git a/packages/solution-nav/es/index.ts b/packages/solution-nav/es/index.ts new file mode 100644 index 0000000000000..8024948fb3cd1 --- /dev/null +++ b/packages/solution-nav/es/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 { definition } from './definition'; diff --git a/packages/solution-nav/es/jest.config.js b/packages/solution-nav/es/jest.config.js new file mode 100644 index 0000000000000..5c651f7bb9bbe --- /dev/null +++ b/packages/solution-nav/es/jest.config.js @@ -0,0 +1,13 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/solution-nav/es'], +}; diff --git a/packages/solution-nav/es/kibana.jsonc b/packages/solution-nav/es/kibana.jsonc new file mode 100644 index 0000000000000..7e02c576c397b --- /dev/null +++ b/packages/solution-nav/es/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/solution-nav-es", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/solution-nav/es/package.json b/packages/solution-nav/es/package.json new file mode 100644 index 0000000000000..a73bd66a9ddcc --- /dev/null +++ b/packages/solution-nav/es/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/solution-nav-es", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/solution-nav/es/tsconfig.json b/packages/solution-nav/es/tsconfig.json new file mode 100644 index 0000000000000..6793f0abe08ec --- /dev/null +++ b/packages/solution-nav/es/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-chrome-browser", + ], +} diff --git a/packages/solution-nav/oblt/README.md b/packages/solution-nav/oblt/README.md new file mode 100644 index 0000000000000..c01cf9968c143 --- /dev/null +++ b/packages/solution-nav/oblt/README.md @@ -0,0 +1,3 @@ +# @kbn/solution-nav-oblt + +## This package contains the navigation definition for the Observability solution in Kibana stateful. \ No newline at end of file diff --git a/packages/solution-nav/oblt/definition.ts b/packages/solution-nav/oblt/definition.ts new file mode 100644 index 0000000000000..2ba8dab9edaeb --- /dev/null +++ b/packages/solution-nav/oblt/definition.ts @@ -0,0 +1,37 @@ +/* + * 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 { SolutionNavigationDefinition } from '@kbn/core-chrome-browser'; +import { of } from 'rxjs'; + +export const definition: SolutionNavigationDefinition = { + id: 'oblt', + title: 'Observability', + icon: 'logoObservability', + homePage: 'discover', // Temp. Wil be updated when all links are registered + navigationTree$: of({ + body: [ + // Temp. In future work this will be loaded from a package + { + type: 'navGroup', + id: 'observability_project_nav', + title: 'Observability', + icon: 'logoObservability', + defaultIsCollapsed: false, + isCollapsible: false, + breadcrumbStatus: 'hidden', + children: [ + { + link: 'discover', + spaceBefore: 'm', + }, + ], + }, + ], + }), +}; diff --git a/packages/solution-nav/oblt/index.ts b/packages/solution-nav/oblt/index.ts new file mode 100644 index 0000000000000..8024948fb3cd1 --- /dev/null +++ b/packages/solution-nav/oblt/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 { definition } from './definition'; diff --git a/packages/solution-nav/oblt/jest.config.js b/packages/solution-nav/oblt/jest.config.js new file mode 100644 index 0000000000000..35039f0fc7cd6 --- /dev/null +++ b/packages/solution-nav/oblt/jest.config.js @@ -0,0 +1,13 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/packages/solution-nav/oblt'], +}; diff --git a/packages/solution-nav/oblt/kibana.jsonc b/packages/solution-nav/oblt/kibana.jsonc new file mode 100644 index 0000000000000..50c103d9c87ea --- /dev/null +++ b/packages/solution-nav/oblt/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/solution-nav-oblt", + "owner": "@elastic/appex-sharedux" +} diff --git a/packages/solution-nav/oblt/package.json b/packages/solution-nav/oblt/package.json new file mode 100644 index 0000000000000..e8985b19e9c63 --- /dev/null +++ b/packages/solution-nav/oblt/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/solution-nav-oblt", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} \ No newline at end of file diff --git a/packages/solution-nav/oblt/tsconfig.json b/packages/solution-nav/oblt/tsconfig.json new file mode 100644 index 0000000000000..6793f0abe08ec --- /dev/null +++ b/packages/solution-nav/oblt/tsconfig.json @@ -0,0 +1,21 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-chrome-browser", + ], +} diff --git a/renovate.json b/renovate.json index 70595b721b871..def56e63810bb 100644 --- a/renovate.json +++ b/renovate.json @@ -522,7 +522,7 @@ "team:enterprise-search-frontend", "team:kibana-presentation", "team:kibana-data-discovery", - "team:platform-deployment-management", + "team:kibana-management", "team:kibana-gis", "team:security-solution" ], diff --git a/src/dev/performance/run_performance_cli.ts b/src/dev/performance/run_performance_cli.ts index 810827a89f73f..d25795efc2c8a 100644 --- a/src/dev/performance/run_performance_cli.ts +++ b/src/dev/performance/run_performance_cli.ts @@ -14,7 +14,7 @@ import { ToolingLog } from '@kbn/tooling-log'; import fs from 'fs'; import path from 'path'; -const JOURNEY_BASE_PATH = 'x-pack/performance/journeys'; +const JOURNEY_BASE_PATH = 'x-pack/performance/journeys_e2e'; export interface Journey { name: string; @@ -126,7 +126,7 @@ run( if (journeyPath && fs.statSync(journeyPath).isFile()) { journeys.push({ name: path.parse(journeyPath).name, path: journeyPath }); } else { - // default dir is x-pack/performance/journeys + // default dir is x-pack/performance/journeys_e2e const dir = journeyPath ?? path.resolve(REPO_ROOT, JOURNEY_BASE_PATH); readFilesRecursively(dir, (filePath: string) => journeys.push({ diff --git a/src/dev/storybook/aliases.ts b/src/dev/storybook/aliases.ts index fffa53da5d926..d478350919559 100644 --- a/src/dev/storybook/aliases.ts +++ b/src/dev/storybook/aliases.ts @@ -57,6 +57,7 @@ export const storybookAliases = { security_solution_packages: 'x-pack/packages/security-solution/storybook/config', serverless: 'packages/serverless/storybook/config', shared_ux: 'packages/shared-ux/storybook/config', + slo: 'x-pack/plugins/observability_solution/slo/.storybook', threat_intelligence: 'x-pack/plugins/threat_intelligence/.storybook', triggers_actions_ui: 'x-pack/plugins/triggers_actions_ui/.storybook', ui_actions_enhanced: 'src/plugins/ui_actions_enhanced/.storybook', diff --git a/src/plugins/advanced_settings/kibana.jsonc b/src/plugins/advanced_settings/kibana.jsonc index 1997baa90d97a..c0a338935a590 100644 --- a/src/plugins/advanced_settings/kibana.jsonc +++ b/src/plugins/advanced_settings/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/advanced-settings-plugin", - "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management", + "owner": "@elastic/appex-sharedux @elastic/kibana-management", "plugin": { "id": "advancedSettings", "server": true, diff --git a/src/plugins/console/README.md b/src/plugins/console/README.md index 54648ad767f45..02da27229286a 100644 --- a/src/plugins/console/README.md +++ b/src/plugins/console/README.md @@ -52,7 +52,7 @@ Kibana users benefit greatly from autocomplete suggestions since not all Elastic Autocomplete definitions are all created in the form of javascript objects loaded from `json` and `js` files. ### Creating definitions -The [`generated`](https://github.com/elastic/kibana/blob/main/src/plugins/console/server/lib/spec_definitions/json/generated) folder contains definitions created automatically from Elasticsearch specifications. See this [README](https://github.com/elastic/kibana/blob/main/packages/kbn-generate-console-definitions/README.md) file for more information on the `generate-console-definitions` script. The AppEx/Management team (@elastic/platform-deployment-management) regularly runs the script to update the definitions and is planning to automate this process. +The [`generated`](https://github.com/elastic/kibana/blob/main/src/plugins/console/server/lib/spec_definitions/json/generated) folder contains definitions created automatically from Elasticsearch specifications. See this [README](https://github.com/elastic/kibana/blob/main/packages/kbn-generate-console-definitions/README.md) file for more information on the `generate-console-definitions` script. The AppEx/Management team (@elastic/kibana-management) regularly runs the script to update the definitions and is planning to automate this process. Manually created override files in the [`overrides`](https://github.com/elastic/kibana/blob/main/src/plugins/console/server/lib/spec_definitions/json/overrides) folder contain additions for request body parameters since those are not created by the script. Any other fixes such as documentation links, request methods and patterns and url parameters diff --git a/src/plugins/console/kibana.jsonc b/src/plugins/console/kibana.jsonc index 0a0d4e4b548d4..2dc047ebb661d 100644 --- a/src/plugins/console/kibana.jsonc +++ b/src/plugins/console/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/console-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "console", "server": true, diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.scss b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.scss new file mode 100644 index 0000000000000..859a0ee11067e --- /dev/null +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.scss @@ -0,0 +1,6 @@ +.dshSolutionToolbar__editorContextMenu { + @include euiScrollBar; + @include euiOverflowShadow; + max-height: 60vh; + overflow-y: scroll; +} \ No newline at end of file diff --git a/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx index 7fe5c9343aa64..1b460d247d67c 100644 --- a/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx +++ b/src/plugins/dashboard/public/dashboard_app/top_nav/editor_menu.tsx @@ -6,6 +6,8 @@ * Side Public License, v 1. */ +import './editor_menu.scss'; + import React, { useCallback, useEffect, useMemo, useState, useRef } from 'react'; import { EuiBadge, diff --git a/src/plugins/dev_tools/kibana.jsonc b/src/plugins/dev_tools/kibana.jsonc index 32b9040a34e54..9665ca223ca1d 100644 --- a/src/plugins/dev_tools/kibana.jsonc +++ b/src/plugins/dev_tools/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/dev-tools-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "devTools", "server": true, diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx index 0e7cf4a97f4d1..41a05a18da62b 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx @@ -83,8 +83,10 @@ export function DiscoverLayout({ stateContainer }: DiscoverLayoutProps) { state.columns, state.sort, ]); + const isPlainRecord = useMemo(() => getRawRecordType(query) === RecordRawType.PLAIN, [query]); const viewMode: VIEW_MODE = useAppStateSelector((state) => { - if (uiSettings.get(SHOW_FIELD_STATISTICS) !== true) return VIEW_MODE.DOCUMENT_LEVEL; + if (uiSettings.get(SHOW_FIELD_STATISTICS) !== true || isPlainRecord) + return VIEW_MODE.DOCUMENT_LEVEL; return state.viewMode ?? VIEW_MODE.DOCUMENT_LEVEL; }); const [dataView, dataViewLoading] = useInternalStateSelector((state) => [ @@ -112,7 +114,6 @@ export function DiscoverLayout({ stateContainer }: DiscoverLayoutProps) { const useNewFieldsApi = useMemo(() => !uiSettings.get(SEARCH_FIELDS_FROM_SOURCE), [uiSettings]); - const isPlainRecord = useMemo(() => getRawRecordType(query) === RecordRawType.PLAIN, [query]); const resultState = useMemo( () => getResultState(dataState.fetchStatus, dataState.foundDocuments ?? false), [dataState.fetchStatus, dataState.foundDocuments] diff --git a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx index 3b14bf3b80fcb..559f2bf03b27a 100644 --- a/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx +++ b/src/plugins/discover/public/application/main/hooks/use_test_based_query_language.test.tsx @@ -102,36 +102,25 @@ describe('useTextBasedQueryLanguage', () => { test('a text based query should change state when loading and finished', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(true); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - await waitFor(() => { - expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - columns: [], - }); - }); - replaceUrlState.mockReset(); stateContainer.dataState.data$.documents$.next(msgComplete); expect(replaceUrlState).toHaveBeenCalledTimes(0); }); - test('should change viewMode to DOCUMENT_LEVEL if it was AGGREGATED_LEVEL', async () => { + test('should change viewMode to undefined (default) if it was AGGREGATED_LEVEL', async () => { const { replaceUrlState } = renderHookWithContext(false, { viewMode: VIEW_MODE.AGGREGATED_LEVEL, }); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - viewMode: VIEW_MODE.DOCUMENT_LEVEL, - columns: [], + viewMode: undefined, }); }); test('changing a text based query with different result columns should change state when loading and finished', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; stateContainer.dataState.data$.documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); replaceUrlState.mockReset(); documents$.next({ @@ -151,18 +140,15 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', columns: ['field1'], }); }); }); - test('changing a text based query with same result columns should change state when loading and finished', async () => { + test('changing a text based query with same result columns should not change state when loading and finished', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; stateContainer.dataState.data$.documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - replaceUrlState.mockReset(); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -176,52 +162,16 @@ describe('useTextBasedQueryLanguage', () => { ], query: { esql: 'from the-data-view-2' }, }); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - - await waitFor(() => { - expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - columns: [], - }); - }); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); }); - test('changing a text based query with no transformational commands should only change dataview state when loading and finished', async () => { - const { replaceUrlState, stateContainer } = renderHookWithContext(false); - const documents$ = stateContainer.dataState.data$.documents$; - stateContainer.dataState.data$.documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - replaceUrlState.mockReset(); - - documents$.next({ - recordRawType: RecordRawType.PLAIN, - fetchStatus: FetchStatus.PARTIAL, - result: [ - { - id: '1', - raw: { field1: 1 }, - flattened: { field1: 1 }, - } as unknown as DataTableRecord, - ], - // non transformational command - query: { esql: 'from the-data-view-title | where field1 > 0' }, - }); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); - - await waitFor(() => { - expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', - columns: [], - }); - }); - }); test('only changing a text based query with same result columns should not change columns', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); replaceUrlState.mockReset(); documents$.next({ @@ -237,6 +187,11 @@ describe('useTextBasedQueryLanguage', () => { query: { esql: 'from the-data-view-title | keep field1' }, }); await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => { + expect(replaceUrlState).toHaveBeenCalledWith({ + columns: ['field1'], + }); + }); replaceUrlState.mockReset(); documents$.next({ @@ -252,14 +207,14 @@ describe('useTextBasedQueryLanguage', () => { query: { esql: 'from the-data-view-title | keep field 1 | WHERE field1=1' }, }); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); }); test('if its not a text based query coming along, it should be ignored', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false); const documents$ = stateContainer.dataState.data$.documents$; documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); replaceUrlState.mockReset(); documents$.next({ @@ -289,7 +244,6 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', columns: ['field1'], }); }); @@ -298,9 +252,9 @@ describe('useTextBasedQueryLanguage', () => { test('it should not overwrite existing state columns on initial fetch', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false, { columns: ['field1'], - index: 'the-data-view-id', }); const documents$ = stateContainer.dataState.data$.documents$; + expect(replaceUrlState).toHaveBeenCalledTimes(0); documents$.next({ recordRawType: RecordRawType.PLAIN, @@ -315,6 +269,14 @@ describe('useTextBasedQueryLanguage', () => { query: { esql: 'from the-data-view-title | keep field 1 | WHERE field1=1' }, }); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => { + expect(replaceUrlState).toHaveBeenCalledWith({ + columns: ['field1', 'field2'], + }); + }); + replaceUrlState.mockReset(); + documents$.next({ recordRawType: RecordRawType.PLAIN, fetchStatus: FetchStatus.PARTIAL, @@ -336,7 +298,6 @@ describe('useTextBasedQueryLanguage', () => { test('it should not overwrite existing state columns on initial fetch and non transformational commands', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false, { columns: ['field1'], - index: 'the-data-view-id', }); const documents$ = stateContainer.dataState.data$.documents$; @@ -356,9 +317,8 @@ describe('useTextBasedQueryLanguage', () => { }); test('it should overwrite existing state columns on transitioning from a query with non transformational commands to a query with transformational', async () => { - const { replaceUrlState, stateContainer } = renderHookWithContext(false, { - index: 'the-data-view-id', - }); + const { replaceUrlState, stateContainer } = renderHookWithContext(false, {}); + const documents$ = stateContainer.dataState.data$.documents$; documents$.next({ @@ -395,7 +355,6 @@ describe('useTextBasedQueryLanguage', () => { test('it should not overwrite state column when successfully fetching after an error fetch', async () => { const { replaceUrlState, stateContainer } = renderHookWithContext(false, { columns: [], - index: 'the-data-view-id', }); const documents$ = stateContainer.dataState.data$.documents$; @@ -468,7 +427,7 @@ describe('useTextBasedQueryLanguage', () => { renderHook(() => useTextBasedQueryLanguage(props), { wrapper: getHookContext(stateContainer) }); documents$.next(msgComplete); - await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(1)); + await waitFor(() => expect(replaceUrlState).toHaveBeenCalledTimes(0)); replaceUrlState.mockReset(); documents$.next({ @@ -488,7 +447,6 @@ describe('useTextBasedQueryLanguage', () => { await waitFor(() => { expect(replaceUrlState).toHaveBeenCalledWith({ - index: 'the-data-view-id', columns: ['field1'], }); }); diff --git a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts index 49e010d13a041..485ce689ba415 100644 --- a/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts +++ b/src/plugins/discover/public/application/main/hooks/use_text_based_query_language.ts @@ -9,7 +9,6 @@ import { isEqual } from 'lodash'; import { isOfAggregateQueryType, getAggregateQueryMode } from '@kbn/es-query'; import { useCallback, useEffect, useRef } from 'react'; import type { DataViewsContract } from '@kbn/data-views-plugin/public'; -import { VIEW_MODE } from '@kbn/saved-search-plugin/public'; import { switchMap } from 'rxjs'; import { useSavedSearchInitial } from '../services/discover_state_provider'; import type { DiscoverStateContainer } from '../services/discover_state'; @@ -87,7 +86,7 @@ export function useTextBasedQueryLanguage({ if (next.fetchStatus !== FetchStatus.PARTIAL) { return; } - const dataViewObj = stateContainer.internalState.getState().dataView!; + const dataViewObj = stateContainer.internalState.getState().dataView; if (hasResults) { // check if state needs to contain column transformation due to a different columns in the resultset @@ -110,8 +109,10 @@ export function useTextBasedQueryLanguage({ const addColumnsToState = !isEqual(nextColumns, prev.current.columns); const queryChanged = query[language] !== prev.current.query; // no need to reset index to state if it hasn't changed - const addDataViewToState = Boolean(dataViewObj?.id !== index); - if (!queryChanged || (!addDataViewToState && !addColumnsToState)) { + const addDataViewToState = index !== undefined; + const changeViewMode = + viewMode !== getValidViewMode({ viewMode, isTextBasedQueryMode: true }); + if (!queryChanged || (!addDataViewToState && !addColumnsToState && !changeViewMode)) { sendComplete(); return; } @@ -120,14 +121,16 @@ export function useTextBasedQueryLanguage({ prev.current.query = query[language]; prev.current.columns = nextColumns; } - const nextState = { - ...(addDataViewToState && { index: dataViewObj.id }), - ...((addColumnsToState || queryChanged) && { columns: nextColumns }), - ...(viewMode === VIEW_MODE.AGGREGATED_LEVEL && { - viewMode: getValidViewMode({ viewMode, isTextBasedQueryMode: true }), - }), - }; - await stateContainer.appState.replaceUrlState(nextState); + // just change URL state if necessary + if (addDataViewToState || addColumnsToState || changeViewMode) { + const nextState = { + ...(addDataViewToState && { index: undefined }), + ...(addColumnsToState && { columns: nextColumns }), + ...(changeViewMode && { viewMode: undefined }), + }; + await stateContainer.appState.replaceUrlState(nextState); + } + sendComplete(); } else { // cleanup for a "regular" query diff --git a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts index 27407822553bb..305f67d61a0ae 100644 --- a/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts +++ b/src/plugins/discover/public/application/main/hooks/utils/build_state_subscribe.ts @@ -47,7 +47,19 @@ export const buildStateSubscribe = const nextQuery = nextState.query; const savedSearch = savedSearchState.getState(); const prevQuery = savedSearch.searchSource.getField('query'); + const isTextBasedQueryLang = isTextBasedQuery(nextQuery); const queryChanged = !isEqual(nextQuery, prevQuery) || !isEqual(nextQuery, prevState.query); + + if ( + isTextBasedQueryLang && + isEqualState(prevState, nextState, ['index', 'viewMode']) && + !queryChanged + ) { + // When there's a switch from data view to es|ql, this just leads to a cleanup of index and viewMode + // And there's no subsequent action in this function required + addLog('[appstate] subscribe update ignored for es|ql', { prevState, nextState }); + return; + } if (isEqualState(prevState, nextState) && !queryChanged) { addLog('[appstate] subscribe update ignored due to no changes', { prevState, nextState }); return; @@ -55,7 +67,6 @@ export const buildStateSubscribe = addLog('[appstate] subscribe triggered', nextState); const { hideChart, interval, breakdownField, sampleSize, sort, index } = prevState; - const isTextBasedQueryLang = isTextBasedQuery(nextQuery); if (isTextBasedQueryLang) { const isTextBasedQueryLangPrev = isTextBasedQuery(prevQuery); if (!isTextBasedQueryLangPrev) { diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts index dab98134db317..0ddc8c47c2767 100644 --- a/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.test.ts @@ -11,14 +11,14 @@ import { dataViewMock } from '@kbn/discover-utils/src/__mocks__'; import { createKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; import type { Filter } from '@kbn/es-query'; import { History } from 'history'; - import { savedSearchMock } from '../../../__mocks__/saved_search'; import { discoverServiceMock } from '../../../__mocks__/services'; import { DiscoverAppStateContainer, getDiscoverAppStateContainer, + isEqualState, } from './discover_app_state_container'; -import { SavedSearch } from '@kbn/saved-search-plugin/common'; +import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/common'; let history: History; let state: DiscoverAppStateContainer; @@ -161,4 +161,66 @@ describe('Test discover app state container', () => { ); }); }); + + describe('isEqualState', () => { + const initialState = { + index: 'the-index', + columns: ['the-column'], + sort: [], + query: { query: 'the-query', language: 'kuery' }, + filters: [], + interval: 'auto', + hideChart: true, + sampleSize: 100, + viewMode: VIEW_MODE.DOCUMENT_LEVEL, + savedQuery: undefined, + hideAggregatedPreview: true, + rowHeight: 25, + headerRowHeight: 25, + grid: {}, + breakdownField: 'the-breakdown-field', + }; + + test('returns true if the states are equal', () => { + expect(isEqualState(initialState, { ...initialState })).toBeTruthy(); + }); + + test('handles the special filter change case correctly ', () => { + // this is some sort of legacy behavior, especially for the filter case + const previousState = { initialState, filters: [{ index: 'test', meta: {} }] }; + const nextState = { + initialState, + filters: [{ index: 'test', meta: {}, $$hashKey: 'hi' }], + }; + expect(isEqualState(previousState, nextState)).toBeTruthy(); + }); + + test('returns true if the states are not equal', () => { + const changedParams = [ + { index: 'the-new-index' }, + { columns: ['newColumns'] }, + { sort: [['column', 'desc']] }, + { query: { query: 'ok computer', language: 'pirate-english' } }, + { filters: [{ index: 'test', meta: {} }] }, + { interval: 'eternity' }, + { hideChart: undefined }, + { sampleSize: 1 }, + { viewMode: undefined }, + { savedQuery: 'sdsd' }, + { hideAggregatedPreview: false }, + { rowHeight: 100 }, + { headerRowHeight: 1 }, + { grid: { test: 'test' } }, + { breakdownField: 'new-breakdown-field' }, + ]; + changedParams.forEach((param) => { + expect(isEqualState(initialState, { ...initialState, ...param })).toBeFalsy(); + }); + }); + test('allows to exclude variables from comparison', () => { + expect( + isEqualState(initialState, { ...initialState, index: undefined }, ['index']) + ).toBeTruthy(); + }); + }); }); diff --git a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts index 7d75d76cb6f8b..9f073e14b2e6d 100644 --- a/src/plugins/discover/public/application/main/services/discover_app_state_container.ts +++ b/src/plugins/discover/public/application/main/services/discover_app_state_container.ts @@ -22,7 +22,7 @@ import { } from '@kbn/es-query'; import { SavedSearch, VIEW_MODE } from '@kbn/saved-search-plugin/public'; import { IKbnUrlStateStorage, ISyncStateRef, syncState } from '@kbn/kibana-utils-plugin/public'; -import { isEqual } from 'lodash'; +import { isEqual, omit } from 'lodash'; import { connectToQueryState, syncGlobalQueryStateWithUrl } from '@kbn/data-plugin/public'; import type { DiscoverGridSettings } from '@kbn/saved-search-plugin/common'; import type { DiscoverServices } from '../../../build_services'; @@ -350,13 +350,19 @@ export function isEqualFilters( * Helper function to compare 2 different state, is needed since comparing filters * works differently */ -export function isEqualState(stateA: DiscoverAppState, stateB: DiscoverAppState) { +export function isEqualState( + stateA: DiscoverAppState, + stateB: DiscoverAppState, + exclude: string[] = [] +) { if (!stateA && !stateB) { return true; } else if (!stateA || !stateB) { return false; } - const { filters: stateAFilters = [], ...stateAPartial } = stateA; - const { filters: stateBFilters = [], ...stateBPartial } = stateB; + + const { filters: stateAFilters = [], ...stateAPartial } = omit(stateA, exclude); + const { filters: stateBFilters = [], ...stateBPartial } = omit(stateB, exclude); + return isEqual(stateAPartial, stateBPartial) && isEqualFilters(stateAFilters, stateBFilters); } diff --git a/src/plugins/discover/public/application/main/services/discover_state.test.ts b/src/plugins/discover/public/application/main/services/discover_state.test.ts index 9e742f7238410..43a3a63dc2ce4 100644 --- a/src/plugins/discover/public/application/main/services/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/services/discover_state.test.ts @@ -444,7 +444,6 @@ describe('Test discover state actions', () => { "sampleSize": undefined, "sort": Array [], "timeRange": undefined, - "usesAdHocDataView": false, } `); expect(searchSource.getField('index')?.id).toEqual('the-data-view-id'); diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts index bc15de09a8b60..7f5783f98e13e 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.test.ts @@ -108,6 +108,7 @@ describe('getStateDefaults', () => { }, }); expect(actualForTextBasedWithValidViewMode.viewMode).toBe(VIEW_MODE.DOCUMENT_LEVEL); + expect(actualForTextBasedWithValidViewMode.index).toBe(undefined); const actualForWithValidViewMode = getStateDefaults({ services: discoverServiceMock, @@ -117,5 +118,8 @@ describe('getStateDefaults', () => { }, }); expect(actualForWithValidViewMode.viewMode).toBe(VIEW_MODE.AGGREGATED_LEVEL); + expect(actualForWithValidViewMode.index).toBe( + savedSearchMock.searchSource.getField('index')?.id + ); }); }); diff --git a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts index 2c1c9fd7d9702..77a9971640e2a 100644 --- a/src/plugins/discover/public/application/main/utils/get_state_defaults.ts +++ b/src/plugins/discover/public/application/main/utils/get_state_defaults.ts @@ -47,6 +47,7 @@ export function getStateDefaults({ const dataView = searchSource.getField('index'); const query = searchSource.getField('query') || data.query.queryString.getDefaultQuery(); + const isTextBasedQueryMode = isTextBasedQuery(query); const sort = getSortArray(savedSearch.sort ?? [], dataView!); const columns = getDefaultColumns(savedSearch, uiSettings); const chartHidden = getChartHidden(storage, 'discover'); @@ -61,7 +62,7 @@ export function getStateDefaults({ ) : sort, columns, - index: dataView?.id, + index: isTextBasedQueryMode ? undefined : dataView?.id, interval: 'auto', filters: cloneDeep(searchSource.getOwnField('filter')) as DiscoverAppState['filters'], hideChart: typeof chartHidden === 'boolean' ? chartHidden : undefined, @@ -75,6 +76,7 @@ export function getStateDefaults({ grid: undefined, breakdownField: undefined, }; + if (savedSearch.grid) { defaultState.grid = savedSearch.grid; } @@ -90,7 +92,7 @@ export function getStateDefaults({ if (savedSearch.viewMode) { defaultState.viewMode = getValidViewMode({ viewMode: savedSearch.viewMode, - isTextBasedQueryMode: isTextBasedQuery(query), + isTextBasedQueryMode, }); } if (savedSearch.hideAggregatedPreview) { diff --git a/src/plugins/discover/public/application/main/utils/update_saved_search.ts b/src/plugins/discover/public/application/main/utils/update_saved_search.ts index fe3cdac90fc97..05c17cd3ebcd9 100644 --- a/src/plugins/discover/public/application/main/utils/update_saved_search.ts +++ b/src/plugins/discover/public/application/main/utils/update_saved_search.ts @@ -20,6 +20,7 @@ import type { DiscoverGlobalStateContainer } from '../services/discover_global_s * @param savedSearch * @param dataView * @param state + * @param globalStateContainer * @param services * @param useFilterAndQueryServices - when true data services are being used for updating filter + query */ @@ -38,9 +39,11 @@ export function updateSavedSearch({ services: DiscoverServices; useFilterAndQueryServices?: boolean; }) { - if (dataView) { + if (dataView && savedSearch.searchSource.getField('index')?.id !== dataView.id) { savedSearch.searchSource.setField('index', dataView); - savedSearch.usesAdHocDataView = !dataView.isPersisted(); + if (!dataView.isPersisted()) { + savedSearch.usesAdHocDataView = true; + } } if (useFilterAndQueryServices) { savedSearch.searchSource diff --git a/src/plugins/embeddable/public/index.ts b/src/plugins/embeddable/public/index.ts index 3214e18aeff26..52e408e8ebcd6 100644 --- a/src/plugins/embeddable/public/index.ts +++ b/src/plugins/embeddable/public/index.ts @@ -112,3 +112,8 @@ export { registerSavedObjectToPanelMethod } from './registry/saved_object_to_pan export function plugin(initializerContext: PluginInitializerContext) { return new EmbeddablePublicPlugin(initializerContext); } + +export { + embeddableInputToSubject, + embeddableOutputToSubject, +} from './lib/embeddables/compatibility/embeddable_compatibility_utils'; diff --git a/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts b/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts index fb4ce7e7bfa03..611654173b09f 100644 --- a/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts +++ b/src/plugins/embeddable/public/lib/embeddables/compatibility/embeddable_compatibility_utils.ts @@ -15,6 +15,7 @@ import { map, Subscription, } from 'rxjs'; +import { IEmbeddable } from '../..'; import { Container } from '../../containers'; import { ViewMode as LegacyViewMode } from '../../types'; import { @@ -23,10 +24,13 @@ import { CommonLegacyOutput, } from './legacy_embeddable_to_api'; -export const embeddableInputToSubject = ( +export const embeddableInputToSubject = < + T extends unknown = unknown, + LegacyInput extends CommonLegacyInput = CommonLegacyInput +>( subscription: Subscription, - embeddable: CommonLegacyEmbeddable, - key: keyof CommonLegacyInput, + embeddable: IEmbeddable, + key: keyof LegacyInput, useExplicitInput = false ) => { const subject = new BehaviorSubject(embeddable.getExplicitInput()?.[key] as T); @@ -36,12 +40,10 @@ export const embeddableInputToSubject = ( .getInput$() .pipe( distinctUntilChanged((prev, current) => { - const previousValue = (prev.panels[embeddable.id]?.explicitInput as CommonLegacyInput)[ + const previousValue = (prev.panels[embeddable.id]?.explicitInput as LegacyInput)[key]; + const currentValue = (current.panels[embeddable.id]?.explicitInput as LegacyInput)?.[ key ]; - const currentValue = ( - current.panels[embeddable.id]?.explicitInput as CommonLegacyInput - )?.[key]; return deepEqual(previousValue, currentValue); }) ) @@ -58,10 +60,13 @@ export const embeddableInputToSubject = ( return subject; }; -export const embeddableOutputToSubject = ( +export const embeddableOutputToSubject = < + T extends unknown = unknown, + LegacyOutput extends CommonLegacyOutput = CommonLegacyOutput +>( subscription: Subscription, - embeddable: CommonLegacyEmbeddable, - key: keyof CommonLegacyOutput + embeddable: IEmbeddable, + key: keyof LegacyOutput ) => { const subject = new BehaviorSubject(embeddable.getOutput()[key] as T); subscription.add( diff --git a/src/plugins/es_ui_shared/kibana.jsonc b/src/plugins/es_ui_shared/kibana.jsonc index 2be8c61cc9c15..3c738268e7034 100644 --- a/src/plugins/es_ui_shared/kibana.jsonc +++ b/src/plugins/es_ui_shared/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/es-ui-shared-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "esUiShared", "server": true, diff --git a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts index 97c2c74814db1..0e12abb64bcc7 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/application_usage/schema.ts @@ -162,6 +162,7 @@ export const applicationUsageSchema = { 'exploratory-view': commonSchema, osquery: commonSchema, profiling: commonSchema, + slo: commonSchema, security_account: commonSchema, reportingRedirect: commonSchema, security_access_agreement: commonSchema, diff --git a/src/plugins/management/kibana.jsonc b/src/plugins/management/kibana.jsonc index 1c5f3ebc4bf36..c6e6b59206306 100644 --- a/src/plugins/management/kibana.jsonc +++ b/src/plugins/management/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/management-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "management", "server": true, diff --git a/src/plugins/navigation/public/mocks.ts b/src/plugins/navigation/public/mocks.ts index 26a43d4c10109..3625be538f249 100644 --- a/src/plugins/navigation/public/mocks.ts +++ b/src/plugins/navigation/public/mocks.ts @@ -27,6 +27,7 @@ const createStartContract = (): jest.Mocked => { AggregateQueryTopNavMenu: jest.fn(), }, addSolutionNavigation: jest.fn(), + isSolutionNavigationEnabled: jest.fn(), }; return startContract; }; diff --git a/src/plugins/navigation/public/plugin.test.ts b/src/plugins/navigation/public/plugin.test.ts index fbc9bb7b1e3fb..5a30125f9e5ca 100644 --- a/src/plugins/navigation/public/plugin.test.ts +++ b/src/plugins/navigation/public/plugin.test.ts @@ -8,6 +8,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; +import { cloudMock } from '@kbn/cloud-plugin/public/mocks'; import { of } from 'rxjs'; import { DEFAULT_SOLUTION_NAV_UI_SETTING_ID, @@ -16,6 +17,7 @@ import { } from '../common'; import { NavigationPublicPlugin } from './plugin'; import { ConfigSchema } from './types'; +import type { BuildFlavor } from '@kbn/config'; const defaultConfig: ConfigSchema['solutionNavigation'] = { featureOn: true, @@ -27,18 +29,23 @@ const defaultConfig: ConfigSchema['solutionNavigation'] = { const setup = ( partialConfig: Partial & { featureOn: boolean; - } + }, + { buildFlavor = 'traditional' }: { buildFlavor?: BuildFlavor } = {} ) => { - const initializerContext = coreMock.createPluginInitializerContext({ - solutionNavigation: { - ...defaultConfig, - ...partialConfig, + const initializerContext = coreMock.createPluginInitializerContext( + { + solutionNavigation: { + ...defaultConfig, + ...partialConfig, + }, }, - }); + { buildFlavor } + ); const plugin = new NavigationPublicPlugin(initializerContext); const coreStart = coreMock.createStart(); const unifiedSearch = unifiedSearchPluginMock.createStartContract(); + const cloud = cloudMock.createStart(); const getGlobalSetting$ = jest.fn(); const settingsGlobalClient = { @@ -47,7 +54,7 @@ const setup = ( }; coreStart.settings.globalClient = settingsGlobalClient; - return { plugin, coreStart, unifiedSearch, getGlobalSetting$ }; + return { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ }; }; describe('Navigation Plugin', () => { @@ -60,13 +67,18 @@ describe('Navigation Plugin', () => { expect(coreStart.chrome.project.updateSolutionNavigations).not.toHaveBeenCalled(); expect(coreStart.chrome.project.changeActiveSolutionNavigation).not.toHaveBeenCalled(); }); + + it('should return flag to indicate that the solution navigation is disabled', () => { + const { plugin, coreStart, unifiedSearch } = setup({ featureOn }); + expect(plugin.start(coreStart, { unifiedSearch }).isSolutionNavigationEnabled()).toBe(false); + }); }); describe('feature flag enabled', () => { const featureOn = true; it('should add the default solution navs but **not** set the active nav', () => { - const { plugin, coreStart, unifiedSearch, getGlobalSetting$ } = setup({ featureOn }); + const { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ } = setup({ featureOn }); const uiSettingsValues: Record = { [ENABLE_SOLUTION_NAV_UI_SETTING_ID]: false, // NOT enabled, so we should not set the active nav @@ -79,17 +91,17 @@ describe('Navigation Plugin', () => { return of(value); }); - plugin.start(coreStart, { unifiedSearch }); + plugin.start(coreStart, { unifiedSearch, cloud }); expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); const [arg] = coreStart.chrome.project.updateSolutionNavigations.mock.calls[0]; - expect(Object.keys(arg)).toEqual(['es', 'oblt', 'security']); + expect(Object.keys(arg)).toEqual(['es', 'oblt']); expect(coreStart.chrome.project.changeActiveSolutionNavigation).toHaveBeenCalledWith(null); }); it('should add the default solution navs **and** set the active nav', () => { - const { plugin, coreStart, unifiedSearch, getGlobalSetting$ } = setup({ featureOn }); + const { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ } = setup({ featureOn }); const uiSettingsValues: Record = { [ENABLE_SOLUTION_NAV_UI_SETTING_ID]: true, @@ -102,7 +114,7 @@ describe('Navigation Plugin', () => { return of(value); }); - plugin.start(coreStart, { unifiedSearch }); + plugin.start(coreStart, { unifiedSearch, cloud }); expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); @@ -113,7 +125,7 @@ describe('Navigation Plugin', () => { }); it('if not "visible", should not set the active nav', () => { - const { plugin, coreStart, unifiedSearch, getGlobalSetting$ } = setup({ featureOn }); + const { plugin, coreStart, unifiedSearch, cloud, getGlobalSetting$ } = setup({ featureOn }); const uiSettingsValues: Record = { [ENABLE_SOLUTION_NAV_UI_SETTING_ID]: true, @@ -126,12 +138,29 @@ describe('Navigation Plugin', () => { return of(value); }); - plugin.start(coreStart, { unifiedSearch }); + plugin.start(coreStart, { unifiedSearch, cloud }); expect(coreStart.chrome.project.updateSolutionNavigations).toHaveBeenCalled(); expect(coreStart.chrome.project.changeActiveSolutionNavigation).toHaveBeenCalledWith(null, { onlyIfNotSet: true, }); }); + + it('should return flag to indicate that the solution navigation is enabled', () => { + const { plugin, coreStart, unifiedSearch, cloud } = setup({ featureOn }); + expect(plugin.start(coreStart, { unifiedSearch, cloud }).isSolutionNavigationEnabled()).toBe( + true + ); + }); + + it('on serverless should return flag to indicate that the solution navigation is disabled', () => { + const { plugin, coreStart, unifiedSearch, cloud } = setup( + { featureOn }, + { buildFlavor: 'serverless' } + ); + expect(plugin.start(coreStart, { unifiedSearch, cloud }).isSolutionNavigationEnabled()).toBe( + false + ); + }); }); }); diff --git a/src/plugins/navigation/public/plugin.ts b/src/plugins/navigation/public/plugin.ts deleted file mode 100644 index ffdbe978dca24..0000000000000 --- a/src/plugins/navigation/public/plugin.ts +++ /dev/null @@ -1,233 +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 { combineLatest, debounceTime, of, ReplaySubject, takeUntil } from 'rxjs'; -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; -import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; -import type { - CloudURLs, - NavigationTreeDefinition, - SolutionNavigationDefinition, - SolutionNavigationDefinitions, -} from '@kbn/core-chrome-browser'; -import { InternalChromeStart } from '@kbn/core-chrome-browser-internal'; -import { - ENABLE_SOLUTION_NAV_UI_SETTING_ID, - OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID, - DEFAULT_SOLUTION_NAV_UI_SETTING_ID, -} from '../common'; -import { - NavigationPublicSetup, - NavigationPublicStart, - NavigationPublicSetupDependencies, - NavigationPublicStartDependencies, - ConfigSchema, - SolutionNavigation, -} from './types'; -import { TopNavMenuExtensionsRegistry, createTopNav } from './top_nav_menu'; -import { RegisteredTopNavMenuData } from './top_nav_menu/top_nav_menu_data'; -import { getSideNavComponent } from './side_navigation'; - -export class NavigationPublicPlugin - implements - Plugin< - NavigationPublicSetup, - NavigationPublicStart, - NavigationPublicSetupDependencies, - NavigationPublicStartDependencies - > -{ - private readonly topNavMenuExtensionsRegistry: TopNavMenuExtensionsRegistry = - new TopNavMenuExtensionsRegistry(); - private readonly stop$ = new ReplaySubject(1); - - constructor(private initializerContext: PluginInitializerContext) {} - - public setup(_core: CoreSetup): NavigationPublicSetup { - return { - registerMenuItem: this.topNavMenuExtensionsRegistry.register.bind( - this.topNavMenuExtensionsRegistry - ), - }; - } - - public start( - core: CoreStart, - { unifiedSearch, cloud }: NavigationPublicStartDependencies - ): NavigationPublicStart { - const extensions = this.topNavMenuExtensionsRegistry.getAll(); - const chrome = core.chrome as InternalChromeStart; - - /* - * - * This helps clients of navigation to create - * a TopNav Search Bar which does not uses global unifiedSearch/data/query service - * - * Useful in creating multiple stateful SearchBar in the same app without affecting - * global filters - * - * */ - const createCustomTopNav = ( - /* - * Custom instance of unified search if it needs to be overridden - * - * */ - customUnifiedSearch?: UnifiedSearchPublicPluginStart, - customExtensions?: RegisteredTopNavMenuData[] - ) => { - return createTopNav(customUnifiedSearch ?? unifiedSearch, customExtensions ?? extensions); - }; - - const config = this.initializerContext.config.get(); - const { - solutionNavigation: { featureOn: isSolutionNavigationFeatureOn }, - } = config; - - if (isSolutionNavigationFeatureOn) { - this.addDefaultSolutionNavigation({ core, chrome, cloud }); - - combineLatest([ - core.settings.globalClient.get$(ENABLE_SOLUTION_NAV_UI_SETTING_ID), - core.settings.globalClient.get$(OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID), - core.settings.globalClient.get$(DEFAULT_SOLUTION_NAV_UI_SETTING_ID), - ]) - .pipe(takeUntil(this.stop$), debounceTime(10)) - .subscribe(([enabled, status, defaultSolution]) => { - if (!enabled) { - chrome.project.changeActiveSolutionNavigation(null); - } else { - // TODO: Here we will need to check if the user has opt-in or not.... (value set in their user profile) - const changeImmediately = status === 'visible'; - chrome.project.changeActiveSolutionNavigation( - changeImmediately ? defaultSolution : null, - { onlyIfNotSet: true } - ); - } - }); - } - - return { - ui: { - TopNavMenu: createTopNav(unifiedSearch, extensions), - AggregateQueryTopNavMenu: createTopNav(unifiedSearch, extensions), - createTopNavWithCustomContext: createCustomTopNav, - }, - addSolutionNavigation: this.addSolutionNavigation.bind(this), - }; - } - - public stop() { - this.stop$.next(); - } - - private addSolutionNavigation(solutionNavigation: SolutionNavigation) { - // TODO: Implement. This handler will allow any plugin (e.g. security) to register a solution navigation. - } - - private addDefaultSolutionNavigation({ - core, - chrome, - cloud = {}, - }: { - core: CoreStart; - chrome: InternalChromeStart; - cloud?: CloudURLs; - }) { - const { project } = chrome; - const activeNavigationNodes$ = project.getActiveNavigationNodes$(); - const navigationTreeUi$ = project.getNavigationTreeUi$(); - - const getSideNavComponentGetter: ( - navTree: NavigationTreeDefinition, - id: string - ) => SolutionNavigationDefinition['sideNavComponentGetter'] = (navTree, id) => () => { - project.initNavigation(of(navTree), { cloudUrls: cloud }); - - return getSideNavComponent({ - navProps: { navigationTree$: navigationTreeUi$ }, - deps: { core, activeNodes$: activeNavigationNodes$ }, - }); - }; - - const solutionNavs: SolutionNavigationDefinitions = { - es: { - id: 'es', - title: 'Search', - icon: 'logoElasticsearch', - homePage: 'discover', // Temp. Wil be updated when all links are registered - sideNavComponentGetter: getSideNavComponentGetter( - { - body: [ - // Temp. In future work this will be loaded from a package - { - type: 'navGroup', - id: 'search_project_nav', - title: 'Search', - icon: 'logoElasticsearch', - defaultIsCollapsed: false, - isCollapsible: false, - breadcrumbStatus: 'hidden', - children: [], - }, - ], - }, - 'search' - ), - }, - oblt: { - id: 'oblt', - title: 'Observability', - icon: 'logoObservability', - homePage: 'discover', // Temp. Wil be updated when all links are registered - sideNavComponentGetter: getSideNavComponentGetter( - { - body: [ - // Temp. In future work this will be loaded from a package - { - type: 'navGroup', - id: 'observability_project_nav', - title: 'Observability', - icon: 'logoObservability', - defaultIsCollapsed: false, - isCollapsible: false, - breadcrumbStatus: 'hidden', - children: [], - }, - ], - }, - 'oblt' - ), - }, - security: { - id: 'security', - title: 'Security', - icon: 'logoSecurity', - homePage: 'discover', // Temp. Wil be updated when all links are registered - sideNavComponentGetter: getSideNavComponentGetter( - { - body: [ - // Temp. In future work this will be loaded from a package - { - type: 'navGroup', - id: 'security_project_nav', - title: 'Security', - icon: 'logoSecurity', - breadcrumbStatus: 'hidden', - defaultIsCollapsed: false, - children: [], - }, - ], - }, - 'security' - ), - }, - }; - - chrome.project.updateSolutionNavigations(solutionNavs, true); - } -} diff --git a/src/plugins/navigation/public/plugin.tsx b/src/plugins/navigation/public/plugin.tsx new file mode 100644 index 0000000000000..9877e92675d19 --- /dev/null +++ b/src/plugins/navigation/public/plugin.tsx @@ -0,0 +1,241 @@ +/* + * 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 React from 'react'; +import { combineLatest, debounceTime, of, ReplaySubject, takeUntil } from 'rxjs'; +import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { + SolutionNavigationDefinition, + SolutionNavigationDefinitions, +} from '@kbn/core-chrome-browser'; +import { InternalChromeStart } from '@kbn/core-chrome-browser-internal'; +import { definition as esDefinition } from '@kbn/solution-nav-es'; +import { definition as obltDefinition } from '@kbn/solution-nav-oblt'; +import type { PanelContentProvider } from '@kbn/shared-ux-chrome-navigation'; +import { + ENABLE_SOLUTION_NAV_UI_SETTING_ID, + OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID, + DEFAULT_SOLUTION_NAV_UI_SETTING_ID, +} from '../common'; +import { + NavigationPublicSetup, + NavigationPublicStart, + NavigationPublicSetupDependencies, + NavigationPublicStartDependencies, + ConfigSchema, + SolutionNavigation, +} from './types'; +import { TopNavMenuExtensionsRegistry, createTopNav } from './top_nav_menu'; +import { RegisteredTopNavMenuData } from './top_nav_menu/top_nav_menu_data'; +import { SideNavComponent } from './side_navigation'; + +export class NavigationPublicPlugin + implements + Plugin< + NavigationPublicSetup, + NavigationPublicStart, + NavigationPublicSetupDependencies, + NavigationPublicStartDependencies + > +{ + private readonly topNavMenuExtensionsRegistry: TopNavMenuExtensionsRegistry = + new TopNavMenuExtensionsRegistry(); + private readonly stop$ = new ReplaySubject(1); + private coreStart?: CoreStart; + private depsStart?: NavigationPublicStartDependencies; + + constructor(private initializerContext: PluginInitializerContext) {} + + public setup(_core: CoreSetup): NavigationPublicSetup { + return { + registerMenuItem: this.topNavMenuExtensionsRegistry.register.bind( + this.topNavMenuExtensionsRegistry + ), + }; + } + + public start( + core: CoreStart, + depsStart: NavigationPublicStartDependencies + ): NavigationPublicStart { + this.coreStart = core; + this.depsStart = depsStart; + + const { unifiedSearch, cloud } = depsStart; + const extensions = this.topNavMenuExtensionsRegistry.getAll(); + const chrome = core.chrome as InternalChromeStart; + + /* + * + * This helps clients of navigation to create + * a TopNav Search Bar which does not uses global unifiedSearch/data/query service + * + * Useful in creating multiple stateful SearchBar in the same app without affecting + * global filters + * + * */ + const createCustomTopNav = ( + /* + * Custom instance of unified search if it needs to be overridden + * + * */ + customUnifiedSearch?: UnifiedSearchPublicPluginStart, + customExtensions?: RegisteredTopNavMenuData[] + ) => { + return createTopNav(customUnifiedSearch ?? unifiedSearch, customExtensions ?? extensions); + }; + + const config = this.initializerContext.config.get(); + const { + solutionNavigation: { featureOn: isSolutionNavigationFeatureOn }, + } = config; + + const onCloud = cloud !== undefined; // The new side nav will initially only be available to cloud users + const isServerless = this.initializerContext.env.packageInfo.buildFlavor === 'serverless'; + const isSolutionNavEnabled = isSolutionNavigationFeatureOn && onCloud && !isServerless; + + if (isSolutionNavEnabled) { + chrome.project.setCloudUrls(cloud); + this.addDefaultSolutionNavigation({ chrome }); + this.susbcribeToSolutionNavUiSettings(core); + + // Temp. This is temporary to simulate adding a solution nav after bootstrapping + setTimeout(() => { + this.addSolutionNavigation({ + id: 'security', + title: 'Security', + icon: 'logoSecurity', + homePage: 'dashboards', // Temp. Wil be updated when all links are registered + navigationTree$: of({ + body: [ + // Temp. In future work this will be loaded from a package + { + type: 'navGroup', + id: 'security_project_nav', + title: 'Security', + icon: 'logoSecurity', + breadcrumbStatus: 'hidden', + defaultIsCollapsed: false, + children: [ + { + link: 'dashboards', + spaceBefore: 'm', + }, + ], + }, + ], + }), + }); + }, 5000); + } + + return { + ui: { + TopNavMenu: createTopNav(unifiedSearch, extensions), + AggregateQueryTopNavMenu: createTopNav(unifiedSearch, extensions), + createTopNavWithCustomContext: createCustomTopNav, + }, + addSolutionNavigation: ( + solutionNavigation: Omit & { + /** Data test subj for the side navigation */ + dataTestSubj?: string; + /** Panel content provider for the side navigation */ + panelContentProvider?: PanelContentProvider; + } + ) => { + if (!isSolutionNavEnabled) return; + return this.addSolutionNavigation(solutionNavigation); + }, + isSolutionNavigationEnabled: () => isSolutionNavEnabled, + }; + } + + public stop() { + this.stop$.next(); + } + + private susbcribeToSolutionNavUiSettings(core: CoreStart) { + const chrome = core.chrome as InternalChromeStart; + + combineLatest([ + core.settings.globalClient.get$(ENABLE_SOLUTION_NAV_UI_SETTING_ID), + core.settings.globalClient.get$(OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID), + core.settings.globalClient.get$(DEFAULT_SOLUTION_NAV_UI_SETTING_ID), + ]) + .pipe(takeUntil(this.stop$), debounceTime(10)) + .subscribe(([enabled, status, defaultSolution]) => { + if (!enabled) { + chrome.project.changeActiveSolutionNavigation(null); + } else { + // TODO: Here we will need to check if the user has opt-in or not.... (value set in their user profile) + const changeImmediately = status === 'visible'; + chrome.project.changeActiveSolutionNavigation( + changeImmediately ? defaultSolution : null, + { onlyIfNotSet: true } + ); + } + }); + } + + private getSideNavComponent({ + dataTestSubj, + panelContentProvider, + }: { + panelContentProvider?: PanelContentProvider; + dataTestSubj?: string; + } = {}): SolutionNavigationDefinition['sideNavComponent'] { + if (!this.coreStart) throw new Error('coreStart is not available'); + if (!this.depsStart) throw new Error('depsStart is not available'); + + const core = this.coreStart; + const { project } = core.chrome as InternalChromeStart; + const activeNavigationNodes$ = project.getActiveNavigationNodes$(); + const navigationTreeUi$ = project.getNavigationTreeUi$(); + + return () => ( + + ); + } + + private addSolutionNavigation( + solutionNavigation: SolutionNavigation & { + /** Data test subj for the side navigation */ + dataTestSubj?: string; + /** Panel content provider for the side navigation */ + panelContentProvider?: PanelContentProvider; + } + ) { + if (!this.coreStart) throw new Error('coreStart is not available'); + const { dataTestSubj, panelContentProvider, ...rest } = solutionNavigation; + const sideNavComponent = + solutionNavigation.sideNavComponent ?? + this.getSideNavComponent({ dataTestSubj, panelContentProvider }); + const { project } = this.coreStart.chrome as InternalChromeStart; + project.updateSolutionNavigations({ + [solutionNavigation.id]: { ...rest, sideNavComponent }, + }); + } + + private addDefaultSolutionNavigation({ chrome }: { chrome: InternalChromeStart }) { + const solutionNavs: SolutionNavigationDefinitions = { + es: { + ...esDefinition, + sideNavComponent: this.getSideNavComponent({ dataTestSubj: 'svlSearchSideNav' }), + }, + oblt: { + ...obltDefinition, + sideNavComponent: this.getSideNavComponent({ dataTestSubj: 'svlObservabilitySideNav' }), + }, + }; + + chrome.project.updateSolutionNavigations(solutionNavs, true); + } +} diff --git a/src/plugins/navigation/public/side_navigation/index.tsx b/src/plugins/navigation/public/side_navigation/index.tsx index 959413fbe523f..3aa7170295a18 100644 --- a/src/plugins/navigation/public/side_navigation/index.tsx +++ b/src/plugins/navigation/public/side_navigation/index.tsx @@ -8,18 +8,13 @@ import React, { Suspense, type FC } from 'react'; import { EuiLoadingSpinner } from '@elastic/eui'; -import type { SideNavComponent as SideNavComponentType } from '@kbn/core-chrome-browser'; import type { Props as NavigationProps } from './side_navigation'; const SideNavComponentLazy = React.lazy(() => import('./side_navigation')); -const SideNavComponent: FC = (props) => ( +export const SideNavComponent: FC = (props) => ( }> ); - -export const getSideNavComponent = (props: NavigationProps): SideNavComponentType => { - return () => ; -}; diff --git a/src/plugins/navigation/public/types.ts b/src/plugins/navigation/public/types.ts index 9ba333ec641c1..b7bfaab6a2957 100644 --- a/src/plugins/navigation/public/types.ts +++ b/src/plugins/navigation/public/types.ts @@ -31,6 +31,11 @@ export interface NavigationPublicStart { }; /** Add a solution navigation to the header nav switcher. */ addSolutionNavigation: (solutionNavigation: SolutionNavigation) => void; + /** + * Use this handler verify if the solution navigation is enabled. + * @returns true if the solution navigation is enabled, false otherwise. + */ + isSolutionNavigationEnabled: () => boolean; } export interface NavigationPublicSetupDependencies { diff --git a/src/plugins/navigation/tsconfig.json b/src/plugins/navigation/tsconfig.json index 6befc349f606d..1450b9f0aa1a7 100644 --- a/src/plugins/navigation/tsconfig.json +++ b/src/plugins/navigation/tsconfig.json @@ -24,6 +24,9 @@ "@kbn/config-schema", "@kbn/core-plugins-server", "@kbn/i18n", + "@kbn/solution-nav-es", + "@kbn/solution-nav-oblt", + "@kbn/config", ], "exclude": [ "target/**/*", diff --git a/src/plugins/telemetry/public/services/telemetry_service.test.ts b/src/plugins/telemetry/public/services/telemetry_service.test.ts index d072d654cceaa..e9f8f991eee50 100644 --- a/src/plugins/telemetry/public/services/telemetry_service.test.ts +++ b/src/plugins/telemetry/public/services/telemetry_service.test.ts @@ -13,6 +13,7 @@ import { mockTelemetryService } from '../mocks'; import { FetchSnapshotTelemetry, INTERNAL_VERSION, + LastReportedRoute, OptInRoute, UserHasSeenNoticeRoute, } from '../../common/routes'; @@ -354,4 +355,17 @@ describe('TelemetryService', () => { expect(telemetryService.canSendTelemetry()).toBe(true); }); }); + + describe('updateLastReported', () => { + let telemetryService: ReturnType; + + beforeEach(() => { + telemetryService = mockTelemetryService(); + }); + + it('calls expected URL with expected headers', async () => { + await telemetryService.updateLastReported(); + expect(telemetryService['http'].put).toBeCalledWith(LastReportedRoute, INTERNAL_VERSION); + }); + }); }); diff --git a/src/plugins/telemetry/public/services/telemetry_service.ts b/src/plugins/telemetry/public/services/telemetry_service.ts index ec67a4e675e26..a617a181a14d6 100644 --- a/src/plugins/telemetry/public/services/telemetry_service.ts +++ b/src/plugins/telemetry/public/services/telemetry_service.ts @@ -171,7 +171,7 @@ export class TelemetryService { }; public updateLastReported = async (): Promise => { - return this.http.put(LastReportedRoute); + return this.http.put(LastReportedRoute, INTERNAL_VERSION); }; /** Fetches an unencrypted telemetry payload, so we can show it to the user **/ diff --git a/src/plugins/telemetry/schema/oss_plugins.json b/src/plugins/telemetry/schema/oss_plugins.json index e365106dfe8a0..d31c277fa8afd 100644 --- a/src/plugins/telemetry/schema/oss_plugins.json +++ b/src/plugins/telemetry/schema/oss_plugins.json @@ -5635,6 +5635,137 @@ } } }, + "slo": { + "properties": { + "appId": { + "type": "keyword", + "_meta": { + "description": "The application being tracked" + } + }, + "viewId": { + "type": "keyword", + "_meta": { + "description": "Always `main`" + } + }, + "clicks_total": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application since we started counting them" + } + }, + "clicks_7_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 7 days" + } + }, + "clicks_30_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 30 days" + } + }, + "clicks_90_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application over the last 90 days" + } + }, + "minutes_on_screen_total": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen since we started counting them." + } + }, + "minutes_on_screen_7_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 7 days" + } + }, + "minutes_on_screen_30_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 30 days" + } + }, + "minutes_on_screen_90_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen over the last 90 days" + } + }, + "views": { + "type": "array", + "items": { + "properties": { + "appId": { + "type": "keyword", + "_meta": { + "description": "The application being tracked" + } + }, + "viewId": { + "type": "keyword", + "_meta": { + "description": "The application view being tracked" + } + }, + "clicks_total": { + "type": "long", + "_meta": { + "description": "General number of clicks in the application sub view since we started counting them" + } + }, + "clicks_7_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 7 days" + } + }, + "clicks_30_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 30 days" + } + }, + "clicks_90_days": { + "type": "long", + "_meta": { + "description": "General number of clicks in the active application sub view over the last 90 days" + } + }, + "minutes_on_screen_total": { + "type": "float", + "_meta": { + "description": "Minutes the application sub view is active and on-screen since we started counting them." + } + }, + "minutes_on_screen_7_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 7 days" + } + }, + "minutes_on_screen_30_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 30 days" + } + }, + "minutes_on_screen_90_days": { + "type": "float", + "_meta": { + "description": "Minutes the application is active and on-screen active application sub view over the last 90 days" + } + } + } + } + } + } + }, "security_account": { "properties": { "appId": { diff --git a/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts b/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts index 0645fe3cd68ef..1c314b9a66b7a 100644 --- a/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts +++ b/test/examples/data_view_field_editor_example/data_view_field_editor_example.ts @@ -14,7 +14,8 @@ export default function ({ getService }: PluginFunctionalProviderContext) { const testSubjects = getService('testSubjects'); const find = getService('find'); - describe('', () => { + // FLAKY: https://github.com/elastic/kibana/issues/170047 + describe.skip('', () => { it('finds a data view', async () => { await testSubjects.existOrFail('dataViewTitle'); }); diff --git a/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts b/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts index ba11c502b0738..b1b40002ae153 100644 --- a/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts +++ b/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts @@ -24,8 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'header', ]); - // FLAKY: https://github.com/elastic/kibana/issues/178581 - describe.skip('Dashboard control group apply button', () => { + describe('Dashboard control group apply button', () => { let controlIds: string[]; before(async () => { diff --git a/test/functional/apps/navigation/_solution_nav_switcher.ts b/test/functional/apps/navigation/_solution_nav_switcher.ts new file mode 100644 index 0000000000000..1f66d5d18fc3e --- /dev/null +++ b/test/functional/apps/navigation/_solution_nav_switcher.ts @@ -0,0 +1,38 @@ +/* + * 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const PageObjects = getPageObjects(['common', 'header', 'home', 'dashboard']); + const testSubjects = getService('testSubjects'); + const navigation = getService('globalNav'); + + describe('solution navigation switcher', function describeIndexTests() { + it('should be able to switch between solutions', async () => { + await PageObjects.common.navigateToApp('home'); + + // Default to "search" solution + await testSubjects.existOrFail('svlSearchSideNav'); + await testSubjects.missingOrFail('svlObservabilitySideNav'); + + // Change to "observability" solution + await navigation.changeSolutionNavigation('oblt'); + await testSubjects.existOrFail('svlObservabilitySideNav'); + await testSubjects.missingOrFail('svlSearchSideNav'); + }); + + it('should contain links to manage deployment and view all deployments', async () => { + await PageObjects.common.navigateToApp('home'); + + await navigation.openSolutionNavSwitcher(); + + await testSubjects.existOrFail('manageDeploymentBtn', { timeout: 2000 }); + await testSubjects.existOrFail('viewDeploymentsBtn', { timeout: 2000 }); + }); + }); +} diff --git a/test/functional/apps/navigation/config.ts b/test/functional/apps/navigation/config.ts new file mode 100644 index 0000000000000..19df1f83ec844 --- /dev/null +++ b/test/functional/apps/navigation/config.ts @@ -0,0 +1,35 @@ +/* + * 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 { 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('.')], + kbnTestServer: { + ...functionalConfig.get('kbnTestServer'), + serverArgs: [ + ...functionalConfig.get('kbnTestServer.serverArgs'), + '--navigation.solutionNavigation.featureOn=true', + '--navigation.solutionNavigation.enabled=true', + '--navigation.solutionNavigation.optInStatus=visible', + '--navigation.solutionNavigation.defaultSolution=es', + // Note: the base64 string in the cloud.id config contains the ES endpoint required in the functional tests + '--xpack.cloud.id=ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM=', + '--xpack.cloud.base_url=https://cloud.elastic.co', + '--xpack.cloud.deployment_url=/deployments/deploymentId', + '--xpack.cloud.organization_url=/organization/organizationId', + '--xpack.cloud.billing_url=/billing', + '--xpack.cloud.profile_url=/user/userId', + ], + }, + }; +} diff --git a/test/functional/apps/navigation/index.ts b/test/functional/apps/navigation/index.ts new file mode 100644 index 0000000000000..6a05d098e794e --- /dev/null +++ b/test/functional/apps/navigation/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 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('navigation app', function () { + loadTestFile(require.resolve('./_solution_nav_switcher')); + }); +} diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 9bf108d106712..fc1064f1b0464 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -857,6 +857,9 @@ export class SettingsPageObject extends FtrService { async clickAddField() { this.log.debug('click Add Field'); await this.testSubjects.click('addField'); + await this.retry.try(async () => { + await this.testSubjects.existOrFail('flyoutTitle'); + }); } async clickSaveField() { @@ -872,8 +875,7 @@ export class SettingsPageObject extends FtrService { async setFieldType(type: string) { this.log.debug('set type = ' + type); - await this.testSubjects.setValue('typeField', type); - await this.browser.pressKeys(this.browser.keys.ENTER); + await this.comboBox.set('typeField', type); } async setFieldTypeComposite() { diff --git a/test/functional/services/global_nav.ts b/test/functional/services/global_nav.ts index 4ce8ed6cb79dd..4bbea9c9fd7a7 100644 --- a/test/functional/services/global_nav.ts +++ b/test/functional/services/global_nav.ts @@ -52,4 +52,18 @@ export class GlobalNavService extends FtrService { public async badgeMissingOrFail(): Promise { await this.testSubjects.missingOrFail('headerBadge'); } + + public async openSolutionNavSwitcher(): Promise { + if (await this.testSubjects.exists(`~solutionNavSwitcherPanel`, { timeout: 0 })) return; + + await this.testSubjects.click('~solutionNavSwitcher'); + await this.testSubjects.existOrFail('~solutionNavSwitcherPanel'); + } + + public async changeSolutionNavigation(id: 'es' | 'oblt' | 'search'): Promise { + if (!(await this.testSubjects.exists(`~solutionNavSwitcherPanel`, { timeout: 0 }))) { + await this.openSolutionNavSwitcher(); + } + await this.testSubjects.click(`~solutionNavSwitcherPanel > ${`~solutionNavSwitcher-${id}`}`); + } } diff --git a/test/plugin_functional/plugins/management_test_plugin/kibana.jsonc b/test/plugin_functional/plugins/management_test_plugin/kibana.jsonc index 270fc70ced7a5..59bb349f54c70 100644 --- a/test/plugin_functional/plugins/management_test_plugin/kibana.jsonc +++ b/test/plugin_functional/plugins/management_test_plugin/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/management-test-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "managementTestPlugin", "server": false, diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index 28f2590fc3b20..5b06a48809c4c 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -232,6 +232,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'xpack.cloud.base_url (string)', 'xpack.cloud.cname (string)', 'xpack.cloud.deployment_url (string)', + 'xpack.cloud.deployments_url (string)', 'xpack.cloud.is_elastic_staff_owned (boolean)', 'xpack.cloud.trial_end_date (string)', 'xpack.cloud_integrations.chat.chatURL (string)', diff --git a/tsconfig.base.json b/tsconfig.base.json index 03bf4e8e55309..35519b4fd0487 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -24,6 +24,8 @@ "@kbn/aiops-components/*": ["x-pack/packages/ml/aiops_components/*"], "@kbn/aiops-plugin": ["x-pack/plugins/aiops"], "@kbn/aiops-plugin/*": ["x-pack/plugins/aiops/*"], + "@kbn/aiops-test-utils": ["x-pack/packages/ml/aiops_test_utils"], + "@kbn/aiops-test-utils/*": ["x-pack/packages/ml/aiops_test_utils/*"], "@kbn/aiops-utils": ["x-pack/packages/ml/aiops_utils"], "@kbn/aiops-utils/*": ["x-pack/packages/ml/aiops_utils/*"], "@kbn/alerting-api-integration-helpers": ["x-pack/test/alerting_api_integration/packages/helpers"], @@ -1558,10 +1560,16 @@ "@kbn/shared-ux-storybook-mock/*": ["packages/shared-ux/storybook/mock/*"], "@kbn/shared-ux-utility": ["packages/kbn-shared-ux-utility"], "@kbn/shared-ux-utility/*": ["packages/kbn-shared-ux-utility/*"], + "@kbn/slo-plugin": ["x-pack/plugins/observability_solution/slo"], + "@kbn/slo-plugin/*": ["x-pack/plugins/observability_solution/slo/*"], "@kbn/slo-schema": ["x-pack/packages/kbn-slo-schema"], "@kbn/slo-schema/*": ["x-pack/packages/kbn-slo-schema/*"], "@kbn/snapshot-restore-plugin": ["x-pack/plugins/snapshot_restore"], "@kbn/snapshot-restore-plugin/*": ["x-pack/plugins/snapshot_restore/*"], + "@kbn/solution-nav-es": ["packages/solution-nav/es"], + "@kbn/solution-nav-es/*": ["packages/solution-nav/es/*"], + "@kbn/solution-nav-oblt": ["packages/solution-nav/oblt"], + "@kbn/solution-nav-oblt/*": ["packages/solution-nav/oblt/*"], "@kbn/some-dev-log": ["packages/kbn-some-dev-log"], "@kbn/some-dev-log/*": ["packages/kbn-some-dev-log/*"], "@kbn/sort-package-json": ["packages/kbn-sort-package-json"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index b3b25e47fc226..03399acb752da 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -115,6 +115,7 @@ "xpack.securitySolutionEss": "plugins/security_solution_ess", "xpack.securitySolutionServerless": "plugins/security_solution_serverless", "xpack.sessionView": "plugins/session_view", + "xpack.slo": "plugins/observability_solution/slo", "xpack.snapshotRestore": "plugins/snapshot_restore", "xpack.spaces": "plugins/spaces", "xpack.savedObjectsTagging": [ diff --git a/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts b/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts index f626ebdd8c425..becee1697c0c8 100644 --- a/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts +++ b/x-pack/packages/kbn-data-forge/src/data_sources/fake_hosts/index.ts @@ -91,6 +91,7 @@ export const generateEvent: GeneratorFunction = (config, schedule, index, timest '@timestamp': timestamp.toISOString(), host: { name: `host-${index}`, + mac: ['00-00-5E-00-53-23', '00-00-5E-00-53-24'], network: { name: `network-${index}`, ingress: { @@ -134,6 +135,7 @@ export const generateEvent: GeneratorFunction = (config, schedule, index, timest '@timestamp': timestamp.toISOString(), host: { name: `host-${index}`, + mac: ['00-00-5E-00-53-23', '00-00-5E-00-53-24'], network: { name: `network-${index}`, }, diff --git a/x-pack/packages/ml/aiops_test_utils/README.md b/x-pack/packages/ml/aiops_test_utils/README.md new file mode 100644 index 0000000000000..a4e02c020ab46 --- /dev/null +++ b/x-pack/packages/ml/aiops_test_utils/README.md @@ -0,0 +1,3 @@ +# @kbn/aiops-test-utils + +Package containing test utility files used as part of ML team's AIOps features across jest unit tests, functional and API integration tests as well as performance journeys. diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/fields.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/fields.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/fields.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/fields.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_item_sets.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/filtered_frequent_item_sets.ts similarity index 93% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_item_sets.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/filtered_frequent_item_sets.ts index e291093e7d4c1..1a665cf32cf4a 100644 --- a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/filtered_frequent_item_sets.ts +++ b/x-pack/packages/ml/aiops_test_utils/artificial_logs/filtered_frequent_item_sets.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { ItemSet } from '../../types'; +import type { ItemSet } from '@kbn/aiops-utils/types'; export const filteredFrequentItemSets: ItemSet[] = [ { diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_significant_item_groups.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/final_significant_item_groups.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_significant_item_groups.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/final_significant_item_groups.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_significant_item_groups_textfield.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/final_significant_item_groups_textfield.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/final_significant_item_groups_textfield.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/final_significant_item_groups_textfield.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_item_sets.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/frequent_item_sets.ts similarity index 96% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_item_sets.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/frequent_item_sets.ts index 791512e6bffbc..5c5a8fa0b79c9 100644 --- a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/frequent_item_sets.ts +++ b/x-pack/packages/ml/aiops_test_utils/artificial_logs/frequent_item_sets.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { ItemSet } from '../../types'; +import type { ItemSet } from '@kbn/aiops-utils/types'; export const frequentItemSets: ItemSet[] = [ { diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/significant_item_groups.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/significant_item_groups.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/significant_item_groups.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/significant_item_groups.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/significant_log_patterns.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/significant_log_patterns.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/significant_log_patterns.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/significant_log_patterns.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/significant_terms.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/significant_terms.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/significant_terms.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/significant_terms.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/top_terms.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/top_terms.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/top_terms.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/top_terms.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/artificial_logs/top_terms_groups.ts b/x-pack/packages/ml/aiops_test_utils/artificial_logs/top_terms_groups.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/artificial_logs/top_terms_groups.ts rename to x-pack/packages/ml/aiops_test_utils/artificial_logs/top_terms_groups.ts diff --git a/x-pack/plugins/aiops/common/__mocks__/farequote/significant_item_groups.ts b/x-pack/packages/ml/aiops_test_utils/farequote/significant_item_groups.ts similarity index 100% rename from x-pack/plugins/aiops/common/__mocks__/farequote/significant_item_groups.ts rename to x-pack/packages/ml/aiops_test_utils/farequote/significant_item_groups.ts diff --git a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/__mocks__/frequent_item_sets_large_arrays.ts b/x-pack/packages/ml/aiops_test_utils/frequent_item_sets_large_arrays.ts similarity index 64% rename from x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/__mocks__/frequent_item_sets_large_arrays.ts rename to x-pack/packages/ml/aiops_test_utils/frequent_item_sets_large_arrays.ts index 7296fdfc4dc66..e553448745c7b 100644 --- a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/__mocks__/frequent_item_sets_large_arrays.ts +++ b/x-pack/packages/ml/aiops_test_utils/frequent_item_sets_large_arrays.ts @@ -7,1005 +7,6 @@ import type { SignificantItem, SignificantItemGroup } from '@kbn/ml-agg-utils'; -// This was generated from real data using the following code: -// -// const data = testDataFrequentItemSets.response.hits.hits.map((doc) => { -// return doc.fields['files.pathAndFilename'].map((d) => `${stringHash(d)}`); -// }); -// -// The data is used for testing `frequent_item_sets` with somewhat larger arrays -// within the same field of a document. -export const frequentItemSetsLargeArraysSource = [ - [ - '3122117744', - '1846471239', - '3850123478', - '491462432', - '2145700416', - '1136953980', - '1423181790', - '784813175', - '3950054860', - ], - [ - '1451672588', - '3112205174', - '359183539', - '3434731980', - '1217080824', - '4072732370', - '764323024', - '1380284592', - '471153522', - '1104487811', - '3759120234', - '1896487004', - '225357271', - '1157393364', - '1600940924', - '1846471239', - '3178671192', - '32293944', - '2469262600', - '1052777253', - '801912434', - '1371557807', - '3850123478', - '505971607', - '732360692', - '2134530418', - '1416571574', - '2145700416', - '2887166226', - '1518623688', - '550501793', - '2179218510', - '742260364', - '1129761594', - '3625900628', - '3887145594', - '484181980', - '3779185628', - '3234612808', - ], - ['1416571574', '2145700416', '2887166226'], - ['1451672588', '978800164', '3122117744', '2145700416', '1136953980', '1129761594', '1969286181'], - [ - '471153522', - '1104487811', - '606140382', - '1896487004', - '225357271', - '1416571574', - '2145700416', - '2887166226', - '1901595662', - '1136953980', - '1129761594', - '1064752192', - ], - [ - '2432527302', - '1685611991', - '3709732414', - '3434731980', - '914276804', - '629341211', - '3561517034', - '1104874254', - '603630362', - '850909865', - '511726177', - '774389318', - '65096514', - '464464365', - '4072732370', - '3989522974', - '369147719', - '1756911944', - '2132661800', - '1351408438', - '2566334776', - '365681874', - '1994406554', - '4183628510', - '2411863132', - '153528430', - '2125040243', - '1919882921', - '484454192', - '2285116966', - '694867546', - '1275826846', - '1863819958', - '1332658570', - '764323024', - '4195111702', - '652426849', - '1380284592', - '471153522', - '2524040016', - '1325698447', - '998290200', - '1104487811', - '625944587', - '1140596684', - '1979833532', - '1475971156', - '1529680269', - '1925258778', - '3095335232', - '4009453878', - '953226620', - '3127779728', - '1432609585', - '3345566998', - '1867260038', - '3108151752', - '484256652', - '2138441449', - '1992199813', - '644711789', - '355508418', - '2463774400', - '1974037124', - '1437073018', - '2062952599', - '2317033220', - '165907306', - '39215494', - '2924749428', - '1831094494', - '606140382', - '1366342370', - '2084416768', - '55129418', - '899074608', - '1947835436', - '3759120234', - '978208972', - '1896487004', - '225357271', - '3096101166', - '3767723084', - '3035540120', - '853675916', - '1901780335', - '2639455238', - '1853107498', - '1157393364', - '2009375757', - '652223620', - '4028673796', - '1600940924', - '1808235940', - '1846471239', - '3178671192', - '1690511642', - '875090116', - '32293944', - '1073297840', - '1310779384', - '1940824684', - '1616339276', - '1878061294', - '2387317510', - '3899749436', - '1028474515', - '80529116', - '1081175620', - '3850123478', - '505971607', - '1091455238', - '1864834432', - '1569561080', - '1919542521', - '595513713', - '1627808055', - '1509804328', - '2134530418', - '894704468', - '1416571574', - '1227568232', - '1165010485', - '2145700416', - '3568288730', - '1758096804', - '2939442746', - '2057777897', - '456806730', - '1883416844', - '338634143', - '343273046', - '2290476620', - '1912970652', - '918833910', - '3419329722', - '2998254532', - '2887166226', - '3588882742', - '3305614422', - '333459111', - '3700075048', - '422724693', - '2172049200', - '912657112', - '1493078886', - '1924864316', - '1901595662', - '872035779', - '1143829704', - '2513611754', - '1136953980', - '1372713988', - '2087729311', - '209053355', - '1423181790', - '784813175', - '2380606900', - '1439966722', - '1518623688', - '3085917568', - '134825909', - '2848504534', - '1792385756', - '23762256', - '683600999', - '2993287316', - '3662867336', - '550501793', - '3948564194', - '1764158287', - '1124226732', - '3928811594', - '1598402559', - '679133986', - '3777335490', - '1652565419', - '1129761594', - '4043271966', - '4237245772', - '3657936252', - '281200596', - '1501943035', - '628118277', - '3950054860', - '3234612808', - '1548316370', - '315977894', - ], - [ - '178851049', - '1293256852', - '967305015', - '945750959', - '3112205174', - '359183539', - '744667649', - '355870296', - '65096514', - '2411863132', - '471153522', - '644711789', - '165907306', - '606140382', - '1366342370', - '2084416768', - '55129418', - '899074608', - '1947835436', - '1901780335', - '2009375757', - '892741844', - '1175209945', - '894704468', - '2145700416', - '3568288730', - '1758096804', - '2057777897', - '456806730', - '1883416844', - '338634143', - '94643047', - '578183673', - '3419329722', - '1372713988', - '209053355', - '784813175', - '715654930', - '679133986', - '3777335490', - '1652565419', - '1129761594', - '1445245168', - '484181980', - ], - [ - '3709732414', - '1774067546', - '629341211', - '3561517034', - '511726177', - '774389318', - '65096514', - '464464365', - '4072732370', - '1351408438', - '1880041108', - '1863819958', - '471153522', - '1104487811', - '625944587', - '1979833532', - '1475971156', - '3127779728', - '1432609585', - '644711789', - '2463774400', - '1437073018', - '2062952599', - '165907306', - '39215494', - '3279070400', - '33232218', - '3702216900', - '169386347', - '4282833864', - '343056858', - '1048252464', - '3328723350', - '766594295', - '864457688', - '1881750640', - '358188834', - '3464086212', - '1318649342', - '2007178432', - '2039579870', - '2028869426', - '1782757648', - '198736362', - '1459346396', - '261701072', - '860004934', - '1416825454', - '1901780335', - '1853107498', - '1157393364', - '1808235940', - '287718944', - '32293944', - '1310779384', - '1616339276', - '1878061294', - '3899749436', - '3850123478', - '1919542521', - '894704468', - '2803891618', - '1416571574', - '2145700416', - '1758096804', - '2057777897', - '456806730', - '1883416844', - '338634143', - '94643047', - '578183673', - '2998254532', - '333459111', - '912657112', - '1493078886', - '1901595662', - '872035779', - '2513611754', - '1136953980', - '1372713988', - '2087729311', - '209053355', - '1423181790', - '784813175', - '2380606900', - '1214124778', - '23762256', - '715654930', - '550501793', - '2148044396', - '679133986', - '3777335490', - '1652565419', - '4043271966', - '1418709661', - '3950054860', - '923662969', - '3234612808', - '1548316370', - '315977894', - '296863626', - ], - ['1183454328', '1104487811', '2639455238', '1808235940', '2145700416', '1329827342'], - [ - '3341153940', - '1499538523', - '1104487811', - '1979833532', - '2639455238', - '1853107498', - '1157393364', - '1808235940', - '1416571574', - '2145700416', - '2998254532', - '23762256', - '683600999', - '550501793', - '2148044396', - '1329827342', - ], - [ - '2432527302', - '396010280', - '888945742', - '1236602460', - '3709732414', - '629341211', - '3561517034', - '850909865', - '511726177', - '774389318', - '65096514', - '464464365', - '3989522974', - '369147719', - '1756911944', - '2132661800', - '1351408438', - '365681874', - '1994406554', - '4183628510', - '2411863132', - '153528430', - '2125040243', - '1919882921', - '484454192', - '2134641614', - '793940582', - '1782787351', - '1219720056', - '243787747', - '2970663200', - '1380206706', - '1473389172', - '3341153940', - '1023429210', - '1499538523', - '1103890809', - '1183454328', - '408379606', - '83894197', - '2349146622', - '1759997430', - '1880041108', - '672264778', - '1965916128', - '1213194741', - '1962101985', - '2524040016', - '1325698447', - '998290200', - '1104487811', - '625944587', - '1979833532', - '1475971156', - '4009453878', - '953226620', - '3127779728', - '1432609585', - '3345566998', - '1867260038', - '3108151752', - '484256652', - '1992199813', - '644711789', - '355508418', - '2463774400', - '52266782', - '1974037124', - '1437073018', - '2062952599', - '39215494', - '1853107498', - '1157393364', - '2009375757', - '4028673796', - '1600940924', - '1302044808', - '1808235940', - '1846471239', - '1690511642', - '875090116', - '32293944', - '1073297840', - '1310779384', - '1940824684', - '1616339276', - '1878061294', - '2387317510', - '3899749436', - '1028474515', - '80529116', - '1592492698', - '505971607', - '1091455238', - '1864834432', - '1569561080', - '1919542521', - '595513713', - '1627808055', - '892741844', - '1175209945', - '894704468', - '1416571574', - '1165010485', - '2145700416', - '3568288730', - '2057777897', - '456806730', - '1883416844', - '338634143', - '3419329722', - '2998254532', - '2073206647', - '3588882742', - '3305614422', - '684643770', - '333459111', - '3700075048', - '422724693', - '2172049200', - '912657112', - '1493078886', - '1924864316', - '2380606900', - '1439966722', - '1214124778', - '3085917568', - '134825909', - '2848504534', - '23762256', - '683600999', - '2993287316', - '550501793', - '3948564194', - '1764158287', - '1124226732', - '2148044396', - '3777335490', - '1652565419', - '4043271966', - '4237245772', - '3657936252', - '249588550', - '281200596', - '1501943035', - '3939021644', - '1418709661', - '628118277', - '998280499', - '1445245168', - '3950054860', - '1361617926', - '923662969', - '1264884266', - '3234612808', - '1548316370', - '315977894', - '296863626', - ], - [ - '1447828634', - '396010280', - '888945742', - '1439926706', - '1236602460', - '3709732414', - '629341211', - '3561517034', - '850909865', - '511726177', - '774389318', - '65096514', - '464464365', - '3989522974', - '369147719', - '1756911944', - '2132661800', - '1351408438', - '365681874', - '1994406554', - '4183628510', - '2411863132', - '153528430', - '2125040243', - '1919882921', - '484454192', - '2134641614', - '793940582', - '1782787351', - '1219720056', - '243787747', - '2970663200', - '1380206706', - '1473389172', - '3341153940', - '1023429210', - '1499538523', - '1103890809', - '1183454328', - '408379606', - '83894197', - '2349146622', - '1759997430', - '1880041108', - '672264778', - '1965916128', - '1213194741', - '1962101985', - '2524040016', - '1325698447', - '998290200', - '1104487811', - '625944587', - '1979833532', - '1475971156', - '4009453878', - '953226620', - '3127779728', - '1432609585', - '3345566998', - '1867260038', - '3108151752', - '484256652', - '1992199813', - '644711789', - '355508418', - '2463774400', - '52266782', - '1974037124', - '1437073018', - '2062952599', - '39215494', - '1853107498', - '1157393364', - '2009375757', - '4028673796', - '1600940924', - '1302044808', - '1808235940', - '1846471239', - '1690511642', - '875090116', - '32293944', - '1073297840', - '1310779384', - '1940824684', - '1616339276', - '1878061294', - '2387317510', - '3899749436', - '1028474515', - '80529116', - '1592492698', - '505971607', - '1091455238', - '1864834432', - '1569561080', - '1919542521', - '595513713', - '1627808055', - '892741844', - '1175209945', - '894704468', - '1416571574', - '1165010485', - '2145700416', - '3568288730', - '2057777897', - '456806730', - '1883416844', - '338634143', - '3419329722', - '2998254532', - '2073206647', - '3588882742', - '3305614422', - '684643770', - '333459111', - '3700075048', - '422724693', - '2172049200', - '912657112', - '1493078886', - '1924864316', - '2380606900', - '1439966722', - '1214124778', - '3085917568', - '134825909', - '2848504534', - '23762256', - '683600999', - '2993287316', - '550501793', - '3948564194', - '1764158287', - '1124226732', - '2148044396', - '3777335490', - '1652565419', - '4043271966', - '4237245772', - '3657936252', - '249588550', - '281200596', - '1501943035', - '3939021644', - '1418709661', - '628118277', - '998280499', - '1445245168', - '3950054860', - '1361617926', - '923662969', - '1264884266', - '3234612808', - '1548316370', - '315977894', - '296863626', - ], - [ - '850909865', - '464464365', - '3341153940', - '1103890809', - '83894197', - '1759997430', - '2524040016', - '998290200', - '1104487811', - '625944587', - '1979833532', - '4009453878', - '3127779728', - '52266782', - '1157393364', - '1808235940', - '1024718864', - '32293944', - '505971607', - '894704468', - '1416571574', - '2145700416', - '3568288730', - '2998254532', - '3588882742', - '3305614422', - '684643770', - '333459111', - '3700075048', - '422724693', - '2172049200', - '1493078886', - '1924864316', - '2380606900', - '1439966722', - '23762256', - '683600999', - '2148044396', - '3777335490', - '3234612808', - '1548316370', - ], - [ - '178851049', - '1685611991', - '869061781', - '3122117744', - '1712164321', - '914276804', - '850909865', - '65096514', - '464464365', - '369147719', - '1351408438', - '1325698447', - '998290200', - '1104487811', - '625944587', - '3127779728', - '1157393364', - '1808235940', - '1690511642', - '32293944', - '1616339276', - '2387317510', - '505971607', - '894704468', - '2145700416', - '2998254532', - '1214124778', - '550501793', - '3777335490', - '1652565419', - '1548316370', - ], - ['945750959', '850909865', '1416571574', '2145700416', '2998254532', '3305614422', '1548316370'], - [ - '2432527302', - '1144870203', - '1293256852', - '945750959', - '2861405270', - '3157340152', - '869061781', - '289756479', - '744667649', - '1217080824', - '362845723', - '355870296', - '3122117744', - '1774067546', - '1284354426', - '1712164321', - '629341211', - '3561517034', - '850909865', - '511726177', - '774389318', - '65096514', - '464464365', - '4072732370', - '3989522974', - '369147719', - '1756911944', - '2132661800', - '1351408438', - '365681874', - '1994406554', - '4183628510', - '2411863132', - '153528430', - '2125040243', - '1919882921', - '484454192', - '1028927795', - '2134641614', - '793940582', - '1782787351', - '1219720056', - '243787747', - '2970663200', - '1380206706', - '1473389172', - '3341153940', - '1023429210', - '1499538523', - '1103890809', - '1183454328', - '408379606', - '83894197', - '2349146622', - '1759997430', - '1880041108', - '672264778', - '1965916128', - '1213194741', - '1962101985', - '2524040016', - '1325698447', - '998290200', - '1104487811', - '625944587', - '1979833532', - '1475971156', - '4009453878', - '953226620', - '3127779728', - '1432609585', - '3345566998', - '1867260038', - '3108151752', - '484256652', - '1992199813', - '644711789', - '355508418', - '2463774400', - '52266782', - '1974037124', - '1437073018', - '2062952599', - '39215494', - '2173098414', - '1157393364', - '4035065194', - '1600940924', - '1808235940', - '1846471239', - '287718944', - '1690511642', - '875090116', - '32293944', - '1073297840', - '1310779384', - '1940824684', - '1616339276', - '1878061294', - '2387317510', - '3899749436', - '1028474515', - '80529116', - '1592492698', - '3850123478', - '505971607', - '1091455238', - '3521104552', - '1864834432', - '1569561080', - '1919542521', - '595513713', - '1627808055', - '892741844', - '1175209945', - '894704468', - '1622294140', - '1416571574', - '1165010485', - '2145700416', - '3568288730', - '2057777897', - '456806730', - '1883416844', - '338634143', - '3419329722', - '2998254532', - '2073206647', - '3588882742', - '3305614422', - '684643770', - '333459111', - '3700075048', - '422724693', - '2172049200', - '912657112', - '1493078886', - '1924864316', - '2380606900', - '1439966722', - '1214124778', - '3085917568', - '134825909', - '2848504534', - '23762256', - '683600999', - '2993287316', - '550501793', - '3948564194', - '1764158287', - '1124226732', - '2148044396', - '3777335490', - '1445245168', - '3950054860', - '484181980', - '1361617926', - '923662969', - '1264884266', - '3234612808', - '315977894', - '296863626', - ], -]; - export const frequentItemSetsLargeArraysSignificantItems: SignificantItem[] = [ { doc_count: 16, fieldValue: '2145700416' }, { doc_count: 11, fieldValue: '1104487811' }, diff --git a/x-pack/packages/ml/aiops_test_utils/jest.config.js b/x-pack/packages/ml/aiops_test_utils/jest.config.js new file mode 100644 index 0000000000000..39dea48501808 --- /dev/null +++ b/x-pack/packages/ml/aiops_test_utils/jest.config.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/x-pack/packages/ml/aiops_test_utils'], +}; diff --git a/x-pack/packages/ml/aiops_test_utils/kibana.jsonc b/x-pack/packages/ml/aiops_test_utils/kibana.jsonc new file mode 100644 index 0000000000000..1c79f5adf34a4 --- /dev/null +++ b/x-pack/packages/ml/aiops_test_utils/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/aiops-test-utils", + "owner": "@elastic/ml-ui" +} diff --git a/x-pack/packages/ml/aiops_test_utils/package.json b/x-pack/packages/ml/aiops_test_utils/package.json new file mode 100644 index 0000000000000..c5d9c316fd818 --- /dev/null +++ b/x-pack/packages/ml/aiops_test_utils/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/aiops-test-utils", + "private": true, + "version": "1.0.0", + "license": "Elastic License 2.0" +} \ No newline at end of file diff --git a/x-pack/packages/ml/aiops_test_utils/tsconfig.json b/x-pack/packages/ml/aiops_test_utils/tsconfig.json new file mode 100644 index 0000000000000..2f76ef07f75b2 --- /dev/null +++ b/x-pack/packages/ml/aiops_test_utils/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/ml-agg-utils", + "@kbn/aiops-utils", + ] +} diff --git a/x-pack/packages/ml/aiops_utils/tsconfig.json b/x-pack/packages/ml/aiops_utils/tsconfig.json index 806b5b07e847e..0ca488f2b7967 100644 --- a/x-pack/packages/ml/aiops_utils/tsconfig.json +++ b/x-pack/packages/ml/aiops_utils/tsconfig.json @@ -15,6 +15,7 @@ ], "kbn_references": [ "@kbn/ml-is-populated-object", + "@kbn/ml-agg-utils", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/aiops/common/types.ts b/x-pack/packages/ml/aiops_utils/types.ts similarity index 100% rename from x-pack/plugins/aiops/common/types.ts rename to x-pack/packages/ml/aiops_utils/types.ts diff --git a/x-pack/packages/security/plugin_types_server/src/audit/audit_events.ts b/x-pack/packages/security/plugin_types_server/src/audit/audit_events.ts index f071a3edcd824..35d7bb254fc22 100644 --- a/x-pack/packages/security/plugin_types_server/src/audit/audit_events.ts +++ b/x-pack/packages/security/plugin_types_server/src/audit/audit_events.ts @@ -26,6 +26,7 @@ export interface AuditKibana { saved_object?: { type: string; id: string; + name?: string; }; /** * Name of authentication provider associated with a login event. diff --git a/x-pack/performance/journeys/infra_hosts_view.ts b/x-pack/performance/journeys/infra_hosts_view.ts deleted file mode 100644 index 893eb835a796d..0000000000000 --- a/x-pack/performance/journeys/infra_hosts_view.ts +++ /dev/null @@ -1,95 +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 { Journey } from '@kbn/journeys'; -import { - createLogger, - InfraSynthtraceEsClient, - LogLevel, - InfraSynthtraceKibanaClient, -} from '@kbn/apm-synthtrace'; -import { infra, timerange } from '@kbn/apm-synthtrace-client'; -import { subj } from '@kbn/test-subj-selector'; - -export const journey = new Journey({ - beforeSteps: async ({ kbnUrl, auth, es }) => { - const logger = createLogger(LogLevel.debug); - const synthKibanaClient = new InfraSynthtraceKibanaClient({ - logger, - target: kbnUrl.get(), - username: auth.getUsername(), - password: auth.getPassword(), - }); - - const pkgVersion = await synthKibanaClient.fetchLatestSystemPackageVersion(); - await synthKibanaClient.installSystemPackage(pkgVersion); - - const synthEsClient = new InfraSynthtraceEsClient({ - logger, - client: es, - refreshAfterIndex: true, - }); - - const start = Date.now() - 1000 * 60 * 10; - await synthEsClient.index( - generateHostsData({ - from: new Date(start).toISOString(), - to: new Date().toISOString(), - count: 1000, - }) - ); - }, -}) - .step('Navigate to Hosts view and load 500 hosts', async ({ page, kbnUrl, kibanaPage }) => { - await page.goto( - kbnUrl.get( - `app/metrics/hosts?_a=(dateRange:(from:now-15m,to:now),filters:!(),limit:500,panelFilters:!(),query:(language:kuery,query:''))` - ) - ); - // wait for table to be loaded - await page.waitForSelector(subj('hostsView-table-loaded')); - // wait for metric charts to be loaded - await kibanaPage.waitForCharts({ count: 5, timeout: 60000 }); - }) - .step('Go to single host asset details view', async ({ page, kibanaPage }) => { - // get the links to asset details page - const hostsTableLinks = await page.locator(subj('hostsViewTableEntryTitleLink')); - // click on the first host in the table to see asset details - await hostsTableLinks.first().click(); - // wait for metric charts on the asset details view to be loaded - await kibanaPage.waitForCharts({ count: 4, timeout: 60000 }); - }); - -export function generateHostsData({ - from, - to, - count = 1, -}: { - from: string; - to: string; - count: number; -}) { - const range = timerange(from, to); - - const hosts = Array(count) - .fill(0) - .map((_, idx) => infra.host(`my-host-${idx}`)); - - return range - .interval('30s') - .rate(1) - .generator((timestamp, index) => - 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), - ]) - ); -} diff --git a/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts b/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts new file mode 100644 index 0000000000000..4cf8ab6c074cc --- /dev/null +++ b/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Journey } from '@kbn/journeys'; +import { subj } from '@kbn/test-subj-selector'; + +import dataView from '../kbn_archives/large_arrays_data_view.json'; + +export const journey = new Journey({ + kbnArchives: ['x-pack/performance/kbn_archives/large_arrays_data_view'], + esArchives: ['x-pack/test/functional/es_archives/large_arrays'], +}) + .step('Go to AIOps Log Rate Analysis', async ({ page, kbnUrl }) => { + // Navigate to Log Rate Analysis with a prepopulated url state that runs + // the analysis directly on page load without any necessary user interactions. + await page.goto( + kbnUrl.get( + `app/ml/aiops/log_rate_analysis?index=${dataView.id}&_g=%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A60000%29%2Ctime%3A%28from%3A%272019-07-01T15%3A35%3A38.700Z%27%2Cto%3A%272019-07-05T15%3A35%3A38.700Z%27%29%29&_a=%28logRateAnalysis%3A%28filters%3A%21%28%29%2CsearchQuery%3A%28match_all%3A%28%29%29%2CsearchQueryLanguage%3Akuery%2CsearchString%3A%27%27%2Cwp%3A%28bMax%3A1562198400000%2CbMin%3A1562097600000%2CdMax%3A1562270400000%2CdMin%3A1562234400000%29%29%29` + ) + ); + + // Wait for the AIOps Log Rate Analysis page wrapper to load + await page.waitForSelector(subj('aiopsLogRateAnalysisPage')); + }) + .step('Run AIOps Log Rate Analysis', async ({ page, kbnUrl }) => { + // Wait for the analysis to complete with extended timeout, this one tracks a known issue with slow frequent_item_sets performance. + await page.waitForSelector(subj('aiopsAnalysisComplete'), { timeout: 120000 }); + }); diff --git a/x-pack/performance/journeys/apm_service_inventory.ts b/x-pack/performance/journeys_e2e/apm_service_inventory.ts similarity index 58% rename from x-pack/performance/journeys/apm_service_inventory.ts rename to x-pack/performance/journeys_e2e/apm_service_inventory.ts index f6f2f3731a65b..2c4b3803f5c32 100644 --- a/x-pack/performance/journeys/apm_service_inventory.ts +++ b/x-pack/performance/journeys_e2e/apm_service_inventory.ts @@ -7,36 +7,19 @@ import { Journey } from '@kbn/journeys'; import { subj } from '@kbn/test-subj-selector'; -import { SynthtraceClient } from '../services/synthtrace'; -import { generateData } from '../synthtrace_data/apm_data'; +import { generateApmData } from '../synthtrace_data/apm_data'; export const journey = new Journey({ - beforeSteps: async ({ kbnUrl, log, auth, es }) => { - // Install APM Package - const synthClient = new SynthtraceClient({ - kbnBaseUrl: kbnUrl.get(), - logger: log, - username: auth.getUsername(), - password: auth.getPassword(), - esClient: es, - }); - - await synthClient.installApmPackage(); - // Setup Synthtrace Client - await synthClient.initialiseEsClient(); - // Generate data using Synthtrace - const start = Date.now() - 1000 * 60 * 15; - const end = Date.now() + 1000 * 60 * 15; - await synthClient.index( - generateData({ - from: new Date(start).getTime(), - to: new Date(end).getTime(), - }) - ); + synthtrace: { + type: 'apm', + generator: generateApmData, + options: { + from: new Date(Date.now() - 1000 * 60 * 15), + to: new Date(Date.now() + 1000 * 60 * 15), + }, }, + ftrConfigPath: 'x-pack/performance/configs/apm_config.ts', - // FLAKY: https://github.com/elastic/kibana/issues/162813 - skipped: true, }) .step('Navigate to Service Inventory Page', async ({ page, kbnUrl }) => { await page.goto(kbnUrl.get(`app/apm/services`)); diff --git a/x-pack/performance/journeys/cloud_security_dashboard.ts b/x-pack/performance/journeys_e2e/cloud_security_dashboard.ts similarity index 100% rename from x-pack/performance/journeys/cloud_security_dashboard.ts rename to x-pack/performance/journeys_e2e/cloud_security_dashboard.ts diff --git a/x-pack/performance/journeys/dashboard_listing_page.ts b/x-pack/performance/journeys_e2e/dashboard_listing_page.ts similarity index 100% rename from x-pack/performance/journeys/dashboard_listing_page.ts rename to x-pack/performance/journeys_e2e/dashboard_listing_page.ts diff --git a/x-pack/performance/journeys/data_stress_test_lens.ts b/x-pack/performance/journeys_e2e/data_stress_test_lens.ts similarity index 100% rename from x-pack/performance/journeys/data_stress_test_lens.ts rename to x-pack/performance/journeys_e2e/data_stress_test_lens.ts diff --git a/x-pack/performance/journeys/ecommerce_dashboard.ts b/x-pack/performance/journeys_e2e/ecommerce_dashboard.ts similarity index 100% rename from x-pack/performance/journeys/ecommerce_dashboard.ts rename to x-pack/performance/journeys_e2e/ecommerce_dashboard.ts diff --git a/x-pack/performance/journeys/ecommerce_dashboard_map_only.ts b/x-pack/performance/journeys_e2e/ecommerce_dashboard_map_only.ts similarity index 100% rename from x-pack/performance/journeys/ecommerce_dashboard_map_only.ts rename to x-pack/performance/journeys_e2e/ecommerce_dashboard_map_only.ts diff --git a/x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts b/x-pack/performance/journeys_e2e/ecommerce_dashboard_saved_search_only.ts similarity index 100% rename from x-pack/performance/journeys/ecommerce_dashboard_saved_search_only.ts rename to x-pack/performance/journeys_e2e/ecommerce_dashboard_saved_search_only.ts diff --git a/x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts b/x-pack/performance/journeys_e2e/ecommerce_dashboard_tsvb_gauge_only.ts similarity index 100% rename from x-pack/performance/journeys/ecommerce_dashboard_tsvb_gauge_only.ts rename to x-pack/performance/journeys_e2e/ecommerce_dashboard_tsvb_gauge_only.ts diff --git a/x-pack/performance/journeys/flight_dashboard.ts b/x-pack/performance/journeys_e2e/flight_dashboard.ts similarity index 100% rename from x-pack/performance/journeys/flight_dashboard.ts rename to x-pack/performance/journeys_e2e/flight_dashboard.ts diff --git a/x-pack/performance/journeys_e2e/infra_hosts_view.ts b/x-pack/performance/journeys_e2e/infra_hosts_view.ts new file mode 100644 index 0000000000000..d7f2beb661ce3 --- /dev/null +++ b/x-pack/performance/journeys_e2e/infra_hosts_view.ts @@ -0,0 +1,41 @@ +/* + * 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 { Journey } from '@kbn/journeys'; +import { subj } from '@kbn/test-subj-selector'; +import { generateHostsData } from '../synthtrace_data/hosts_data'; + +export const journey = new Journey({ + synthtrace: { + type: 'infra', + generator: generateHostsData, + options: { + from: new Date(Date.now() - 1000 * 60 * 10), + to: new Date(), + count: 1000, + }, + }, +}) + .step('Navigate to Hosts view and load 500 hosts', async ({ page, kbnUrl, kibanaPage }) => { + await page.goto( + kbnUrl.get( + `app/metrics/hosts?_a=(dateRange:(from:now-15m,to:now),filters:!(),limit:500,panelFilters:!(),query:(language:kuery,query:''))` + ) + ); + // wait for table to be loaded + await page.waitForSelector(subj('hostsView-table-loaded')); + // wait for metric charts to be loaded + await kibanaPage.waitForCharts({ count: 5, timeout: 60000 }); + }) + .step('Go to single host asset details view', async ({ page, kibanaPage }) => { + // get the links to asset details page + const hostsTableLinks = await page.locator(subj('hostsViewTableEntryTitleLink')); + // click on the first host in the table to see asset details + await hostsTableLinks.first().click(); + // wait for metric charts on the asset details view to be loaded + await kibanaPage.waitForCharts({ count: 4, timeout: 60000 }); + }); diff --git a/x-pack/performance/journeys/login.ts b/x-pack/performance/journeys_e2e/login.ts similarity index 100% rename from x-pack/performance/journeys/login.ts rename to x-pack/performance/journeys_e2e/login.ts diff --git a/x-pack/performance/journeys/many_fields_discover.ts b/x-pack/performance/journeys_e2e/many_fields_discover.ts similarity index 100% rename from x-pack/performance/journeys/many_fields_discover.ts rename to x-pack/performance/journeys_e2e/many_fields_discover.ts diff --git a/x-pack/performance/journeys/many_fields_lens_editor.ts b/x-pack/performance/journeys_e2e/many_fields_lens_editor.ts similarity index 100% rename from x-pack/performance/journeys/many_fields_lens_editor.ts rename to x-pack/performance/journeys_e2e/many_fields_lens_editor.ts diff --git a/x-pack/performance/journeys/many_fields_transform.ts b/x-pack/performance/journeys_e2e/many_fields_transform.ts similarity index 100% rename from x-pack/performance/journeys/many_fields_transform.ts rename to x-pack/performance/journeys_e2e/many_fields_transform.ts diff --git a/x-pack/performance/journeys/promotion_tracking_dashboard.ts b/x-pack/performance/journeys_e2e/promotion_tracking_dashboard.ts similarity index 100% rename from x-pack/performance/journeys/promotion_tracking_dashboard.ts rename to x-pack/performance/journeys_e2e/promotion_tracking_dashboard.ts diff --git a/x-pack/performance/journeys/tags_listing_page.ts b/x-pack/performance/journeys_e2e/tags_listing_page.ts similarity index 100% rename from x-pack/performance/journeys/tags_listing_page.ts rename to x-pack/performance/journeys_e2e/tags_listing_page.ts diff --git a/x-pack/performance/journeys/tsdb_logs_data_visualizer.ts b/x-pack/performance/journeys_e2e/tsdb_logs_data_visualizer.ts similarity index 100% rename from x-pack/performance/journeys/tsdb_logs_data_visualizer.ts rename to x-pack/performance/journeys_e2e/tsdb_logs_data_visualizer.ts diff --git a/x-pack/performance/journeys/web_logs_dashboard.ts b/x-pack/performance/journeys_e2e/web_logs_dashboard.ts similarity index 100% rename from x-pack/performance/journeys/web_logs_dashboard.ts rename to x-pack/performance/journeys_e2e/web_logs_dashboard.ts diff --git a/x-pack/performance/kbn_archives/large_arrays_data_view.json b/x-pack/performance/kbn_archives/large_arrays_data_view.json new file mode 100644 index 0000000000000..aaa4cd61ee0ec --- /dev/null +++ b/x-pack/performance/kbn_archives/large_arrays_data_view.json @@ -0,0 +1,22 @@ +{ + "attributes": { + "allowHidden": false, + "fieldAttrs": "{}", + "fieldFormatMap": "{}", + "fields": "[]", + "name": "large_arrays", + "runtimeFieldMap": "{}", + "sourceFilters": "[]", + "timeFieldName": "@timestamp", + "title": "large_arrays" + }, + "coreMigrationVersion": "8.8.0", + "created_at": "2024-03-12T15:53:19.579Z", + "id": "69dc58dc-80f7-4c46-8fa1-eb29b0794c52", + "managed": false, + "references": [], + "type": "index-pattern", + "typeMigrationVersion": "8.0.0", + "updated_at": "2024-03-12T15:53:19.579Z", + "version": "WzEwLDFd" +} diff --git a/x-pack/performance/services/synthtrace/index.ts b/x-pack/performance/services/synthtrace/index.ts deleted file mode 100644 index fc7ac5c306b62..0000000000000 --- a/x-pack/performance/services/synthtrace/index.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { ApmSynthtraceEsClient, ApmSynthtraceKibanaClient } from '@kbn/apm-synthtrace'; -import Url from 'url'; -import { Readable } from 'stream'; -import { ApmFields, SynthtraceGenerator } from '@kbn/apm-synthtrace-client'; - -export interface SynthtraceClientParams { - kbnBaseUrl: string; - logger: any; - username: string; - password: string; - esClient: any; -} - -export class SynthtraceClient { - private synthtraceEsClient: ApmSynthtraceEsClient | undefined; - private packageVersion: string = ''; - private readonly kibanaUrlWithAuth: string; - - constructor(private readonly baseParams: SynthtraceClientParams) { - const kibanaUrl = new URL(this.baseParams.kbnBaseUrl); - this.kibanaUrlWithAuth = Url.format({ - protocol: kibanaUrl.protocol, - hostname: kibanaUrl.hostname, - port: kibanaUrl.port, - auth: `${this.baseParams.username}:${this.baseParams.password}`, - }); - } - - async installApmPackage() { - const kibanaClient = new ApmSynthtraceKibanaClient({ - logger: this.baseParams.logger, - target: this.kibanaUrlWithAuth, - }); - this.packageVersion = await kibanaClient.fetchLatestApmPackageVersion(); - - await kibanaClient.installApmPackage(this.packageVersion); - } - - async initialiseEsClient() { - this.synthtraceEsClient = new ApmSynthtraceEsClient({ - client: this.baseParams.esClient, - logger: this.baseParams.logger, - refreshAfterIndex: true, - version: this.packageVersion, - }); - - this.synthtraceEsClient.pipeline(this.synthtraceEsClient.getDefaultPipeline(false)); - } - - async index(events: SynthtraceGenerator) { - if (this.synthtraceEsClient) { - await this.synthtraceEsClient.index( - Readable.from(Array.from(events).flatMap((event) => event.serialize())) - ); - } else { - throw new Error('ES Client not initialised'); - } - } -} diff --git a/x-pack/performance/synthtrace_data/apm_data.ts b/x-pack/performance/synthtrace_data/apm_data.ts index 4a7ab835d37cd..4adf560a94044 100644 --- a/x-pack/performance/synthtrace_data/apm_data.ts +++ b/x-pack/performance/synthtrace_data/apm_data.ts @@ -5,9 +5,10 @@ * 2.0. */ import { apm, httpExitSpan, timerange } from '@kbn/apm-synthtrace-client'; +import { Readable } from 'stream'; -export function generateData({ from, to }: { from: number; to: number }) { - const range = timerange(from, to); +export function generateApmData({ from, to }: { from: Date; to: Date }) { + const range = timerange(from.toISOString(), to.toISOString()); const transactionName = '240rpm/75% 1000ms'; const synthRum = apm @@ -20,7 +21,7 @@ export function generateData({ from, to }: { from: number; to: number }) { .service({ name: 'synth-go', environment: 'production', agentName: 'go' }) .instance('my-instance'); - return range.interval('1m').generator((timestamp) => { + const data = range.interval('1m').generator((timestamp) => { return synthRum .transaction({ transactionName }) .duration(400) @@ -74,4 +75,6 @@ export function generateData({ from, to }: { from: number; to: number }) { ) ); }); + + return Readable.from(Array.from(data).flatMap((event) => event.serialize())); } diff --git a/x-pack/performance/synthtrace_data/hosts_data.ts b/x-pack/performance/synthtrace_data/hosts_data.ts new file mode 100644 index 0000000000000..3d9de1a0dbebc --- /dev/null +++ b/x-pack/performance/synthtrace_data/hosts_data.ts @@ -0,0 +1,37 @@ +/* + * 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 { infra, timerange } from '@kbn/apm-synthtrace-client'; + +export function generateHostsData({ + from, + to, + count = 1, +}: { + from: Date; + to: Date; + count?: number; +}) { + const range = timerange(from.toISOString(), to.toISOString()); + + const hosts = Array(count) + .fill(0) + .map((_, idx) => infra.host(`my-host-${idx}`)); + + return range + .interval('30s') + .rate(1) + .generator((timestamp, index) => + 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), + ]) + ); +} diff --git a/x-pack/performance/tsconfig.json b/x-pack/performance/tsconfig.json index 8dcd1caca873f..5c00a3b2895d8 100644 --- a/x-pack/performance/tsconfig.json +++ b/x-pack/performance/tsconfig.json @@ -2,9 +2,15 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", - "types": ["node", "jest"] + "types": [ + "node", + "jest" + ], }, - "include": ["**/*.ts"], + "include": [ + "**/*.ts", + "kbn_archives/large_arrays_data_view.json" + ], "exclude": [ "target/**/*", ], @@ -15,7 +21,6 @@ "@kbn/test", "@kbn/expect", "@kbn/dev-utils", - "@kbn/apm-synthtrace", "@kbn/apm-synthtrace-client", ] } diff --git a/x-pack/plugins/aiops/common/api/stream_reducer.test.ts b/x-pack/plugins/aiops/common/api/stream_reducer.test.ts index 5344d2448463c..6a7bd6d8480ba 100644 --- a/x-pack/plugins/aiops/common/api/stream_reducer.test.ts +++ b/x-pack/plugins/aiops/common/api/stream_reducer.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { significantTerms } from '../__mocks__/artificial_logs/significant_terms'; -import { finalSignificantItemGroups } from '../__mocks__/artificial_logs/final_significant_item_groups'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; +import { finalSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; import { addSignificantItemsAction, diff --git a/x-pack/plugins/aiops/public/components/log_categorization/show_flyout.tsx b/x-pack/plugins/aiops/public/components/log_categorization/show_flyout.tsx index ea4cb6a039020..02303671d758e 100644 --- a/x-pack/plugins/aiops/public/components/log_categorization/show_flyout.tsx +++ b/x-pack/plugins/aiops/public/components/log_categorization/show_flyout.tsx @@ -34,7 +34,8 @@ export async function showCategorizeFlyout( originatingApp: string, additionalFilter?: CategorizationAdditionalFilter ): Promise { - const { http, theme, overlays, application, notifications, uiSettings, i18n } = coreStart; + const { analytics, http, theme, overlays, application, notifications, uiSettings, i18n } = + coreStart; return new Promise(async (resolve, reject) => { try { @@ -44,6 +45,7 @@ export async function showCategorizeFlyout( }; const appDependencies: AiopsAppDependencies = { + analytics, notifications, uiSettings, http, diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx index f2af2918302ea..e69a18bd85cf3 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx @@ -6,7 +6,7 @@ */ import type { FC } from 'react'; -import React, { useEffect, useMemo, useState } from 'react'; +import React, { useEffect, useMemo, useRef, useState } from 'react'; import { isEqual, uniq } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; @@ -22,6 +22,7 @@ import { EuiText, } from '@elastic/eui'; +import { reportPerformanceMetricEvent } from '@kbn/ebt-tools'; import type { DataView } from '@kbn/data-views-plugin/public'; import { ProgressControls } from '@kbn/aiops-components'; import { useFetchStream } from '@kbn/ml-response-stream/client'; @@ -137,7 +138,11 @@ export const LogRateAnalysisResults: FC = ({ onAnalysisCompleted, embeddingOrigin, }) => { - const { http } = useAiopsAppContext(); + const { analytics, http } = useAiopsAppContext(); + + // Store the performance metric's start time using a ref + // to be able to track it across rerenders. + const analysisStartTime = useRef(window.performance.now()); const { clearAllRowState } = useLogRateAnalysisResultsTableRowContext(); @@ -232,8 +237,11 @@ export const LogRateAnalysisResults: FC = ({ remainingFieldCandidates, significantItems: data.significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], }); - } else { + } else if (loaded > 0) { + // Reset all overrides. setOverrides(undefined); + + // If provided call the `onAnalysisCompleted` callback with the analysis results. if (onAnalysisCompleted) { onAnalysisCompleted({ analysisType, @@ -241,6 +249,19 @@ export const LogRateAnalysisResults: FC = ({ significantItemsGroups: data.significantItemsGroups, }); } + + // Track performance metric + if (analysisStartTime.current !== undefined) { + const analysisDuration = window.performance.now() - analysisStartTime.current; + + // Set this to undefined so reporting the metric gets triggered only once. + analysisStartTime.current = undefined; + + reportPerformanceMetricEvent(analytics, { + eventName: 'aiopsLogRateAnalysisCompleted', + duration: analysisDuration, + }); + } } } // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_group_table_items.test.ts b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_group_table_items.test.ts index 0976382377245..28e209190198f 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_group_table_items.test.ts +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_group_table_items.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { finalSignificantItemGroups } from '../../../common/__mocks__/artificial_logs/final_significant_item_groups'; +import { finalSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; import { getGroupTableItems } from './get_group_table_items'; diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_table_item_as_kql.test.ts b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_table_item_as_kql.test.ts index 28c4d8c40a676..ff1a986ce4759 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_table_item_as_kql.test.ts +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/get_table_item_as_kql.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { finalSignificantItemGroups } from '../../../common/__mocks__/artificial_logs/final_significant_item_groups'; -import { significantTerms } from '../../../common/__mocks__/artificial_logs/significant_terms'; +import { finalSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getGroupTableItems } from './get_group_table_items'; import { getTableItemAsKQL } from './get_table_item_as_kql'; diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_copy_to_clipboard_action.test.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_copy_to_clipboard_action.test.tsx index 52ffafd29bcc5..8e3b68f4ec279 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_copy_to_clipboard_action.test.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_copy_to_clipboard_action.test.tsx @@ -12,8 +12,8 @@ import { renderHook } from '@testing-library/react-hooks'; import type { SignificantItem } from '@kbn/ml-agg-utils'; -import { finalSignificantItemGroups } from '../../../common/__mocks__/artificial_logs/final_significant_item_groups'; -import { significantTerms } from '../../../common/__mocks__/artificial_logs/significant_terms'; +import { finalSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getGroupTableItems } from './get_group_table_items'; import { useCopyToClipboardAction } from './use_copy_to_clipboard_action'; diff --git a/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts b/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts index cc617c7bade1c..72a5ed494a446 100644 --- a/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts +++ b/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts @@ -14,6 +14,7 @@ import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import type { SharePluginStart } from '@kbn/share-plugin/public'; import type { + AnalyticsServiceStart, CoreSetup, CoreStart, ExecutionContextStart, @@ -39,6 +40,10 @@ import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; * AIOps App Dependencies to be provided via React context. */ export interface AiopsAppDependencies { + /** + * Used for telemetry/performance metrics. + */ + analytics: AnalyticsServiceStart; /** * Used to check capabilities for links to other plugins. * `application.currentAppId$` is used to close the log pattern analysis flyout diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.test.ts index 88dc3735c1166..1112b1fed9f46 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getShouldClauses, getFrequentItemSetsAggFields } from './fetch_frequent_item_sets'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.ts index b5cd15636434c..aea40b0129fcf 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_frequent_item_sets.ts @@ -14,13 +14,13 @@ import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { Logger } from '@kbn/logging'; import { type SignificantItem } from '@kbn/ml-agg-utils'; import { createRandomSamplerWrapper } from '@kbn/ml-random-sampler-utils'; - -import { RANDOM_SAMPLER_SEED, LOG_RATE_ANALYSIS_SETTINGS } from '../../../../common/constants'; import type { SignificantItemDuplicateGroup, ItemSet, FetchFrequentItemSetsResponse, -} from '../../../../common/types'; +} from '@kbn/aiops-utils/types'; + +import { RANDOM_SAMPLER_SEED, LOG_RATE_ANALYSIS_SETTINGS } from '../../../../common/constants'; interface FrequentItemSetsAggregation extends estypes.AggregationsSamplerAggregation { fi: { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_terms_2_categories_counts.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_terms_2_categories_counts.ts index e991d5d925bde..998569f068d7f 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_terms_2_categories_counts.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/fetch_terms_2_categories_counts.ts @@ -12,10 +12,10 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import type { Logger } from '@kbn/logging'; import type { FieldValuePair, SignificantItem } from '@kbn/ml-agg-utils'; +import type { FetchFrequentItemSetsResponse, ItemSet } from '@kbn/aiops-utils/types'; import { isPopulatedObject } from '@kbn/ml-is-populated-object'; import type { AiopsLogRateAnalysisSchema } from '../../../../common/api/log_rate_analysis/schema'; -import type { FetchFrequentItemSetsResponse, ItemSet } from '../../../../common/types'; import { getCategoryQuery } from '../../../../common/api/log_categorization/get_category_query'; import type { Category } from '../../../../common/api/log_categorization/types'; import { LOG_RATE_ANALYSIS_SETTINGS } from '../../../../common/constants'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.test.ts index 903755eca45d5..37abc1bc4db87 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { significantItemGroups } from '../../../../common/__mocks__/farequote/significant_item_groups'; -import { fields } from '../../../../common/__mocks__/artificial_logs/fields'; -import { filteredFrequentItemSets } from '../../../../common/__mocks__/artificial_logs/filtered_frequent_item_sets'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { significantItemGroups } from '@kbn/aiops-test-utils/farequote/significant_item_groups'; +import { fields } from '@kbn/aiops-test-utils/artificial_logs/fields'; +import { filteredFrequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/filtered_frequent_item_sets'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getFieldValuePairCounts } from './get_field_value_pair_counts'; import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.ts index 6d0e15f2117f8..e11be8ed2f2f0 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_field_value_pair_counts.ts @@ -6,8 +6,7 @@ */ import type { SignificantItemGroup } from '@kbn/ml-agg-utils'; - -import type { FieldValuePairCounts } from '../../../../common/types'; +import type { FieldValuePairCounts } from '@kbn/aiops-utils/types'; /** * Get a nested record of field/value pairs with counts diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_group_filter.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_group_filter.test.ts index eea96297b4622..746422ba7421b 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_group_filter.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_group_filter.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { finalSignificantItemGroups } from '../../../../common/__mocks__/artificial_logs/final_significant_item_groups'; +import { finalSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; import { getGroupFilter } from './get_group_filter'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.test.ts index 5a0e1507f398d..2fbc819c6eb89 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { significantItemGroups } from '../../../../common/__mocks__/artificial_logs/significant_item_groups'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { significantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/significant_item_groups'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { duplicateIdentifier } from './duplicate_identifier'; import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.ts index e3e012ce299e3..bfca0c3b82c58 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_groups_with_readded_duplicates.ts @@ -8,8 +8,7 @@ import { uniqWith, isEqual } from 'lodash'; import type { SignificantItemGroup } from '@kbn/ml-agg-utils'; - -import type { SignificantItemDuplicateGroup } from '../../../../common/types'; +import type { SignificantItemDuplicateGroup } from '@kbn/aiops-utils/types'; export function getGroupsWithReaddedDuplicates( groups: SignificantItemGroup[], diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.test.ts index fcc2448d4cd46..116b688439c13 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { significantItemGroups } from '../../../../common/__mocks__/farequote/significant_item_groups'; -import { fields } from '../../../../common/__mocks__/artificial_logs/fields'; -import { filteredFrequentItemSets } from '../../../../common/__mocks__/artificial_logs/filtered_frequent_item_sets'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { significantItemGroups } from '@kbn/aiops-test-utils/farequote/significant_item_groups'; +import { fields } from '@kbn/aiops-test-utils/artificial_logs/fields'; +import { filteredFrequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/filtered_frequent_item_sets'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getFieldValuePairCounts } from './get_field_value_pair_counts'; import { getMarkedDuplicates } from './get_marked_duplicates'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.ts index 8ddc13cfee8df..f0513a9323a76 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_marked_duplicates.ts @@ -6,8 +6,7 @@ */ import type { SignificantItemGroup } from '@kbn/ml-agg-utils'; - -import type { FieldValuePairCounts } from '../../../../common/types'; +import type { FieldValuePairCounts } from '@kbn/aiops-utils/types'; /** * Analyse duplicate field/value pairs in groups. diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_missing_significant_items.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_missing_significant_items.test.ts index 8ac70af16d298..e74bef385738b 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_missing_significant_items.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_missing_significant_items.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { significantItemGroups } from '../../../../common/__mocks__/artificial_logs/significant_item_groups'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { significantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/significant_item_groups'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { duplicateIdentifier } from './duplicate_identifier'; import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.test.ts index cf5ba41fe5216..27e0cf2355f30 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.test.ts @@ -7,10 +7,10 @@ import { orderBy } from 'lodash'; -import { fields } from '../../../../common/__mocks__/artificial_logs/fields'; -import { frequentItemSets } from '../../../../common/__mocks__/artificial_logs/frequent_item_sets'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; -import { finalSignificantItemGroups } from '../../../../common/__mocks__/artificial_logs/final_significant_item_groups'; +import { fields } from '@kbn/aiops-test-utils/artificial_logs/fields'; +import { frequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/frequent_item_sets'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; +import { finalSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; import { getSignificantItemGroups } from './get_significant_item_groups'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.ts index ace3bd73cba69..1e0e140bb48d5 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_significant_item_groups.ts @@ -8,6 +8,7 @@ import { uniqBy } from 'lodash'; import type { SignificantItem, SignificantItemGroup } from '@kbn/ml-agg-utils'; +import type { ItemSet } from '@kbn/aiops-utils/types'; import { duplicateIdentifier } from './duplicate_identifier'; import { groupDuplicates } from './fetch_frequent_item_sets'; @@ -17,7 +18,6 @@ import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; import { getSimpleHierarchicalTreeLeaves } from './get_simple_hierarchical_tree_leaves'; import { getMissingSignificantItems } from './get_missing_significant_items'; import { transformSignificantItemToGroup } from './transform_significant_item_to_group'; -import type { ItemSet } from '../../../../common/types'; export function getSignificantItemGroups( itemsets: ItemSet[], diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.test.ts index 32f73d6ca2387..695eee9212342 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { fields } from '../../../../common/__mocks__/artificial_logs/fields'; -import { filteredFrequentItemSets } from '../../../../common/__mocks__/artificial_logs/filtered_frequent_item_sets'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { fields } from '@kbn/aiops-test-utils/artificial_logs/fields'; +import { filteredFrequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/filtered_frequent_item_sets'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.ts index d046058aa1095..79722d67c8f6a 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree.ts @@ -6,8 +6,7 @@ */ import type { SignificantItem } from '@kbn/ml-agg-utils'; - -import type { ItemSet, SimpleHierarchicalTreeNode } from '../../../../common/types'; +import type { ItemSet, SimpleHierarchicalTreeNode } from '@kbn/aiops-utils/types'; import { getValueCounts } from './get_value_counts'; import { getValuesDescending } from './get_values_descending'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.test.ts index 6cb4f4b3c6532..00173cddc0013 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.test.ts @@ -5,9 +5,9 @@ * 2.0. */ -import { fields } from '../../../../common/__mocks__/artificial_logs/fields'; -import { filteredFrequentItemSets } from '../../../../common/__mocks__/artificial_logs/filtered_frequent_item_sets'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { fields } from '@kbn/aiops-test-utils/artificial_logs/fields'; +import { filteredFrequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/filtered_frequent_item_sets'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { getSimpleHierarchicalTree } from './get_simple_hierarchical_tree'; import { getSimpleHierarchicalTreeLeaves } from './get_simple_hierarchical_tree_leaves'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.ts index 619ec2896d4d4..27aba8ee54e00 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_simple_hierarchical_tree_leaves.ts @@ -8,8 +8,7 @@ import { orderBy } from 'lodash'; import type { SignificantItemGroup } from '@kbn/ml-agg-utils'; import { stringHash } from '@kbn/ml-string-hash'; - -import type { SimpleHierarchicalTreeNode } from '../../../../common/types'; +import type { SimpleHierarchicalTreeNode } from '@kbn/aiops-utils/types'; /** * Get leaves from hierarchical tree. diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.test.ts index 9187ed7c0eaab..c8b5f5ebc2a6f 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.test.ts @@ -5,7 +5,8 @@ * 2.0. */ -import { frequentItemSets } from '../../../../common/__mocks__/artificial_logs/frequent_item_sets'; +import { frequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/frequent_item_sets'; + import { getValueCounts } from './get_value_counts'; describe('getValueCounts', () => { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.ts index d08d2a21cd3cb..624cfd7417689 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_value_counts.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { ItemSet } from '../../../../common/types'; +import type { ItemSet } from '@kbn/aiops-utils/types'; export function getValueCounts(df: ItemSet[], field: string) { return df.reduce>((p, c) => { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.test.ts index cc5fc2d39bee3..5ca944e31d1ee 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { frequentItemSets } from '../../../../common/__mocks__/artificial_logs/frequent_item_sets'; +import { frequentItemSets } from '@kbn/aiops-test-utils/artificial_logs/frequent_item_sets'; import { getValuesDescending } from './get_values_descending'; describe('getValuesDescending', () => { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.ts index 9e6fd92178e82..cc4f19ce388a4 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/get_values_descending.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { ItemSet } from '../../../../common/types'; +import type { ItemSet } from '@kbn/aiops-utils/types'; import { getValueCounts } from './get_value_counts'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.test.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.test.ts index f1a2a540dc877..14d5444cfd1dc 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.test.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { significantItemGroups } from '../../../../common/__mocks__/artificial_logs/significant_item_groups'; -import { significantTerms } from '../../../../common/__mocks__/artificial_logs/significant_terms'; +import { significantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/significant_item_groups'; +import { significantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; import { duplicateIdentifier } from './duplicate_identifier'; import { getGroupsWithReaddedDuplicates } from './get_groups_with_readded_duplicates'; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.ts index 05a1473acc2bd..88cb81dc3140a 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/queries/transform_significant_item_to_group.ts @@ -7,8 +7,7 @@ import { stringHash } from '@kbn/ml-string-hash'; import type { SignificantItem, SignificantItemGroup } from '@kbn/ml-agg-utils'; - -import type { SignificantItemDuplicateGroup } from '../../../../common/types'; +import type { SignificantItemDuplicateGroup } from '@kbn/aiops-utils/types'; export function transformSignificantItemToGroup( significantItem: SignificantItem, diff --git a/x-pack/plugins/aiops/tsconfig.json b/x-pack/plugins/aiops/tsconfig.json index a8b58134c4174..052f5367cb541 100644 --- a/x-pack/plugins/aiops/tsconfig.json +++ b/x-pack/plugins/aiops/tsconfig.json @@ -68,6 +68,8 @@ "@kbn/ml-ui-actions", "@kbn/core-http-server", "@kbn/core-ui-settings-browser-mocks", + "@kbn/ebt-tools", + "@kbn/aiops-test-utils", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/alerting/server/alerts_client/alerts_client.mock.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.mock.ts index acd5ad468dd70..f963d53899485 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.mock.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.mock.ts @@ -13,7 +13,6 @@ const createAlertsClientMock = () => { logAlerts: jest.fn(), updateAlertMaintenanceWindowIds: jest.fn(), getMaintenanceWindowScopedQueryAlerts: jest.fn(), - updateAlertsMaintenanceWindowIdByScopedQuery: jest.fn(), getTrackedAlerts: jest.fn(), getProcessedAlerts: jest.fn(), getAlertsToSerialize: jest.fn(), diff --git a/x-pack/plugins/alerting/server/alerts_client/alerts_client.test.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.test.ts index dcebb07009af5..ac2e45839f62e 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.test.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.test.ts @@ -1342,7 +1342,10 @@ describe('Alerts Client', () => { alertsClientParams ); - expect(await alertsClient.persistAlerts()).toBe(void 0); + expect(await alertsClient.persistAlerts()).toStrictEqual({ + alertIds: [], + maintenanceWindowIds: [], + }); expect(logger.debug).toHaveBeenCalledWith( `Resources registered and installed for test context but "shouldWrite" is set to false.` @@ -1929,13 +1932,11 @@ describe('Alerts Client', () => { // @ts-ignore .mockResolvedValueOnce({}); - const result = await alertsClient.updateAlertsMaintenanceWindowIdByScopedQuery({ - ...getParamsByUpdateMaintenanceWindowIds, - maintenanceWindows: [ - ...getParamsByUpdateMaintenanceWindowIds.maintenanceWindows, - { id: 'mw3' } as unknown as MaintenanceWindow, - ], - }); + // @ts-expect-error + const result = await alertsClient.updateAlertsMaintenanceWindowIdByScopedQuery([ + ...getParamsByUpdateMaintenanceWindowIds.maintenanceWindows, + { id: 'mw3' } as unknown as MaintenanceWindow, + ]); expect(alert1.getMaintenanceWindowIds()).toEqual(['mw3', 'mw1']); expect(alert2.getMaintenanceWindowIds()).toEqual(['mw3', 'mw1']); diff --git a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts index 0c1eb897a6e59..5c2e9ed03569b 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts @@ -45,7 +45,6 @@ import { UpdateableAlert, GetSummarizedAlertsParams, GetMaintenanceWindowScopedQueryAlertsParams, - UpdateAlertsMaintenanceWindowIdByScopedQueryParams, ScopedQueryAggregationResult, } from './types'; import { @@ -62,6 +61,11 @@ import { } from './lib'; import { isValidAlertIndexName } from '../alerts_service'; import { resolveAlertConflicts } from './lib/alert_conflict_resolver'; +import { MaintenanceWindow } from '../application/maintenance_window/types'; +import { + filterMaintenanceWindows, + filterMaintenanceWindowsIds, +} from '../task_runner/get_maintenance_windows'; // Term queries can take up to 10,000 terms const CHUNK_SIZE = 10000; @@ -299,7 +303,99 @@ export class AlertsClient< return this.legacyAlertsClient.getProcessedAlerts(type); } - public async persistAlerts() { + public async persistAlerts(maintenanceWindows?: MaintenanceWindow[]): Promise<{ + alertIds: string[]; + maintenanceWindowIds: string[]; + } | null> { + // Persist alerts first + await this.persistAlertsHelper(); + + // Try to update the persisted alerts with maintenance windows with a scoped query + let updateAlertsMaintenanceWindowResult = null; + try { + updateAlertsMaintenanceWindowResult = await this.updateAlertsMaintenanceWindowIdByScopedQuery( + maintenanceWindows ?? [] + ); + } catch (e) { + this.options.logger.debug( + `Failed to update alert matched by maintenance window scoped query for rule ${this.ruleType.id}:${this.options.rule.id}: '${this.options.rule.name}'.` + ); + } + + return updateAlertsMaintenanceWindowResult; + } + + public getAlertsToSerialize() { + // The flapping value that is persisted inside the task manager state (and used in the next execution) + // is different than the value that should be written to the alert document. For this reason, we call + // getAlertsToSerialize() twice, once before building and bulk indexing alert docs and once after to return + // the value for task state serialization + + // This will be a blocker if ever we want to stop serializing alert data inside the task state and just use + // the fetched alert document. + return this.legacyAlertsClient.getAlertsToSerialize(); + } + + public factory() { + return this.legacyAlertsClient.factory(); + } + + public async getSummarizedAlerts({ + ruleId, + spaceId, + excludedAlertInstanceIds, + alertsFilter, + start, + end, + executionUuid, + }: GetSummarizedAlertsParams): Promise { + if (!ruleId || !spaceId) { + throw new Error(`Must specify both rule ID and space ID for AAD alert query.`); + } + const queryByExecutionUuid: boolean = !!executionUuid; + const queryByTimeRange: boolean = !!start && !!end; + // Either executionUuid or start/end dates must be specified, but not both + if ( + (!queryByExecutionUuid && !queryByTimeRange) || + (queryByExecutionUuid && queryByTimeRange) + ) { + throw new Error(`Must specify either execution UUID or time range for AAD alert query.`); + } + + const getQueryParams = { + executionUuid, + start, + end, + ruleId, + excludedAlertInstanceIds, + alertsFilter, + }; + + const formatAlert = this.ruleType.alerts?.formatAlert; + + const isLifecycleAlert = this.ruleType.autoRecoverAlerts ?? false; + + if (isLifecycleAlert) { + const queryBodies = getLifecycleAlertsQueries(getQueryParams); + const responses = await Promise.all(queryBodies.map((queryBody) => this.search(queryBody))); + + return { + new: getHitsWithCount(responses[0], formatAlert), + ongoing: getHitsWithCount(responses[1], formatAlert), + recovered: getHitsWithCount(responses[2], formatAlert), + }; + } + + const response = await this.search(getContinualAlertsQuery(getQueryParams)); + + return { + new: getHitsWithCount(response, formatAlert), + ongoing: { count: 0, data: [] }, + recovered: { count: 0, data: [] }, + }; + } + + private async persistAlertsHelper() { if (!this.ruleType.alerts?.shouldWrite) { this.options.logger.debug( `Resources registered and installed for ${this.ruleType.alerts?.context} context but "shouldWrite" is set to false.` @@ -499,76 +595,6 @@ export class AlertsClient< } } - public getAlertsToSerialize() { - // The flapping value that is persisted inside the task manager state (and used in the next execution) - // is different than the value that should be written to the alert document. For this reason, we call - // getAlertsToSerialize() twice, once before building and bulk indexing alert docs and once after to return - // the value for task state serialization - - // This will be a blocker if ever we want to stop serializing alert data inside the task state and just use - // the fetched alert document. - return this.legacyAlertsClient.getAlertsToSerialize(); - } - - public factory() { - return this.legacyAlertsClient.factory(); - } - - public async getSummarizedAlerts({ - ruleId, - spaceId, - excludedAlertInstanceIds, - alertsFilter, - start, - end, - executionUuid, - }: GetSummarizedAlertsParams): Promise { - if (!ruleId || !spaceId) { - throw new Error(`Must specify both rule ID and space ID for AAD alert query.`); - } - const queryByExecutionUuid: boolean = !!executionUuid; - const queryByTimeRange: boolean = !!start && !!end; - // Either executionUuid or start/end dates must be specified, but not both - if ( - (!queryByExecutionUuid && !queryByTimeRange) || - (queryByExecutionUuid && queryByTimeRange) - ) { - throw new Error(`Must specify either execution UUID or time range for AAD alert query.`); - } - - const getQueryParams = { - executionUuid, - start, - end, - ruleId, - excludedAlertInstanceIds, - alertsFilter, - }; - - const formatAlert = this.ruleType.alerts?.formatAlert; - - const isLifecycleAlert = this.ruleType.autoRecoverAlerts ?? false; - - if (isLifecycleAlert) { - const queryBodies = getLifecycleAlertsQueries(getQueryParams); - const responses = await Promise.all(queryBodies.map((queryBody) => this.search(queryBody))); - - return { - new: getHitsWithCount(responses[0], formatAlert), - ongoing: getHitsWithCount(responses[1], formatAlert), - recovered: getHitsWithCount(responses[2], formatAlert), - }; - } - - const response = await this.search(getContinualAlertsQuery(getQueryParams)); - - return { - new: getHitsWithCount(response, formatAlert), - ongoing: { count: 0, data: [] }, - recovered: { count: 0, data: [] }, - }; - } - private async getMaintenanceWindowScopedQueryAlerts({ ruleId, spaceId, @@ -633,21 +659,17 @@ export class AlertsClient< } } - public async updateAlertsMaintenanceWindowIdByScopedQuery({ - ruleId, - spaceId, - executionUuid, - maintenanceWindows, - }: UpdateAlertsMaintenanceWindowIdByScopedQueryParams) { - const maintenanceWindowsWithScopedQuery = maintenanceWindows.filter( - ({ scopedQuery }) => scopedQuery - ); - const maintenanceWindowsWithoutScopedQuery = maintenanceWindows.filter( - ({ scopedQuery }) => !scopedQuery - ); - const maintenanceWindowsWithoutScopedQueryIds = maintenanceWindowsWithoutScopedQuery.map( - ({ id }) => id - ); + private async updateAlertsMaintenanceWindowIdByScopedQuery( + maintenanceWindows: MaintenanceWindow[] + ) { + const maintenanceWindowsWithScopedQuery = filterMaintenanceWindows({ + maintenanceWindows, + withScopedQuery: true, + }); + const maintenanceWindowsWithoutScopedQueryIds = filterMaintenanceWindowsIds({ + maintenanceWindows, + withScopedQuery: false, + }); if (maintenanceWindowsWithScopedQuery.length === 0) { return { @@ -659,9 +681,9 @@ export class AlertsClient< // Run aggs to get all scoped query alert IDs, returns a record, // indicating the maintenance window has matches a number of alerts with the scoped query. const aggsResult = await this.getMaintenanceWindowScopedQueryAlerts({ - ruleId, - spaceId, - executionUuid, + ruleId: this.options.rule.id, + spaceId: this.options.rule.spaceId, + executionUuid: this.options.rule.executionId, maintenanceWindows: maintenanceWindowsWithScopedQuery, }); diff --git a/x-pack/plugins/alerting/server/alerts_client/index.ts b/x-pack/plugins/alerting/server/alerts_client/index.ts index c141ac8167e9b..e2b33256dc2f0 100644 --- a/x-pack/plugins/alerting/server/alerts_client/index.ts +++ b/x-pack/plugins/alerting/server/alerts_client/index.ts @@ -8,5 +8,5 @@ export { type LegacyAlertsClientParams, LegacyAlertsClient } from './legacy_alerts_client'; export { AlertsClient } from './alerts_client'; export type { AlertRuleData } from './types'; -export { sanitizeBulkErrorResponse } from './lib'; +export { sanitizeBulkErrorResponse, initializeAlertsClient } from './lib'; export { AlertsClientError } from './alerts_client_error'; diff --git a/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts index 8c9bf91d17ed8..ecbd49c0d248f 100644 --- a/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts @@ -21,6 +21,7 @@ import { import { trimRecoveredAlerts } from '../lib/trim_recovered_alerts'; import { logAlerts } from '../task_runner/log_alerts'; import { AlertInstanceContext, AlertInstanceState, WithoutReservedActionGroups } from '../types'; +import { MaintenanceWindow } from '../application/maintenance_window/types'; import { DEFAULT_FLAPPING_SETTINGS, RulesSettingsFlappingProperties, @@ -265,7 +266,9 @@ export class LegacyAlertsClient< return null; } - public async persistAlerts() {} + public async persistAlerts(maintenanceWindows?: MaintenanceWindow[]) { + return null; + } public async setAlertStatusToUntracked() { return; diff --git a/x-pack/plugins/alerting/server/alerts_client/lib/index.ts b/x-pack/plugins/alerting/server/alerts_client/lib/index.ts index 8f209345ff508..edd9660bba4c7 100644 --- a/x-pack/plugins/alerting/server/alerts_client/lib/index.ts +++ b/x-pack/plugins/alerting/server/alerts_client/lib/index.ts @@ -19,3 +19,4 @@ export { } from './get_summarized_alerts_query'; export { expandFlattenedAlert } from './format_alert'; export { sanitizeBulkErrorResponse } from './sanitize_bulk_response'; +export { initializeAlertsClient } from './initialize_alerts_client'; diff --git a/x-pack/plugins/alerting/server/alerts_client/lib/initialize_alerts_client.test.ts b/x-pack/plugins/alerting/server/alerts_client/lib/initialize_alerts_client.test.ts new file mode 100644 index 0000000000000..b81e369d6048d --- /dev/null +++ b/x-pack/plugins/alerting/server/alerts_client/lib/initialize_alerts_client.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { + mockedRule, + mockTaskInstance, + ruleType, + RULE_ID, + RULE_NAME, + RULE_TYPE_ID, +} from '../../task_runner/fixtures'; +import * as LegacyAlertsClientModule from '../legacy_alerts_client'; +import { alertsServiceMock } from '../../alerts_service/alerts_service.mock'; +import { ruleRunMetricsStoreMock } from '../../lib/rule_run_metrics_store.mock'; +import { alertingEventLoggerMock } from '../../lib/alerting_event_logger/alerting_event_logger.mock'; +import { DEFAULT_FLAPPING_SETTINGS, DEFAULT_QUERY_DELAY_SETTINGS } from '../../types'; +import { alertsClientMock } from '../alerts_client.mock'; +import { UntypedNormalizedRuleType } from '../../rule_type_registry'; +import { legacyAlertsClientMock } from '../legacy_alerts_client.mock'; +import { initializeAlertsClient } from './initialize_alerts_client'; + +const alertingEventLogger = alertingEventLoggerMock.create(); +const ruleRunMetricsStore = ruleRunMetricsStoreMock.create(); +const alertsService = alertsServiceMock.create(); +const alertsClient = alertsClientMock.create(); +const legacyAlertsClient = legacyAlertsClientMock.create(); +const logger = loggingSystemMock.create().get(); + +const ruleTypeWithAlerts: jest.Mocked = { + ...ruleType, + alerts: { + context: 'test', + mappings: { + fieldMap: { + textField: { + type: 'keyword', + required: false, + }, + numericField: { + type: 'long', + required: false, + }, + }, + }, + shouldWrite: true, + }, +}; + +describe('initializeAlertsClient', () => { + test('should initialize and return alertsClient if createAlertsClient succeeds', async () => { + const spy1 = jest + .spyOn(LegacyAlertsClientModule, 'LegacyAlertsClient') + .mockImplementation(() => legacyAlertsClient); + alertsService.createAlertsClient.mockImplementationOnce(() => alertsClient); + await initializeAlertsClient({ + alertsService, + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + executionId: 'abc', + logger, + maxAlerts: 100, + rule: mockedRule, + ruleType: ruleTypeWithAlerts, + taskInstance: mockTaskInstance(), + }); + + expect(alertsService.createAlertsClient).toHaveBeenCalledWith({ + logger, + ruleType: ruleTypeWithAlerts, + namespace: 'default', + rule: { + alertDelay: 0, + consumer: 'bar', + executionId: 'abc', + id: '1', + name: 'rule-name', + parameters: { + bar: true, + }, + revision: 0, + spaceId: 'default', + tags: ['rule-', '-tags'], + }, + }); + expect(LegacyAlertsClientModule.LegacyAlertsClient).not.toHaveBeenCalled(); + expect(alertsClient.initializeExecution).toHaveBeenCalledWith({ + activeAlertsFromState: {}, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + maxAlerts: 100, + recoveredAlertsFromState: {}, + ruleLabel: `test:1: 'rule-name'`, + startedAt: expect.any(Date), + }); + spy1.mockRestore(); + }); + + test('should use LegacyAlertsClient if createAlertsClient returns null', async () => { + const spy1 = jest + .spyOn(LegacyAlertsClientModule, 'LegacyAlertsClient') + .mockImplementation(() => legacyAlertsClient); + alertsService.createAlertsClient.mockImplementationOnce(() => null); + await initializeAlertsClient({ + alertsService, + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + executionId: 'abc', + logger, + maxAlerts: 100, + rule: mockedRule, + ruleType: ruleTypeWithAlerts, + taskInstance: mockTaskInstance(), + }); + + expect(alertsService.createAlertsClient).toHaveBeenCalledWith({ + logger, + ruleType: ruleTypeWithAlerts, + namespace: 'default', + rule: { + alertDelay: 0, + consumer: 'bar', + executionId: 'abc', + id: '1', + name: 'rule-name', + parameters: { + bar: true, + }, + revision: 0, + spaceId: 'default', + tags: ['rule-', '-tags'], + }, + }); + expect(LegacyAlertsClientModule.LegacyAlertsClient).toHaveBeenCalledWith({ + logger, + ruleType: ruleTypeWithAlerts, + }); + expect(legacyAlertsClient.initializeExecution).toHaveBeenCalledWith({ + activeAlertsFromState: {}, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + maxAlerts: 100, + recoveredAlertsFromState: {}, + ruleLabel: `test:1: 'rule-name'`, + startedAt: expect.any(Date), + }); + spy1.mockRestore(); + }); + + test('should use LegacyAlertsClient if createAlertsClient throws error', async () => { + const spy1 = jest + .spyOn(LegacyAlertsClientModule, 'LegacyAlertsClient') + .mockImplementation(() => legacyAlertsClient); + alertsService.createAlertsClient.mockImplementationOnce(() => { + throw new Error('fail fail'); + }); + await initializeAlertsClient({ + alertsService, + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + executionId: 'abc', + logger, + maxAlerts: 100, + rule: mockedRule, + ruleType: ruleTypeWithAlerts, + taskInstance: mockTaskInstance(), + }); + + expect(alertsService.createAlertsClient).toHaveBeenCalledWith({ + logger, + ruleType: ruleTypeWithAlerts, + namespace: 'default', + rule: { + alertDelay: 0, + consumer: 'bar', + executionId: 'abc', + id: '1', + name: 'rule-name', + parameters: { + bar: true, + }, + revision: 0, + spaceId: 'default', + tags: ['rule-', '-tags'], + }, + }); + expect(LegacyAlertsClientModule.LegacyAlertsClient).toHaveBeenCalledWith({ + logger, + ruleType: ruleTypeWithAlerts, + }); + expect(logger.error).toHaveBeenCalledWith( + `Error initializing AlertsClient for context test. Using legacy alerts client instead. - fail fail` + ); + expect(legacyAlertsClient.initializeExecution).toHaveBeenCalledWith({ + activeAlertsFromState: {}, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + maxAlerts: 100, + recoveredAlertsFromState: {}, + ruleLabel: `test:1: 'rule-name'`, + startedAt: expect.any(Date), + }); + spy1.mockRestore(); + }); +}); diff --git a/x-pack/plugins/alerting/server/alerts_client/lib/initialize_alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/lib/initialize_alerts_client.ts new file mode 100644 index 0000000000000..f00348ca502cb --- /dev/null +++ b/x-pack/plugins/alerting/server/alerts_client/lib/initialize_alerts_client.ts @@ -0,0 +1,116 @@ +/* + * 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 { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { Logger } from '@kbn/core/server'; +import { LegacyAlertsClient } from '..'; +import { IAlertsClient } from '../types'; +import { AlertsService } from '../../alerts_service'; +import { UntypedNormalizedRuleType } from '../../rule_type_registry'; +import { + AlertInstanceContext, + AlertInstanceState, + RuleAlertData, + RuleTypeParams, + SanitizedRule, +} from '../../types'; +import { RuleTaskInstance, RuleTypeRunnerContext } from '../../task_runner/types'; + +interface InitializeAlertsClientOpts { + alertsService: AlertsService | null; + context: RuleTypeRunnerContext; + executionId: string; + logger: Logger; + maxAlerts: number; + rule: SanitizedRule; + ruleType: UntypedNormalizedRuleType; + taskInstance: RuleTaskInstance; +} + +export const initializeAlertsClient = async < + Params extends RuleTypeParams, + AlertData extends RuleAlertData, + State extends AlertInstanceState, + Context extends AlertInstanceContext, + ActionGroupIds extends string, + RecoveryActionGroupId extends string +>({ + alertsService, + context, + executionId, + logger, + maxAlerts, + rule, + ruleType, + taskInstance, +}: InitializeAlertsClientOpts) => { + const { + state: { + alertInstances: alertRawInstances = {}, + alertRecoveredInstances: alertRecoveredRawInstances = {}, + }, + } = taskInstance; + + const alertsClientParams = { logger, ruleType }; + + // Create AlertsClient if rule type has registered an alerts context + // with the framework. The AlertsClient will handle reading and + // writing from alerts-as-data indices and eventually + // we will want to migrate all the processing of alerts out + // of the LegacyAlertsClient and into the AlertsClient. + let alertsClient: IAlertsClient; + + try { + const client = + (await alertsService?.createAlertsClient< + AlertData, + State, + Context, + ActionGroupIds, + RecoveryActionGroupId + >({ + ...alertsClientParams, + namespace: context.namespace ?? DEFAULT_NAMESPACE_STRING, + rule: { + consumer: rule.consumer, + executionId, + id: rule.id, + name: rule.name, + parameters: rule.params, + revision: rule.revision, + spaceId: context.spaceId, + tags: rule.tags, + alertDelay: rule.alertDelay?.active ?? 0, + }, + })) ?? null; + + alertsClient = client + ? client + : new LegacyAlertsClient( + alertsClientParams + ); + } catch (err) { + logger.error( + `Error initializing AlertsClient for context ${ruleType.alerts?.context}. Using legacy alerts client instead. - ${err.message}` + ); + + alertsClient = new LegacyAlertsClient( + alertsClientParams + ); + } + + await alertsClient.initializeExecution({ + maxAlerts, + ruleLabel: context.ruleLogPrefix, + flappingSettings: context.flappingSettings, + startedAt: taskInstance.startedAt!, + activeAlertsFromState: alertRawInstances, + recoveredAlertsFromState: alertRecoveredRawInstances, + }); + + return alertsClient; +}; diff --git a/x-pack/plugins/alerting/server/alerts_client/types.ts b/x-pack/plugins/alerting/server/alerts_client/types.ts index 043fcbe5c3d8f..763b293363a26 100644 --- a/x-pack/plugins/alerting/server/alerts_client/types.ts +++ b/x-pack/plugins/alerting/server/alerts_client/types.ts @@ -80,14 +80,11 @@ export interface IAlertsClient< getProcessedAlerts( type: 'new' | 'active' | 'activeCurrent' | 'recovered' | 'recoveredCurrent' ): Record>; - persistAlerts(): Promise; - getSummarizedAlerts?(params: GetSummarizedAlertsParams): Promise; - updateAlertsMaintenanceWindowIdByScopedQuery?( - params: UpdateAlertsMaintenanceWindowIdByScopedQueryParams - ): Promise<{ + persistAlerts(maintenanceWindows?: MaintenanceWindow[]): Promise<{ alertIds: string[]; maintenanceWindowIds: string[]; - }>; + } | null>; + getSummarizedAlerts?(params: GetSummarizedAlertsParams): Promise; getAlertsToSerialize(): { alertsToReturn: Record; recoveredAlertsToReturn: Record; diff --git a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts index 62d2a2f14162d..451ca628f8607 100644 --- a/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts +++ b/x-pack/plugins/alerting/server/lib/alerting_event_logger/alerting_event_logger.test.ts @@ -777,6 +777,7 @@ describe('AlertingEventLogger', () => { [TaskRunnerTimerSpan.StartTaskRun]: 10, [TaskRunnerTimerSpan.TotalRunDuration]: 20, [TaskRunnerTimerSpan.PrepareRule]: 30, + [TaskRunnerTimerSpan.PrepareToRun]: 35, [TaskRunnerTimerSpan.RuleTypeRun]: 40, [TaskRunnerTimerSpan.ProcessAlerts]: 50, [TaskRunnerTimerSpan.PersistAlerts]: 60, @@ -800,6 +801,7 @@ describe('AlertingEventLogger', () => { claim_to_start_duration_ms: 10, total_run_duration_ms: 20, prepare_rule_duration_ms: 30, + prepare_to_run_duration_ms: 35, rule_type_run_duration_ms: 40, process_alerts_duration_ms: 50, persist_alerts_duration_ms: 60, @@ -838,6 +840,7 @@ describe('AlertingEventLogger', () => { [TaskRunnerTimerSpan.StartTaskRun]: 10, [TaskRunnerTimerSpan.TotalRunDuration]: 20, [TaskRunnerTimerSpan.PrepareRule]: 30, + [TaskRunnerTimerSpan.PrepareToRun]: 35, [TaskRunnerTimerSpan.RuleTypeRun]: 40, [TaskRunnerTimerSpan.ProcessAlerts]: 50, [TaskRunnerTimerSpan.PersistAlerts]: 60, @@ -872,6 +875,7 @@ describe('AlertingEventLogger', () => { claim_to_start_duration_ms: 10, total_run_duration_ms: 20, prepare_rule_duration_ms: 30, + prepare_to_run_duration_ms: 35, rule_type_run_duration_ms: 40, process_alerts_duration_ms: 50, persist_alerts_duration_ms: 60, diff --git a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.mock.ts b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.mock.ts new file mode 100644 index 0000000000000..1285937f1d30a --- /dev/null +++ b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.mock.ts @@ -0,0 +1,18 @@ +/* + * 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 { elasticsearchServiceMock } from '@kbn/core/server/mocks'; + +export const createWrappedScopedClusterClientMock = jest.fn().mockImplementation(() => { + return { + client: jest.fn().mockReturnValue(elasticsearchServiceMock.createScopedClusterClient()), + getMetrics: jest.fn(), + }; +}); +export const wrappedScopedClusterClientMock = { + create: createWrappedScopedClusterClientMock, +}; diff --git a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts index 2150f415f1039..44a0681e6a36e 100644 --- a/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts +++ b/x-pack/plugins/alerting/server/lib/wrap_scoped_cluster_client.ts @@ -49,7 +49,14 @@ interface LogSearchMetricsOpts { } type LogSearchMetricsFn = (metrics: LogSearchMetricsOpts) => void; -export function createWrappedScopedClusterClientFactory(opts: WrapScopedClusterClientFactoryOpts) { +export interface WrappedScopedClusterClient { + client: () => IScopedClusterClient; + getMetrics: () => SearchMetrics; +} + +export function createWrappedScopedClusterClientFactory( + opts: WrapScopedClusterClientFactoryOpts +): WrappedScopedClusterClient { let numSearches: number = 0; let esSearchDurationMs: number = 0; let totalSearchDurationMs: number = 0; diff --git a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.mock.ts b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.mock.ts new file mode 100644 index 0000000000000..4a06ad3560c8d --- /dev/null +++ b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.mock.ts @@ -0,0 +1,18 @@ +/* + * 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 { searchSourceCommonMock } from '@kbn/data-plugin/common/search/search_source/mocks'; + +export const createWrappedSearchSourceClientMock = jest.fn().mockImplementation(() => { + return { + client: jest.fn().mockReturnValue(searchSourceCommonMock), + getMetrics: jest.fn(), + }; +}); +export const wrappedSearchSourceClientMock = { + create: createWrappedSearchSourceClientMock, +}; diff --git a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts index 00577d39aaa97..17e5d05f61fae 100644 --- a/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts +++ b/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts @@ -33,13 +33,18 @@ interface WrapParams { requestTimeout?: number; } +export interface WrappedSearchSourceClient { + searchSourceClient: ISearchStartSearchSource; + getMetrics: () => SearchMetrics; +} + export function wrapSearchSourceClient({ logger, rule, abortController, searchSourceClient: pureSearchSourceClient, requestTimeout, -}: Props) { +}: Props): WrappedSearchSourceClient { let numSearches: number = 0; let esSearchDurationMs: number = 0; let totalSearchDurationMs: number = 0; diff --git a/x-pack/plugins/alerting/server/monitoring/rule_monitoring_service.mock.ts b/x-pack/plugins/alerting/server/monitoring/rule_monitoring_service.mock.ts new file mode 100644 index 0000000000000..132aa395a9630 --- /dev/null +++ b/x-pack/plugins/alerting/server/monitoring/rule_monitoring_service.mock.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +function createRuleMonitoringServiceMock() { + return jest.fn().mockImplementation(() => { + return { + addHistory: jest.fn(), + getLastRunMetricsSetters: jest.fn(), + getMonitoring: jest.fn(), + setLastRunMetricsDuration: jest.fn(), + setMonitoring: jest.fn(), + }; + }); +} + +function createPublicRuleMonitoringServiceMock() { + return jest.fn().mockImplementation(() => { + return { + setLastRunMetricsGapDurationS: jest.fn(), + setLastRunMetricsTotalAlertsCreated: jest.fn(), + setLastRunMetricsTotalAlertsDetected: jest.fn(), + setLastRunMetricsTotalIndexingDurationMs: jest.fn(), + setLastRunMetricsTotalSearchDurationMs: jest.fn(), + }; + }); +} + +export const ruleMonitoringServiceMock = { + create: createRuleMonitoringServiceMock(), +}; + +export const publicRuleMonitoringServiceMock = { + create: createPublicRuleMonitoringServiceMock(), +}; diff --git a/x-pack/plugins/alerting/server/monitoring/rule_result_service.mock.ts b/x-pack/plugins/alerting/server/monitoring/rule_result_service.mock.ts new file mode 100644 index 0000000000000..a9fc8c56ec3df --- /dev/null +++ b/x-pack/plugins/alerting/server/monitoring/rule_result_service.mock.ts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +function createRuleResultServiceMock() { + return jest.fn().mockImplementation(() => { + return { + getLastRunErrors: jest.fn(), + getLastRunOutcomeMessage: jest.fn(), + getLastRunResults: jest.fn(), + getLastRunSetters: jest.fn(), + getLastRunWarnings: jest.fn(), + }; + }); +} + +function createPublicRuleResultServiceMock() { + return jest.fn().mockImplementation(() => { + return { + addLastRunError: jest.fn(), + addLastRunWarning: jest.fn(), + setLastRunOutcomeMessage: jest.fn(), + }; + }); +} + +export const ruleResultServiceMock = { + create: createRuleResultServiceMock(), +}; + +export const publicRuleResultServiceMock = { + create: createPublicRuleResultServiceMock(), +}; diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts index a742afb152b19..56a0bbaa7d774 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts @@ -26,7 +26,6 @@ import { } from '../types'; import { RuleRunMetricsStore } from '../lib/rule_run_metrics_store'; import { alertingEventLoggerMock } from '../lib/alerting_event_logger/alerting_event_logger.mock'; -import { TaskRunnerContext } from './task_runner_factory'; import { ConcreteTaskInstance, TaskErrorSource } from '@kbn/task-manager-plugin/server'; import { Alert } from '../alert'; import { AlertInstanceState, AlertInstanceContext, RuleNotifyWhen } from '../../common'; @@ -38,6 +37,7 @@ import { alertsClientMock } from '../alerts_client/alerts_client.mock'; import { ExecutionResponseType } from '@kbn/actions-plugin/server/create_execute_function'; import { RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; import { getErrorSource } from '@kbn/task-manager-plugin/server/task_running'; +import { TaskRunnerContext } from './types'; jest.mock('./inject_action_params', () => ({ injectActionParams: jest.fn(), diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts index a1af1dccb9928..23fb063384b3e 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts @@ -27,8 +27,7 @@ import { AlertingEventLogger } from '../lib/alerting_event_logger/alerting_event import { AlertHit, parseDuration, CombinedSummarizedAlerts, ThrottledActions } from '../types'; import { RuleRunMetricsStore } from '../lib/rule_run_metrics_store'; import { injectActionParams } from './inject_action_params'; -import { Executable, ExecutionHandlerOptions, RuleTaskInstance } from './types'; -import { TaskRunnerContext } from './task_runner_factory'; +import { Executable, ExecutionHandlerOptions, RuleTaskInstance, TaskRunnerContext } from './types'; import { transformActionParams, TransformActionParamsOptions, diff --git a/x-pack/plugins/alerting/server/task_runner/get_executor_services.ts b/x-pack/plugins/alerting/server/task_runner/get_executor_services.ts new file mode 100644 index 0000000000000..f2f5436597daa --- /dev/null +++ b/x-pack/plugins/alerting/server/task_runner/get_executor_services.ts @@ -0,0 +1,94 @@ +/* + * 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 { + IUiSettingsClient, + KibanaRequest, + Logger, + SavedObjectsClientContract, +} from '@kbn/core/server'; +import { DataViewsContract } from '@kbn/data-views-plugin/common'; +import { RULE_SAVED_OBJECT_TYPE } from '..'; +import { getEsRequestTimeout } from '../lib'; +import { + createWrappedScopedClusterClientFactory, + WrappedScopedClusterClient, +} from '../lib/wrap_scoped_cluster_client'; +import { + WrappedSearchSourceClient, + wrapSearchSourceClient, +} from '../lib/wrap_search_source_client'; +import { RuleMonitoringService } from '../monitoring/rule_monitoring_service'; +import { RuleResultService } from '../monitoring/rule_result_service'; +import { PublicRuleMonitoringService, PublicRuleResultService } from '../types'; +import { TaskRunnerContext } from './types'; + +interface GetExecutorServicesOpts { + context: TaskRunnerContext; + fakeRequest: KibanaRequest; + abortController: AbortController; + logger: Logger; + ruleMonitoringService: RuleMonitoringService; + ruleResultService: RuleResultService; + ruleData: { name: string; alertTypeId: string; id: string; spaceId: string }; + ruleTaskTimeout?: string; +} + +export interface ExecutorServices { + dataViews: DataViewsContract; + ruleMonitoringService: PublicRuleMonitoringService; + ruleResultService: PublicRuleResultService; + savedObjectsClient: SavedObjectsClientContract; + uiSettingsClient: IUiSettingsClient; + wrappedScopedClusterClient: WrappedScopedClusterClient; + wrappedSearchSourceClient: WrappedSearchSourceClient; +} + +export const getExecutorServices = async (opts: GetExecutorServicesOpts) => { + const { context, abortController, fakeRequest, logger, ruleData, ruleTaskTimeout } = opts; + + const wrappedClientOptions = { + rule: ruleData, + logger, + abortController, + // Set the ES request timeout to the rule task timeout + requestTimeout: getEsRequestTimeout(logger, ruleTaskTimeout), + }; + + const scopedClusterClient = context.elasticsearch.client.asScoped(fakeRequest); + const wrappedScopedClusterClient = createWrappedScopedClusterClientFactory({ + ...wrappedClientOptions, + scopedClusterClient, + }); + + const searchSourceClient = await context.data.search.searchSource.asScoped(fakeRequest); + const wrappedSearchSourceClient = wrapSearchSourceClient({ + ...wrappedClientOptions, + searchSourceClient, + }); + + const savedObjectsClient = context.savedObjects.getScopedClient(fakeRequest, { + includedHiddenTypes: [RULE_SAVED_OBJECT_TYPE, 'action'], + }); + + const dataViews = await context.dataViews.dataViewsServiceFactory( + savedObjectsClient, + scopedClusterClient.asInternalUser + ); + + const uiSettingsClient = context.uiSettings.asScopedToClient(savedObjectsClient); + + return { + dataViews, + ruleMonitoringService: opts.ruleMonitoringService.getLastRunMetricsSetters(), + ruleResultService: opts.ruleResultService.getLastRunSetters(), + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }; +}; diff --git a/x-pack/plugins/alerting/server/task_runner/get_maintenance_windows.test.ts b/x-pack/plugins/alerting/server/task_runner/get_maintenance_windows.test.ts new file mode 100644 index 0000000000000..3cc5e54283dc8 --- /dev/null +++ b/x-pack/plugins/alerting/server/task_runner/get_maintenance_windows.test.ts @@ -0,0 +1,326 @@ +/* + * 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 { CoreKibanaRequest } from '@kbn/core-http-router-server-internal'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { maintenanceWindowCategoryIdTypes } from '../application/maintenance_window/constants'; +import { getMockMaintenanceWindow } from '../data/maintenance_window/test_helpers'; +import { maintenanceWindowClientMock } from '../maintenance_window_client.mock'; +import { MaintenanceWindowStatus } from '../types'; +import { MaintenanceWindow } from '../application/maintenance_window/types'; +import { mockedRawRuleSO, mockedRule } from './fixtures'; +import { + filterMaintenanceWindows, + filterMaintenanceWindowsIds, + getMaintenanceWindows, +} from './get_maintenance_windows'; +import { getFakeKibanaRequest } from './rule_loader'; +import { TaskRunnerContext } from './types'; + +const logger = loggingSystemMock.create().get(); +const mockBasePathService = { set: jest.fn() }; +const maintenanceWindowClient = maintenanceWindowClientMock.create(); + +const apiKey = mockedRawRuleSO.attributes.apiKey!; +const ruleId = mockedRule.id; +const ruleTypeId = mockedRule.alertTypeId; + +describe('getMaintenanceWindows', () => { + let context: TaskRunnerContext; + let fakeRequest: CoreKibanaRequest; + let contextMock: ReturnType; + + beforeEach(() => { + jest.resetAllMocks(); + contextMock = getTaskRunnerContext(); + context = contextMock as unknown as TaskRunnerContext; + fakeRequest = getFakeKibanaRequest(context, 'default', apiKey); + }); + + test('returns active maintenance windows if they exist', async () => { + const mockMaintenanceWindows = [ + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id1', + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id2', + }, + ]; + maintenanceWindowClient.getActiveMaintenanceWindows.mockResolvedValueOnce( + mockMaintenanceWindows + ); + expect( + await getMaintenanceWindows({ + context, + fakeRequest, + logger, + ruleTypeId, + ruleTypeCategory: 'observability', + ruleId, + }) + ).toEqual(mockMaintenanceWindows); + }); + + test('filters to rule type category if category IDs array exists', async () => { + const mockMaintenanceWindows = [ + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id1', + categoryIds: [maintenanceWindowCategoryIdTypes.OBSERVABILITY], + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id2', + categoryIds: [maintenanceWindowCategoryIdTypes.SECURITY_SOLUTION], + }, + ]; + maintenanceWindowClient.getActiveMaintenanceWindows.mockResolvedValueOnce( + mockMaintenanceWindows + ); + expect( + await getMaintenanceWindows({ + context, + fakeRequest, + logger, + ruleTypeId, + ruleTypeCategory: 'observability', + ruleId, + }) + ).toEqual([mockMaintenanceWindows[0]]); + }); + + test('filters to rule type category and no category IDs', async () => { + const mockMaintenanceWindows = [ + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id1', + categoryIds: [maintenanceWindowCategoryIdTypes.OBSERVABILITY], + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id2', + categoryIds: [maintenanceWindowCategoryIdTypes.SECURITY_SOLUTION], + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id3', + }, + ]; + maintenanceWindowClient.getActiveMaintenanceWindows.mockResolvedValueOnce( + mockMaintenanceWindows + ); + expect( + await getMaintenanceWindows({ + context, + fakeRequest, + logger, + ruleTypeId, + ruleTypeCategory: 'observability', + ruleId, + }) + ).toEqual([mockMaintenanceWindows[0], mockMaintenanceWindows[2]]); + }); + + test('returns empty array if no active maintenance windows exist', async () => { + maintenanceWindowClient.getActiveMaintenanceWindows.mockResolvedValueOnce([]); + expect( + await getMaintenanceWindows({ + context, + fakeRequest, + logger, + ruleTypeId, + ruleTypeCategory: 'observability', + ruleId, + }) + ).toEqual([]); + }); + + test('logs error if error loading maintenance window but does not throw', async () => { + maintenanceWindowClient.getActiveMaintenanceWindows.mockImplementationOnce(() => { + throw new Error('fail fail'); + }); + expect( + await getMaintenanceWindows({ + context, + fakeRequest, + logger, + ruleTypeId, + ruleTypeCategory: 'observability', + ruleId, + }) + ).toEqual([]); + expect(logger.error).toHaveBeenCalledWith( + `error getting active maintenance window for test:1 fail fail` + ); + }); +}); + +describe('filterMaintenanceWindows', () => { + const mockMaintenanceWindows: MaintenanceWindow[] = [ + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id1', + scopedQuery: { + kql: "_id: '1234'", + filters: [ + { + meta: { + disabled: false, + negate: false, + alias: null, + key: 'kibana.alert.action_group', + field: 'kibana.alert.action_group', + params: { + query: 'test', + }, + type: 'phrase', + }, + $state: { + store: 'appState', + }, + query: { + match_phrase: { + 'kibana.alert.action_group': 'test', + }, + }, + }, + ], + }, + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id2', + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id3', + }, + ]; + test('correctly filters maintenance windows when withScopedQuery = true', () => { + expect( + filterMaintenanceWindows({ + maintenanceWindows: mockMaintenanceWindows, + withScopedQuery: true, + }) + ).toEqual([mockMaintenanceWindows[0]]); + }); + test('correctly filters maintenance windows when withScopedQuery = false', () => { + expect( + filterMaintenanceWindows({ + maintenanceWindows: mockMaintenanceWindows, + withScopedQuery: false, + }) + ).toEqual([mockMaintenanceWindows[1], mockMaintenanceWindows[2]]); + }); +}); + +describe('filterMaintenanceWindowsIds', () => { + const mockMaintenanceWindows: MaintenanceWindow[] = [ + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id1', + scopedQuery: { + kql: "_id: '1234'", + filters: [ + { + meta: { + disabled: false, + negate: false, + alias: null, + key: 'kibana.alert.action_group', + field: 'kibana.alert.action_group', + params: { + query: 'test', + }, + type: 'phrase', + }, + $state: { + store: 'appState', + }, + query: { + match_phrase: { + 'kibana.alert.action_group': 'test', + }, + }, + }, + ], + }, + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id2', + }, + { + ...getMockMaintenanceWindow(), + eventStartTime: new Date().toISOString(), + eventEndTime: new Date().toISOString(), + status: MaintenanceWindowStatus.Running, + id: 'test-id3', + }, + ]; + test('correctly filters maintenance windows when withScopedQuery = true', () => { + expect( + filterMaintenanceWindowsIds({ + maintenanceWindows: mockMaintenanceWindows, + withScopedQuery: true, + }) + ).toEqual(['test-id1']); + }); + test('correctly filters maintenance windows when withScopedQuery = false', () => { + expect( + filterMaintenanceWindowsIds({ + maintenanceWindows: mockMaintenanceWindows, + withScopedQuery: false, + }) + ).toEqual(['test-id2', 'test-id3']); + }); +}); + +function getTaskRunnerContext() { + return { + basePathService: mockBasePathService, + getMaintenanceWindowClientWithRequest: jest.fn().mockReturnValue(maintenanceWindowClient), + }; +} diff --git a/x-pack/plugins/alerting/server/task_runner/get_maintenance_windows.ts b/x-pack/plugins/alerting/server/task_runner/get_maintenance_windows.ts new file mode 100644 index 0000000000000..9fbdd235f5d45 --- /dev/null +++ b/x-pack/plugins/alerting/server/task_runner/get_maintenance_windows.ts @@ -0,0 +1,83 @@ +/* + * 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 { KibanaRequest, Logger } from '@kbn/core/server'; +import { MaintenanceWindow } from '../application/maintenance_window/types'; +import { TaskRunnerContext } from './types'; + +interface GetMaintenanceWindowsOpts { + context: TaskRunnerContext; + fakeRequest: KibanaRequest; + logger: Logger; + ruleTypeId: string; + ruleTypeCategory: string; + ruleId: string; +} + +interface FilterMaintenanceWindowsOpts { + maintenanceWindows: MaintenanceWindow[]; + withScopedQuery: boolean; +} + +export const filterMaintenanceWindows = ({ + maintenanceWindows, + withScopedQuery, +}: FilterMaintenanceWindowsOpts): MaintenanceWindow[] => { + const filteredMaintenanceWindows = maintenanceWindows.filter(({ scopedQuery }) => { + if (withScopedQuery && scopedQuery) { + return true; + } else if (!withScopedQuery && !scopedQuery) { + return true; + } + + return false; + }); + + return filteredMaintenanceWindows; +}; + +export const filterMaintenanceWindowsIds = ({ + maintenanceWindows, + withScopedQuery, +}: FilterMaintenanceWindowsOpts): string[] => { + const filteredMaintenanceWindows = filterMaintenanceWindows({ + maintenanceWindows, + withScopedQuery, + }); + + return filteredMaintenanceWindows.map(({ id }) => id); +}; + +export const getMaintenanceWindows = async ( + opts: GetMaintenanceWindowsOpts +): Promise => { + const { context, fakeRequest, logger, ruleTypeId, ruleId, ruleTypeCategory } = opts; + const maintenanceWindowClient = context.getMaintenanceWindowClientWithRequest(fakeRequest); + + let activeMaintenanceWindows: MaintenanceWindow[] = []; + try { + activeMaintenanceWindows = await maintenanceWindowClient.getActiveMaintenanceWindows(); + } catch (err) { + logger.error( + `error getting active maintenance window for ${ruleTypeId}:${ruleId} ${err.message}` + ); + } + + const maintenanceWindows = activeMaintenanceWindows.filter(({ categoryIds }) => { + // If category IDs array doesn't exist: allow all + if (!Array.isArray(categoryIds)) { + return true; + } + // If category IDs array exist: check category + if ((categoryIds as string[]).includes(ruleTypeCategory)) { + return true; + } + return false; + }); + + return maintenanceWindows; +}; diff --git a/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts b/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts index 2ba2396ee4bfc..f7d2bc2b0950f 100644 --- a/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/rule_loader.test.ts @@ -9,14 +9,17 @@ import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/s import { CoreKibanaRequest, SavedObjectsErrorHelpers } from '@kbn/core/server'; import { schema } from '@kbn/config-schema'; -import { getRuleAttributes, getFakeKibanaRequest, validateRule } from './rule_loader'; -import { TaskRunnerContext } from './task_runner_factory'; +import { + getDecryptedRule, + getFakeKibanaRequest, + validateRuleAndCreateFakeRequest, +} from './rule_loader'; +import { TaskRunnerContext } from './types'; import { ruleTypeRegistryMock } from '../rule_type_registry.mock'; import { rulesClientMock } from '../rules_client.mock'; import { Rule } from '../types'; import { MONITORING_HISTORY_LIMIT, RuleExecutionStatusErrorReasons } from '../../common'; import { ErrorWithReason, getReasonFromError } from '../lib/error_with_reason'; -import { alertingEventLoggerMock } from '../lib/alerting_event_logger/alerting_event_logger.mock'; import { mockedRawRuleSO, mockedRule } from './fixtures'; import { RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; import { getErrorSource, TaskErrorSource } from '@kbn/task-manager-plugin/server/task_running'; @@ -24,7 +27,6 @@ import { getErrorSource, TaskErrorSource } from '@kbn/task-manager-plugin/server // create mocks const rulesClient = rulesClientMock.create(); const ruleTypeRegistry = ruleTypeRegistryMock.create(); -const alertingEventLogger = alertingEventLoggerMock.create(); const encryptedSavedObjects = encryptedSavedObjectsMock.createClient(); const mockBasePathService = { set: jest.fn() }; @@ -47,30 +49,23 @@ describe('rule_loader', () => { }); const getDefaultValidateRuleParams = ({ - fakeRequest, error, enabled: ruleEnabled = true, - params = mockedRule.params, }: { - fakeRequest: CoreKibanaRequest; error?: ErrorWithReason; enabled?: boolean; - params?: typeof mockedRule.params; }) => ({ paramValidator, ruleId, spaceId, ruleTypeRegistry, - alertingEventLogger, ruleData: error ? { error } : { data: { indirectParams: { ...mockedRawRuleSO.attributes, enabled: ruleEnabled }, - rule: { ...mockedRule, params }, - rulesClient, version: '1', - fakeRequest, + references: [], }, }, }); @@ -93,34 +88,30 @@ describe('rule_loader', () => { jest.restoreAllMocks(); }); - describe('validateRule()', () => { + describe('validateRuleAndCreateFakeRequest()', () => { describe('succeeds', () => { test('validates and returns the results', () => { - const fakeRequest = getFakeKibanaRequest(context, 'default', apiKey); - const result = validateRule({ - ...getDefaultValidateRuleParams({ fakeRequest }), + const result = validateRuleAndCreateFakeRequest({ + ...getDefaultValidateRuleParams({}), context, }); expect(result.apiKey).toBe(apiKey); - expect(result.validatedParams).toEqual(ruleParams); expect(result.fakeRequest.headers.authorization).toEqual(`ApiKey ${apiKey}`); expect(result.rule.alertTypeId).toBe(ruleTypeId); expect(result.rule.name).toBe(ruleName); expect(result.rule.params).toBe(ruleParams); - expect(result.indirectParams).toEqual(mockedRawRuleSO.attributes); - expect(result.version).toBe('1'); expect(result.rulesClient).toBe(rulesClient); + expect(result.validatedParams).toEqual(ruleParams); + expect(result.version).toBe('1'); }); }); test('throws when there is decrypt attributes error', () => { - const fakeRequest = getFakeKibanaRequest(context, 'default', apiKey); let outcome = 'success'; try { - validateRule({ + validateRuleAndCreateFakeRequest({ ...getDefaultValidateRuleParams({ - fakeRequest, error: new ErrorWithReason(RuleExecutionStatusErrorReasons.Decrypt, new Error('test')), }), context, @@ -133,11 +124,10 @@ describe('rule_loader', () => { }); test('throws when rule is not enabled', async () => { - const fakeRequest = getFakeKibanaRequest(context, 'default', apiKey); let outcome = 'success'; try { - validateRule({ - ...getDefaultValidateRuleParams({ fakeRequest, enabled: false }), + validateRuleAndCreateFakeRequest({ + ...getDefaultValidateRuleParams({ enabled: false }), context, }); } catch (err) { @@ -149,15 +139,14 @@ describe('rule_loader', () => { }); test('throws when rule type is not enabled', async () => { - const fakeRequest = getFakeKibanaRequest(context, 'default', apiKey); ruleTypeRegistry.ensureRuleTypeEnabled.mockImplementation(() => { throw new Error('rule-type-not-enabled: 2112'); }); let outcome = 'success'; try { - validateRule({ - ...getDefaultValidateRuleParams({ fakeRequest }), + validateRuleAndCreateFakeRequest({ + ...getDefaultValidateRuleParams({}), context, }); } catch (err) { @@ -169,12 +158,13 @@ describe('rule_loader', () => { expect(outcome).toBe('failure'); }); - test('throws when rule params fail validation', async () => { - const fakeRequest = getFakeKibanaRequest(context, 'default', apiKey); + test('test throws when rule params fail validation', async () => { + contextMock = getTaskRunnerContext({ bar: 'foo' }, MONITORING_HISTORY_LIMIT); + context = contextMock as unknown as TaskRunnerContext; let outcome = 'success'; try { - validateRule({ - ...getDefaultValidateRuleParams({ fakeRequest, params: { bar: 'foo' } }), + validateRuleAndCreateFakeRequest({ + ...getDefaultValidateRuleParams({}), context, }); } catch (err) { @@ -190,17 +180,16 @@ describe('rule_loader', () => { describe('getDecryptedAttributes()', () => { test('succeeds with default space', async () => { contextMock.spaceIdToNamespace.mockReturnValue(undefined); - const result = await getRuleAttributes(context, ruleId, 'default'); + const result = await getDecryptedRule(context, ruleId, 'default'); - expect(result.fakeRequest).toEqual(expect.any(CoreKibanaRequest)); - expect(result.rule.alertTypeId).toBe(ruleTypeId); expect(result.indirectParams).toEqual({ ...mockedRawRuleSO.attributes, apiKey, enabled, consumer, }); - expect(result.rulesClient).toBeTruthy(); + expect(result.references).toEqual([]); + expect(result.version).toEqual('1'); expect(contextMock.spaceIdToNamespace.mock.calls[0]).toEqual(['default']); const esoArgs = encryptedSavedObjects.getDecryptedAsInternalUser.mock.calls[0]; @@ -209,11 +198,8 @@ describe('rule_loader', () => { test('succeeds with non-default space', async () => { contextMock.spaceIdToNamespace.mockReturnValue(spaceId); - const result = await getRuleAttributes(context, ruleId, spaceId); + const result = await getDecryptedRule(context, ruleId, spaceId); - expect(result.fakeRequest).toEqual(expect.any(CoreKibanaRequest)); - expect(result.rule.alertTypeId).toBe(ruleTypeId); - expect(result.rulesClient).toBeTruthy(); expect(contextMock.spaceIdToNamespace.mock.calls[0]).toEqual([spaceId]); expect(result.indirectParams).toEqual({ ...mockedRawRuleSO.attributes, @@ -221,6 +207,8 @@ describe('rule_loader', () => { enabled, consumer, }); + expect(result.references).toEqual([]); + expect(result.version).toEqual('1'); const esoArgs = encryptedSavedObjects.getDecryptedAsInternalUser.mock.calls[0]; expect(esoArgs).toEqual([RULE_SAVED_OBJECT_TYPE, ruleId, { namespace: spaceId }]); @@ -234,7 +222,7 @@ describe('rule_loader', () => { ); try { - await getRuleAttributes(context, ruleId, spaceId); + await getDecryptedRule(context, ruleId, spaceId); } catch (e) { expect(e.message).toMatch('wops'); expect(getErrorSource(e)).toBe(TaskErrorSource.FRAMEWORK); @@ -247,7 +235,7 @@ describe('rule_loader', () => { ); try { - await getRuleAttributes(context, ruleId, spaceId); + await getDecryptedRule(context, ruleId, spaceId); } catch (e) { expect(e.message).toMatch('Not Found'); expect(getErrorSource(e)).toBe(TaskErrorSource.USER); @@ -317,7 +305,7 @@ describe('rule_loader', () => { // returns a version of encryptedSavedObjects.getDecryptedAsInternalUser() with provided params function mockGetDecrypted(attributes: { apiKey?: string; enabled: boolean; consumer: string }) { return async (type: string, id: string, opts_: unknown) => { - return { id, type, references: [], attributes }; + return { id, type, references: [], version: '1', attributes }; }; } diff --git a/x-pack/plugins/alerting/server/task_runner/rule_loader.ts b/x-pack/plugins/alerting/server/task_runner/rule_loader.ts index 66e8ab70e5f70..555a38886d3c5 100644 --- a/x-pack/plugins/alerting/server/task_runner/rule_loader.ts +++ b/x-pack/plugins/alerting/server/task_runner/rule_loader.ts @@ -11,70 +11,68 @@ import { FakeRawRequest, Headers, SavedObject, + SavedObjectReference, SavedObjectsErrorHelpers, } from '@kbn/core/server'; -import { PublicMethodsOf } from '@kbn/utility-types'; import { LoadedIndirectParams, LoadIndirectParamsResult, } from '@kbn/task-manager-plugin/server/task'; import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; -import { TaskRunnerContext } from './task_runner_factory'; +import { RunRuleParams, TaskRunnerContext } from './types'; import { ErrorWithReason, validateRuleTypeParams } from '../lib'; import { RuleExecutionStatusErrorReasons, RawRule, RuleTypeRegistry, RuleTypeParamsValidator, - SanitizedRule, - RulesClientApi, } from '../types'; import { MONITORING_HISTORY_LIMIT, RuleTypeParams } from '../../common'; -import { AlertingEventLogger } from '../lib/alerting_event_logger/alerting_event_logger'; import { RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; -export interface RuleData extends LoadedIndirectParams { +export interface RuleData extends LoadedIndirectParams { indirectParams: RawRule; - rule: SanitizedRule; version: string | undefined; - fakeRequest: CoreKibanaRequest; - rulesClient: RulesClientApi; + references: SavedObjectReference[]; } export type RuleDataResult = LoadIndirectParamsResult; -export interface ValidatedRuleData extends RuleData { - validatedParams: Params; - apiKey: string | null; -} - -interface ValidateRuleParams { - alertingEventLogger: PublicMethodsOf; +interface ValidateRuleAndCreateFakeRequestParams { + context: TaskRunnerContext; paramValidator?: RuleTypeParamsValidator; + ruleData: RuleDataResult; ruleId: string; - spaceId: string; - context: TaskRunnerContext; ruleTypeRegistry: RuleTypeRegistry; - ruleData: RuleDataResult>; + spaceId: string; } -export function validateRule( - params: ValidateRuleParams -): ValidatedRuleData { +/** + * With the decrypted rule saved object + * - transform from domain model to application model (rule) + * - create a fakeRequest object using the rule API key + * - get an instance of the RulesClient using the fakeRequest + */ +export function validateRuleAndCreateFakeRequest( + params: ValidateRuleAndCreateFakeRequestParams +): RunRuleParams { + // If there was a prior error loading the decrypted rule SO, exit early if (params.ruleData.error) { throw params.ruleData.error; } const { + context, + paramValidator, ruleData: { - data: { indirectParams, rule, fakeRequest, rulesClient, version }, + data: { indirectParams, references, version }, }, + ruleId, ruleTypeRegistry, - paramValidator, - alertingEventLogger, + spaceId, } = params; - const { enabled, apiKey } = indirectParams; + const { enabled, apiKey, alertTypeId: ruleTypeId } = indirectParams; if (!enabled) { throw createTaskRunError( @@ -86,7 +84,17 @@ export function validateRule( ); } - alertingEventLogger.setRuleName(rule.name); + const fakeRequest = getFakeKibanaRequest(context, spaceId, apiKey); + const rulesClient = context.getRulesClientWithRequest(fakeRequest); + const rule = rulesClient.getAlertFromRaw({ + id: ruleId, + ruleTypeId, + rawRule: indirectParams as RawRule, + references, + includeLegacyId: false, + omitGeneratedValues: false, + }); + try { ruleTypeRegistry.ensureRuleTypeEnabled(rule.alertTypeId); } catch (err) { @@ -114,21 +122,23 @@ export function validateRule( } return { - rule, - indirectParams, - fakeRequest, apiKey, + fakeRequest, + rule, rulesClient, validatedParams, version, }; } -export async function getRuleAttributes( +/** + * Loads the decrypted rule saved object + */ +export async function getDecryptedRule( context: TaskRunnerContext, ruleId: string, spaceId: string -): Promise> { +): Promise { const namespace = context.spaceIdToNamespace(spaceId); let rawRule: SavedObject; @@ -146,23 +156,10 @@ export async function getRuleAttributes( throw createTaskRunError(e, TaskErrorSource.FRAMEWORK); } - const fakeRequest = getFakeKibanaRequest(context, spaceId, rawRule.attributes.apiKey); - const rulesClient = context.getRulesClientWithRequest(fakeRequest); - const rule = rulesClient.getAlertFromRaw({ - id: ruleId, - ruleTypeId: rawRule.attributes.alertTypeId as string, - rawRule: rawRule.attributes as RawRule, - references: rawRule.references, - includeLegacyId: false, - omitGeneratedValues: false, - }); - return { - rule, version: rawRule.version, indirectParams: rawRule.attributes, - fakeRequest, - rulesClient, + references: rawRule.references, }; } diff --git a/x-pack/plugins/alerting/server/task_runner/rule_type_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/rule_type_runner.test.ts new file mode 100644 index 0000000000000..9c32710714467 --- /dev/null +++ b/x-pack/plugins/alerting/server/task_runner/rule_type_runner.test.ts @@ -0,0 +1,936 @@ +/* + * 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 { savedObjectsClientMock, uiSettingsServiceMock } from '@kbn/core/server/mocks'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { + DATE_1970, + mockedRule, + mockTaskInstance, + RULE_ID, + RULE_NAME, + RULE_TYPE_ID, +} from './fixtures'; +import { alertingEventLoggerMock } from '../lib/alerting_event_logger/alerting_event_logger.mock'; +import { ruleRunMetricsStoreMock } from '../lib/rule_run_metrics_store.mock'; +import { RuleTypeRunner } from './rule_type_runner'; +import { TaskRunnerTimer } from './task_runner_timer'; +import { + DEFAULT_FLAPPING_SETTINGS, + DEFAULT_QUERY_DELAY_SETTINGS, + RecoveredActionGroup, +} from '../types'; +import { TaskRunnerContext } from './types'; +import { executionContextServiceMock } from '@kbn/core-execution-context-server-mocks'; +import { SharePluginStart } from '@kbn/share-plugin/server'; +import { alertsClientMock } from '../alerts_client/alerts_client.mock'; +import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; +import { publicRuleMonitoringServiceMock } from '../monitoring/rule_monitoring_service.mock'; +import { publicRuleResultServiceMock } from '../monitoring/rule_result_service.mock'; +import { wrappedScopedClusterClientMock } from '../lib/wrap_scoped_cluster_client.mock'; +import { wrappedSearchSourceClientMock } from '../lib/wrap_search_source_client.mock'; +import { NormalizedRuleType } from '../rule_type_registry'; + +const alertingEventLogger = alertingEventLoggerMock.create(); +const alertsClient = alertsClientMock.create(); +const dataViews = dataViewPluginMocks.createStartContract(); +const logger = loggingSystemMock.create().get(); +const publicRuleMonitoringService = publicRuleMonitoringServiceMock.create(); +const publicRuleResultService = publicRuleResultServiceMock.create(); +const ruleRunMetricsStore = ruleRunMetricsStoreMock.create(); +const savedObjectsClient = savedObjectsClientMock.create(); +const uiSettingsClient = uiSettingsServiceMock.createClient(); +const wrappedScopedClusterClient = wrappedScopedClusterClientMock.create(); +const wrappedSearchSourceClient = wrappedSearchSourceClientMock.create(); + +const timer = new TaskRunnerTimer({ logger }); +const ruleType: jest.Mocked< + NormalizedRuleType<{}, {}, { foo: string }, {}, {}, 'default', 'recovered', {}> +> = { + id: RULE_TYPE_ID, + name: 'My test rule', + actionGroups: [{ id: 'default', name: 'Default' }, RecoveredActionGroup], + defaultActionGroupId: 'default', + minimumLicenseRequired: 'basic', + isExportable: true, + recoveryActionGroup: RecoveredActionGroup, + executor: jest.fn(), + category: 'test', + producer: 'alerts', + cancelAlertsOnRuleTimeout: true, + ruleTaskTimeout: '5m', + autoRecoverAlerts: true, + validate: { + params: { validate: (params) => params }, + }, + alerts: { + context: 'test', + mappings: { fieldMap: { field: { type: 'keyword', required: false } } }, + }, + validLegacyConsumers: [], +}; + +describe('RuleTypeRunner', () => { + let ruleTypeRunner: RuleTypeRunner<{}, {}, { foo: string }, {}, {}, 'default', 'recovered', {}>; + let context: TaskRunnerContext; + let contextMock: ReturnType; + + beforeEach(() => { + jest.resetAllMocks(); + contextMock = getTaskRunnerContext(); + context = contextMock as unknown as TaskRunnerContext; + + ruleTypeRunner = new RuleTypeRunner< + {}, + {}, + { foo: string }, + {}, + {}, + 'default', + 'recovered', + {} + >({ + context, + timer, + logger, + ruleType, + }); + }); + + describe('run', () => { + test('should return state when rule type executor succeeds', async () => { + ruleType.executor.mockResolvedValueOnce({ state: { foo: 'bar' } }); + + const { state, error, stackTrace } = await ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(state).toEqual({ foo: 'bar' }); + expect(error).toBeUndefined(); + expect(stackTrace).toBeUndefined(); + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertsClient.checkLimitUsage).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).toHaveBeenCalledWith( + `rule executed: ${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'` + ); + expect(ruleRunMetricsStore.setSearchMetrics).toHaveBeenCalled(); + expect(alertsClient.processAlerts).toHaveBeenCalledWith({ + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + notifyOnActionGroupChange: false, + maintenanceWindowIds: [], + alertDelay: 0, + ruleRunMetricsStore, + }); + expect(alertsClient.persistAlerts).toHaveBeenCalledWith([]); + expect(alertsClient.logAlerts).toHaveBeenCalledWith({ + eventLogger: alertingEventLogger, + ruleRunMetricsStore, + shouldLogAlerts: true, + }); + }); + + test('should return error when checkLimitUsage() throws error', async () => { + const err = new Error('limit exceeded'); + alertsClient.checkLimitUsage.mockImplementationOnce(() => { + throw err; + }); + ruleType.executor.mockResolvedValueOnce({ state: { foo: 'bar' } }); + + const { state, error, stackTrace } = await ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(state).toBeUndefined(); + expect(error).toEqual(err); + expect(stackTrace).toEqual({ message: err, stackTrace: err.stack }); + expect(alertsClient.checkLimitUsage).toHaveBeenCalled(); + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).not.toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionFailed).toHaveBeenCalledWith( + `rule execution failure: test:1: 'rule-name'`, + 'limit exceeded' + ); + expect(ruleRunMetricsStore.setSearchMetrics).not.toHaveBeenCalled(); + expect(alertsClient.processAlerts).not.toHaveBeenCalled(); + expect(alertsClient.persistAlerts).not.toHaveBeenCalled(); + expect(alertsClient.logAlerts).not.toHaveBeenCalled(); + }); + + test('should return error when rule type executor throws error', async () => { + const err = new Error('executor error'); + ruleType.executor.mockImplementationOnce(() => { + throw err; + }); + + const { state, error, stackTrace } = await ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(state).toBeUndefined(); + expect(error).toEqual(err); + expect(stackTrace).toEqual({ message: err, stackTrace: err.stack }); + expect(alertsClient.checkLimitUsage).not.toHaveBeenCalled(); + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).not.toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionFailed).toHaveBeenCalledWith( + `rule execution failure: test:1: 'rule-name'`, + 'executor error' + ); + expect(ruleRunMetricsStore.setSearchMetrics).not.toHaveBeenCalled(); + expect(alertsClient.processAlerts).not.toHaveBeenCalled(); + expect(alertsClient.persistAlerts).not.toHaveBeenCalled(); + expect(alertsClient.logAlerts).not.toHaveBeenCalled(); + }); + + test('should handle reaching alert limit when rule type executor succeeds', async () => { + alertsClient.hasReachedAlertLimit.mockReturnValueOnce(true); + ruleType.executor.mockResolvedValueOnce({ state: { foo: 'bar' } }); + + const { state, error, stackTrace } = await ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(logger.warn).toHaveBeenCalledWith( + `rule execution generated greater than 100 alerts: test:1: 'rule-name'` + ); + expect(ruleRunMetricsStore.setHasReachedAlertLimit).toHaveBeenCalledWith(true); + expect(state).toEqual({ foo: 'bar' }); + expect(error).toBeUndefined(); + expect(stackTrace).toBeUndefined(); + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertsClient.checkLimitUsage).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).toHaveBeenCalledWith( + `rule executed: ${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'` + ); + expect(ruleRunMetricsStore.setSearchMetrics).toHaveBeenCalled(); + expect(alertsClient.processAlerts).toHaveBeenCalledWith({ + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + notifyOnActionGroupChange: false, + maintenanceWindowIds: [], + alertDelay: 0, + ruleRunMetricsStore, + }); + expect(alertsClient.persistAlerts).toHaveBeenCalledWith([]); + expect(alertsClient.logAlerts).toHaveBeenCalledWith({ + eventLogger: alertingEventLogger, + ruleRunMetricsStore, + shouldLogAlerts: true, + }); + }); + + test('should handle reaching alert limit when rule type executor throws error', async () => { + alertsClient.hasReachedAlertLimit.mockReturnValueOnce(true); + alertsClient.hasReachedAlertLimit.mockReturnValueOnce(true); + const err = new Error('executor error'); + ruleType.executor.mockImplementationOnce(() => { + throw err; + }); + + const { state, error, stackTrace } = await ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(logger.warn).toHaveBeenCalledWith( + `rule execution generated greater than 100 alerts: test:1: 'rule-name'` + ); + expect(ruleRunMetricsStore.setHasReachedAlertLimit).toHaveBeenCalledWith(true); + expect(state).toBeUndefined(); + expect(error).toBeUndefined(); + expect(stackTrace).toBeUndefined(); + expect(alertsClient.checkLimitUsage).not.toHaveBeenCalled(); + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).toHaveBeenCalledWith( + `rule executed: ${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'` + ); + expect(ruleRunMetricsStore.setSearchMetrics).toHaveBeenCalled(); + expect(alertsClient.processAlerts).toHaveBeenCalledWith({ + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + notifyOnActionGroupChange: false, + maintenanceWindowIds: [], + alertDelay: 0, + ruleRunMetricsStore, + }); + expect(alertsClient.persistAlerts).toHaveBeenCalledWith([]); + expect(alertsClient.logAlerts).toHaveBeenCalledWith({ + eventLogger: alertingEventLogger, + ruleRunMetricsStore, + shouldLogAlerts: true, + }); + }); + + test('should throw error if alertsClient.processAlerts throws error', async () => { + alertsClient.processAlerts.mockImplementationOnce(() => { + throw new Error('process alerts failed'); + }); + + ruleType.executor.mockResolvedValueOnce({ state: { foo: 'bar' } }); + + await expect( + ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"process alerts failed"`); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertsClient.checkLimitUsage).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).toHaveBeenCalledWith( + `rule executed: ${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'` + ); + expect(ruleRunMetricsStore.setSearchMetrics).toHaveBeenCalled(); + expect(alertsClient.processAlerts).toHaveBeenCalledWith({ + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + notifyOnActionGroupChange: false, + maintenanceWindowIds: [], + alertDelay: 0, + ruleRunMetricsStore, + }); + expect(alertsClient.persistAlerts).not.toHaveBeenCalled(); + expect(alertsClient.logAlerts).not.toHaveBeenCalled(); + }); + + test('should throw error if alertsClient.persistAlerts throws error', async () => { + alertsClient.persistAlerts.mockImplementationOnce(() => { + throw new Error('persist alerts failed'); + }); + + ruleType.executor.mockResolvedValueOnce({ state: { foo: 'bar' } }); + + await expect( + ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"persist alerts failed"`); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertsClient.checkLimitUsage).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).toHaveBeenCalledWith( + `rule executed: ${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'` + ); + expect(ruleRunMetricsStore.setSearchMetrics).toHaveBeenCalled(); + expect(alertsClient.processAlerts).toHaveBeenCalledWith({ + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + notifyOnActionGroupChange: false, + maintenanceWindowIds: [], + alertDelay: 0, + ruleRunMetricsStore, + }); + expect(alertsClient.persistAlerts).toHaveBeenCalledWith([]); + expect(alertsClient.logAlerts).not.toHaveBeenCalled(); + }); + + test('should throw error if alertsClient.logAlerts throws error', async () => { + alertsClient.logAlerts.mockImplementationOnce(() => { + throw new Error('log alerts failed'); + }); + + ruleType.executor.mockResolvedValueOnce({ state: { foo: 'bar' } }); + + await expect( + ruleTypeRunner.run({ + context: { + alertingEventLogger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + queryDelaySettings: DEFAULT_QUERY_DELAY_SETTINGS, + ruleId: RULE_ID, + ruleLogPrefix: `${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'`, + ruleRunMetricsStore, + spaceId: 'default', + }, + alertsClient, + executionId: 'abc', + executorServices: { + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + uiSettingsClient, + wrappedScopedClusterClient, + wrappedSearchSourceClient, + }, + rule: mockedRule, + startedAt: new Date(DATE_1970), + state: mockTaskInstance().state, + validatedParams: mockedRule.params, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"log alerts failed"`); + + expect(ruleType.executor).toHaveBeenCalledWith({ + executionId: 'abc', + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews, + ruleMonitoringService: publicRuleMonitoringService, + ruleResultService: publicRuleResultService, + savedObjectsClient, + scopedClusterClient: wrappedScopedClusterClient.client(), + searchSourceClient: wrappedSearchSourceClient.searchSourceClient, + share: {}, + shouldStopExecution: expect.any(Function), + shouldWriteAlerts: expect.any(Function), + uiSettingsClient, + }, + params: mockedRule.params, + state: mockTaskInstance().state, + startedAt: new Date(DATE_1970), + previousStartedAt: null, + spaceId: 'default', + rule: { + id: RULE_ID, + name: mockedRule.name, + tags: mockedRule.tags, + consumer: mockedRule.consumer, + producer: ruleType.producer, + revision: mockedRule.revision, + ruleTypeId: mockedRule.alertTypeId, + ruleTypeName: ruleType.name, + enabled: mockedRule.enabled, + schedule: mockedRule.schedule, + actions: mockedRule.actions, + createdBy: mockedRule.createdBy, + updatedBy: mockedRule.updatedBy, + createdAt: mockedRule.createdAt, + updatedAt: mockedRule.updatedAt, + throttle: mockedRule.throttle, + notifyWhen: mockedRule.notifyWhen, + muteAll: mockedRule.muteAll, + snoozeSchedule: mockedRule.snoozeSchedule, + alertDelay: mockedRule.alertDelay, + }, + logger, + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + getTimeRange: expect.any(Function), + }); + + expect(alertsClient.hasReachedAlertLimit).toHaveBeenCalled(); + expect(alertsClient.checkLimitUsage).toHaveBeenCalled(); + expect(alertingEventLogger.setExecutionSucceeded).toHaveBeenCalledWith( + `rule executed: ${RULE_TYPE_ID}:${RULE_ID}: '${RULE_NAME}'` + ); + expect(ruleRunMetricsStore.setSearchMetrics).toHaveBeenCalled(); + expect(alertsClient.processAlerts).toHaveBeenCalledWith({ + flappingSettings: DEFAULT_FLAPPING_SETTINGS, + notifyOnActionGroupChange: false, + maintenanceWindowIds: [], + alertDelay: 0, + ruleRunMetricsStore, + }); + expect(alertsClient.persistAlerts).toHaveBeenCalledWith([]); + expect(alertsClient.logAlerts).toHaveBeenCalledWith({ + eventLogger: alertingEventLogger, + ruleRunMetricsStore, + shouldLogAlerts: true, + }); + }); + }); +}); + +// return enough of TaskRunnerContext that RuleTypeRunner needs +function getTaskRunnerContext() { + return { + maxAlerts: 100, + executionContext: executionContextServiceMock.createInternalStartContract(), + share: {} as SharePluginStart, + }; +} diff --git a/x-pack/plugins/alerting/server/task_runner/rule_type_runner.ts b/x-pack/plugins/alerting/server/task_runner/rule_type_runner.ts new file mode 100644 index 0000000000000..ca0757aa69351 --- /dev/null +++ b/x-pack/plugins/alerting/server/task_runner/rule_type_runner.ts @@ -0,0 +1,327 @@ +/* + * 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 { AlertInstanceContext, AlertInstanceState, RuleTaskState } from '@kbn/alerting-state-types'; +import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; +import { Logger } from '@kbn/core/server'; +import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; +import { some } from 'lodash'; +import { IAlertsClient } from '../alerts_client/types'; +import { MaintenanceWindow } from '../application/maintenance_window/types'; +import { ErrorWithReason } from '../lib'; +import { getTimeRange } from '../lib/get_time_range'; +import { NormalizedRuleType } from '../rule_type_registry'; +import { + RuleAlertData, + RuleExecutionStatusErrorReasons, + RuleNotifyWhen, + RuleTypeParams, + RuleTypeState, + SanitizedRule, +} from '../types'; +import { ExecutorServices } from './get_executor_services'; +import { StackTraceLog } from './task_runner'; +import { TaskRunnerTimer, TaskRunnerTimerSpan } from './task_runner_timer'; +import { RuleTypeRunnerContext, TaskRunnerContext } from './types'; + +interface ConstructorOpts< + Params extends RuleTypeParams, + ExtractedParams extends RuleTypeParams, + RuleState extends RuleTypeState, + State extends AlertInstanceState, + Context extends AlertInstanceContext, + ActionGroupIds extends string, + RecoveryActionGroupId extends string, + AlertData extends RuleAlertData +> { + context: TaskRunnerContext; + timer: TaskRunnerTimer; + logger: Logger; + ruleType: NormalizedRuleType< + Params, + ExtractedParams, + RuleState, + State, + Context, + ActionGroupIds, + RecoveryActionGroupId, + AlertData + >; +} + +interface RunOpts< + Params extends RuleTypeParams, + State extends AlertInstanceState, + Context extends AlertInstanceContext, + ActionGroupIds extends string, + RecoveryActionGroupId extends string, + AlertData extends RuleAlertData +> { + context: RuleTypeRunnerContext; + alertsClient: IAlertsClient; + executionId: string; + executorServices: ExecutorServices & { + getTimeRangeFn?: ( + timeWindow: string, + nowDate?: string + ) => { dateStart: string; dateEnd: string }; + }; + maintenanceWindows?: MaintenanceWindow[]; + maintenanceWindowsWithoutScopedQueryIds?: string[]; + rule: SanitizedRule; + startedAt: Date | null; + state: RuleTaskState; + validatedParams: Params; +} + +interface RunResult { + state: RuleTypeState | undefined; + error?: Error; + stackTrace?: StackTraceLog | null; +} + +export class RuleTypeRunner< + Params extends RuleTypeParams, + ExtractedParams extends RuleTypeParams, + RuleState extends RuleTypeState, + State extends AlertInstanceState, + Context extends AlertInstanceContext, + ActionGroupIds extends string, + RecoveryActionGroupId extends string, + AlertData extends RuleAlertData +> { + private cancelled: boolean = false; + + constructor( + private readonly options: ConstructorOpts< + Params, + ExtractedParams, + RuleState, + State, + Context, + ActionGroupIds, + RecoveryActionGroupId, + AlertData + > + ) {} + + public cancelRun() { + this.cancelled = true; + } + + public async run({ + context, + alertsClient, + executionId, + executorServices, + maintenanceWindows = [], + maintenanceWindowsWithoutScopedQueryIds = [], + rule, + startedAt, + state, + validatedParams, + }: RunOpts< + Params, + State, + Context, + ActionGroupIds, + RecoveryActionGroupId, + AlertData + >): Promise { + const { + alertTypeId: ruleTypeId, + consumer, + schedule, + throttle = null, + notifyWhen = null, + name, + tags, + createdBy, + updatedBy, + createdAt, + updatedAt, + enabled, + actions, + muteAll, + revision, + snoozeSchedule, + alertDelay, + } = rule; + + const { alertTypeState: ruleTypeState = {}, previousStartedAt } = state; + + const { updatedRuleTypeState, error, stackTrace } = await this.options.timer.runWithTimer( + TaskRunnerTimerSpan.RuleTypeRun, + async () => { + const checkHasReachedAlertLimit = () => { + const reachedLimit = alertsClient.hasReachedAlertLimit() || false; + if (reachedLimit) { + this.options.logger.warn( + `rule execution generated greater than ${this.options.context.maxAlerts} alerts: ${context.ruleLogPrefix}` + ); + context.ruleRunMetricsStore.setHasReachedAlertLimit(true); + } + return reachedLimit; + }; + + let executorResult: { state: RuleState } | undefined; + try { + const ctx = { + type: 'alert', + name: `execute ${ruleTypeId}`, + id: context.ruleId, + description: `execute [${ruleTypeId}] with name [${name}] in [${ + context.namespace ?? DEFAULT_NAMESPACE_STRING + }] namespace`, + }; + executorResult = await this.options.context.executionContext.withContext(ctx, () => + this.options.ruleType.executor({ + executionId, + services: { + alertFactory: alertsClient.factory(), + alertsClient: alertsClient.client(), + dataViews: executorServices.dataViews, + ruleMonitoringService: executorServices.ruleMonitoringService, + ruleResultService: executorServices.ruleResultService, + savedObjectsClient: executorServices.savedObjectsClient, + scopedClusterClient: executorServices.wrappedScopedClusterClient.client(), + searchSourceClient: executorServices.wrappedSearchSourceClient.searchSourceClient, + share: this.options.context.share, + shouldStopExecution: () => this.cancelled, + shouldWriteAlerts: () => this.shouldLogAndScheduleActionsForAlerts(), + uiSettingsClient: executorServices.uiSettingsClient, + }, + params: validatedParams, + state: ruleTypeState as RuleState, + startedAt: startedAt!, + previousStartedAt: previousStartedAt ? new Date(previousStartedAt) : null, + spaceId: context.spaceId, + namespace: context.namespace, + rule: { + id: context.ruleId, + name, + tags, + consumer, + producer: this.options.ruleType.producer, + revision, + ruleTypeId, + ruleTypeName: this.options.ruleType.name, + enabled, + schedule, + actions, + createdBy, + updatedBy, + createdAt, + updatedAt, + throttle, + notifyWhen, + muteAll, + snoozeSchedule, + alertDelay, + }, + logger: this.options.logger, + flappingSettings: context.flappingSettings, + // passed in so the rule registry knows about maintenance windows + ...(maintenanceWindowsWithoutScopedQueryIds.length + ? { maintenanceWindowIds: maintenanceWindowsWithoutScopedQueryIds } + : {}), + getTimeRange: (timeWindow) => + getTimeRange(this.options.logger, context.queryDelaySettings, timeWindow), + }) + ); + // Rule type execution has successfully completed + // Check that the rule type either never requested the max alerts limit + // or requested it and then reported back whether it exceeded the limit + // If neither of these apply, this check will throw an error + // These errors should show up during rule type development + alertsClient.checkLimitUsage(); + } catch (err) { + // Check if this error is due to reaching the alert limit + if (!checkHasReachedAlertLimit()) { + context.alertingEventLogger.setExecutionFailed( + `rule execution failure: ${context.ruleLogPrefix}`, + err.message + ); + return { + error: createTaskRunError( + new ErrorWithReason(RuleExecutionStatusErrorReasons.Execute, err), + TaskErrorSource.USER + ), + stackTrace: { message: err, stackTrace: err.stack }, + }; + } + } + + // Check if the rule type has reported that it reached the alert limit + checkHasReachedAlertLimit(); + + context.alertingEventLogger.setExecutionSucceeded( + `rule executed: ${context.ruleLogPrefix}` + ); + context.ruleRunMetricsStore.setSearchMetrics([ + executorServices.wrappedScopedClusterClient.getMetrics(), + executorServices.wrappedSearchSourceClient.getMetrics(), + ]); + + return { + updatedRuleTypeState: executorResult?.state || undefined, + }; + } + ); + + if (error) { + return { state: undefined, error, stackTrace }; + } + + await this.options.timer.runWithTimer(TaskRunnerTimerSpan.ProcessAlerts, async () => { + alertsClient.processAlerts({ + flappingSettings: context.flappingSettings, + notifyOnActionGroupChange: + notifyWhen === RuleNotifyWhen.CHANGE || + some(actions, (action) => action.frequency?.notifyWhen === RuleNotifyWhen.CHANGE), + maintenanceWindowIds: maintenanceWindowsWithoutScopedQueryIds, + alertDelay: alertDelay?.active ?? 0, + ruleRunMetricsStore: context.ruleRunMetricsStore, + }); + }); + + await this.options.timer.runWithTimer(TaskRunnerTimerSpan.PersistAlerts, async () => { + const updateAlertsMaintenanceWindowResult = await alertsClient.persistAlerts( + maintenanceWindows + ); + + // Set the event log MW ids again, this time including the ids that matched alerts with + // scoped query + if (updateAlertsMaintenanceWindowResult?.maintenanceWindowIds) { + context.alertingEventLogger.setMaintenanceWindowIds( + updateAlertsMaintenanceWindowResult.maintenanceWindowIds + ); + } + }); + + alertsClient.logAlerts({ + eventLogger: context.alertingEventLogger, + ruleRunMetricsStore: context.ruleRunMetricsStore, + shouldLogAlerts: this.shouldLogAndScheduleActionsForAlerts(), + }); + + return { state: updatedRuleTypeState }; + } + + private shouldLogAndScheduleActionsForAlerts() { + // if execution hasn't been cancelled, return true + if (!this.cancelled) { + return true; + } + + // if execution has been cancelled, return true if EITHER alerting config or rule type indicate to proceed with scheduling actions + return ( + !this.options.context.cancelAlertsOnRuleTimeout || + !this.options.ruleType.cancelAlertsOnRuleTimeout + ); + } +} diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts index 3994883ec9277..56263e0e245a3 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.test.ts @@ -23,7 +23,7 @@ import { isUnrecoverableError, TaskErrorSource, } from '@kbn/task-manager-plugin/server'; -import { TaskRunnerContext } from './task_runner_factory'; +import { TaskRunnerContext } from './types'; import { TaskRunner } from './task_runner'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { @@ -834,7 +834,7 @@ describe('Task Runner', () => { mockMaintenanceWindows ); - alertsClient.updateAlertsMaintenanceWindowIdByScopedQuery.mockResolvedValue({ + alertsClient.persistAlerts.mockResolvedValue({ alertIds: [], maintenanceWindowIds: ['test-id-1', 'test-id-2'], }); @@ -855,12 +855,7 @@ describe('Task Runner', () => { await taskRunner.run(); expect(actionsClient.ephemeralEnqueuedExecution).toHaveBeenCalledTimes(0); - expect(alertsClient.updateAlertsMaintenanceWindowIdByScopedQuery).toHaveBeenLastCalledWith({ - executionUuid: '5f6aa57d-3e22-484e-bae8-cbed868f4d28', - maintenanceWindows: mockMaintenanceWindows, - ruleId: '1', - spaceId: 'default', - }); + expect(alertsClient.persistAlerts).toHaveBeenLastCalledWith(mockMaintenanceWindows); expect(alertingEventLogger.setMaintenanceWindowIds).toHaveBeenCalledWith(['test-id-1']); expect(alertingEventLogger.setMaintenanceWindowIds).toHaveBeenCalledWith([ @@ -1883,11 +1878,11 @@ describe('Task Runner', () => { inMemoryMetrics, }); expect(AlertingEventLogger).toHaveBeenCalled(); - rulesClient.getAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - schedule: { interval: '30s' }, + rulesClient.getAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue({ + ...mockedRawRuleSO, + attributes: { ...mockedRawRuleSO.attributes, schedule: { interval: '30s' } }, }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); const runnerResult = await taskRunner.run(); expect(runnerResult).toEqual( @@ -1954,7 +1949,7 @@ describe('Task Runner', () => { const taskRunError = new Error(GENERIC_ERROR_MESSAGE); // used in loadIndirectParams() which is called to load rule data - rulesClient.getAlertFromRaw.mockImplementation(() => { + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockImplementation(() => { throw taskRunError; }); @@ -1967,8 +1962,6 @@ describe('Task Runner', () => { }); expect(AlertingEventLogger).toHaveBeenCalled(); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); - const runnerResult = await taskRunner.run(); expect(runnerResult).toEqual(generateRunnerResult({ successRatio: 0, taskRunError })); @@ -2755,11 +2748,11 @@ describe('Task Runner', () => { inMemoryMetrics, }); expect(AlertingEventLogger).toHaveBeenCalled(); - rulesClient.getAlertFromRaw.mockReturnValue({ - ...(mockedRuleTypeSavedObject as Rule), - schedule: { interval: '50s' }, + rulesClient.getAlertFromRaw.mockReturnValue(mockedRuleTypeSavedObject as Rule); + encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue({ + ...mockedRawRuleSO, + attributes: { ...mockedRawRuleSO.attributes, schedule: { interval: '50s' } }, }); - encryptedSavedObjectsClient.getDecryptedAsInternalUser.mockResolvedValue(mockedRawRuleSO); await taskRunner.run(); expect( @@ -3405,6 +3398,7 @@ describe('Task Runner', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, + prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, @@ -3440,6 +3434,7 @@ describe('Task Runner', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, + prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, @@ -3473,6 +3468,7 @@ describe('Task Runner', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, + prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner.ts b/x-pack/plugins/alerting/server/task_runner/task_runner.ts index aea121e7037ce..e65e74c732691 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner.ts @@ -6,21 +6,20 @@ */ import apm from 'elastic-apm-node'; -import { omit, some } from 'lodash'; +import { omit } from 'lodash'; import { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { v4 as uuidv4 } from 'uuid'; import { Logger } from '@kbn/core/server'; import { ConcreteTaskInstance, createTaskRunError, - TaskErrorSource, throwUnrecoverableError, } from '@kbn/task-manager-plugin/server'; import { nanosToMillis } from '@kbn/event-log-plugin/server'; -import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; import { getErrorSource } from '@kbn/task-manager-plugin/server/task_running'; import { ExecutionHandler, RunResult } from './execution_handler'; -import { TaskRunnerContext } from './task_runner_factory'; +import { TaskRunnerContext } from './types'; +import { getExecutorServices } from './get_executor_services'; import { ElasticsearchError, ErrorWithReason, @@ -30,7 +29,6 @@ import { isRuleSnoozed, lastRunFromError, ruleExecutionStatusToRaw, - getEsRequestTimeout, } from '../lib'; import { IntervalSchedule, @@ -45,7 +43,7 @@ import { import { asErr, asOk, isErr, isOk, map, resolveErr, Result } from '../lib/result_type'; import { taskInstanceToAlertTaskInstance } from './alert_task_instance'; import { isAlertSavedObjectNotFoundError, isEsUnavailableError } from '../lib/is_alerting_error'; -import { partiallyUpdateRule, RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; +import { partiallyUpdateRule } from '../saved_objects'; import { AlertInstanceContext, AlertInstanceState, @@ -53,10 +51,8 @@ import { RawAlertInstance, RuleAlertData, RuleLastRunOutcomeOrderMap, - RuleNotifyWhen, RuleTypeParams, RuleTypeState, - SanitizedRule, } from '../../common'; import { NormalizedRuleType, UntypedNormalizedRuleType } from '../rule_type_registry'; import { getEsErrorMessage } from '../lib/errors'; @@ -67,32 +63,29 @@ import { RuleTaskStateAndMetrics, RunRuleParams, } from './types'; -import { createWrappedScopedClusterClientFactory } from '../lib/wrap_scoped_cluster_client'; import { IExecutionStatusAndMetrics } from '../lib/rule_execution_status'; import { RuleRunMetricsStore } from '../lib/rule_run_metrics_store'; -import { wrapSearchSourceClient } from '../lib/wrap_search_source_client'; import { AlertingEventLogger } from '../lib/alerting_event_logger/alerting_event_logger'; import { - getRuleAttributes, + getDecryptedRule, RuleData, RuleDataResult, - ValidatedRuleData, - validateRule, + validateRuleAndCreateFakeRequest, } from './rule_loader'; import { TaskRunnerTimer, TaskRunnerTimerSpan } from './task_runner_timer'; import { RuleMonitoringService } from '../monitoring/rule_monitoring_service'; import { ILastRun, lastRunFromState, lastRunToRaw } from '../lib/last_run_status'; import { RunningHandler } from './running_handler'; import { RuleResultService } from '../monitoring/rule_result_service'; -import { LegacyAlertsClient } from '../alerts_client'; -import { IAlertsClient } from '../alerts_client/types'; import { MaintenanceWindow } from '../application/maintenance_window/types'; -import { getTimeRange } from '../lib/get_time_range'; +import { getMaintenanceWindows, filterMaintenanceWindowsIds } from './get_maintenance_windows'; +import { RuleTypeRunner } from './rule_type_runner'; +import { initializeAlertsClient } from '../alerts_client'; const FALLBACK_RETRY_INTERVAL = '5m'; const CONNECTIVITY_RETRY_INTERVAL = '5m'; -interface StackTraceLog { +export interface StackTraceLog { message: ElasticsearchError; stackTrace?: string; } @@ -149,7 +142,6 @@ export class TaskRunner< private readonly executionId: string; private readonly ruleTypeRegistry: RuleTypeRegistry; private readonly inMemoryMetrics: InMemoryMetrics; - private readonly maxAlerts: number; private timer: TaskRunnerTimer; private alertingEventLogger: AlertingEventLogger; private usageCounter?: UsageCounter; @@ -159,7 +151,19 @@ export class TaskRunner< private ruleMonitoring: RuleMonitoringService; private ruleRunning: RunningHandler; private ruleResult: RuleResultService; - private ruleData?: RuleDataResult>; + private ruleData?: RuleDataResult; + private maintenanceWindows: MaintenanceWindow[] = []; + private maintenanceWindowsWithoutScopedQueryIds: string[] = []; + private ruleTypeRunner: RuleTypeRunner< + Params, + ExtractedParams, + RuleState, + AlertState, + Context, + ActionGroupIds, + RecoveryActionGroupId, + AlertData + >; private runDate = new Date(); constructor({ @@ -189,7 +193,6 @@ export class TaskRunner< this.cancelled = false; this.executionId = uuidv4(); this.inMemoryMetrics = inMemoryMetrics; - this.maxAlerts = context.maxAlerts; this.timer = new TaskRunnerTimer({ logger: this.logger }); this.alertingEventLogger = new AlertingEventLogger(this.context.eventLogger); this.stackTraceLog = null; @@ -199,6 +202,21 @@ export class TaskRunner< this.logger, loggerId ); + this.ruleTypeRunner = new RuleTypeRunner< + Params, + ExtractedParams, + RuleState, + AlertState, + Context, + ActionGroupIds, + RecoveryActionGroupId, + AlertData + >({ + context: this.context, + logger: this.logger, + timer: this.timer, + ruleType: this.ruleType, + }); this.ruleResult = new RuleResultService(); } @@ -248,20 +266,6 @@ export class TaskRunner< return !this.context.cancelAlertsOnRuleTimeout || !this.ruleType.cancelAlertsOnRuleTimeout; } - private getAADRuleData(rule: SanitizedRule, spaceId: string) { - return { - consumer: rule.consumer, - executionId: this.executionId, - id: rule.id, - name: rule.name, - parameters: rule.params, - revision: rule.revision, - spaceId, - tags: rule.tags, - alertDelay: rule.alertDelay?.active ?? 0, - }; - } - // Usage counter for telemetry // This keeps track of how many times action executions were skipped after rule // execution completed successfully after the execution timeout @@ -296,337 +300,81 @@ export class TaskRunner< }); } - const { - alertTypeId: ruleTypeId, - consumer, - schedule, - throttle = null, - notifyWhen = null, - name, - tags, - createdBy, - updatedBy, - createdAt, - updatedAt, - enabled, - actions, - muteAll, - revision, - snoozeSchedule, - alertDelay, - } = rule; const { params: { alertId: ruleId, spaceId }, - state: { - alertInstances: alertRawInstances = {}, - alertRecoveredInstances: alertRecoveredRawInstances = {}, - alertTypeState: ruleTypeState = {}, - previousStartedAt, - }, + state: { previousStartedAt }, } = this.taskInstance; - const ruleRunMetricsStore = new RuleRunMetricsStore(); - - const namespace = this.context.spaceIdToNamespace(spaceId); - const ruleType = this.ruleTypeRegistry.get(ruleTypeId); - - const ruleLabel = `${this.ruleType.id}:${ruleId}: '${name}'`; - const rulesSettingsClient = this.context.getRulesSettingsClientWithRequest(fakeRequest); - const flappingSettings = await rulesSettingsClient.flapping().get(); - const queryDelaySettings = await rulesSettingsClient.queryDelay().get(); + const ruleRunMetricsStore = new RuleRunMetricsStore(); + const ruleLabel = `${this.ruleType.id}:${ruleId}: '${rule.name}'`; - const alertsClientParams = { - logger: this.logger, - ruleType: this.ruleType as UntypedNormalizedRuleType, + const ruleTypeRunnerContext = { + alertingEventLogger: this.alertingEventLogger, + flappingSettings: await rulesSettingsClient.flapping().get(), + namespace: this.context.spaceIdToNamespace(spaceId), + queryDelaySettings: await rulesSettingsClient.queryDelay().get(), + ruleId, + ruleLogPrefix: ruleLabel, + ruleRunMetricsStore, + spaceId, }; - - // Create AlertsClient if rule type has registered an alerts context - // with the framework. The AlertsClient will handle reading and - // writing from alerts-as-data indices and eventually - // we will want to migrate all the processing of alerts out - // of the LegacyAlertsClient and into the AlertsClient. - let alertsClient: IAlertsClient< + const alertsClient = await initializeAlertsClient< + Params, AlertData, AlertState, Context, ActionGroupIds, RecoveryActionGroupId - >; - - try { - const client = - (await this.context.alertsService?.createAlertsClient< - AlertData, - AlertState, - Context, - ActionGroupIds, - RecoveryActionGroupId - >({ - ...alertsClientParams, - namespace: namespace ?? DEFAULT_NAMESPACE_STRING, - rule: this.getAADRuleData(rule, spaceId), - })) ?? null; - - alertsClient = client - ? client - : new LegacyAlertsClient( - alertsClientParams - ); - } catch (err) { - this.logger.error( - `Error initializing AlertsClient for context ${this.ruleType.alerts?.context}. Using legacy alerts client instead. - ${err.message}` - ); - - alertsClient = new LegacyAlertsClient< - AlertState, - Context, - ActionGroupIds, - RecoveryActionGroupId - >(alertsClientParams); - } - - await alertsClient.initializeExecution({ - maxAlerts: this.maxAlerts, - ruleLabel, - flappingSettings, - startedAt: this.taskInstance.startedAt!, - activeAlertsFromState: alertRawInstances, - recoveredAlertsFromState: alertRecoveredRawInstances, + >({ + alertsService: this.context.alertsService, + context: ruleTypeRunnerContext, + executionId: this.executionId, + logger: this.logger, + maxAlerts: this.context.maxAlerts, + rule, + ruleType: this.ruleType as UntypedNormalizedRuleType, + taskInstance: this.taskInstance, }); - - const wrappedClientOptions = { - rule: { + const executorServices = await getExecutorServices({ + context: this.context, + fakeRequest, + abortController: this.searchAbortController, + logger: this.logger, + ruleMonitoringService: this.ruleMonitoring, + ruleResultService: this.ruleResult, + ruleData: { name: rule.name, alertTypeId: rule.alertTypeId, id: rule.id, spaceId, }, - logger: this.logger, - abortController: this.searchAbortController, - // Set the ES request timeout to the rule task timeout - requestTimeout: getEsRequestTimeout(this.logger, this.ruleType.ruleTaskTimeout), - }; - const scopedClusterClient = this.context.elasticsearch.client.asScoped(fakeRequest); - const wrappedScopedClusterClient = createWrappedScopedClusterClientFactory({ - ...wrappedClientOptions, - scopedClusterClient, - }); - const searchSourceClient = await this.context.data.search.searchSource.asScoped(fakeRequest); - const wrappedSearchSourceClient = wrapSearchSourceClient({ - ...wrappedClientOptions, - searchSourceClient, - }); - const maintenanceWindowClient = this.context.getMaintenanceWindowClientWithRequest(fakeRequest); - - let activeMaintenanceWindows: MaintenanceWindow[] = []; - try { - activeMaintenanceWindows = await maintenanceWindowClient.getActiveMaintenanceWindows(); - } catch (err) { - this.logger.error( - `error getting active maintenance window for ${ruleTypeId}:${ruleId} ${err.message}` - ); - } - - const maintenanceWindows = activeMaintenanceWindows.filter(({ categoryIds }) => { - // If category IDs array doesn't exist: allow all - if (!Array.isArray(categoryIds)) { - return true; - } - // If category IDs array exist: check category - if ((categoryIds as string[]).includes(ruleType.category)) { - return true; - } - return false; - }); - - const maintenanceWindowsWithoutScopedQuery = maintenanceWindows.filter( - ({ scopedQuery }) => !scopedQuery - ); - - const maintenanceWindowsWithoutScopedQueryIds = maintenanceWindowsWithoutScopedQuery.map( - ({ id }) => id - ); - - // Set the event log MW Id field the first time with MWs without scoped queries - if (maintenanceWindowsWithoutScopedQuery.length) { - this.alertingEventLogger.setMaintenanceWindowIds(maintenanceWindowsWithoutScopedQueryIds); - } - - const { updatedRuleTypeState } = await this.timer.runWithTimer( - TaskRunnerTimerSpan.RuleTypeRun, - async () => { - const checkHasReachedAlertLimit = () => { - const reachedLimit = alertsClient.hasReachedAlertLimit() || false; - if (reachedLimit) { - this.logger.warn( - `rule execution generated greater than ${this.maxAlerts} alerts: ${ruleLabel}` - ); - ruleRunMetricsStore.setHasReachedAlertLimit(true); - } - return reachedLimit; - }; - - let executorResult: { state: RuleState } | undefined; - try { - const ctx = { - type: 'alert', - name: `execute ${rule.alertTypeId}`, - id: ruleId, - description: `execute [${rule.alertTypeId}] with name [${name}] in [${ - namespace ?? 'default' - }] namespace`, - }; - - const savedObjectsClient = this.context.savedObjects.getScopedClient(fakeRequest, { - includedHiddenTypes: [RULE_SAVED_OBJECT_TYPE, 'action'], - }); - - const dataViews = await this.context.dataViews.dataViewsServiceFactory( - savedObjectsClient, - scopedClusterClient.asInternalUser - ); - - executorResult = await this.context.executionContext.withContext(ctx, () => - this.ruleType.executor({ - executionId: this.executionId, - services: { - savedObjectsClient, - searchSourceClient: wrappedSearchSourceClient.searchSourceClient, - uiSettingsClient: this.context.uiSettings.asScopedToClient(savedObjectsClient), - scopedClusterClient: wrappedScopedClusterClient.client(), - alertFactory: alertsClient.factory(), - alertsClient: alertsClient.client(), - shouldWriteAlerts: () => this.shouldLogAndScheduleActionsForAlerts(), - shouldStopExecution: () => this.cancelled, - ruleMonitoringService: this.ruleMonitoring.getLastRunMetricsSetters(), - dataViews, - share: this.context.share, - ruleResultService: this.ruleResult.getLastRunSetters(), - }, - params, - state: ruleTypeState as RuleState, - startedAt: this.taskInstance.startedAt!, - previousStartedAt: previousStartedAt ? new Date(previousStartedAt) : null, - spaceId, - namespace, - rule: { - id: ruleId, - name, - tags, - consumer, - producer: ruleType.producer, - revision, - ruleTypeId: rule.alertTypeId, - ruleTypeName: ruleType.name, - enabled, - schedule, - actions, - createdBy, - updatedBy, - createdAt, - updatedAt, - throttle, - notifyWhen, - muteAll, - snoozeSchedule, - alertDelay, - }, - logger: this.logger, - flappingSettings, - ...(maintenanceWindowsWithoutScopedQueryIds.length - ? { maintenanceWindowIds: maintenanceWindowsWithoutScopedQueryIds } - : {}), - getTimeRange: (timeWindow) => - getTimeRange(this.logger, queryDelaySettings, timeWindow), - }) - ); - - // Rule type execution has successfully completed - // Check that the rule type either never requested the max alerts limit - // or requested it and then reported back whether it exceeded the limit - // If neither of these apply, this check will throw an error - // These errors should show up during rule type development - alertsClient.checkLimitUsage(); - } catch (err) { - // Check if this error is due to reaching the alert limit - if (!checkHasReachedAlertLimit()) { - this.alertingEventLogger.setExecutionFailed( - `rule execution failure: ${ruleLabel}`, - err.message - ); - this.stackTraceLog = { - message: err, - stackTrace: err.stack, - }; - throw createTaskRunError( - new ErrorWithReason(RuleExecutionStatusErrorReasons.Execute, err), - TaskErrorSource.USER - ); - } - } - - // Check if the rule type has reported that it reached the alert limit - checkHasReachedAlertLimit(); - - this.alertingEventLogger.setExecutionSucceeded(`rule executed: ${ruleLabel}`); - ruleRunMetricsStore.setSearchMetrics([ - wrappedScopedClusterClient.getMetrics(), - wrappedSearchSourceClient.getMetrics(), - ]); - - return { - updatedRuleTypeState: executorResult?.state || undefined, - }; - } - ); - - await this.timer.runWithTimer(TaskRunnerTimerSpan.ProcessAlerts, async () => { - alertsClient.processAlerts({ - flappingSettings, - notifyOnActionGroupChange: - notifyWhen === RuleNotifyWhen.CHANGE || - some(actions, (action) => action.frequency?.notifyWhen === RuleNotifyWhen.CHANGE), - maintenanceWindowIds: maintenanceWindowsWithoutScopedQueryIds, - alertDelay: alertDelay?.active ?? 0, - ruleRunMetricsStore, - }); + ruleTaskTimeout: this.ruleType.ruleTaskTimeout, }); - await this.timer.runWithTimer(TaskRunnerTimerSpan.PersistAlerts, async () => { - await alertsClient.persistAlerts(); + const { + state: updatedRuleTypeState, + error, + stackTrace, + } = await this.ruleTypeRunner.run({ + context: ruleTypeRunnerContext, + alertsClient, + executionId: this.executionId, + executorServices, + maintenanceWindows: this.maintenanceWindows, + maintenanceWindowsWithoutScopedQueryIds: this.maintenanceWindowsWithoutScopedQueryIds, + rule, + startedAt: this.taskInstance.startedAt!, + state: this.taskInstance.state, + validatedParams: params, }); - let updateAlertsMaintenanceWindowResult = null; - - try { - updateAlertsMaintenanceWindowResult = - await alertsClient.updateAlertsMaintenanceWindowIdByScopedQuery?.({ - ruleId: rule.id, - spaceId, - executionUuid: this.executionId, - maintenanceWindows, - }); - } catch (e) { - this.logger.debug( - `Failed to update alert matched by maintenance window scoped query for rule ${ruleLabel}.` - ); - } - - // Set the event log MW ids again, this time including the ids that matched alerts with - // scoped query - if (updateAlertsMaintenanceWindowResult?.maintenanceWindowIds) { - this.alertingEventLogger.setMaintenanceWindowIds( - updateAlertsMaintenanceWindowResult.maintenanceWindowIds - ); + // if there was an error, save the stack trace and throw + if (error) { + this.stackTraceLog = stackTrace ?? null; + throw error; } - alertsClient.logAlerts({ - eventLogger: this.alertingEventLogger, - ruleRunMetricsStore, - shouldLogAlerts: this.shouldLogAndScheduleActionsForAlerts(), - }); - const executionHandler = new ExecutionHandler({ rule, ruleType: this.ruleType, @@ -684,170 +432,259 @@ export class TaskRunner< } /** - * Initialize event logger, load and validate the rule + * Before we actually run the rule: + * - start the RunningHandler + * - initialize the event logger + * - if rule data not loaded, load it + * - set the current APM transaction info + * - validate that rule type is enabled and params are valid + * - initialize monitoring data + * - clear expired snoozes */ - private async prepareToRun(): Promise> { - if (!this.ruleData) { - this.ruleData = await this.loadIndirectParams(); - } + private async prepareToRun(): Promise> { + return await this.timer.runWithTimer(TaskRunnerTimerSpan.PrepareToRun, async () => { + const { + params: { alertId: ruleId, spaceId }, + startedAt, + } = this.taskInstance; + + if (apm.currentTransaction) { + apm.currentTransaction.name = `Execute Alerting Rule`; + apm.currentTransaction.addLabels({ + alerting_rule_space_id: spaceId, + alerting_rule_id: ruleId, + }); + } - const { - params: { alertId: ruleId, spaceId, consumer }, - } = this.taskInstance; + this.ruleRunning.start(ruleId, this.context.spaceIdToNamespace(spaceId)); + this.logger.debug( + `executing rule ${this.ruleType.id}:${ruleId} at ${this.runDate.toISOString()}` + ); - if (apm.currentTransaction) { - apm.currentTransaction.name = `Execute Alerting Rule`; - apm.currentTransaction.addLabels({ - alerting_rule_space_id: spaceId, - alerting_rule_id: ruleId, + if (startedAt) { + // Capture how long it took for the rule to start running after being claimed + this.timer.setDuration(TaskRunnerTimerSpan.StartTaskRun, startedAt); + } + + // Load rule SO (indirect task params) if necessary + if (!this.ruleData) { + this.ruleData = await this.loadIndirectParams(); + } + + const runRuleParams = validateRuleAndCreateFakeRequest({ + ruleData: this.ruleData, + paramValidator: this.ruleType.validate.params, + ruleId, + spaceId, + context: this.context, + ruleTypeRegistry: this.ruleTypeRegistry, }); - } - // Initially use consumer as stored inside the task instance - // Replace this with consumer as read from the rule saved object after - // we successfully read the rule SO. This allows us to populate a consumer - // value for `execute-start` events (which are written before the rule SO is read) - // and in the event of decryption errors (where we cannot read the rule SO) - // Because "consumer" is set when a rule is created, this value should be static - // for the life of a rule but there may be edge cases where migrations cause - // the consumer values to become out of sync. - if (consumer) { - this.ruleConsumer = consumer; - } + // Update the consumer + this.ruleConsumer = runRuleParams.rule.consumer; - const namespace = this.context.spaceIdToNamespace(spaceId); + // Update the rule name + this.alertingEventLogger.setRuleName(runRuleParams.rule.name); - this.alertingEventLogger.initialize({ - ruleId, - ruleType: this.ruleType as UntypedNormalizedRuleType, - consumer: this.ruleConsumer!, - spaceId, - executionId: this.executionId, - taskScheduledAt: this.taskInstance.scheduledAt, - ...(namespace ? { namespace } : {}), - }); + // Set rule monitoring data + this.ruleMonitoring.setMonitoring(runRuleParams.rule.monitoring); - this.alertingEventLogger.start(this.runDate); + // Load the maintenance windows + this.maintenanceWindows = await getMaintenanceWindows({ + context: this.context, + fakeRequest: runRuleParams.fakeRequest, + logger: this.logger, + ruleTypeId: this.ruleType.id, + ruleId, + ruleTypeCategory: this.ruleType.category, + }); - return validateRule({ - alertingEventLogger: this.alertingEventLogger, - ruleData: this.ruleData, - paramValidator: this.ruleType.validate.params, - ruleId, - spaceId, - context: this.context, - ruleTypeRegistry: this.ruleTypeRegistry, + // Set the event log MW Id field the first time with MWs without scoped queries + this.maintenanceWindowsWithoutScopedQueryIds = filterMaintenanceWindowsIds({ + maintenanceWindows: this.maintenanceWindows, + withScopedQuery: false, + }); + + if (this.maintenanceWindowsWithoutScopedQueryIds.length) { + this.alertingEventLogger.setMaintenanceWindowIds( + this.maintenanceWindowsWithoutScopedQueryIds + ); + } + + (async () => { + try { + await runRuleParams.rulesClient.clearExpiredSnoozes({ + rule: runRuleParams.rule, + version: runRuleParams.version, + }); + } catch (e) { + // Most likely a 409 conflict error, which is ok, we'll try again at the next rule run + this.logger.debug(`Failed to clear expired snoozes: ${e.message}`); + } + })(); + + return runRuleParams; }); } private async processRunResults({ - nextRun, + schedule, stateWithMetrics, }: { - nextRun: string | null; + schedule: Result; stateWithMetrics: Result; }) { - const { - params: { alertId: ruleId, spaceId }, - } = this.taskInstance; + const { executionStatus: execStatus, executionMetrics: execMetrics } = + await this.timer.runWithTimer(TaskRunnerTimerSpan.ProcessRuleRun, async () => { + const { + params: { alertId: ruleId, spaceId }, + startedAt, + schedule: taskSchedule, + } = this.taskInstance; - const namespace = this.context.spaceIdToNamespace(spaceId); + let nextRun: string | null = null; + if (isOk(schedule)) { + nextRun = getNextRun({ startDate: startedAt, interval: schedule.value.interval }); + } else if (taskSchedule) { + nextRun = getNextRun({ startDate: startedAt, interval: taskSchedule.interval }); + } - // Getting executionStatus for backwards compatibility - const { status: executionStatus } = map< - RuleTaskStateAndMetrics, - ElasticsearchError, - IExecutionStatusAndMetrics - >( - stateWithMetrics, - (ruleRunStateWithMetrics) => executionStatusFromState(ruleRunStateWithMetrics, this.runDate), - (err: ElasticsearchError) => executionStatusFromError(err, this.runDate) - ); + const namespace = this.context.spaceIdToNamespace(spaceId); - // New consolidated statuses for lastRun - const { lastRun, metrics: executionMetrics } = map< - RuleTaskStateAndMetrics, - ElasticsearchError, - ILastRun - >( - stateWithMetrics, - (ruleRunStateWithMetrics) => lastRunFromState(ruleRunStateWithMetrics, this.ruleResult), - (err: ElasticsearchError) => lastRunFromError(err) - ); + // Getting executionStatus for backwards compatibility + const { status: executionStatus } = map< + RuleTaskStateAndMetrics, + ElasticsearchError, + IExecutionStatusAndMetrics + >( + stateWithMetrics, + (ruleRunStateWithMetrics) => + executionStatusFromState(ruleRunStateWithMetrics, this.runDate), + (err: ElasticsearchError) => executionStatusFromError(err, this.runDate) + ); - if (apm.currentTransaction) { - if (executionStatus.status === 'ok' || executionStatus.status === 'active') { - apm.currentTransaction.setOutcome('success'); - } else if (executionStatus.status === 'error' || executionStatus.status === 'unknown') { - apm.currentTransaction.setOutcome('failure'); - } else if (lastRun.outcome === 'succeeded') { - apm.currentTransaction.setOutcome('success'); - } else if (lastRun.outcome === 'failed') { - apm.currentTransaction.setOutcome('failure'); - } - } + // New consolidated statuses for lastRun + const { lastRun, metrics: executionMetrics } = map< + RuleTaskStateAndMetrics, + ElasticsearchError, + ILastRun + >( + stateWithMetrics, + (ruleRunStateWithMetrics) => lastRunFromState(ruleRunStateWithMetrics, this.ruleResult), + (err: ElasticsearchError) => lastRunFromError(err) + ); - this.logger.debug( - `deprecated ruleRunStatus for ${this.ruleType.id}:${ruleId}: ${JSON.stringify( - executionStatus - )}` - ); - this.logger.debug( - `ruleRunStatus for ${this.ruleType.id}:${ruleId}: ${JSON.stringify(lastRun)}` - ); - if (executionMetrics) { - this.logger.debug( - `ruleRunMetrics for ${this.ruleType.id}:${ruleId}: ${JSON.stringify(executionMetrics)}` - ); - } + if (apm.currentTransaction) { + if (executionStatus.status === 'ok' || executionStatus.status === 'active') { + apm.currentTransaction.setOutcome('success'); + } else if (executionStatus.status === 'error' || executionStatus.status === 'unknown') { + apm.currentTransaction.setOutcome('failure'); + } else if (lastRun.outcome === 'succeeded') { + apm.currentTransaction.setOutcome('success'); + } else if (lastRun.outcome === 'failed') { + apm.currentTransaction.setOutcome('failure'); + } + } - // set start and duration based on event log - const { start, duration } = this.alertingEventLogger.getStartAndDuration(); - if (null != start) { - executionStatus.lastExecutionDate = start; - } - if (null != duration) { - executionStatus.lastDuration = nanosToMillis(duration); - } + this.logger.debug( + `deprecated ruleRunStatus for ${this.ruleType.id}:${ruleId}: ${JSON.stringify( + executionStatus + )}` + ); + this.logger.debug( + `ruleRunStatus for ${this.ruleType.id}:${ruleId}: ${JSON.stringify(lastRun)}` + ); + if (executionMetrics) { + this.logger.debug( + `ruleRunMetrics for ${this.ruleType.id}:${ruleId}: ${JSON.stringify(executionMetrics)}` + ); + } - // if executionStatus indicates an error, fill in fields in - this.ruleMonitoring.addHistory({ - duration: executionStatus.lastDuration, - hasError: executionStatus.error != null, - runDate: this.runDate, - }); + // set start and duration based on event log + const { start, duration } = this.alertingEventLogger.getStartAndDuration(); + if (null != start) { + executionStatus.lastExecutionDate = start; + } + if (null != duration) { + executionStatus.lastDuration = nanosToMillis(duration); + } - if (!this.cancelled) { - this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_EXECUTIONS); - if (lastRun.outcome === 'failed') { - this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_FAILURES); - } else if (executionStatus.error) { - this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_FAILURES); - } - this.logger.debug( - `Updating rule task for ${this.ruleType.id} rule with id ${ruleId} - ${JSON.stringify( - executionStatus - )} - ${JSON.stringify(lastRun)}` - ); - await this.updateRuleSavedObjectPostRun(ruleId, namespace, { - executionStatus: ruleExecutionStatusToRaw(executionStatus), - nextRun, - lastRun: lastRunToRaw(lastRun), - monitoring: this.ruleMonitoring.getMonitoring() as RawRuleMonitoring, + // if executionStatus indicates an error, fill in fields in + this.ruleMonitoring.addHistory({ + duration: executionStatus.lastDuration, + hasError: executionStatus.error != null, + runDate: this.runDate, + }); + + if (!this.cancelled) { + this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_EXECUTIONS); + if (lastRun.outcome === 'failed') { + this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_FAILURES); + } else if (executionStatus.error) { + this.inMemoryMetrics.increment(IN_MEMORY_METRICS.RULE_FAILURES); + } + this.logger.debug( + `Updating rule task for ${this.ruleType.id} rule with id ${ruleId} - ${JSON.stringify( + executionStatus + )} - ${JSON.stringify(lastRun)}` + ); + await this.updateRuleSavedObjectPostRun(ruleId, namespace, { + executionStatus: ruleExecutionStatusToRaw(executionStatus), + nextRun, + lastRun: lastRunToRaw(lastRun), + monitoring: this.ruleMonitoring.getMonitoring() as RawRuleMonitoring, + }); + } + + if (startedAt) { + // Capture how long it took for the rule to run after being claimed + this.timer.setDuration(TaskRunnerTimerSpan.TotalRunDuration, startedAt); + } + + return { executionStatus, executionMetrics }; }); - } - return { executionStatus, executionMetrics }; + this.alertingEventLogger.done({ + status: execStatus, + metrics: execMetrics, + timings: this.timer.toJson(), + }); } - async loadIndirectParams(): Promise>> { + async loadIndirectParams(): Promise> { this.runDate = new Date(); return await this.timer.runWithTimer(TaskRunnerTimerSpan.PrepareRule, async () => { try { const { - params: { alertId: ruleId, spaceId }, + params: { alertId: ruleId, spaceId, consumer }, } = this.taskInstance; - const data = await getRuleAttributes(this.context, ruleId, spaceId); + + // Initially use consumer as stored inside the task instance + // This allows us to populate a consumer value for event log + // `execute-start` events (which are indexed before the rule SO is read) + // and in the event of decryption errors (where we cannot read the rule SO) + // Because "consumer" is set when a rule is created, this value should be static + // for the life of a rule but there may be edge cases where migrations cause + // the consumer values to become out of sync. + if (consumer) { + this.ruleConsumer = consumer; + } + + // Start the event logger so that something is logged in the + // event that rule SO decryption fails. + const namespace = this.context.spaceIdToNamespace(spaceId); + this.alertingEventLogger.initialize({ + ruleId, + ruleType: this.ruleType as UntypedNormalizedRuleType, + consumer: this.ruleConsumer!, + spaceId, + executionId: this.executionId, + taskScheduledAt: this.taskInstance.scheduledAt, + ...(namespace ? { namespace } : {}), + }); + this.alertingEventLogger.start(this.runDate); + + const data = await getDecryptedRule(this.context, ruleId, spaceId); this.ruleData = { data }; } catch (err) { const error = createTaskRunError( @@ -868,62 +705,22 @@ export class TaskRunner< schedule: taskSchedule, } = this.taskInstance; - this.ruleRunning.start(ruleId, this.context.spaceIdToNamespace(spaceId)); - - this.logger.debug( - `executing rule ${this.ruleType.id}:${ruleId} at ${this.runDate.toISOString()}` - ); - - if (startedAt) { - // Capture how long it took for the rule to start running after being claimed - this.timer.setDuration(TaskRunnerTimerSpan.StartTaskRun, startedAt); - } - let stateWithMetrics: Result; let schedule: Result; try { - const preparedResult = await this.prepareToRun(); - - this.ruleMonitoring.setMonitoring(preparedResult.rule.monitoring); - - (async () => { - try { - await preparedResult.rulesClient.clearExpiredSnoozes({ - rule: preparedResult.rule, - version: preparedResult.version, - }); - } catch (e) { - // Most likely a 409 conflict error, which is ok, we'll try again at the next rule run - this.logger.debug(`Failed to clear expired snoozes: ${e.message}`); - } - })(); - - stateWithMetrics = asOk(await this.runRule(preparedResult)); + const validatedRuleData = await this.prepareToRun(); + stateWithMetrics = asOk(await this.runRule(validatedRuleData)); // fetch the rule again to ensure we return the correct schedule as it may have // changed during the task execution - const attributes = await getRuleAttributes(this.context, ruleId, spaceId); - schedule = asOk(attributes.rule.schedule); + const data = await getDecryptedRule(this.context, ruleId, spaceId); + schedule = asOk(data.indirectParams.schedule); } catch (err) { stateWithMetrics = asErr(err); schedule = asErr(err); } - let nextRun: string | null = null; - if (isOk(schedule)) { - nextRun = getNextRun({ startDate: startedAt, interval: schedule.value.interval }); - } else if (taskSchedule) { - nextRun = getNextRun({ startDate: startedAt, interval: taskSchedule.interval }); - } - - const { executionStatus, executionMetrics } = await this.timer.runWithTimer( - TaskRunnerTimerSpan.ProcessRuleRun, - async () => - this.processRunResults({ - nextRun, - stateWithMetrics, - }) - ); + await this.processRunResults({ schedule, stateWithMetrics }); const transformRunStateToTaskState = ( runStateWithMetrics: RuleTaskStateAndMetrics @@ -934,17 +731,6 @@ export class TaskRunner< }; }; - if (startedAt) { - // Capture how long it took for the rule to run after being claimed - this.timer.setDuration(TaskRunnerTimerSpan.TotalRunDuration, startedAt); - } - - this.alertingEventLogger.done({ - status: executionStatus, - metrics: executionMetrics, - timings: this.timer.toJson(), - }); - const getTaskRunError = (state: Result) => { return isErr(state) ? { @@ -1010,6 +796,7 @@ export class TaskRunner< } this.cancelled = true; + this.ruleTypeRunner.cancelRun(); // Write event log entry const { diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_alerts_client.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_alerts_client.test.ts index 246215ba9a154..ed58d75dc1038 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_alerts_client.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_alerts_client.test.ts @@ -17,7 +17,7 @@ import { RuleAlertData, } from '../types'; import { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server'; -import { TaskRunnerContext } from './task_runner_factory'; +import { TaskRunnerContext } from './types'; import { TaskRunner } from './task_runner'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts index 8d7a8857a0e9a..9a7367533b7c8 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_cancel.test.ts @@ -17,7 +17,6 @@ import { RuleAlertData, } from '../types'; import { ConcreteTaskInstance } from '@kbn/task-manager-plugin/server'; -import { TaskRunnerContext } from './task_runner_factory'; import { TaskRunner } from './task_runner'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { @@ -59,6 +58,7 @@ import { rulesSettingsClientMock } from '../rules_settings_client.mock'; import { maintenanceWindowClientMock } from '../maintenance_window_client.mock'; import { alertsServiceMock } from '../alerts_service/alerts_service.mock'; import { RULE_SAVED_OBJECT_TYPE } from '../saved_objects'; +import { TaskRunnerContext } from './types'; jest.mock('uuid', () => ({ v4: () => '5f6aa57d-3e22-484e-bae8-cbed868f4d28', @@ -531,6 +531,7 @@ describe('Task Runner Cancel', () => { claim_to_start_duration_ms: 0, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, + prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts index 8f40fe026c7a7..8b3d3c7b6e27d 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_factory.test.ts @@ -8,7 +8,7 @@ import sinon from 'sinon'; import { usageCountersServiceMock } from '@kbn/usage-collection-plugin/server/usage_counters/usage_counters_service.mock'; import { ConcreteTaskInstance, TaskStatus } from '@kbn/task-manager-plugin/server'; -import { TaskRunnerContext, TaskRunnerFactory } from './task_runner_factory'; +import { TaskRunnerFactory } from './task_runner_factory'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { loggingSystemMock, @@ -33,6 +33,7 @@ import { rulesSettingsClientMock } from '../rules_settings_client.mock'; import { maintenanceWindowClientMock } from '../maintenance_window_client.mock'; import { alertsServiceMock } from '../alerts_service/alerts_service.mock'; import { schema } from '@kbn/config-schema'; +import { TaskRunnerContext } from './types'; const inMemoryMetrics = inMemoryMetricsMock.create(); const executionContext = executionContextServiceMock.createSetupContract(); diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts index dd2ca5ddaa2cb..e8860ec5cf565 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_factory.ts @@ -5,70 +5,18 @@ * 2.0. */ -import { UsageCounter } from '@kbn/usage-collection-plugin/server'; -import type { - Logger, - KibanaRequest, - ISavedObjectsRepository, - IBasePath, - ExecutionContextStart, - SavedObjectsServiceStart, - ElasticsearchServiceStart, - UiSettingsServiceStart, -} from '@kbn/core/server'; -import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; import { RunContext } from '@kbn/task-manager-plugin/server'; -import { EncryptedSavedObjectsClient } from '@kbn/encrypted-saved-objects-plugin/server'; -import { PluginStartContract as ActionsPluginStartContract } from '@kbn/actions-plugin/server'; -import { IEventLogger } from '@kbn/event-log-plugin/server'; -import { PluginStart as DataPluginStart } from '@kbn/data-plugin/server'; -import { SharePluginStart } from '@kbn/share-plugin/server'; import { RuleAlertData, RuleTypeParams, - RuleTypeRegistry, - SpaceIdToNamespaceFunction, RuleTypeState, AlertInstanceState, AlertInstanceContext, - RulesClientApi, - RulesSettingsClientApi, - MaintenanceWindowClientApi, } from '../types'; import { TaskRunner } from './task_runner'; import { NormalizedRuleType } from '../rule_type_registry'; import { InMemoryMetrics } from '../monitoring'; -import { ActionsConfigMap } from '../lib/get_actions_config_map'; -import { AlertsService } from '../alerts_service/alerts_service'; - -export interface TaskRunnerContext { - logger: Logger; - data: DataPluginStart; - dataViews: DataViewsPluginStart; - share: SharePluginStart; - savedObjects: SavedObjectsServiceStart; - uiSettings: UiSettingsServiceStart; - elasticsearch: ElasticsearchServiceStart; - getRulesClientWithRequest(request: KibanaRequest): RulesClientApi; - actionsPlugin: ActionsPluginStartContract; - eventLogger: IEventLogger; - encryptedSavedObjectsClient: EncryptedSavedObjectsClient; - executionContext: ExecutionContextStart; - spaceIdToNamespace: SpaceIdToNamespaceFunction; - basePathService: IBasePath; - internalSavedObjectsRepository: ISavedObjectsRepository; - ruleTypeRegistry: RuleTypeRegistry; - alertsService: AlertsService | null; - kibanaBaseUrl: string | undefined; - supportsEphemeralTasks: boolean; - maxEphemeralActionsPerRule: number; - maxAlerts: number; - actionsConfigMap: ActionsConfigMap; - cancelAlertsOnRuleTimeout: boolean; - usageCounter?: UsageCounter; - getRulesSettingsClientWithRequest(request: KibanaRequest): RulesSettingsClientApi; - getMaintenanceWindowClientWithRequest(request: KibanaRequest): MaintenanceWindowClientApi; -} +import { TaskRunnerContext } from './types'; export class TaskRunnerFactory { private isInitialized = false; diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts index 3cabaa1fe0450..137f1f747c42e 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.test.ts @@ -34,6 +34,7 @@ describe('TaskRunnerTimer', () => { claim_to_start_duration_ms: 259200000, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, + prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, @@ -52,6 +53,7 @@ describe('TaskRunnerTimer', () => { claim_to_start_duration_ms: 432000000, persist_alerts_duration_ms: 0, prepare_rule_duration_ms: 0, + prepare_to_run_duration_ms: 0, process_alerts_duration_ms: 0, process_rule_duration_ms: 0, rule_type_run_duration_ms: 0, diff --git a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts index bcf07834acb66..237fe66793d1e 100644 --- a/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts +++ b/x-pack/plugins/alerting/server/task_runner/task_runner_timer.ts @@ -10,6 +10,7 @@ import { Logger } from '@kbn/core/server'; export enum TaskRunnerTimerSpan { StartTaskRun = 'claim_to_start_duration_ms', TotalRunDuration = 'total_run_duration_ms', + PrepareToRun = 'prepare_to_run_duration_ms', PrepareRule = 'prepare_rule_duration_ms', RuleTypeRun = 'rule_type_run_duration_ms', ProcessAlerts = 'process_alerts_duration_ms', @@ -60,6 +61,7 @@ export class TaskRunnerTimer { [TaskRunnerTimerSpan.StartTaskRun]: this.timings[TaskRunnerTimerSpan.StartTaskRun] ?? 0, [TaskRunnerTimerSpan.TotalRunDuration]: this.timings[TaskRunnerTimerSpan.TotalRunDuration] ?? 0, + [TaskRunnerTimerSpan.PrepareToRun]: this.timings[TaskRunnerTimerSpan.PrepareToRun] ?? 0, [TaskRunnerTimerSpan.PrepareRule]: this.timings[TaskRunnerTimerSpan.PrepareRule] ?? 0, [TaskRunnerTimerSpan.RuleTypeRun]: this.timings[TaskRunnerTimerSpan.RuleTypeRun] ?? 0, [TaskRunnerTimerSpan.ProcessAlerts]: this.timings[TaskRunnerTimerSpan.ProcessAlerts] ?? 0, diff --git a/x-pack/plugins/alerting/server/task_runner/types.ts b/x-pack/plugins/alerting/server/task_runner/types.ts index 33417bcfe9c44..5c80f7b083636 100644 --- a/x-pack/plugins/alerting/server/task_runner/types.ts +++ b/x-pack/plugins/alerting/server/task_runner/types.ts @@ -5,13 +5,29 @@ * 2.0. */ -import { KibanaRequest, Logger } from '@kbn/core/server'; +import type { + Logger, + KibanaRequest, + IBasePath, + ExecutionContextStart, + SavedObjectsServiceStart, + ElasticsearchServiceStart, + UiSettingsServiceStart, + ISavedObjectsRepository, +} from '@kbn/core/server'; import { ConcreteTaskInstance, DecoratedError } from '@kbn/task-manager-plugin/server'; import { PublicMethodsOf } from '@kbn/utility-types'; +import { PluginStartContract as ActionsPluginStartContract } from '@kbn/actions-plugin/server'; import { ActionsClient } from '@kbn/actions-plugin/server/actions_client'; +import { PluginStart as DataPluginStart } from '@kbn/data-plugin/server'; +import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; +import { EncryptedSavedObjectsClient } from '@kbn/encrypted-saved-objects-plugin/server'; +import { IEventLogger } from '@kbn/event-log-plugin/server'; +import { SharePluginStart } from '@kbn/share-plugin/server'; +import { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { IAlertsClient } from '../alerts_client/types'; import { Alert } from '../alert'; -import { TaskRunnerContext } from './task_runner_factory'; +import { AlertsService } from '../alerts_service/alerts_service'; import { AlertInstanceContext, AlertInstanceState, @@ -23,9 +39,20 @@ import { RuleTypeState, RuleAction, RuleAlertData, + RulesSettingsFlappingProperties, + RulesSettingsQueryDelayProperties, } from '../../common'; +import { ActionsConfigMap } from '../lib/get_actions_config_map'; import { NormalizedRuleType } from '../rule_type_registry'; -import { RawRule, RulesClientApi, CombinedSummarizedAlerts } from '../types'; +import { + CombinedSummarizedAlerts, + MaintenanceWindowClientApi, + RawRule, + RulesClientApi, + RulesSettingsClientApi, + RuleTypeRegistry, + SpaceIdToNamespaceFunction, +} from '../types'; import { RuleRunMetrics, RuleRunMetricsStore } from '../lib/rule_run_metrics_store'; import { AlertingEventLogger } from '../lib/alerting_event_logger/alerting_event_logger'; @@ -42,11 +69,12 @@ export type RuleTaskStateAndMetrics = RuleTaskState & { }; export interface RunRuleParams { + apiKey: RawRule['apiKey']; fakeRequest: KibanaRequest; - rulesClient: RulesClientApi; rule: SanitizedRule; - apiKey: RawRule['apiKey']; + rulesClient: RulesClientApi; validatedParams: Params; + version: string | undefined; } export interface RuleTaskInstance extends ConcreteTaskInstance { @@ -107,3 +135,43 @@ export type Executable< summarizedAlerts: CombinedSummarizedAlerts; } ); + +export interface RuleTypeRunnerContext { + alertingEventLogger: AlertingEventLogger; + flappingSettings: RulesSettingsFlappingProperties; + namespace?: string; + queryDelaySettings: RulesSettingsQueryDelayProperties; + ruleId: string; + ruleLogPrefix: string; + ruleRunMetricsStore: RuleRunMetricsStore; + spaceId: string; +} + +export interface TaskRunnerContext { + actionsConfigMap: ActionsConfigMap; + actionsPlugin: ActionsPluginStartContract; + alertsService: AlertsService | null; + basePathService: IBasePath; + cancelAlertsOnRuleTimeout: boolean; + data: DataPluginStart; + dataViews: DataViewsPluginStart; + elasticsearch: ElasticsearchServiceStart; + encryptedSavedObjectsClient: EncryptedSavedObjectsClient; + eventLogger: IEventLogger; + executionContext: ExecutionContextStart; + getMaintenanceWindowClientWithRequest(request: KibanaRequest): MaintenanceWindowClientApi; + getRulesClientWithRequest(request: KibanaRequest): RulesClientApi; + getRulesSettingsClientWithRequest(request: KibanaRequest): RulesSettingsClientApi; + internalSavedObjectsRepository: ISavedObjectsRepository; + kibanaBaseUrl: string | undefined; + logger: Logger; + maxAlerts: number; + maxEphemeralActionsPerRule: number; + ruleTypeRegistry: RuleTypeRegistry; + savedObjects: SavedObjectsServiceStart; + share: SharePluginStart; + spaceIdToNamespace: SpaceIdToNamespaceFunction; + supportsEphemeralTasks: boolean; + uiSettings: UiSettingsServiceStart; + usageCounter?: UsageCounter; +} diff --git a/x-pack/plugins/alerting/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json index ada9116393748..de830800f5aea 100644 --- a/x-pack/plugins/alerting/tsconfig.json +++ b/x-pack/plugins/alerting/tsconfig.json @@ -66,7 +66,9 @@ "@kbn/core-http-browser", "@kbn/core-saved-objects-api-server-mocks", "@kbn/core-ui-settings-server-mocks", - "@kbn/core-test-helpers-kbn-server" + "@kbn/core-test-helpers-kbn-server", + "@kbn/core-http-router-server-internal", + "@kbn/core-execution-context-server-mocks" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/cases/common/api/runtime_types.ts b/x-pack/plugins/cases/common/api/runtime_types.ts index bc8cd0401f129..79caebbaebba7 100644 --- a/x-pack/plugins/cases/common/api/runtime_types.ts +++ b/x-pack/plugins/cases/common/api/runtime_types.ts @@ -6,48 +6,14 @@ */ import * as rt from 'io-ts'; -import Boom from '@hapi/boom'; -import { fold } from 'fp-ts/lib/Either'; -import { identity } from 'fp-ts/lib/function'; -import { pipe } from 'fp-ts/lib/pipeable'; import type { JsonArray, JsonObject, JsonValue } from '@kbn/utility-types'; -import { exactCheck } from '@kbn/securitysolution-io-ts-utils/src/exact_check'; import { formatErrors } from '@kbn/securitysolution-io-ts-utils/src/format_errors'; - type ErrorFactory = (message: string) => Error; - -export const createPlainError = (message: string) => new Error(message); - export const throwErrors = (createError: ErrorFactory) => (errors: rt.Errors) => { throw createError(formatErrors(errors).join()); }; -export const throwBadRequestError = (errors: rt.Errors) => { - throw Boom.badRequest(formatErrors(errors).join()); -}; - -/** - * This function will throw if a required field is missing or an excess field is present. - * NOTE: This will only throw for an excess field if the type passed in leverages exact from io-ts. - */ -export const decodeWithExcessOrThrow = - (runtimeType: rt.Type) => - (inputValue: I): A => - pipe( - runtimeType.decode(inputValue), - (decoded) => exactCheck(inputValue, decoded), - fold(throwBadRequestError, identity) - ); - -/** - * This function will throw if a required field is missing. - */ -export const decodeOrThrow = - (runtimeType: rt.Type, createError: ErrorFactory = createPlainError) => - (inputValue: I) => - pipe(runtimeType.decode(inputValue), fold(throwErrors(createError), identity)); - export const jsonScalarRt = rt.union([rt.null, rt.boolean, rt.number, rt.string]); export const jsonValueRt: rt.Type = rt.recursion('JsonValue', () => diff --git a/x-pack/plugins/cases/common/utils/index.ts b/x-pack/plugins/cases/common/utils/index.ts index ef509fb8bfd86..b8be12831200e 100644 --- a/x-pack/plugins/cases/common/utils/index.ts +++ b/x-pack/plugins/cases/common/utils/index.ts @@ -7,4 +7,3 @@ export * from './connectors_api'; export * from './capabilities'; -export * from './validators'; diff --git a/x-pack/plugins/cases/server/client/attachments/add.ts b/x-pack/plugins/cases/server/client/attachments/add.ts index 5eba3d4b81f02..1fdf3bb4f8301 100644 --- a/x-pack/plugins/cases/server/client/attachments/add.ts +++ b/x-pack/plugins/cases/server/client/attachments/add.ts @@ -7,10 +7,9 @@ import { SavedObjectsUtils } from '@kbn/core/server'; -import { validateMaxUserActions } from '../../../common/utils'; import { AttachmentRequestRt } from '../../../common/types/api'; import type { Case } from '../../../common/types/domain'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow } from '../../common/runtime_types'; import { CaseCommentModel } from '../../common/models'; import { createCaseError } from '../../common/error'; import type { CasesClientArgs } from '..'; @@ -18,6 +17,7 @@ import { decodeCommentRequest } from '../utils'; import { Operations } from '../../authorization'; import type { AddArgs } from './types'; import { validateRegisteredAttachments } from './validators'; +import { validateMaxUserActions } from '../../common/validators'; /** * Create an attachment to a case. diff --git a/x-pack/plugins/cases/server/client/attachments/bulk_create.ts b/x-pack/plugins/cases/server/client/attachments/bulk_create.ts index 8e265ab9c88d5..aee3a8364bf2c 100644 --- a/x-pack/plugins/cases/server/client/attachments/bulk_create.ts +++ b/x-pack/plugins/cases/server/client/attachments/bulk_create.ts @@ -7,11 +7,10 @@ import { SavedObjectsUtils } from '@kbn/core/server'; -import { validateMaxUserActions } from '../../../common/utils'; import type { AttachmentRequest } from '../../../common/types/api'; import { BulkCreateAttachmentsRequestRt } from '../../../common/types/api'; import type { Case } from '../../../common/types/domain'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow } from '../../common/runtime_types'; import { CaseCommentModel } from '../../common/models'; import { createCaseError } from '../../common/error'; @@ -22,6 +21,7 @@ import type { OwnerEntity } from '../../authorization'; import { Operations } from '../../authorization'; import type { BulkCreateArgs } from './types'; import { validateRegisteredAttachments } from './validators'; +import { validateMaxUserActions } from '../../common/validators'; export const bulkCreate = async ( args: BulkCreateArgs, diff --git a/x-pack/plugins/cases/server/client/attachments/bulk_delete.ts b/x-pack/plugins/cases/server/client/attachments/bulk_delete.ts index 0d19963ec0dff..7db846a1fdf4d 100644 --- a/x-pack/plugins/cases/server/client/attachments/bulk_delete.ts +++ b/x-pack/plugins/cases/server/client/attachments/bulk_delete.ts @@ -15,7 +15,7 @@ import type { File, FileJSON } from '@kbn/files-plugin/common'; import type { FileServiceStart } from '@kbn/files-plugin/server'; import { FileNotFoundError } from '@kbn/files-plugin/server/file_service/errors'; import { BulkDeleteFileAttachmentsRequestRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow } from '../../common/runtime_types'; import { MAX_CONCURRENT_SEARCHES } from '../../../common/constants'; import type { CasesClientArgs } from '../types'; import { createCaseError } from '../../common/error'; diff --git a/x-pack/plugins/cases/server/client/attachments/bulk_get.ts b/x-pack/plugins/cases/server/client/attachments/bulk_get.ts index 0f957d8ed57c2..5537755bfb398 100644 --- a/x-pack/plugins/cases/server/client/attachments/bulk_get.ts +++ b/x-pack/plugins/cases/server/client/attachments/bulk_get.ts @@ -11,7 +11,6 @@ import { BulkGetAttachmentsRequestRt, BulkGetAttachmentsResponseRt, } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; import { flattenCommentSavedObjects } from '../../common/utils'; import { createCaseError, generateCaseErrorResponse } from '../../common/error'; import type { CasesClientArgs } from '../types'; @@ -21,7 +20,7 @@ import type { BulkOptionalAttributes, OptionalAttributes } from '../../services/ import type { CasesClient } from '../client'; import type { AttachmentSavedObject, SOWithErrors } from '../../common/types'; import { partitionByCaseAssociation } from '../../common/partitioning'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeOrThrow, decodeWithExcessOrThrow } from '../../common/runtime_types'; import type { AttachmentAttributes } from '../../../common/types/domain'; type AttachmentSavedObjectWithErrors = Array>; diff --git a/x-pack/plugins/cases/server/client/attachments/delete.ts b/x-pack/plugins/cases/server/client/attachments/delete.ts index e67a5788b3476..009562bf89a53 100644 --- a/x-pack/plugins/cases/server/client/attachments/delete.ts +++ b/x-pack/plugins/cases/server/client/attachments/delete.ts @@ -9,7 +9,7 @@ import Boom from '@hapi/boom'; import type { AlertAttachmentPayload } from '../../../common/types/domain'; import { UserActionActions, UserActionTypes } from '../../../common/types/domain'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { CASE_SAVED_OBJECT } from '../../../common/constants'; import { getAlertInfoFromComments, isCommentRequestTypeAlert } from '../../common/utils'; import type { CasesClientArgs } from '../types'; diff --git a/x-pack/plugins/cases/server/client/attachments/get.ts b/x-pack/plugins/cases/server/client/attachments/get.ts index c53a8eb348313..dac17d2863325 100644 --- a/x-pack/plugins/cases/server/client/attachments/get.ts +++ b/x-pack/plugins/cases/server/client/attachments/get.ts @@ -25,7 +25,7 @@ import type { CasesClientArgs } from '../types'; import type { FindCommentsArgs, GetAllAlertsAttachToCase, GetAllArgs, GetArgs } from './types'; import { CASE_COMMENT_SAVED_OBJECT, CASE_SAVED_OBJECT } from '../../../common/constants'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeOrThrow, decodeWithExcessOrThrow } from '../../common/runtime_types'; import { defaultSortField, transformComments, @@ -37,7 +37,6 @@ import { createCaseError } from '../../common/error'; import { DEFAULT_PAGE, DEFAULT_PER_PAGE } from '../../routes/api'; import { buildFilter, combineFilters } from '../utils'; import { Operations } from '../../authorization'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; import { AttachmentRt, AttachmentsRt } from '../../../common/types/domain'; const normalizeAlertResponse = ( diff --git a/x-pack/plugins/cases/server/client/attachments/update.ts b/x-pack/plugins/cases/server/client/attachments/update.ts index 5c1243b69a1df..1babdc090d6dd 100644 --- a/x-pack/plugins/cases/server/client/attachments/update.ts +++ b/x-pack/plugins/cases/server/client/attachments/update.ts @@ -7,18 +7,18 @@ import Boom from '@hapi/boom'; -import { validateMaxUserActions } from '../../../common/utils/validators'; import { AttachmentPatchRequestRt } from '../../../common/types/api'; import { CaseCommentModel } from '../../common/models'; import { createCaseError } from '../../common/error'; import { isCommentRequestTypeExternalReference } from '../../../common/utils/attachments'; import type { Case } from '../../../common/types/domain'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow } from '../../common/runtime_types'; import { CASE_SAVED_OBJECT } from '../../../common/constants'; import type { CasesClientArgs } from '..'; import { decodeCommentRequest } from '../utils'; import { Operations } from '../../authorization'; import type { UpdateArgs } from './types'; +import { validateMaxUserActions } from '../../common/validators'; /** * Update an attachment. diff --git a/x-pack/plugins/cases/server/client/cases/bulk_create.ts b/x-pack/plugins/cases/server/client/cases/bulk_create.ts index f118b9640a6f3..b94e16481a35a 100644 --- a/x-pack/plugins/cases/server/client/cases/bulk_create.ts +++ b/x-pack/plugins/cases/server/client/cases/bulk_create.ts @@ -13,14 +13,13 @@ import { SavedObjectsUtils } from '@kbn/core/server'; import type { Case, CustomFieldsConfiguration, User } from '../../../common/types/domain'; import { CaseSeverity, UserActionTypes } from '../../../common/types/domain'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { Operations } from '../../authorization'; import { createCaseError, isSODecoratedError, isSOError } from '../../common/error'; import { flattenCaseSavedObject, transformNewCase } from '../../common/utils'; import type { CasesClient, CasesClientArgs } from '..'; import { LICENSING_CASE_ASSIGNMENT_FEATURE } from '../../common/constants'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; import type { BulkCreateCasesRequest, BulkCreateCasesResponse, diff --git a/x-pack/plugins/cases/server/client/cases/bulk_get.ts b/x-pack/plugins/cases/server/client/cases/bulk_get.ts index dd39ee47f8881..6cff7e51d3b3a 100644 --- a/x-pack/plugins/cases/server/client/cases/bulk_get.ts +++ b/x-pack/plugins/cases/server/client/cases/bulk_get.ts @@ -10,14 +10,13 @@ import { partition } from 'lodash'; import type { CaseAttributes } from '../../../common/types/domain'; import type { CasesBulkGetRequest, CasesBulkGetResponse } from '../../../common/types/api'; import { CasesBulkGetResponseRt, CasesBulkGetRequestRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { createCaseError, generateCaseErrorResponse } from '../../common/error'; import { flattenCaseSavedObject } from '../../common/utils'; import type { CasesClientArgs } from '../types'; import { Operations } from '../../authorization'; import type { CaseSavedObjectTransformed } from '../../common/types/case'; import type { SOWithErrors } from '../../common/types'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; type CaseSavedObjectWithErrors = Array>; diff --git a/x-pack/plugins/cases/server/client/cases/create.ts b/x-pack/plugins/cases/server/client/cases/create.ts index 4e548d07a2ef6..b1d444ec2a3c5 100644 --- a/x-pack/plugins/cases/server/client/cases/create.ts +++ b/x-pack/plugins/cases/server/client/cases/create.ts @@ -6,19 +6,17 @@ */ import Boom from '@hapi/boom'; - import { SavedObjectsUtils } from '@kbn/core/server'; import type { Case } from '../../../common/types/domain'; import { CaseSeverity, UserActionTypes, CaseRt } from '../../../common/types/domain'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { Operations } from '../../authorization'; import { createCaseError } from '../../common/error'; import { flattenCaseSavedObject, transformNewCase } from '../../common/utils'; import type { CasesClient, CasesClientArgs } from '..'; import { LICENSING_CASE_ASSIGNMENT_FEATURE } from '../../common/constants'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; import type { CasePostRequest } from '../../../common/types/api'; import { CasePostRequestRt } from '../../../common/types/api'; import {} from '../utils'; diff --git a/x-pack/plugins/cases/server/client/cases/delete.ts b/x-pack/plugins/cases/server/client/cases/delete.ts index f0f632eb8f263..9ca71cc3836da 100644 --- a/x-pack/plugins/cases/server/client/cases/delete.ts +++ b/x-pack/plugins/cases/server/client/cases/delete.ts @@ -11,7 +11,7 @@ import type { SavedObjectsBulkDeleteObject } from '@kbn/core/server'; import type { FileServiceStart } from '@kbn/files-plugin/server'; import type { CasesDeleteRequest } from '../../../common/types/api'; import { CasesDeleteRequestRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow } from '../../common/runtime_types'; import { CASE_COMMENT_SAVED_OBJECT, CASE_SAVED_OBJECT, diff --git a/x-pack/plugins/cases/server/client/cases/get.ts b/x-pack/plugins/cases/server/client/cases/get.ts index 42366cfcee879..e950ab6652105 100644 --- a/x-pack/plugins/cases/server/client/cases/get.ts +++ b/x-pack/plugins/cases/server/client/cases/get.ts @@ -26,7 +26,7 @@ import { GetReportersResponseRt, GetTagsResponseRt, } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { createCaseError } from '../../common/error'; import { countAlertsForID, flattenCaseSavedObject, countUserAttachments } from '../../common/utils'; import type { CasesClientArgs } from '..'; @@ -37,7 +37,6 @@ import type { CaseSavedObjectTransformed, CaseTransformedAttributes, } from '../../common/types/case'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; import { CaseRt } from '../../../common/types/domain'; /** diff --git a/x-pack/plugins/cases/server/client/cases/push.ts b/x-pack/plugins/cases/server/client/cases/push.ts index fba7908ed2762..85d853f825907 100644 --- a/x-pack/plugins/cases/server/client/cases/push.ts +++ b/x-pack/plugins/cases/server/client/cases/push.ts @@ -43,7 +43,7 @@ import { Operations } from '../../authorization'; import { casesConnectors } from '../../connectors'; import { getAlerts } from '../alerts/get'; import { buildFilter } from '../utils'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeOrThrow } from '../../common/runtime_types'; import type { ExternalServiceResponse } from '../../../common/types/api'; /** diff --git a/x-pack/plugins/cases/server/client/cases/replace_custom_field.ts b/x-pack/plugins/cases/server/client/cases/replace_custom_field.ts index 5a87c2acc1bf9..c57acee4b0a6c 100644 --- a/x-pack/plugins/cases/server/client/cases/replace_custom_field.ts +++ b/x-pack/plugins/cases/server/client/cases/replace_custom_field.ts @@ -6,20 +6,18 @@ */ import Boom from '@hapi/boom'; - import type { CasesClient, CasesClientArgs } from '..'; import type { CustomFieldPutRequest } from '../../../common/types/api'; import { CustomFieldPutRequestRt, CaseRequestCustomFieldsRt } from '../../../common/types/api'; import { Operations } from '../../authorization'; import { createCaseError } from '../../common/error'; -import { validateMaxUserActions } from '../../../common/utils/validators'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import type { CaseCustomField } from '../../../common/types/domain'; import { CaseCustomFieldRt } from '../../../common/types/domain'; -import { decodeWithExcessOrThrow } from '../../../common/api'; import { validateCustomFieldTypesInRequest } from './validators'; import type { UserActionEvent } from '../../services/user_actions/types'; +import { validateMaxUserActions } from '../../common/validators'; export interface ReplaceCustomFieldArgs { /** diff --git a/x-pack/plugins/cases/server/client/cases/search.ts b/x-pack/plugins/cases/server/client/cases/search.ts index 554f0c8055aaa..d49241a16a38c 100644 --- a/x-pack/plugins/cases/server/client/cases/search.ts +++ b/x-pack/plugins/cases/server/client/cases/search.ts @@ -11,7 +11,7 @@ import Boom from '@hapi/boom'; import type { CustomFieldsConfiguration } from '../../../common/types/domain'; import type { CasesSearchRequest, CasesFindResponse } from '../../../common/types/api'; import { CasesSearchRequestRt, CasesFindResponseRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { createCaseError } from '../../common/error'; import { asArray, transformCases } from '../../common/utils'; @@ -20,7 +20,6 @@ import { Operations } from '../../authorization'; import type { CasesClient, CasesClientArgs } from '..'; import { LICENSING_CASE_ASSIGNMENT_FEATURE } from '../../common/constants'; import type { CasesSearchParams } from '../types'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; import { validateSearchCasesCustomFields } from './validators'; /** diff --git a/x-pack/plugins/cases/server/client/cases/update.ts b/x-pack/plugins/cases/server/client/cases/update.ts index db63cabc7b12e..420b352e44a30 100644 --- a/x-pack/plugins/cases/server/client/cases/update.ts +++ b/x-pack/plugins/cases/server/client/cases/update.ts @@ -47,7 +47,7 @@ import { import { LICENSING_CASE_ASSIGNMENT_FEATURE } from '../../common/constants'; import type { LicensingService } from '../../services/licensing'; import type { CaseSavedObjectTransformed } from '../../common/types/case'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import type { Cases, Case, @@ -58,7 +58,6 @@ import type { CustomFieldsConfiguration, } from '../../../common/types/domain'; import { CasesPatchRequestRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; import { CasesRt, CaseStatuses, AttachmentType } from '../../../common/types/domain'; import { validateCustomFields } from './validators'; diff --git a/x-pack/plugins/cases/server/client/configure/client.ts b/x-pack/plugins/cases/server/client/configure/client.ts index 1261f1061a371..2fc0cc3e72590 100644 --- a/x-pack/plugins/cases/server/client/configure/client.ts +++ b/x-pack/plugins/cases/server/client/configure/client.ts @@ -31,7 +31,7 @@ import { GetConfigurationFindRequestRt, FindActionConnectorResponseRt, } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { MAX_CONCURRENT_SEARCHES, MAX_SUPPORTED_CONNECTORS_RETURNED, @@ -46,7 +46,6 @@ import { combineAuthorizedAndOwnerFilter } from '../utils'; import type { MappingsArgs, CreateMappingsArgs, UpdateMappingsArgs } from './types'; import { createMappings } from './create_mappings'; import { updateMappings } from './update_mappings'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; import { ConfigurationRt, ConfigurationsRt } from '../../../common/types/domain'; import { validateDuplicatedCustomFieldKeysInRequest } from '../validators'; import { validateCustomFieldTypesInRequest } from './validators'; diff --git a/x-pack/plugins/cases/server/client/configure/create_mappings.ts b/x-pack/plugins/cases/server/client/configure/create_mappings.ts index 82be0cfa1c361..2116947fd4e60 100644 --- a/x-pack/plugins/cases/server/client/configure/create_mappings.ts +++ b/x-pack/plugins/cases/server/client/configure/create_mappings.ts @@ -8,7 +8,7 @@ import { ACTION_SAVED_OBJECT_TYPE } from '@kbn/actions-plugin/server'; import type { ConnectorMappingResponse } from '../../../common/types/api'; import { ConnectorMappingResponseRt } from '../../../common/types/api'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { createCaseError } from '../../common/error'; import type { CasesClientArgs } from '..'; import type { CreateMappingsArgs } from './types'; diff --git a/x-pack/plugins/cases/server/client/configure/get_mappings.ts b/x-pack/plugins/cases/server/client/configure/get_mappings.ts index 5dd4380403bf5..c1becb1600668 100644 --- a/x-pack/plugins/cases/server/client/configure/get_mappings.ts +++ b/x-pack/plugins/cases/server/client/configure/get_mappings.ts @@ -8,7 +8,7 @@ import { ACTION_SAVED_OBJECT_TYPE } from '@kbn/actions-plugin/server'; import type { ConnectorMappingResponse } from '../../../common/types/api'; import { ConnectorMappingResponseRt } from '../../../common/types/api'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { createCaseError } from '../../common/error'; import type { CasesClientArgs } from '..'; import type { MappingsArgs } from './types'; diff --git a/x-pack/plugins/cases/server/client/configure/update_mappings.ts b/x-pack/plugins/cases/server/client/configure/update_mappings.ts index ac9b609a9f291..2952fa3238b95 100644 --- a/x-pack/plugins/cases/server/client/configure/update_mappings.ts +++ b/x-pack/plugins/cases/server/client/configure/update_mappings.ts @@ -8,7 +8,7 @@ import { ACTION_SAVED_OBJECT_TYPE } from '@kbn/actions-plugin/server'; import type { ConnectorMappingResponse } from '../../../common/types/api'; import { ConnectorMappingResponseRt } from '../../../common/types/api'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { createCaseError } from '../../common/error'; import type { CasesClientArgs } from '..'; import type { UpdateMappingsArgs } from './types'; diff --git a/x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts b/x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts index 680f303d9a56b..c8e8ca72d1f28 100644 --- a/x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts +++ b/x-pack/plugins/cases/server/client/metrics/get_case_metrics.ts @@ -8,14 +8,13 @@ import { merge } from 'lodash'; import type { SingleCaseMetricsResponse } from '../../../common/types/api'; import { SingleCaseMetricsResponseRt, SingleCaseMetricsRequestRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { Operations } from '../../authorization'; import { createCaseError } from '../../common/error'; import type { CasesClient } from '../client'; import type { CasesClientArgs } from '../types'; import type { GetCaseMetricsParams } from './types'; import { buildHandlers } from './utils'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; export const getCaseMetrics = async ( { caseId, features }: GetCaseMetricsParams, diff --git a/x-pack/plugins/cases/server/client/metrics/get_cases_metrics.ts b/x-pack/plugins/cases/server/client/metrics/get_cases_metrics.ts index 96282af1c301e..7577ac770bab5 100644 --- a/x-pack/plugins/cases/server/client/metrics/get_cases_metrics.ts +++ b/x-pack/plugins/cases/server/client/metrics/get_cases_metrics.ts @@ -8,13 +8,12 @@ import { merge } from 'lodash'; import type { CasesMetricsRequest, CasesMetricsResponse } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import { CasesMetricsRequestRt, CasesMetricsResponseRt } from '../../../common/types/api'; import { createCaseError } from '../../common/error'; import type { CasesClient } from '../client'; import type { CasesClientArgs } from '../types'; import { buildHandlers } from './utils'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; export const getCasesMetrics = async ( params: CasesMetricsRequest, diff --git a/x-pack/plugins/cases/server/client/metrics/get_status_totals.ts b/x-pack/plugins/cases/server/client/metrics/get_status_totals.ts index 13d35bf2110bd..b7ca0e91debeb 100644 --- a/x-pack/plugins/cases/server/client/metrics/get_status_totals.ts +++ b/x-pack/plugins/cases/server/client/metrics/get_status_totals.ts @@ -7,12 +7,11 @@ import type { CasesStatusRequest, CasesStatusResponse } from '../../../common/types/api'; import { CasesStatusRequestRt, CasesStatusResponseRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import type { CasesClientArgs } from '../types'; import { Operations } from '../../authorization'; import { constructQueryOptions } from '../utils'; import { createCaseError } from '../../common/error'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; export async function getStatusTotalsByType( params: CasesStatusRequest, diff --git a/x-pack/plugins/cases/server/client/user_actions/connectors.ts b/x-pack/plugins/cases/server/client/user_actions/connectors.ts index 2532b8c81bb0a..c9ebfe8724a91 100644 --- a/x-pack/plugins/cases/server/client/user_actions/connectors.ts +++ b/x-pack/plugins/cases/server/client/user_actions/connectors.ts @@ -15,7 +15,7 @@ import type { GetCaseConnectorsResponse, } from '../../../common/types/api'; import { GetCaseConnectorsResponseRt } from '../../../common/types/api'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { isConnectorUserAction, isCreateCaseUserAction, diff --git a/x-pack/plugins/cases/server/client/user_actions/find.ts b/x-pack/plugins/cases/server/client/user_actions/find.ts index 442f6c5273937..e5a27c8b4f934 100644 --- a/x-pack/plugins/cases/server/client/user_actions/find.ts +++ b/x-pack/plugins/cases/server/client/user_actions/find.ts @@ -7,7 +7,7 @@ import type { UserActionFindResponse } from '../../../common/types/api'; import { UserActionFindRequestRt, UserActionFindResponseRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow, decodeOrThrow } from '../../common/runtime_types'; import type { CasesClientArgs } from '../types'; import type { UserActionFind } from './types'; import { Operations } from '../../authorization'; @@ -15,7 +15,6 @@ import { formatSavedObjects } from './utils'; import { createCaseError } from '../../common/error'; import { asArray } from '../../common/utils'; import type { CasesClient } from '../client'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; export const find = async ( { caseId, params }: UserActionFind, diff --git a/x-pack/plugins/cases/server/client/user_actions/get.ts b/x-pack/plugins/cases/server/client/user_actions/get.ts index 28ccd1b19262b..37fa29fdc4c31 100644 --- a/x-pack/plugins/cases/server/client/user_actions/get.ts +++ b/x-pack/plugins/cases/server/client/user_actions/get.ts @@ -12,7 +12,7 @@ import type { CasesClientArgs } from '..'; import { Operations } from '../../authorization'; import type { UserActionGet } from './types'; import { extractAttributes } from './utils'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeOrThrow } from '../../common/runtime_types'; export const get = async ( { caseId }: UserActionGet, diff --git a/x-pack/plugins/cases/server/client/user_actions/stats.ts b/x-pack/plugins/cases/server/client/user_actions/stats.ts index 8f312e9ff35dd..26b3cd6d77fe9 100644 --- a/x-pack/plugins/cases/server/client/user_actions/stats.ts +++ b/x-pack/plugins/cases/server/client/user_actions/stats.ts @@ -7,7 +7,7 @@ import type { CaseUserActionStatsResponse } from '../../../common/types/api'; import { CaseUserActionStatsResponseRt } from '../../../common/types/api'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { createCaseError } from '../../common/error'; import type { CasesClientArgs } from '..'; import type { UserActionGet } from './types'; diff --git a/x-pack/plugins/cases/server/client/user_actions/users.ts b/x-pack/plugins/cases/server/client/user_actions/users.ts index 6179e41c2c632..cc189f987afe1 100644 --- a/x-pack/plugins/cases/server/client/user_actions/users.ts +++ b/x-pack/plugins/cases/server/client/user_actions/users.ts @@ -9,7 +9,7 @@ import { isString } from 'lodash'; import type { UserProfileAvatarData, UserProfileWithAvatar } from '@kbn/user-profile-components'; import type { GetCaseUsersResponse } from '../../../common/types/api'; import { GetCaseUsersResponseRt } from '../../../common/types/api'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import type { OwnerEntity } from '../../authorization'; import { Operations } from '../../authorization'; import { createCaseError } from '../../common/error'; diff --git a/x-pack/plugins/cases/server/client/utils.ts b/x-pack/plugins/cases/server/client/utils.ts index 24cbce31b32fb..0ce4da8bcc21b 100644 --- a/x-pack/plugins/cases/server/client/utils.ts +++ b/x-pack/plugins/cases/server/client/utils.ts @@ -34,7 +34,7 @@ import { import type { SavedObjectFindOptionsKueryNode } from '../common/types'; import type { CasesSearchParams } from './types'; -import { decodeWithExcessOrThrow } from '../../common/api'; +import { decodeWithExcessOrThrow } from '../common/runtime_types'; import { CASE_SAVED_OBJECT, NO_ASSIGNEES_FILTERING_KEYWORD, diff --git a/x-pack/plugins/cases/server/common/models/case_with_comments.ts b/x-pack/plugins/cases/server/common/models/case_with_comments.ts index a1eb5cbfdb8b5..b48895bd90715 100644 --- a/x-pack/plugins/cases/server/common/models/case_with_comments.ts +++ b/x-pack/plugins/cases/server/common/models/case_with_comments.ts @@ -42,7 +42,7 @@ import { getAlertInfoFromComments, getIDsAndIndicesAsArrays, } from '../utils'; -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeOrThrow } from '../runtime_types'; import type { AttachmentRequest, AttachmentPatchRequest } from '../../../common/types/api'; type CaseCommentModelParams = Omit; diff --git a/x-pack/plugins/cases/common/api/runtime_types.test.ts b/x-pack/plugins/cases/server/common/runtime_types.test.ts similarity index 100% rename from x-pack/plugins/cases/common/api/runtime_types.test.ts rename to x-pack/plugins/cases/server/common/runtime_types.test.ts diff --git a/x-pack/plugins/cases/server/common/runtime_types.ts b/x-pack/plugins/cases/server/common/runtime_types.ts new file mode 100644 index 0000000000000..a0a3854cb7b16 --- /dev/null +++ b/x-pack/plugins/cases/server/common/runtime_types.ts @@ -0,0 +1,45 @@ +/* + * 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 * as rt from 'io-ts'; +import { badRequest } from '@hapi/boom'; +import { fold } from 'fp-ts/lib/Either'; +import { identity } from 'fp-ts/lib/function'; +import { pipe } from 'fp-ts/lib/pipeable'; + +import { exactCheck } from '@kbn/securitysolution-io-ts-utils/src/exact_check'; +import { formatErrors } from '@kbn/securitysolution-io-ts-utils/src/format_errors'; +import { throwErrors } from '../../common/api'; + +type ErrorFactory = (message: string) => Error; + +export const createPlainError = (message: string) => new Error(message); + +export const throwBadRequestError = (errors: rt.Errors) => { + throw badRequest(formatErrors(errors).join()); +}; + +/** + * This function will throw if a required field is missing or an excess field is present. + * NOTE: This will only throw for an excess field if the type passed in leverages exact from io-ts. + */ +export const decodeWithExcessOrThrow = + (runtimeType: rt.Type) => + (inputValue: I): A => + pipe( + runtimeType.decode(inputValue), + (decoded) => exactCheck(inputValue, decoded), + fold(throwBadRequestError, identity) + ); + +/** + * This function will throw if a required field is missing. + */ +export const decodeOrThrow = + (runtimeType: rt.Type, createError: ErrorFactory = createPlainError) => + (inputValue: I) => + pipe(runtimeType.decode(inputValue), fold(throwErrors(createError), identity)); diff --git a/x-pack/plugins/cases/server/common/types/case.test.ts b/x-pack/plugins/cases/server/common/types/case.test.ts index 3a36b7cdcac30..ed7356546e56d 100644 --- a/x-pack/plugins/cases/server/common/types/case.test.ts +++ b/x-pack/plugins/cases/server/common/types/case.test.ts @@ -12,7 +12,7 @@ import { getPartialCaseTransformedAttributesRt, OwnerRt, } from './case'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../runtime_types'; import { CaseSeverity, CaseStatuses } from '../../../common/types/domain'; describe('case types', () => { diff --git a/x-pack/plugins/cases/server/common/types/configure.test.ts b/x-pack/plugins/cases/server/common/types/configure.test.ts index dcc05fc42ad78..c5cf9711c23d8 100644 --- a/x-pack/plugins/cases/server/common/types/configure.test.ts +++ b/x-pack/plugins/cases/server/common/types/configure.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeOrThrow } from '../runtime_types'; import { ConfigurationPartialAttributesRt } from './configure'; describe('Configuration', () => { diff --git a/x-pack/plugins/cases/server/common/types/connector_mappings.test.ts b/x-pack/plugins/cases/server/common/types/connector_mappings.test.ts index b44fb0e78c1e7..ef8834ec552d8 100644 --- a/x-pack/plugins/cases/server/common/types/connector_mappings.test.ts +++ b/x-pack/plugins/cases/server/common/types/connector_mappings.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { decodeOrThrow } from '../../../common/api/runtime_types'; +import { decodeOrThrow } from '../runtime_types'; import { ConnectorMappingsAttributesPartialRt } from './connector_mappings'; describe('mappings', () => { diff --git a/x-pack/plugins/cases/common/utils/validators.test.ts b/x-pack/plugins/cases/server/common/validators.test.ts similarity index 96% rename from x-pack/plugins/cases/common/utils/validators.test.ts rename to x-pack/plugins/cases/server/common/validators.test.ts index 1daf64f90c611..28ea5a653bdc9 100644 --- a/x-pack/plugins/cases/common/utils/validators.test.ts +++ b/x-pack/plugins/cases/server/common/validators.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { createUserActionServiceMock } from '../../server/services/mocks'; -import { MAX_ASSIGNEES_PER_CASE, MAX_USER_ACTIONS_PER_CASE } from '../constants'; +import { MAX_ASSIGNEES_PER_CASE, MAX_USER_ACTIONS_PER_CASE } from '../../common/constants'; +import { createUserActionServiceMock } from '../services/mocks'; import { areTotalAssigneesInvalid, validateMaxUserActions } from './validators'; describe('validators', () => { diff --git a/x-pack/plugins/cases/common/utils/validators.ts b/x-pack/plugins/cases/server/common/validators.ts similarity index 88% rename from x-pack/plugins/cases/common/utils/validators.ts rename to x-pack/plugins/cases/server/common/validators.ts index cd85401d7a6bd..5e8a8fd73dda9 100644 --- a/x-pack/plugins/cases/common/utils/validators.ts +++ b/x-pack/plugins/cases/server/common/validators.ts @@ -6,10 +6,9 @@ */ import Boom from '@hapi/boom'; - -import type { CaseUserActionService } from '../../server/services'; -import { MAX_ASSIGNEES_PER_CASE, MAX_USER_ACTIONS_PER_CASE } from '../constants'; -import type { CaseAssignees } from '../types/domain'; +import { MAX_ASSIGNEES_PER_CASE, MAX_USER_ACTIONS_PER_CASE } from '../../common/constants'; +import type { CaseAssignees } from '../../common/types/domain'; +import type { CaseUserActionService } from '../services'; export const areTotalAssigneesInvalid = (assignees?: CaseAssignees): boolean => { if (assignees == null) { diff --git a/x-pack/plugins/cases/server/internal_attachments/index.ts b/x-pack/plugins/cases/server/internal_attachments/index.ts index 4e68775dd0aaf..a6fb48d79a72e 100644 --- a/x-pack/plugins/cases/server/internal_attachments/index.ts +++ b/x-pack/plugins/cases/server/internal_attachments/index.ts @@ -10,7 +10,7 @@ import { FileAttachmentMetadataRt } from '../../common/types/domain'; import { LENS_ATTACHMENT_TYPE } from '../../common/constants/visualizations'; import { FILE_ATTACHMENT_TYPE } from '../../common/constants'; -import { decodeWithExcessOrThrow } from '../../common/api'; +import { decodeWithExcessOrThrow } from '../common/runtime_types'; import type { ExternalReferenceAttachmentTypeRegistry } from '../attachment_framework/external_reference_registry'; import type { PersistableStateAttachmentTypeRegistry } from '../attachment_framework/persistable_state_registry'; diff --git a/x-pack/plugins/cases/server/routes/api/cases/push_case.ts b/x-pack/plugins/cases/server/routes/api/cases/push_case.ts index ec77bf97e5ab8..ff040fa8fb673 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/push_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/push_case.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { decodeWithExcessOrThrow } from '../../../../common/api'; +import { decodeWithExcessOrThrow } from '../../../common/runtime_types'; import { CASE_PUSH_URL } from '../../../../common/constants'; import type { CaseRoute } from '../types'; import { createCaseError } from '../../../common/error'; diff --git a/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts b/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts index 99a697cb0bc9a..dfa549bb9e9a6 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts @@ -7,7 +7,7 @@ import { schema } from '@kbn/config-schema'; import { AttachmentPatchRequestRt } from '../../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../../common/api'; +import { decodeWithExcessOrThrow } from '../../../common/runtime_types'; import { CASE_COMMENTS_URL } from '../../../../common/constants'; import { createCaseError } from '../../../common/error'; import { createCasesRoute } from '../create_cases_route'; diff --git a/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts index 2ab05277891ed..0f246cd07af22 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts @@ -6,7 +6,7 @@ */ import { CaseConfigureRequestParamsRt } from '../../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../../common/api'; +import { decodeWithExcessOrThrow } from '../../../common/runtime_types'; import { CASE_CONFIGURE_DETAILS_URL } from '../../../../common/constants'; import { createCaseError } from '../../../common/error'; import { createCasesRoute } from '../create_cases_route'; diff --git a/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts index b4d831df75537..872c9ae5aee7f 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts @@ -6,7 +6,7 @@ */ import { ConfigurationRequestRt } from '../../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../../common/api'; +import { decodeWithExcessOrThrow } from '../../../common/runtime_types'; import { CASE_CONFIGURE_URL } from '../../../../common/constants'; import { createCaseError } from '../../../common/error'; import { createCasesRoute } from '../create_cases_route'; diff --git a/x-pack/plugins/cases/server/routes/api/internal/bulk_delete_file_attachments.ts b/x-pack/plugins/cases/server/routes/api/internal/bulk_delete_file_attachments.ts index d1e62f13c633b..42fd25bb5c7b9 100644 --- a/x-pack/plugins/cases/server/routes/api/internal/bulk_delete_file_attachments.ts +++ b/x-pack/plugins/cases/server/routes/api/internal/bulk_delete_file_attachments.ts @@ -7,7 +7,7 @@ import { schema } from '@kbn/config-schema'; -import { decodeWithExcessOrThrow } from '../../../../common/api'; +import { decodeWithExcessOrThrow } from '../../../common/runtime_types'; import { INTERNAL_DELETE_FILE_ATTACHMENTS_URL } from '../../../../common/constants'; import { createCasesRoute } from '../create_cases_route'; import { createCaseError } from '../../../common/error'; diff --git a/x-pack/plugins/cases/server/routes/api/internal/bulk_get_attachments.ts b/x-pack/plugins/cases/server/routes/api/internal/bulk_get_attachments.ts index a5cb22f536caa..e747d0304e24a 100644 --- a/x-pack/plugins/cases/server/routes/api/internal/bulk_get_attachments.ts +++ b/x-pack/plugins/cases/server/routes/api/internal/bulk_get_attachments.ts @@ -7,7 +7,7 @@ import { schema } from '@kbn/config-schema'; import { BulkGetAttachmentsRequestRt } from '../../../../common/types/api/attachment/v1'; -import { decodeWithExcessOrThrow } from '../../../../common/api'; +import { decodeWithExcessOrThrow } from '../../../common/runtime_types'; import type { attachmentApiV1 } from '../../../../common/types/api'; import { INTERNAL_BULK_GET_ATTACHMENTS_URL } from '../../../../common/constants'; diff --git a/x-pack/plugins/cases/server/services/attachments/index.ts b/x-pack/plugins/cases/server/services/attachments/index.ts index f61e0c8e06ff1..165949b0e37d8 100644 --- a/x-pack/plugins/cases/server/services/attachments/index.ts +++ b/x-pack/plugins/cases/server/services/attachments/index.ts @@ -16,7 +16,7 @@ import type { import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { fromKueryExpression } from '@kbn/es-query'; import { AttachmentAttributesRt, AttachmentType } from '../../../common/types/domain'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { CASE_COMMENT_SAVED_OBJECT, CASE_SAVED_OBJECT, diff --git a/x-pack/plugins/cases/server/services/attachments/operations/get.ts b/x-pack/plugins/cases/server/services/attachments/operations/get.ts index a4e1f51bea404..da258afc5eeb9 100644 --- a/x-pack/plugins/cases/server/services/attachments/operations/get.ts +++ b/x-pack/plugins/cases/server/services/attachments/operations/get.ts @@ -13,7 +13,7 @@ import type { import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { FILE_SO_TYPE } from '@kbn/files-plugin/common'; import { isSOError } from '../../../common/error'; -import { decodeOrThrow } from '../../../../common/api'; +import { decodeOrThrow } from '../../../common/runtime_types'; import type { AttachmentPersistedAttributes, AttachmentTransformedAttributes, diff --git a/x-pack/plugins/cases/server/services/cases/index.ts b/x-pack/plugins/cases/server/services/cases/index.ts index 2d199dd261ed3..d53cbc2edd867 100644 --- a/x-pack/plugins/cases/server/services/cases/index.ts +++ b/x-pack/plugins/cases/server/services/cases/index.ts @@ -28,7 +28,7 @@ import { CASE_SAVED_OBJECT, MAX_DOCS_PER_PAGE, } from '../../../common/constants'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import type { SavedObjectFindOptionsKueryNode, SavedObjectsBulkResponseWithErrors, diff --git a/x-pack/plugins/cases/server/services/configure/index.ts b/x-pack/plugins/cases/server/services/configure/index.ts index 5f31403be8d3e..6c367d9a96848 100644 --- a/x-pack/plugins/cases/server/services/configure/index.ts +++ b/x-pack/plugins/cases/server/services/configure/index.ts @@ -15,7 +15,7 @@ import type { import { ACTION_SAVED_OBJECT_TYPE } from '@kbn/actions-plugin/server'; import type { ConfigurationAttributes } from '../../../common/types/domain'; import { CONNECTOR_ID_REFERENCE_NAME } from '../../common/constants'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { CASE_CONFIGURE_SAVED_OBJECT } from '../../../common/constants'; import { transformFieldsToESModel, diff --git a/x-pack/plugins/cases/server/services/connector_mappings/index.ts b/x-pack/plugins/cases/server/services/connector_mappings/index.ts index 16fadae1004c3..0892f179922a5 100644 --- a/x-pack/plugins/cases/server/services/connector_mappings/index.ts +++ b/x-pack/plugins/cases/server/services/connector_mappings/index.ts @@ -27,7 +27,7 @@ import { ConnectorMappingsAttributesPartialRt, ConnectorMappingsAttributesTransformedRt, } from '../../common/types/connector_mappings'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; export class ConnectorMappingsService { constructor(private readonly log: Logger) {} diff --git a/x-pack/plugins/cases/server/services/user_actions/index.ts b/x-pack/plugins/cases/server/services/user_actions/index.ts index 7385c4cc958f6..911f31c5c52f2 100644 --- a/x-pack/plugins/cases/server/services/user_actions/index.ts +++ b/x-pack/plugins/cases/server/services/user_actions/index.ts @@ -15,7 +15,7 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { KueryNode } from '@kbn/es-query'; import type { CaseUserActionDeprecatedResponse } from '../../../common/types/api'; import { UserActionTypes } from '../../../common/types/domain'; -import { decodeOrThrow } from '../../../common/api'; +import { decodeOrThrow } from '../../common/runtime_types'; import { CASE_SAVED_OBJECT, CASE_USER_ACTION_SAVED_OBJECT, diff --git a/x-pack/plugins/cases/server/services/user_actions/operations/create.ts b/x-pack/plugins/cases/server/services/user_actions/operations/create.ts index e66f375e39108..49fd786163f78 100644 --- a/x-pack/plugins/cases/server/services/user_actions/operations/create.ts +++ b/x-pack/plugins/cases/server/services/user_actions/operations/create.ts @@ -21,7 +21,7 @@ import { UserActionPersistedAttributesRt } from '../../../common/types/user_acti import { CASE_SAVED_OBJECT, CASE_USER_ACTION_SAVED_OBJECT } from '../../../../common/constants'; import { arraysDifference } from '../../../client/utils'; import { isUserActionType } from '../../../../common/utils/user_actions'; -import { decodeOrThrow } from '../../../../common/api'; +import { decodeOrThrow } from '../../../common/runtime_types'; import { BuilderFactory } from '../builder_factory'; import type { BuildUserActionsDictParams, diff --git a/x-pack/plugins/cases/server/services/user_actions/operations/find.ts b/x-pack/plugins/cases/server/services/user_actions/operations/find.ts index c055a5cf4c81e..402bc16a12e4b 100644 --- a/x-pack/plugins/cases/server/services/user_actions/operations/find.ts +++ b/x-pack/plugins/cases/server/services/user_actions/operations/find.ts @@ -11,7 +11,7 @@ import type { SavedObjectsFindResponse } from '@kbn/core-saved-objects-api-serve import type { UserActionFindRequestTypes } from '../../../../common/types/api'; import { DEFAULT_PAGE, DEFAULT_PER_PAGE } from '../../../routes/api'; import { defaultSortField } from '../../../common/utils'; -import { decodeOrThrow } from '../../../../common/api'; +import { decodeOrThrow } from '../../../common/runtime_types'; import { CASE_SAVED_OBJECT, CASE_USER_ACTION_SAVED_OBJECT, diff --git a/x-pack/plugins/cases/server/services/user_profiles/index.ts b/x-pack/plugins/cases/server/services/user_profiles/index.ts index 7808cf74b0112..6a7be7deac4eb 100644 --- a/x-pack/plugins/cases/server/services/user_profiles/index.ts +++ b/x-pack/plugins/cases/server/services/user_profiles/index.ts @@ -16,7 +16,7 @@ import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; import type { LicensingPluginStart } from '@kbn/licensing-plugin/server'; import type { SuggestUserProfilesRequest } from '../../../common/types/api'; import { SuggestUserProfilesRequestRt } from '../../../common/types/api'; -import { decodeWithExcessOrThrow } from '../../../common/api'; +import { decodeWithExcessOrThrow } from '../../common/runtime_types'; import { Operations } from '../../authorization'; import { createCaseError } from '../../common/error'; import { LicensingService } from '../licensing'; diff --git a/x-pack/plugins/cases/server/services/utils.ts b/x-pack/plugins/cases/server/services/utils.ts index b5b8cac8ac2bc..4ec0f25cd5a13 100644 --- a/x-pack/plugins/cases/server/services/utils.ts +++ b/x-pack/plugins/cases/server/services/utils.ts @@ -6,7 +6,7 @@ */ import type { Type } from 'io-ts'; -import { decodeOrThrow } from '../../common/api'; +import { decodeOrThrow } from '../common/runtime_types'; export const bulkDecodeSOAttributes = ( savedObjects: Array<{ id: string; attributes: T }>, diff --git a/x-pack/plugins/cloud/public/plugin.tsx b/x-pack/plugins/cloud/public/plugin.tsx index f0e7b8f713e80..760436bfd4f6c 100644 --- a/x-pack/plugins/cloud/public/plugin.tsx +++ b/x-pack/plugins/cloud/public/plugin.tsx @@ -22,6 +22,7 @@ export interface CloudConfigType { cname?: string; base_url?: string; profile_url?: string; + deployments_url?: string; deployment_url?: string; projects_url?: string; billing_url?: string; @@ -38,6 +39,9 @@ export interface CloudConfigType { } interface CloudUrls { + /** Link to all deployments page on cloud */ + deploymentsUrl?: string; + /** Link to the current deployment on cloud */ deploymentUrl?: string; profileUrl?: string; billingUrl?: string; @@ -122,6 +126,7 @@ export class CloudPlugin implements Plugin { }; const { + deploymentsUrl, deploymentUrl, profileUrl, billingUrl, @@ -141,6 +146,7 @@ export class CloudPlugin implements Plugin { isCloudEnabled: this.isCloudEnabled, cloudId: this.config.id, billingUrl, + deploymentsUrl, deploymentUrl, profileUrl, organizationUrl, @@ -165,6 +171,7 @@ export class CloudPlugin implements Plugin { profile_url: profileUrl, billing_url: billingUrl, organization_url: organizationUrl, + deployments_url: deploymentsUrl, deployment_url: deploymentUrl, base_url: baseUrl, performance_url: performanceUrl, @@ -172,6 +179,7 @@ export class CloudPlugin implements Plugin { projects_url: projectsUrl, } = this.config; + const fullCloudDeploymentsUrl = getFullCloudUrl(baseUrl, deploymentsUrl); const fullCloudDeploymentUrl = getFullCloudUrl(baseUrl, deploymentUrl); const fullCloudProfileUrl = getFullCloudUrl(baseUrl, profileUrl); const fullCloudBillingUrl = getFullCloudUrl(baseUrl, billingUrl); @@ -182,6 +190,7 @@ export class CloudPlugin implements Plugin { const fullCloudSnapshotsUrl = `${fullCloudDeploymentUrl}/${CLOUD_SNAPSHOTS_PATH}`; return { + deploymentsUrl: fullCloudDeploymentsUrl, deploymentUrl: fullCloudDeploymentUrl, profileUrl: fullCloudProfileUrl, billingUrl: fullCloudBillingUrl, diff --git a/x-pack/plugins/cloud/public/types.ts b/x-pack/plugins/cloud/public/types.ts index 36c2aa256e88f..a3d448668d8aa 100644 --- a/x-pack/plugins/cloud/public/types.ts +++ b/x-pack/plugins/cloud/public/types.ts @@ -20,6 +20,12 @@ export interface CloudStart { * Cloud ID. Undefined if not running on Cloud. */ cloudId?: string; + /** + * This is the path to the Cloud deployments management page. The value is already prepended with `baseUrl`. + * + * @example `{baseUrl}/deployments` + */ + deploymentsUrl?: string; /** * This is the path to the Cloud deployment management page for the deployment to which the Kibana instance belongs. The value is already prepended with `baseUrl`. * diff --git a/x-pack/plugins/cloud/server/config.ts b/x-pack/plugins/cloud/server/config.ts index cb5a1e12b09bd..39babd548d99a 100644 --- a/x-pack/plugins/cloud/server/config.ts +++ b/x-pack/plugins/cloud/server/config.ts @@ -22,6 +22,7 @@ const configSchema = schema.object({ apm: schema.maybe(apmConfigSchema), base_url: schema.maybe(schema.string()), cname: schema.maybe(schema.string()), + deployments_url: schema.string({ defaultValue: '/deployments' }), deployment_url: schema.maybe(schema.string()), id: schema.maybe(schema.string()), billing_url: schema.maybe(schema.string()), @@ -51,6 +52,7 @@ export const config: PluginConfigDescriptor = { exposeToBrowser: { base_url: true, cname: true, + deployments_url: true, deployment_url: true, id: true, billing_url: true, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx index 06de63c3cff0c..3604bb6693def 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx @@ -33,6 +33,7 @@ import { AzureCredentialsType } from '../../../../common/types_old'; import { SetupFormat, useAzureCredentialsForm } from './hooks'; import { getPosturePolicy, NewPackagePolicyPostureInput } from '../utils'; import { CspRadioOption, RadioGroup } from '../csp_boxed_radio_group'; +import { CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS } from '../../test_subjects'; interface AzureSetupInfoContentProps { integrationLink: string; @@ -41,7 +42,7 @@ interface AzureSetupInfoContentProps { export const AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE = 'arm_template'; export const AZURE_MANUAL_CREDENTIAL_TYPE = 'manual'; -const AzureSetupInfoContent = ({ integrationLink }: AzureSetupInfoContentProps) => { +export const AzureSetupInfoContent = ({ integrationLink }: AzureSetupInfoContentProps) => { return ( <> @@ -78,16 +79,18 @@ const getSetupFormatOptions = (): CspRadioOption[] => [ { id: AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE, label: 'ARM Template', + testId: CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE, }, { id: AZURE_MANUAL_CREDENTIAL_TYPE, label: i18n.translate('xpack.csp.azureIntegration.setupFormatOptions.manual', { defaultMessage: 'Manual', }), + testId: CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL, }, ]; -interface Props { +export interface AzureCredentialsFormProps { newPolicy: NewPackagePolicy; input: Extract; updatePolicy(updatedPolicy: NewPackagePolicy): void; @@ -97,7 +100,7 @@ interface Props { disabled: boolean; } -const ARM_TEMPLATE_EXTERNAL_DOC_URL = +export const ARM_TEMPLATE_EXTERNAL_DOC_URL = 'https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/'; const ArmTemplateSetup = ({ @@ -248,7 +251,7 @@ const TemporaryManualSetup = ({ integrationLink }: { integrationLink: string }) const AZURE_MINIMUM_PACKAGE_VERSION = '1.6.0'; const AZURE_MANUAL_FIELDS_PACKAGE_VERSION = '1.7.0'; -const AzureInputVarFields = ({ +export const AzureInputVarFields = ({ fields, onChange, }: { @@ -266,6 +269,7 @@ const AzureInputVarFields = ({ fullWidth value={field.value || ''} onChange={(event) => onChange(field.id, event.target.value)} + data-test-subj={field.testSubj} /> )} {field.type === 'text' && ( @@ -274,6 +278,7 @@ const AzureInputVarFields = ({ fullWidth value={field.value || ''} onChange={(event) => onChange(field.id, event.target.value)} + data-test-subj={field.testSubj} /> )} @@ -290,7 +295,7 @@ export const AzureCredentialsForm = ({ onChange, setIsValid, disabled, -}: Props) => { +}: AzureCredentialsFormProps) => { const { group, fields, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form_agentless.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form_agentless.tsx new file mode 100644 index 0000000000000..1d763fe8cfa57 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form_agentless.tsx @@ -0,0 +1,70 @@ +/* + * 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 { EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; + +import { cspIntegrationDocsNavigation } from '../../../common/navigation/constants'; +import { + AzureCredentialsFormProps, + AzureSetupInfoContent, + AzureInputVarFields, + ARM_TEMPLATE_EXTERNAL_DOC_URL, +} from './azure_credentials_form'; +import { getPosturePolicy } from '../utils'; +import { + getAzureCredentialsFormOptions, + getInputVarsFields, +} from './get_azure_credentials_form_options'; + +export const AzureCredentialsFormAgentless = ({ + input, + newPolicy, + updatePolicy, +}: AzureCredentialsFormProps) => { + const integrationLink = cspIntegrationDocsNavigation.cspm.getStartedPath; + const options = getAzureCredentialsFormOptions(); + const group = options.service_principal_with_client_secret; + const fields = getInputVarsFields(input, group.fields); + + return ( + <> + + + { + updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })); + }} + /> + + + + {i18n.translate('xpack.csp.azureIntegration.documentationLinkText', { + defaultMessage: 'documentation', + })} + + ), + }} + /> + + + ); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx index c4135ecaf2eb7..d9ec4c4c0b20b 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx @@ -11,8 +11,12 @@ import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiText } from '@elastic/eui'; import { AzureCredentialsType } from '../../../../common/types_old'; +import { CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS } from '../../test_subjects'; -export type AzureCredentialsFields = Record; +export type AzureCredentialsFields = Record< + string, + { label: string; type?: 'password' | 'text'; testSubj?: string } +>; export interface AzureOptionValue { label: string; @@ -48,6 +52,7 @@ export const getInputVarsFields = (input: NewPackagePolicyInput, fields: AzureCr id, label: field.label, type: field.type || 'text', + testSubj: field.testSubj, value: inputVar.value, } as const; }); @@ -91,13 +96,20 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ defaultMessage: 'Service principal with Client Secret', }), fields: { - 'azure.credentials.tenant_id': { label: I18N_TENANT_ID }, - 'azure.credentials.client_id': { label: I18N_CLIENT_ID }, + 'azure.credentials.tenant_id': { + label: I18N_TENANT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID, + }, + 'azure.credentials.client_id': { + label: I18N_CLIENT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, + }, 'azure.credentials.client_secret': { type: 'password', label: i18n.translate('xpack.csp.azureIntegration.clientSecretLabel', { defaultMessage: 'Client Secret', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET, }, }, }, @@ -106,18 +118,26 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ defaultMessage: 'Service principal with Client Certificate', }), fields: { - 'azure.credentials.tenant_id': { label: I18N_TENANT_ID }, - 'azure.credentials.client_id': { label: I18N_CLIENT_ID }, + 'azure.credentials.tenant_id': { + label: I18N_TENANT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID, + }, + 'azure.credentials.client_id': { + label: I18N_CLIENT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, + }, 'azure.credentials.client_certificate_path': { label: i18n.translate('xpack.csp.azureIntegration.clientCertificatePathLabel', { defaultMessage: 'Client Certificate Path', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_CERTIFICATE_PATH, }, 'azure.credentials.client_certificate_password': { type: 'password', label: i18n.translate('xpack.csp.azureIntegration.clientCertificatePasswordLabel', { defaultMessage: 'Client Certificate Password', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_CERTIFICATE_PASSWORD, }, }, }, @@ -127,18 +147,26 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ { defaultMessage: 'Service principal with Client Username and Password' } ), fields: { - 'azure.credentials.tenant_id': { label: I18N_TENANT_ID }, - 'azure.credentials.client_id': { label: I18N_CLIENT_ID }, + 'azure.credentials.tenant_id': { + label: I18N_TENANT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID, + }, + 'azure.credentials.client_id': { + label: I18N_CLIENT_ID, + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID, + }, 'azure.credentials.client_username': { label: i18n.translate('xpack.csp.azureIntegration.clientUsernameLabel', { defaultMessage: 'Client Username', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_USERNAME, }, 'azure.credentials.client_password': { type: 'password', label: i18n.translate('xpack.csp.azureIntegration.clientPasswordLabel', { defaultMessage: 'Client Password', }), + testSubj: CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_PASSWORD, }, }, }, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx index 49c33f343e099..56159f1d899dd 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx @@ -10,16 +10,16 @@ import semverCoerce from 'semver/functions/coerce'; import semverValid from 'semver/functions/valid'; import { css } from '@emotion/react'; import { + EuiCallOut, EuiFieldText, + EuiForm, EuiFormRow, + EuiHorizontalRule, + EuiSelect, EuiSpacer, EuiText, - EuiTitle, - EuiSelect, - EuiForm, - EuiCallOut, EuiTextArea, - EuiHorizontalRule, + EuiTitle, } from '@elastic/eui'; import type { NewPackagePolicy } from '@kbn/fleet-plugin/public'; import { NewPackagePolicyInput, PackageInfo } from '@kbn/fleet-plugin/common'; @@ -42,16 +42,11 @@ import { MIN_VERSION_GCP_CIS } from '../../../common/constants'; import { cspIntegrationDocsNavigation } from '../../../common/navigation/constants'; import { ReadDocumentation } from '../aws_credentials_form/aws_credentials_form'; import { GCP_ORGANIZATION_ACCOUNT } from '../policy_template_form'; -import { GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ } from '../../test_subjects'; - -export const CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS = { - GOOGLE_CLOUD_SHELL_SETUP: 'google_cloud_shell_setup_test_id', - PROJECT_ID: 'project_id_test_id', - ORGANIZATION_ID: 'organization_id_test_id', - CREDENTIALS_TYPE: 'credentials_type_test_id', - CREDENTIALS_FILE: 'credentials_file_test_id', - CREDENTIALS_JSON: 'credentials_json_test_id', -}; +import { + CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS, + GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ, +} from '../../test_subjects'; + type SetupFormatGCP = 'google_cloud_shell' | 'manual'; export const GCPSetupInfoContent = () => ( <> diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts index b960ac3c48e20..887c8c471d9c8 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts @@ -244,7 +244,7 @@ const getPolicyMock = ( { type: CLOUDBEAT_AZURE, policy_template: 'cspm', - enabled: false, + enabled: type === CLOUDBEAT_AZURE, streams: [ { enabled: type === CLOUDBEAT_AZURE, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx index 3c8b767d1bde7..ef680d95c7166 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx @@ -45,11 +45,14 @@ import { useParams } from 'react-router-dom'; import { createReactQueryResponse } from '../../test/fixtures/react_query'; import { useCspSetupStatusApi } from '../../common/api/use_setup_status_api'; import { usePackagePolicyList } from '../../common/api/use_package_policy_list'; -import { CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS } from './gcp_credentials_form/gcp_credential_form'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { AWS_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ, AWS_CREDENTIALS_TYPE_SELECTOR_TEST_SUBJ, + CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS, + CIS_AZURE_OPTION_TEST_SUBJ, + CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS, + CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS, CIS_GCP_OPTION_TEST_SUBJ, GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ, SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ, @@ -1533,7 +1536,7 @@ describe('', () => { expect(credentialsTypSelector).not.toBeInTheDocument(); expect(credentialsFileField).not.toBeInTheDocument(); - // select agent-based and check for cloudformation option + // select agent-based and check for Cloud Shell option userEvent.click(setupTechnologySelector); const agentBasedOption = getByRole('option', { name: /agent-based/i }); await waitForEuiPopoverOpen(); @@ -1589,24 +1592,95 @@ describe('', () => { expect(credentialsFileField).not.toBeInTheDocument(); }); - it('should not render setup technology selector for KSPM', () => { + it('should render setup technology selector for Azure for Organisation type', async () => { const agentlessPolicy = getMockAgentlessAgentPolicy(); - const newPackagePolicy = getMockPolicyEKS(); + const newPackagePolicy = getMockPolicyAzure(); - const { queryByTestId } = render( - + const { getByTestId, queryByTestId, getByRole } = render( + ); + // navigate to Azure + const azureSelectorButton = getByTestId(CIS_AZURE_OPTION_TEST_SUBJ); + userEvent.click(azureSelectorButton); + const setupTechnologySelectorAccordion = queryByTestId( SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ ); + const setupTechnologySelector = getByTestId(SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ); + const tenantIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID); + const clientIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID); + const clientSecretField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET); + const armTemplateSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE); + const manualSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL); - expect(setupTechnologySelectorAccordion).not.toBeInTheDocument(); + // default state for Azure with the Org selected + expect(setupTechnologySelectorAccordion).toBeInTheDocument(); + expect(setupTechnologySelector).toBeInTheDocument(); + expect(setupTechnologySelector).toHaveTextContent(/agentless/i); + expect(tenantIdField).toBeInTheDocument(); + expect(clientIdField).toBeInTheDocument(); + expect(clientSecretField).toBeInTheDocument(); + expect(armTemplateSelector).not.toBeInTheDocument(); + expect(manualSelector).not.toBeInTheDocument(); + + // select agent-based and check for ARM template option + userEvent.click(setupTechnologySelector); + const agentBasedOption = getByRole('option', { name: /agent-based/i }); + await waitForEuiPopoverOpen(); + userEvent.click(agentBasedOption); + await waitFor(() => { + expect(getByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE)).toBeInTheDocument(); + expect(getByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL)).toBeInTheDocument(); + }); }); - it('should not render setup technology selector for CNVM', () => { + it('should render setup technology selector for Azure for Single Subscription type', async () => { const agentlessPolicy = getMockAgentlessAgentPolicy(); - const newPackagePolicy = getMockPolicyVulnMgmtAWS(); + const newPackagePolicy = getMockPolicyAzure({ + 'azure.account_type': { value: 'single-account', type: 'text' }, + }); + + const { getByTestId, queryByTestId } = render( + + ); + + // navigate to Azure + const azureSelectorButton = getByTestId(CIS_AZURE_OPTION_TEST_SUBJ); + userEvent.click(azureSelectorButton); + + const setupTechnologySelectorAccordion = queryByTestId( + SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ + ); + const setupTechnologySelector = getByTestId(SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ); + const tenantIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.TENANT_ID); + const clientIdField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_ID); + const clientSecretField = queryByTestId(CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS.CLIENT_SECRET); + const armTemplateSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.ARM_TEMPLATE); + const manualSelector = queryByTestId(CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS.MANUAL); + + // default state for Azure with the Org selected + expect(setupTechnologySelectorAccordion).toBeInTheDocument(); + expect(setupTechnologySelector).toBeInTheDocument(); + expect(setupTechnologySelector).toHaveTextContent(/agentless/i); + expect(tenantIdField).toBeInTheDocument(); + expect(clientIdField).toBeInTheDocument(); + expect(clientSecretField).toBeInTheDocument(); + expect(armTemplateSelector).not.toBeInTheDocument(); + expect(manualSelector).not.toBeInTheDocument(); + }); + + it('should not render setup technology selector for KSPM', () => { + const agentlessPolicy = getMockAgentlessAgentPolicy(); + const newPackagePolicy = getMockPolicyEKS(); const { queryByTestId } = render( @@ -1619,19 +1693,12 @@ describe('', () => { expect(setupTechnologySelectorAccordion).not.toBeInTheDocument(); }); - it('should not render setup technology selector for CSPM Azure', () => { + it('should not render setup technology selector for CNVM', () => { const agentlessPolicy = getMockAgentlessAgentPolicy(); - let newPackagePolicy = getMockPolicyAzure(); - newPackagePolicy = getPosturePolicy(newPackagePolicy, CLOUDBEAT_AZURE, { - 'azure.credentials.type': { value: 'service_principal_with_client_certificate' }, - }); + const newPackagePolicy = getMockPolicyVulnMgmtAWS(); const { queryByTestId } = render( - + ); const setupTechnologySelectorAccordion = queryByTestId( diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx index 37c0e147c79b2..fef3fd2c59a5c 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx @@ -425,18 +425,21 @@ const AzureAccountTypeSelect = ({ updatePolicy, disabled, packageInfo, + setupTechnology, }: { input: Extract; newPolicy: NewPackagePolicy; updatePolicy: (updatedPolicy: NewPackagePolicy) => void; disabled: boolean; packageInfo: PackageInfo; + setupTechnology: SetupTechnology; }) => { const isAzureOrganizationDisabled = isBelowMinVersion( packageInfo.version, AZURE_ORG_MINIMUM_PACKAGE_VERSION ); const azureAccountTypeOptions = getAzureAccountTypeOptions(isAzureOrganizationDisabled); + const isAgentless = setupTechnology === SetupTechnology.AGENTLESS; useEffect(() => { if (!getAzureAccountType(input)) { @@ -447,7 +450,9 @@ const AzureAccountTypeSelect = ({ type: 'text', }, 'azure.credentials.type': { - value: AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE, + value: isAgentless + ? 'service_principal_with_client_secret' + : AZURE_ARM_TEMPLATE_CREDENTIAL_TYPE, type: 'text', }, }) @@ -743,6 +748,7 @@ export const CspPolicyTemplateForm = memo )} diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx index a7a96ba4c9174..fd816d03fb507 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_selectors.tsx @@ -20,6 +20,7 @@ import type { PostureInput, CloudSecurityPolicyTemplate } from '../../../common/ import { getPolicyTemplateInputOptions, type NewPackagePolicyPostureInput } from './utils'; import { RadioGroup } from './csp_boxed_radio_group'; import { AzureCredentialsForm } from './azure_credentials_form/azure_credentials_form'; +import { AzureCredentialsFormAgentless } from './azure_credentials_form/azure_credentials_form_agentless'; import { AwsCredentialsForm } from './aws_credentials_form/aws_credentials_form'; import { AwsCredentialsFormAgentless } from './aws_credentials_form/aws_credentials_form_agentless'; import { EksCredentialsForm } from './eks_credentials_form'; @@ -103,6 +104,10 @@ export const PolicyTemplateVarsForm = ({ return ; case 'cloudbeat/cis_azure': + if (isAgentless) { + return ; + } + return ; default: return null; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts index 0e32964fae40f..7494a808dcdf3 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.test.ts @@ -10,7 +10,12 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { SetupTechnology } from '@kbn/fleet-plugin/public'; import { AgentPolicy, NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; -import { CLOUDBEAT_AWS, CLOUDBEAT_AZURE, CLOUDBEAT_GCP } from '../../../../common/constants'; +import { + CLOUDBEAT_AWS, + CLOUDBEAT_AZURE, + CLOUDBEAT_EKS, + CLOUDBEAT_GCP, +} from '../../../../common/constants'; import { useSetupTechnology } from './use_setup_technology'; describe('useSetupTechnology', () => { @@ -47,12 +52,22 @@ describe('useSetupTechnology', () => { expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); }); - it('sets to AGENT_BASED when agentless is available and Azure cloud', () => { + it('sets to AGENTLESS when agentless is available and Azure cloud', () => { const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const input = { type: CLOUDBEAT_AZURE } as NewPackagePolicyInput; const { result } = renderHook(() => useSetupTechnology({ input, agentlessPolicy, isEditPage }) ); + expect(result.current.isAgentlessAvailable).toBeTruthy(); + expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); + }); + + it('sets to AGENT_BASED when agentless is available but input is not supported for agentless', () => { + const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; + const input = { type: CLOUDBEAT_EKS } as NewPackagePolicyInput; + const { result } = renderHook(() => + useSetupTechnology({ input, agentlessPolicy, isEditPage }) + ); expect(result.current.isAgentlessAvailable).toBeFalsy(); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENT_BASED); }); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts index bcca6cd2ed41a..1eb3334d09103 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts @@ -8,7 +8,7 @@ import { useEffect, useState } from 'react'; import { AgentPolicy, NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; import { SetupTechnology } from '@kbn/fleet-plugin/public'; -import { CLOUDBEAT_AWS, CLOUDBEAT_GCP } from '../../../../common/constants'; +import { CLOUDBEAT_AWS, CLOUDBEAT_GCP, CLOUDBEAT_AZURE } from '../../../../common/constants'; export const useSetupTechnology = ({ input, @@ -25,7 +25,8 @@ export const useSetupTechnology = ({ }) => { const isCspmAws = input.type === CLOUDBEAT_AWS; const isCspmGcp = input.type === CLOUDBEAT_GCP; - const isAgentlessSupportedForCloudProvider = isCspmAws || isCspmGcp; + const isCspmAzure = input.type === CLOUDBEAT_AZURE; + const isAgentlessSupportedForCloudProvider = isCspmAws || isCspmGcp || isCspmAzure; const isAgentlessAvailable = Boolean(isAgentlessSupportedForCloudProvider && agentlessPolicy); const agentPolicyId = agentPolicy?.id; const agentlessPolicyId = agentlessPolicy?.id; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts index b05c7fe096516..a95940b600e2c 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts @@ -14,6 +14,7 @@ import { getCspmCloudShellDefaultValue, isBelowMinVersion, getDefaultAwsCredentialsType, + getDefaultAzureCredentialsType, } from './utils'; import { getMockPolicyAWS, getMockPolicyK8s, getMockPolicyEKS } from './mocks'; @@ -350,3 +351,66 @@ describe('getDefaultAwsCredentialsType', () => { expect(result).toBe('cloud_formation'); }); }); + +describe('getDefaultAzureCredentialsType', () => { + let packageInfo: PackageInfo; + + beforeEach(() => { + packageInfo = { + policy_templates: [ + { + name: 'cspm', + inputs: [ + { + vars: [ + { + name: 'arm_template_url', + default: 'http://example.com/arm_template_url', + }, + ], + }, + ], + }, + ], + } as PackageInfo; + }); + + it('should return "service_principal_with_client_secret" for agentless', () => { + const setupTechnology = SetupTechnology.AGENTLESS; + const result = getDefaultAzureCredentialsType(packageInfo, setupTechnology); + + expect(result).toBe('service_principal_with_client_secret'); + }); + + it('shold return "arm_template" for agent-based, when arm_template is available', () => { + const setupTechnology = SetupTechnology.AGENT_BASED; + const result = getDefaultAzureCredentialsType(packageInfo, setupTechnology); + + expect(result).toBe('arm_template'); + }); + + it('should return "managed_identity" for agent-based, when arm_template is not available', () => { + const setupTechnology = SetupTechnology.AGENT_BASED; + packageInfo = { + policy_templates: [ + { + name: 'cspm', + inputs: [ + { + vars: [ + { + name: 'cloud_shell', + default: 'http://example.com/cloud_shell', + }, + ], + }, + ], + }, + ], + } as PackageInfo; + + const result = getDefaultAzureCredentialsType(packageInfo, setupTechnology); + + expect(result).toBe('managed_identity'); + }); +}); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts index e3b8055497e22..bd9ce3850a7b2 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts @@ -227,6 +227,23 @@ export const getDefaultAwsCredentialsType = ( return DEFAULT_MANUAL_AWS_CREDENTIALS_TYPE; }; + +export const getDefaultAzureCredentialsType = ( + packageInfo: PackageInfo, + setupTechnology?: SetupTechnology +): string => { + if (setupTechnology && setupTechnology === SetupTechnology.AGENTLESS) { + return 'service_principal_with_client_secret'; + } + + const hasArmTemplateUrl = !!getArmTemplateUrlFromCspmPackage(packageInfo); + if (hasArmTemplateUrl) { + return 'arm_template'; + } + + return 'managed_identity'; +}; + /** * Input vars that are hidden from the user */ @@ -234,7 +251,7 @@ export const getPostureInputHiddenVars = ( inputType: PostureInput, packageInfo: PackageInfo, setupTechnology: SetupTechnology -) => { +): Record | undefined => { switch (inputType) { case 'cloudbeat/cis_aws': return { @@ -243,6 +260,13 @@ export const getPostureInputHiddenVars = ( type: 'text', }, }; + case 'cloudbeat/cis_azure': + return { + 'azure.credentials.type': { + value: getDefaultAzureCredentialsType(packageInfo, setupTechnology), + type: 'text', + }, + }; case 'cloudbeat/cis_eks': return { 'aws.credentials.type': { value: DEFAULT_EKS_VARS_GROUP, type: 'text' } }; default: diff --git a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts index e5c01bfb933e3..ca6fc35c75340 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts @@ -59,6 +59,28 @@ export const GCP_CREDENTIALS_TYPE_OPTIONS_TEST_SUBJ = { MANUAL: 'gcpManualOptionTestId', }; export const CIS_GCP_OPTION_TEST_SUBJ = 'cisGcpTestId'; +export const CIS_AZURE_OPTION_TEST_SUBJ = 'cisAzureTestId'; export const SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ = 'setup-technology-selector-accordion'; export const SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ = 'setup-technology-selector'; +export const CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS = { + TENANT_ID: 'cisAzureTenantId', + CLIENT_ID: 'cisAzureClientId', + CLIENT_SECRET: 'cisAzureClientSecret', + CLIENT_CERTIFICATE_PATH: 'cisAzureClientCertificatePath', + CLIENT_CERTIFICATE_PASSWORD: 'cisAzureClientCertificatePassword', + CLIENT_USERNAME: 'cisAzureClientUsername', + CLIENT_PASSWORD: 'cisAzureClientPassword', +}; +export const CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS = { + ARM_TEMPLATE: 'cisAzureArmTemplate', + MANUAL: 'cisAzureManual', +}; +export const CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS = { + GOOGLE_CLOUD_SHELL_SETUP: 'google_cloud_shell_setup_test_id', + PROJECT_ID: 'project_id_test_id', + ORGANIZATION_ID: 'organization_id_test_id', + CREDENTIALS_TYPE: 'credentials_type_test_id', + CREDENTIALS_FILE: 'credentials_file_test_id', + CREDENTIALS_JSON: 'credentials_json_test_id', +}; diff --git a/x-pack/plugins/cross_cluster_replication/kibana.jsonc b/x-pack/plugins/cross_cluster_replication/kibana.jsonc index f4f89e665432b..0b85ba18781d8 100644 --- a/x-pack/plugins/cross_cluster_replication/kibana.jsonc +++ b/x-pack/plugins/cross_cluster_replication/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/cross-cluster-replication-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "crossClusterReplication", "server": true, diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx index 048d6e478f71b..e80168ab079cf 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/new_index/new_search_index_page.tsx @@ -41,7 +41,7 @@ function getTitle(method: string, serviceType: string): string { Boolean(serviceType) && CONNECTORS.find((item) => item.serviceType === serviceType); return connector ? i18n.translate('xpack.enterpriseSearch.content.new_index.connectorTitleWithServiceType', { - defaultMessage: 'New {name} search index', + defaultMessage: 'New {name} connector', values: { name: connector.name, }, diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx index afe579827a019..da934fb654a3f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/shared/getting_started/getting_started.tsx @@ -74,9 +74,11 @@ export const GettingStarted: React.FC = ({ elasticsearchClients: docLinks.clientsGuide, kibanaRunApiInConsole: docLinks.consoleGuide, }} - http={http} isPanelLeft={isPanelLeft} overviewPanelProps={{ color: 'plain', hasShadow: false }} + application={services.application} + sharePlugin={services.share} + consolePlugin={services.console} > {languageDefinitions.map((language, index) => ( diff --git a/x-pack/plugins/event_log/generated/mappings.json b/x-pack/plugins/event_log/generated/mappings.json index 561217eeae803..84c7b8acd303f 100644 --- a/x-pack/plugins/event_log/generated/mappings.json +++ b/x-pack/plugins/event_log/generated/mappings.json @@ -398,6 +398,9 @@ "prepare_rule_duration_ms": { "type": "long" }, + "prepare_to_run_duration_ms": { + "type": "long" + }, "total_run_duration_ms": { "type": "long" }, diff --git a/x-pack/plugins/event_log/generated/schemas.ts b/x-pack/plugins/event_log/generated/schemas.ts index b8be2221ec1ed..d4865320c042d 100644 --- a/x-pack/plugins/event_log/generated/schemas.ts +++ b/x-pack/plugins/event_log/generated/schemas.ts @@ -175,6 +175,7 @@ export const EventSchema = schema.maybe( claim_to_start_duration_ms: ecsStringOrNumber(), persist_alerts_duration_ms: ecsStringOrNumber(), prepare_rule_duration_ms: ecsStringOrNumber(), + prepare_to_run_duration_ms: ecsStringOrNumber(), total_run_duration_ms: ecsStringOrNumber(), total_enrichment_duration_ms: ecsStringOrNumber(), }) diff --git a/x-pack/plugins/event_log/scripts/mappings.js b/x-pack/plugins/event_log/scripts/mappings.js index 6d0ec3635ab41..db5334d7d4ef6 100644 --- a/x-pack/plugins/event_log/scripts/mappings.js +++ b/x-pack/plugins/event_log/scripts/mappings.js @@ -173,6 +173,9 @@ exports.EcsCustomPropertyMappings = { prepare_rule_duration_ms: { type: 'long', }, + prepare_to_run_duration_ms: { + type: 'long', + }, total_run_duration_ms: { type: 'long', }, diff --git a/x-pack/plugins/fleet/common/types/models/agent.ts b/x-pack/plugins/fleet/common/types/models/agent.ts index 7edc939ee1bcd..6291f73d02f09 100644 --- a/x-pack/plugins/fleet/common/types/models/agent.ts +++ b/x-pack/plugins/fleet/common/types/models/agent.ts @@ -107,6 +107,13 @@ interface AgentBase { tags?: string[]; components?: FleetServerAgentComponent[]; agent?: FleetServerAgentMetadata; + unhealthy_reason?: UnhealthyReason[]; +} + +export enum UnhealthyReason { + INPUT = 'input', + OUTPUT = 'output', + OTHER = 'other', } export interface AgentMetrics { @@ -336,6 +343,11 @@ export interface FleetServerAgent { * Outputs map */ outputs?: OutputMap; + + /** + * Unhealthy reason: input, output, other + */ + unhealthy_reason?: UnhealthyReason[]; } /** diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/markdown_renderers.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/markdown_renderers.tsx index e15b279ede30e..6dc1415b6416d 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/markdown_renderers.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/markdown_renderers.tsx @@ -111,5 +111,10 @@ export const markdownRenderers = ( ); }, + img: ( + props: React.ClassAttributes & React.ImgHTMLAttributes + ) => { + return {props.alt}; + }, }; }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/readme.test.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/readme.test.tsx new file mode 100644 index 0000000000000..e303060778290 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/overview/readme.test.tsx @@ -0,0 +1,40 @@ +/* + * 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 { createIntegrationsTestRendererMock } from '../../../../../../../mock'; + +import { Readme } from './readme'; + +describe('Readme', () => { + function render() { + const refs = { + current: { + set: jest.fn(), + get: jest.fn(), + }, + } as any; + const testRenderer = createIntegrationsTestRendererMock(); + return testRenderer.render( + + ); + } + it('should render img tag with max width', () => { + const result = render(); + + const img = result.getByAltText('Image'); + + expect(img).toHaveStyle('max-width: 100%'); + expect(img).toHaveAttribute('src', '/mock/api/fleet/epm/packages/test/1.0.0//img/image.png'); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap index 86f8126c1c45a..21192a1158009 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap +++ b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap @@ -12,7 +12,7 @@ Object { "logs": false, "metrics": true, "namespace": "default", - "use_output": "default", + "use_output": "test-id", }, "protection": Object { "enabled": false, @@ -35,7 +35,7 @@ Object { ], }, }, - "default": Object { + "test-id": Object { "_elastic_agent_checks": Object { "cluster": Array [ "monitor", @@ -61,7 +61,7 @@ Object { "preset": "balanced", "type": "elasticsearch", }, - "default": Object { + "test-id": Object { "hosts": Array [ "http://127.0.0.1:9201", ], @@ -106,13 +106,6 @@ Object { "id": "agent-policy", "inputs": Array [], "output_permissions": Object { - "default": Object { - "_elastic_agent_checks": Object { - "cluster": Array [ - "monitor", - ], - }, - }, "monitoring-output-id": Object { "_elastic_agent_checks": Object { "cluster": Array [ @@ -130,18 +123,25 @@ Object { ], }, }, + "test-id": Object { + "_elastic_agent_checks": Object { + "cluster": Array [ + "monitor", + ], + }, + }, }, "outputs": Object { - "default": Object { + "monitoring-output-id": Object { "hosts": Array [ - "http://127.0.0.1:9201", + "http://es-monitoring.co:9201", ], "preset": "balanced", "type": "elasticsearch", }, - "monitoring-output-id": Object { + "test-id": Object { "hosts": Array [ - "http://es-monitoring.co:9201", + "http://127.0.0.1:9201", ], "preset": "balanced", "type": "elasticsearch", diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts index a5cba9f9cab3e..09bf54773509f 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts @@ -197,7 +197,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - default: { + 'test-id': { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -228,7 +228,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - default: { + 'test-id': { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -244,7 +244,7 @@ describe('getFullAgentPolicy', () => { }, monitoring: { namespace: 'default', - use_output: 'default', + use_output: 'test-id', enabled: true, logs: true, metrics: false, @@ -264,7 +264,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - default: { + 'test-id': { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -280,7 +280,7 @@ describe('getFullAgentPolicy', () => { }, monitoring: { namespace: 'default', - use_output: 'default', + use_output: 'test-id', enabled: true, logs: false, metrics: true, @@ -358,7 +358,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchSnapshot(); }); - it('should use "default" as the default policy id', async () => { + it('should use output id from default policy id', async () => { mockAgentPolicy({ id: 'policy', status: 'active', @@ -372,7 +372,7 @@ describe('getFullAgentPolicy', () => { const agentPolicy = await getFullAgentPolicy(savedObjectsClientMock.create(), 'agent-policy'); - expect(agentPolicy?.outputs.default).toBeDefined(); + expect(agentPolicy?.outputs['test-id']).toBeDefined(); }); it('should return the sourceURI from the agent policy', async () => { @@ -387,7 +387,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - default: { + 'test-id': { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -403,7 +403,7 @@ describe('getFullAgentPolicy', () => { }, monitoring: { namespace: 'default', - use_output: 'default', + use_output: 'test-id', enabled: true, logs: false, metrics: true, @@ -427,7 +427,7 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy).toMatchObject({ id: 'agent-policy', outputs: { - default: { + 'test-id': { type: 'elasticsearch', hosts: ['http://127.0.0.1:9201'], }, @@ -440,7 +440,7 @@ describe('getFullAgentPolicy', () => { agent: { monitoring: { namespace: 'default', - use_output: 'default', + use_output: 'test-id', enabled: true, logs: false, metrics: true, @@ -626,7 +626,7 @@ describe('getFullAgentPolicy', () => { }, ], type: 'test-logs', - use_output: 'default', + use_output: 'test-id', }, { data_stream: { @@ -652,11 +652,11 @@ describe('getFullAgentPolicy', () => { }, ], type: 'test-logs', - use_output: 'default', + use_output: 'test-id', }, ], output_permissions: { - default: { + 'test-id': { _elastic_agent_checks: { cluster: ['monitor'], }, @@ -679,7 +679,7 @@ describe('getFullAgentPolicy', () => { }, }, outputs: { - default: { + 'test-id': { hosts: ['http://127.0.0.1:9201'], preset: 'balanced', type: 'elasticsearch', diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts index 293090e9813fc..3a35eb9373cb6 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts @@ -32,7 +32,6 @@ import type { } from '../../../common/types'; import { agentPolicyService } from '../agent_policy'; import { dataTypes, kafkaCompressionType, outputType } from '../../../common/constants'; -import { DEFAULT_OUTPUT } from '../../constants'; import { getPackageInfo } from '../epm/packages'; import { pkgToPkgKey, splitPkgKey } from '../epm/registry'; @@ -491,13 +490,8 @@ export function transformOutputToFullPolicyOutput( /** * Get id used in full agent policy (sent to the agents) - * we use "default" for the default policy to avoid breaking changes */ function getOutputIdForAgentPolicy(output: Output) { - if (output.is_default) { - return DEFAULT_OUTPUT.name; - } - return output.id; } diff --git a/x-pack/plugins/fleet/server/services/agents/helpers.ts b/x-pack/plugins/fleet/server/services/agents/helpers.ts index 6da24cdbfb55c..21e4e864e3b6f 100644 --- a/x-pack/plugins/fleet/server/services/agents/helpers.ts +++ b/x-pack/plugins/fleet/server/services/agents/helpers.ts @@ -92,6 +92,7 @@ export function searchHitToAgent( // key-value pairs user_provided_metadata: hit._source?.user_provided_metadata!, local_metadata: hit._source?.local_metadata!, + unhealthy_reason: hit._source?.unhealthy_reason, }; if (!hit.fields?.status?.length) { diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts index 308a10f1bf94d..740ea2af537e9 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/install.ts @@ -727,7 +727,7 @@ async function handleTransformInstall({ body: transform.content, }, // add '{ headers: { es-secondary-authorization: 'ApiKey {encodedApiKey}' } }' - secondaryAuth ? { ...secondaryAuth } : undefined + { ignore: [409], ...(secondaryAuth ? { ...secondaryAuth } : {}) } ), { logger } ); @@ -740,7 +740,9 @@ async function handleTransformInstall({ err?.body?.error?.reason?.includes('unauthorized for API key'); const isAlreadyExistError = - isResponseError && err?.body?.error?.type === 'resource_already_exists_exception'; + isResponseError && + (err?.body?.error?.type === 'resource_already_exists_exception' || + err?.body?.error?.caused_by?.type?.includes('version_conflict_engine_exception')); // swallow the error if the transform already exists or if API key has insufficient permissions if (!isUnauthorizedAPIKey && !isAlreadyExistError) { @@ -770,9 +772,9 @@ async function handleTransformInstall({ err?.body?.error?.type === 'security_exception' && err?.body?.error?.reason?.includes('lacks the required permissions'); - // swallow the error if the transform can't be started if API key has insufficient permissions + // No need to throw error if transform cannot be started, as failure to start shouldn't block package installation if (!isUnauthorizedAPIKey) { - throw err; + logger.debug(`Error starting transform: ${transform.installationName} cause ${err}`); } } } @@ -785,7 +787,7 @@ async function handleTransformInstall({ () => esClient.transform.getTransformStats( { transform_id: transform.installationName }, - { ignore: [409] } + { ignore: [409, 404] } ), { logger, additionalResponseStatuses: [400] } ); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts index 72474d3081f39..4b58dda7d0746 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/legacy_transforms.test.ts @@ -203,6 +203,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], [ { @@ -210,6 +211,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ @@ -351,6 +353,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ @@ -576,6 +579,7 @@ describe('test transform install with legacy schema', () => { defer_validation: true, body: { content: 'data', _meta: meta }, }, + { ignore: [409] }, ], ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts index f0b84ebac1f29..d664392b8b676 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/reauthorize.ts @@ -127,7 +127,7 @@ export async function handleTransformReauthorizeAndStart({ { transform_id: transformId, }, - { ...(secondaryAuth ? secondaryAuth : {}) } + { ...(secondaryAuth ? secondaryAuth : {}), ignore: [404] } ), { logger, additionalResponseStatuses: [400] } ) @@ -136,6 +136,7 @@ export async function handleTransformReauthorizeAndStart({ const transformsMetadata: FleetTransformMetadata[] = transformInfos .flat() + .filter((t) => t.transforms !== undefined) .map((t) => { const transform = t.transforms?.[0]; return { ...transform._meta, transformId: transform?.id }; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts index 164cf81824cff..4d927ca4cef69 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transforms.test.ts @@ -402,7 +402,9 @@ _meta: // Destination index is not created before transform is created expect(esClient.indices.create.mock.calls).toEqual([]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { @@ -684,7 +686,9 @@ _meta: // Destination index is not created before transform is created expect(esClient.indices.create.mock.calls).toEqual([]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { @@ -943,7 +947,9 @@ _meta: // Destination index is not created before transform is created expect(esClient.indices.create.mock.calls).toEqual([]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); expect(esClient.transform.startTransform.mock.calls).toEqual([ [ { @@ -1094,7 +1100,9 @@ _meta: authorizationHeader, }); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); // Does not start transform because start is set to false in manifest.yml expect(esClient.transform.startTransform.mock.calls).toEqual([]); }); @@ -1211,7 +1219,9 @@ _meta: { ignore: [404] }, ], ]); - expect(esClient.transform.putTransform.mock.calls).toEqual([[expectedData.TRANSFORM]]); + expect(esClient.transform.putTransform.mock.calls).toEqual([ + [expectedData.TRANSFORM, { ignore: [409] }], + ]); }); test('retain old transforms and do nothing if fleet_transform_version is the same', async () => { diff --git a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts index d8e8030279620..565c56695c141 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.test.ts @@ -71,6 +71,22 @@ describe('fetchAgentMetrics', () => { }, ], }, + unhealthy_reason: { + buckets: [ + { + key: 'input', + doc_count: 2, + }, + { + key: 'output', + doc_count: 1, + }, + { + key: 'other', + doc_count: 3, + }, + ], + }, }, }); @@ -95,6 +111,11 @@ describe('fetchAgentMetrics', () => { scheduled: 0, watching: 0, }, + unhealthy_reason: { + input: 2, + output: 1, + other: 3, + }, }); }); }); diff --git a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts index 6fc0966e266ed..d753bf1e31888 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fetch_agent_metrics.ts @@ -20,6 +20,7 @@ export interface AgentMetrics { agents: AgentUsage; agents_per_version: AgentPerVersion[]; upgrading_step: UpgradingSteps; + unhealthy_reason: UnhealthyReason; } export interface UpgradingSteps { @@ -34,6 +35,12 @@ export interface UpgradingSteps { failed: number; } +export interface UnhealthyReason { + input: number; + output: number; + other: number; +} + export const fetchAgentMetrics = async ( core: CoreSetup, abortController: AbortController @@ -63,6 +70,7 @@ export const fetchAgentMetrics = async ( agents: await getAgentUsage(soClient, esClient), agents_per_version: await getAgentsPerVersion(esClient, abortController), upgrading_step: await getUpgradingSteps(esClient, abortController), + unhealthy_reason: await getUnhealthyReason(esClient, abortController), }; return usage; }; @@ -195,3 +203,53 @@ export const getUpgradingSteps = async ( return upgradingSteps; } }; + +export const getUnhealthyReason = async ( + esClient: ElasticsearchClient, + abortController: AbortController +): Promise => { + const unhealthyReason = { + input: 0, + output: 0, + other: 0, + }; + try { + const response = await retryTransientEsErrors(() => + esClient.search( + { + index: AGENTS_INDEX, + size: 0, + aggs: { + unhealthy_reason: { + terms: { field: 'unhealthy_reason' }, + }, + }, + }, + { signal: abortController.signal } + ) + ); + ((response?.aggregations?.unhealthy_reason as any)?.buckets ?? []).forEach((bucket: any) => { + switch (bucket.key) { + case 'input': + unhealthyReason.input = bucket.doc_count; + break; + case 'output': + unhealthyReason.output = bucket.doc_count; + break; + case 'other': + unhealthyReason.other = bucket.doc_count; + break; + default: + break; + } + }); + return unhealthyReason; + } catch (error) { + if (error.statusCode === 404) { + appContextService.getLogger().debug('Index .fleet-agents does not exist yet.'); + } else { + throw error; + } + return unhealthyReason; + } +}; diff --git a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts index 17c6ede4c3f74..649fa6fc848c5 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.test.ts @@ -104,6 +104,11 @@ describe('fleet metrics task', () => { count: 2, }, ], + unhealthy_reason: { + input: 2, + output: 1, + other: 3, + }, }); }); @@ -149,6 +154,11 @@ describe('fleet metrics task', () => { scheduled: 1, requested: 1, }, + unhealthy_reason: { + input: 2, + output: 1, + other: 3, + }, }, }, }), diff --git a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts index bd72976fa603c..c60716f312148 100644 --- a/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts +++ b/x-pack/plugins/fleet/server/services/metrics/fleet_metrics_task.ts @@ -20,7 +20,7 @@ import { appContextService } from '../app_context'; import type { AgentMetrics } from './fetch_agent_metrics'; export const TYPE = 'Fleet-Metrics-Task'; -export const VERSION = '1.0.0'; +export const VERSION = '1.1.0'; const TITLE = 'Fleet Metrics Task'; const TIMEOUT = '1m'; const SCOPE = ['fleet']; @@ -115,6 +115,7 @@ export class FleetMetricsTask { unhealthy: agents.unhealthy, inactive: agents.inactive, upgrading_step: agentMetrics.upgrading_step, + unhealthy_reason: agentMetrics.unhealthy_reason, }, }, }; diff --git a/x-pack/plugins/grokdebugger/kibana.jsonc b/x-pack/plugins/grokdebugger/kibana.jsonc index aa0bdc864142f..c006355cc9265 100644 --- a/x-pack/plugins/grokdebugger/kibana.jsonc +++ b/x-pack/plugins/grokdebugger/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/grokdebugger-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "grokdebugger", "server": true, diff --git a/x-pack/plugins/index_lifecycle_management/kibana.jsonc b/x-pack/plugins/index_lifecycle_management/kibana.jsonc index 906b19835741e..e61210ebbbef9 100644 --- a/x-pack/plugins/index_lifecycle_management/kibana.jsonc +++ b/x-pack/plugins/index_lifecycle_management/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/index-lifecycle-management-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "indexLifecycleManagement", "server": true, diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.helpers.ts b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.helpers.ts index 732fc8f0456fa..77b2fb5ecd788 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.helpers.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.helpers.ts @@ -43,6 +43,9 @@ export interface IndexDetailsPageTestBed extends TestBed { getDocsLinkHref: () => string; isErrorDisplayed: () => boolean; clickErrorReloadButton: () => Promise; + getTreeViewContent: () => string; + clickToggleViewButton: () => Promise; + isSearchBarDisabled: () => boolean; }; settings: { getCodeBlockContent: () => string; @@ -195,6 +198,18 @@ export const setup = async ({ }); component.update(); }, + getTreeViewContent: () => { + return find('@timestampField-fieldName').text(); + }, + clickToggleViewButton: async () => { + await act(async () => { + find('indexDetailsMappingsToggleViewButton').simulate('click'); + }); + component.update(); + }, + isSearchBarDisabled: () => { + return find('DocumentFieldsSearch').prop('disabled'); + }, }; const settings = { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx index d2e33b12e3637..876d8952a32bd 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/index_details_page.test.tsx @@ -476,6 +476,24 @@ describe('', () => { expect(tabContent).toEqual(JSON.stringify(testIndexMappings, null, 2)); }); + it('displays the mappings in the table view', async () => { + await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Mappings); + await testBed.actions.mappings.clickToggleViewButton(); + const tabContent = testBed.actions.mappings.getTreeViewContent(); + expect(tabContent).toContain('@timestamp'); + }); + + it('search bar is enabled in JSON view', async () => { + await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Mappings); + expect(testBed.actions.mappings.isSearchBarDisabled()).toBe(true); + }); + + it('search bar is disabled in Tree view', async () => { + await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Mappings); + await testBed.actions.mappings.clickToggleViewButton(); + expect(testBed.actions.mappings.isSearchBarDisabled()).toBe(false); + }); + it('sets the docs link href from the documentation service', async () => { await testBed.actions.clickIndexDetailsTab(IndexDetailsSection.Mappings); const docsLinkHref = testBed.actions.mappings.getDocsLinkHref(); diff --git a/x-pack/plugins/index_management/kibana.jsonc b/x-pack/plugins/index_management/kibana.jsonc index 68d16daaed792..529caf57e3ec0 100644 --- a/x-pack/plugins/index_management/kibana.jsonc +++ b/x-pack/plugins/index_management/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/index-management-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "indexManagement", "server": true, diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_header.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_header.tsx index 4ddf2b9060698..33f4e014b319e 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_header.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_header.tsx @@ -7,10 +7,11 @@ import React from 'react'; -import { EuiText, EuiLink, EuiFlexGroup, EuiFlexItem, EuiFieldSearch } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { documentationService } from '../../../../services/documentation'; +import { DocumentFieldsSearch } from './document_fields_search'; interface Props { searchValue: string; @@ -37,34 +38,7 @@ export const DocumentFieldsHeader = React.memo(({ searchValue, onSearchChange }: /> - - - { - // Temporary fix until EUI fixes the contract - // See my comment https://github.com/elastic/eui/pull/2723/files#r366725059 - if (typeof e === 'string') { - onSearchChange(e); - } else { - onSearchChange(e.target.value); - } - }} - aria-label={i18n.translate( - 'xpack.idxMgmt.mappingsEditor.documentFields.searchFieldsAriaLabel', - { - defaultMessage: 'Search mapped fields', - } - )} - /> - + ); }); diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_search.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_search.tsx new file mode 100644 index 0000000000000..b596c214dd0c5 --- /dev/null +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/document_fields_search.tsx @@ -0,0 +1,53 @@ +/* + * 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 { EuiFieldSearch, EuiFlexItem } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +interface Props { + searchValue: string; + onSearchChange(value: string): void; + disabled?: boolean; +} + +export const DocumentFieldsSearch = React.memo( + ({ searchValue, onSearchChange, disabled = false }: Props) => { + return ( + + { + // Temporary fix until EUI fixes the contract + // See my comment https://github.com/elastic/eui/pull/2723/files#r366725059 + if (typeof e === 'string') { + onSearchChange(e); + } else { + onSearchChange(e.target.value); + } + }} + aria-label={i18n.translate( + 'xpack.idxMgmt.mappingsEditor.documentFields.searchFieldsAriaLabel', + { + defaultMessage: 'Search mapped fields', + } + )} + data-test-subj="DocumentFieldsSearch" + /> + + ); + } +); diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx index 02c9415292826..3055da755cdda 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/mappings_editor.tsx @@ -33,7 +33,7 @@ import { DocLinksStart } from './shared_imports'; type TabName = 'fields' | 'runtimeFields' | 'advanced' | 'templates'; -interface MappingsEditorParsedMetadata { +export interface MappingsEditorParsedMetadata { parsedDefaultValue?: { configuration: MappingsConfiguration; fields: { [key: string]: Field }; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/types/state.ts b/x-pack/plugins/index_management/public/application/components/mappings_editor/types/state.ts index 1c48aa55b1289..e14001234065b 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/types/state.ts +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/types/state.ts @@ -56,7 +56,7 @@ export interface MappingsFields { [key: string]: any; } -export type DocumentFieldsStatus = 'idle' | 'editingField' | 'creatingField'; +export type DocumentFieldsStatus = 'idle' | 'editingField' | 'creatingField' | 'disabled'; export interface DocumentFieldsState { status: DocumentFieldsStatus; diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/use_state_listener.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/use_state_listener.tsx index 2314f269e540d..889ccf1f7ffaf 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/use_state_listener.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/use_state_listener.tsx @@ -8,6 +8,7 @@ import { useEffect, useMemo } from 'react'; import { + DocumentFieldsStatus, Field, Mappings, MappingsConfiguration, @@ -25,16 +26,17 @@ import { import { useMappingsState, useDispatch } from './mappings_state_context'; interface Args { - onChange: OnUpdateHandler; + onChange?: OnUpdateHandler; value?: { templates: MappingsTemplates; configuration: MappingsConfiguration; fields: { [key: string]: Field }; runtime: RuntimeFields; }; + status?: DocumentFieldsStatus; } -export const useMappingsStateListener = ({ onChange, value }: Args) => { +export const useMappingsStateListener = ({ onChange, value, status }: Args) => { const state = useMappingsState(); const dispatch = useDispatch(); @@ -46,6 +48,12 @@ export const useMappingsStateListener = ({ onChange, value }: Args) => { [runtimeFields] ); + const calculateStatus = (fieldStatus: string | undefined, rootLevelFields: string | any[]) => { + if (fieldStatus) return fieldStatus; + + return rootLevelFields.length === 0 ? 'creatingField' : 'idle'; + }; + useEffect(() => { // If we are creating a new field, but haven't entered any name // it is valid and we can byPass its form validation (that requires a "name" to be defined) @@ -58,79 +66,81 @@ export const useMappingsStateListener = ({ onChange, value }: Args) => { const bypassFieldFormValidation = state.documentFields.status === 'creatingField' && emptyNameValue; - onChange({ - // Output a mappings object from the user's input. - getData: () => { - // Pull the mappings properties from the current editor - const fields = - state.documentFields.editor === 'json' - ? state.fieldsJsonEditor.format() - : deNormalize(state.fields); - - // Get the runtime fields - const runtime = deNormalizeRuntimeFields(state.runtimeFields); - - const configurationData = state.configuration.data.format(); - const templatesData = state.templates.data.format(); - - const output = { - ...stripUndefinedValues({ - ...configurationData, - ...templatesData, - }), - }; - - // Mapped fields - if (fields && Object.keys(fields).length > 0) { - output.properties = fields; - } - - // Runtime fields - if (runtime && Object.keys(runtime).length > 0) { - output.runtime = runtime; - } - - return Object.keys(output).length > 0 ? (output as Mappings) : undefined; - }, - validate: async () => { - const configurationFormValidator = - state.configuration.submitForm !== undefined - ? new Promise(async (resolve, reject) => { - try { - const { isValid } = await state.configuration.submitForm!(); - resolve(isValid); - } catch (error) { - reject(error); - } - }) - : Promise.resolve(true); - - const templatesFormValidator = - state.templates.submitForm !== undefined - ? new Promise(async (resolve, reject) => { - try { - const { isValid } = await state.templates.submitForm!(); - resolve(isValid); - } catch (error) { - reject(error); - } - }) - : Promise.resolve(true); - - const promisesToValidate = [configurationFormValidator, templatesFormValidator]; - - if (state.fieldForm !== undefined && !bypassFieldFormValidation) { - promisesToValidate.push(state.fieldForm.validate()); - } - - return Promise.all(promisesToValidate).then((validationArray) => { - const isValid = validationArray.every(Boolean) && state.fieldsJsonEditor.isValid; - dispatch({ type: 'validity:update', value: isValid }); - return isValid; - }); - }, - isValid: state.isValid, - }); + if (onChange) { + onChange({ + // Output a mappings object from the user's input. + getData: () => { + // Pull the mappings properties from the current editor + const fields = + state.documentFields.editor === 'json' + ? state.fieldsJsonEditor.format() + : deNormalize(state.fields); + + // Get the runtime fields + const runtime = deNormalizeRuntimeFields(state.runtimeFields); + + const configurationData = state.configuration.data.format(); + const templatesData = state.templates.data.format(); + + const output = { + ...stripUndefinedValues({ + ...configurationData, + ...templatesData, + }), + }; + + // Mapped fields + if (fields && Object.keys(fields).length > 0) { + output.properties = fields; + } + + // Runtime fields + if (runtime && Object.keys(runtime).length > 0) { + output.runtime = runtime; + } + + return Object.keys(output).length > 0 ? (output as Mappings) : undefined; + }, + validate: async () => { + const configurationFormValidator = + state.configuration.submitForm !== undefined + ? new Promise(async (resolve, reject) => { + try { + const { isValid } = await state.configuration.submitForm!(); + resolve(isValid); + } catch (error) { + reject(error); + } + }) + : Promise.resolve(true); + + const templatesFormValidator = + state.templates.submitForm !== undefined + ? new Promise(async (resolve, reject) => { + try { + const { isValid } = await state.templates.submitForm!(); + resolve(isValid); + } catch (error) { + reject(error); + } + }) + : Promise.resolve(true); + + const promisesToValidate = [configurationFormValidator, templatesFormValidator]; + + if (state.fieldForm !== undefined && !bypassFieldFormValidation) { + promisesToValidate.push(state.fieldForm.validate()); + } + + return Promise.all(promisesToValidate).then((validationArray) => { + const isValid = validationArray.every(Boolean) && state.fieldsJsonEditor.isValid; + dispatch({ type: 'validity:update', value: isValid }); + return isValid; + }); + }, + isValid: state.isValid, + }); + } }, [state, onChange, dispatch]); useEffect(() => { @@ -149,11 +159,11 @@ export const useMappingsStateListener = ({ onChange, value }: Args) => { templates: value.templates, fields: parsedFieldsDefaultValue, documentFields: { - status: parsedFieldsDefaultValue.rootLevelFields.length === 0 ? 'creatingField' : 'idle', + status: calculateStatus(status, parsedFieldsDefaultValue.rootLevelFields), editor: 'default', }, runtimeFields: parsedRuntimeFieldsDefaultValue, }, }); - }, [value, parsedFieldsDefaultValue, dispatch, parsedRuntimeFieldsDefaultValue]); + }, [value, parsedFieldsDefaultValue, dispatch, status, parsedRuntimeFieldsDefaultValue]); }; diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings.tsx b/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings.tsx index ddae61efc631a..03bc61ca71ab6 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings.tsx @@ -84,5 +84,5 @@ export const DetailsPageMappings: FunctionComponent<{ index: Index }> = ({ index ); } - return ; + return ; }; diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings_content.tsx b/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings_content.tsx index 0101855fd63bf..10fcb6d57172a 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings_content.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/details_page_mappings_content.tsx @@ -5,8 +5,8 @@ * 2.0. */ -import React, { FunctionComponent } from 'react'; import { + EuiButton, EuiCodeBlock, EuiFlexGroup, EuiFlexItem, @@ -16,104 +16,242 @@ import { EuiSpacer, EuiText, EuiTitle, + useEuiTheme, + EuiEmptyPrompt, } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import React, { FunctionComponent, useCallback, useMemo, useState } from 'react'; import { Index } from '../../../../../../common'; -import { documentationService } from '../../../../services'; import { useAppContext } from '../../../../app_context'; +import { DocumentFieldsSearch } from '../../../../components/mappings_editor/components/document_fields/document_fields_search'; +import { FieldsList } from '../../../../components/mappings_editor/components/document_fields/fields'; +import { SearchResult } from '../../../../components/mappings_editor/components/document_fields/search_fields'; +import { extractMappingsDefinition } from '../../../../components/mappings_editor/lib'; +import { MappingsEditorParsedMetadata } from '../../../../components/mappings_editor/mappings_editor'; +import { + useDispatch, + useMappingsState, +} from '../../../../components/mappings_editor/mappings_state_context'; +import { useMappingsStateListener } from '../../../../components/mappings_editor/use_state_listener'; +import { documentationService } from '../../../../services'; -export const DetailsPageMappingsContent: FunctionComponent<{ index: Index; data: string }> = ({ - index, - data, -}) => { +export const DetailsPageMappingsContent: FunctionComponent<{ + index: Index; + data: string; + jsonData: any; +}> = ({ index, data, jsonData }) => { const { services: { extensionsService }, core: { getUrlForApp }, } = useAppContext(); - return ( - // using "rowReverse" to keep docs links on the top of the mappings code block on smaller screen - { + setIsJSONVisible(!isJSONVisible); + }; + const mappingsDefinition = extractMappingsDefinition(jsonData); + + const { parsedDefaultValue } = useMemo(() => { + if (mappingsDefinition === null) { + return { multipleMappingsDeclared: true }; + } + + const { + _source, + _meta, + _routing, + _size, + dynamic, + properties, + runtime, + /* eslint-disable @typescript-eslint/naming-convention */ + numeric_detection, + date_detection, + dynamic_date_formats, + dynamic_templates, + /* eslint-enable @typescript-eslint/naming-convention */ + } = mappingsDefinition; + + const parsed = { + configuration: { + _source, + _meta, + _routing, + _size, + dynamic, + numeric_detection, + date_detection, + dynamic_date_formats, + }, + fields: properties, + templates: { + dynamic_templates, + }, + runtime, + }; + + return { parsedDefaultValue: parsed, multipleMappingsDeclared: false }; + }, [mappingsDefinition]); + + useMappingsStateListener({ value: parsedDefaultValue, status: 'disabled' }); + + const { + fields: { byId, rootLevelFields }, + search, + documentFields, + } = useMappingsState(); + + const getField = useCallback((fieldId: string) => byId[fieldId], [byId]); + const fields = useMemo(() => rootLevelFields.map(getField), [rootLevelFields, getField]); + const dispatch = useDispatch(); + const onSearchChange = useCallback( + (value: string) => { + dispatch({ type: 'search:update', value }); + }, + [dispatch] + ); + + const searchTerm = search.term.trim(); + + const jsonBlock = ( + - - - - - - - - -

- -

-
-
-
- - -

- -

-
- - - - -
- {extensionsService.indexMappingsContent && ( - <> - - {extensionsService.indexMappingsContent.renderContent({ index, getUrlForApp })} - + {data} +
+ ); + + const treeViewBlock = ( + + + {mappingsDefinition === null ? ( + + + + } + body={ +

+ +

+ } + /> + ) : searchTerm !== '' ? ( + + ) : ( + )}
+
+ ); - + + + + {isJSONVisible ? ( + + ) : ( + + )} + + + - - - {data} - - - -
+ + + + + + + + +

+ +

+
+
+
+ + +

+ +

+
+ + + + +
+ {extensionsService.indexMappingsContent && ( + <> + + {extensionsService.indexMappingsContent.renderContent({ index, getUrlForApp })} + + )} +
+ + + {isJSONVisible ? jsonBlock : treeViewBlock} + + + ); }; diff --git a/x-pack/plugins/ingest_pipelines/kibana.jsonc b/x-pack/plugins/ingest_pipelines/kibana.jsonc index 41e6eb32ef775..86185e7d772d2 100644 --- a/x-pack/plugins/ingest_pipelines/kibana.jsonc +++ b/x-pack/plugins/ingest_pipelines/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/ingest-pipelines-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "ingestPipelines", "server": true, diff --git a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx index 2acbd21632f2a..c780cd62b05ed 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/sections/pipelines_list/table.tsx @@ -212,6 +212,7 @@ export const PipelineTable: FunctionComponent = ({ ], box: { incremental: true, + 'data-test-subj': 'pipelineTableSearch', }, filters: [ { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_option_append.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_option_append.tsx new file mode 100644 index 0000000000000..09ec24c5b847f --- /dev/null +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_option_append.tsx @@ -0,0 +1,96 @@ +/* + * 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 './chart_switch.scss'; +import React, { ReactNode } from 'react'; +import { EuiFlexItem, EuiIconTip, EuiBetaBadge, EuiFlexGroup, EuiToolTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/react'; + +export const getDataLossWarning = (dataLoss: 'nothing' | 'layers' | 'everything' | 'columns') => { + if (dataLoss === 'nothing') { + return; + } + if (dataLoss === 'everything') { + return i18n.translate('xpack.lens.chartSwitch.dataLossEverything', { + defaultMessage: 'Changing to this visualization clears the current configuration.', + }); + } + if (dataLoss === 'layers') { + return i18n.translate('xpack.lens.chartSwitch.dataLossLayersDescription', { + defaultMessage: + 'Changing to this visualization modifies currently selected layer`s configuration and removes all other layers.', + }); + } else + return i18n.translate('xpack.lens.chartSwitch.dataLossColumns', { + defaultMessage: `Changing to this visualization modifies the current configuration.`, + }); +}; + +const DataLossWarning = ({ content, id }: { content: ReactNode; id: string }) => { + if (!content) return null; + return ( + + + + ); +}; + +export const ExperimentalBadge = () => { + return ( + + + + + + ); +}; + +export const ChartOptionAppend = ({ + dataLoss, + showExperimentalBadge, + id, +}: { + dataLoss: 'nothing' | 'layers' | 'everything' | 'columns'; + showExperimentalBadge?: boolean; + id: string; +}) => ( + + {showExperimentalBadge ? : null} + + +); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.scss b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.scss similarity index 73% rename from x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.scss rename to x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.scss index 9cd11cf1396db..5f51380e06154 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.scss +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.scss @@ -20,8 +20,17 @@ } } -.lnsChartSwitch__append { - display: inline-flex; +.lnsChartSwitch__option { + .euiSelectableListItem__text { + flex-grow: 0; + } + .euiSelectableListItem__append { + margin-left: $euiSizeXS; + display: flex; + flex-grow: 1; + align-items: center; + justify-content: flex-end; + } } // Targeting img as this won't target normal EuiIcon's only the custom svgs's diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.test.tsx similarity index 99% rename from x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.test.tsx rename to x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.test.tsx index 8284f4ad5ff90..0b62384ff026b 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.test.tsx @@ -15,16 +15,16 @@ import { mockDatasourceMap, mockDatasourceStates, renderWithReduxStore, -} from '../../../mocks'; +} from '../../../../mocks'; import { Visualization, FramePublicAPI, DatasourcePublicAPI, SuggestionRequest, -} from '../../../types'; +} from '../../../../types'; import { ChartSwitch, ChartSwitchProps } from './chart_switch'; -import { LensAppState, applyChanges } from '../../../state_management'; +import { LensAppState, applyChanges } from '../../../../state_management'; describe('chart_switch', () => { function generateVisualization(id: string): jest.Mocked { diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.tsx similarity index 85% rename from x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx rename to x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.tsx index c9ae39160e395..d15810c4b8181 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/chart_switch.tsx @@ -14,9 +14,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSelectable, - EuiIconTip, EuiSelectableOption, - EuiBadge, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; @@ -28,9 +26,9 @@ import { VisualizationMap, DatasourceMap, Suggestion, -} from '../../../types'; -import { getSuggestions, switchToSuggestion } from '../suggestion_helpers'; -import { showMemoizedErrorNotification } from '../../../lens_ui_errors'; +} from '../../../../types'; +import { getSuggestions, switchToSuggestion } from '../../suggestion_helpers'; +import { showMemoizedErrorNotification } from '../../../../lens_ui_errors'; import { insertLayer, removeLayers, @@ -41,8 +39,9 @@ import { selectActiveDatasourceId, selectVisualization, selectDatasourceStates, -} from '../../../state_management'; -import { generateId } from '../../../id_generator/id_generator'; +} from '../../../../state_management'; +import { generateId } from '../../../../id_generator/id_generator'; +import { ChartOptionAppend } from './chart_option_append'; interface VisualizationSelection { visualizationId: string; @@ -317,8 +316,8 @@ export const ChartSwitch = memo(function ChartSwitch({ .sort((a, b) => { return (a.fullLabel || a.label).localeCompare(b.fullLabel || b.label); }) - .map( - (v): SelectableEntry => ({ + .map((v): SelectableEntry => { + return { 'aria-label': v.fullLabel || v.label, className: 'lnsChartSwitch__option', isGroupLabel: false, @@ -331,50 +330,16 @@ export const ChartSwitch = memo(function ChartSwitch({ ), append: v.selection.dataLoss !== 'nothing' || v.showExperimentalBadge ? ( - - {v.selection.dataLoss !== 'nothing' ? ( - - - - ) : null} - {v.showExperimentalBadge ? ( - - - - - - ) : null} - + ) : null, // Apparently checked: null is not valid for TS ...(subVisualizationId === v.id && { checked: 'on' }), - }) - ) + }; + }) ); }), visualizationsLookup: lookup, diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/index.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/index.tsx new file mode 100644 index 0000000000000..0bf1b09d532ee --- /dev/null +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/chart_switch/index.tsx @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { ChartSwitch } from './chart_switch'; +export type { ChartSwitchProps } from './chart_switch'; diff --git a/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts b/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts index 9a19a8fa2f16d..d61ddf0448415 100644 --- a/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts +++ b/x-pack/plugins/lens/public/embeddable/interfaces/lens_api.ts @@ -16,10 +16,12 @@ import { apiPublishesUnifiedSearch, apiPublishesPanelTitle, } from '@kbn/presentation-publishing'; -import { LensSavedObjectAttributes } from '../embeddable'; +import { LensSavedObjectAttributes, ViewUnderlyingDataArgs } from '../embeddable'; export type HasLensConfig = HasType<'lens'> & { getSavedVis: () => Readonly; + canViewUnderlyingData: () => Promise; + getViewUnderlyingDataArgs: () => ViewUnderlyingDataArgs; }; export type LensApi = HasLensConfig & @@ -32,6 +34,8 @@ export const isLensApi = (api: unknown): api is LensApi => { api && apiIsOfType(api, 'lens') && typeof (api as HasLensConfig).getSavedVis === 'function' && + typeof (api as HasLensConfig).canViewUnderlyingData === 'function' && + typeof (api as HasLensConfig).getViewUnderlyingDataArgs === 'function' && apiPublishesPanelTitle(api) && apiPublishesUnifiedSearch(api) ); diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts index 94443f4cfcfe0..fca5e37ccc200 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.test.ts @@ -6,17 +6,35 @@ */ import { DataViewsService } from '@kbn/data-views-plugin/public'; -import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; +import { type EmbeddableApiContext } from '@kbn/presentation-publishing'; import { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; +import { BehaviorSubject } from 'rxjs'; import { DOC_TYPE } from '../../common/constants'; -import { Embeddable } from '../embeddable'; import { createOpenInDiscoverAction } from './open_in_discover_action'; import type { DiscoverAppLocator } from './open_in_discover_helpers'; describe('open in discover action', () => { + const compatibleEmbeddableApi = { + type: DOC_TYPE, + panelTitle: 'some title', + hidePanelTitle: false, + filters$: new BehaviorSubject([]), + query$: new BehaviorSubject({ query: 'test', language: 'kuery' }), + timeRange$: new BehaviorSubject({ from: 'now-15m', to: 'now' }), + getSavedVis: jest.fn(() => undefined), + canViewUnderlyingData: () => Promise.resolve(true), + getViewUnderlyingDataArgs: jest.fn(() => ({ + dataViewSpec: { id: 'index-pattern-id' }, + timeRange: { from: 'now-7d', to: 'now' }, + filters: [], + query: undefined, + columns: [], + })), + }; + describe('compatibility check', () => { it('is incompatible with non-lens embeddables', async () => { - const embeddable = { type: 'NOT_LENS' } as IEmbeddable; + const embeddable = { type: 'NOT_LENS' }; const isCompatible = await createOpenInDiscoverAction( {} as DiscoverAppLocator, @@ -24,14 +42,12 @@ describe('open in discover action', () => { true ).isCompatible({ embeddable, - } as ActionExecutionContext<{ embeddable: IEmbeddable }>); + } as ActionExecutionContext); expect(isCompatible).toBeFalsy(); }); it('is incompatible if user cant access Discover app', async () => { // setup - const embeddable = { type: DOC_TYPE } as Embeddable; - embeddable.canViewUnderlyingData = () => Promise.resolve(true); let hasDiscoverAccess = true; // make sure it would work if we had access to Discover @@ -41,8 +57,8 @@ describe('open in discover action', () => { {} as DataViewsService, hasDiscoverAccess ).isCompatible({ - embeddable, - } as unknown as ActionExecutionContext<{ embeddable: IEmbeddable }>) + embeddable: compatibleEmbeddableApi, + } as ActionExecutionContext) ).toBeTruthy(); // make sure no Discover access makes the action incompatible @@ -53,16 +69,19 @@ describe('open in discover action', () => { {} as DataViewsService, hasDiscoverAccess ).isCompatible({ - embeddable, - } as unknown as ActionExecutionContext<{ embeddable: IEmbeddable }>) + embeddable: compatibleEmbeddableApi, + } as ActionExecutionContext) ).toBeFalsy(); }); it('checks for ability to view underlying data if lens embeddable', async () => { // setup - const embeddable = { type: DOC_TYPE } as Embeddable; + const embeddable = { + ...compatibleEmbeddableApi, + canViewUnderlyingData: jest.fn(() => Promise.resolve(false)), + getViewUnderlyingDataArgs: jest.fn(() => undefined), + }; // test false - embeddable.canViewUnderlyingData = jest.fn(() => Promise.resolve(false)); expect( await createOpenInDiscoverAction( {} as DiscoverAppLocator, @@ -70,7 +89,7 @@ describe('open in discover action', () => { true ).isCompatible({ embeddable, - } as unknown as ActionExecutionContext<{ embeddable: IEmbeddable }>) + } as ActionExecutionContext) ).toBeFalsy(); expect(embeddable.canViewUnderlyingData).toHaveBeenCalledTimes(1); @@ -84,7 +103,7 @@ describe('open in discover action', () => { true ).isCompatible({ embeddable, - } as unknown as ActionExecutionContext<{ embeddable: IEmbeddable }>) + } as ActionExecutionContext) ).toBeTruthy(); expect(embeddable.canViewUnderlyingData).toHaveBeenCalledTimes(1); @@ -101,8 +120,8 @@ describe('open in discover action', () => { }; const embeddable = { + ...compatibleEmbeddableApi, getViewUnderlyingDataArgs: jest.fn(() => viewUnderlyingDataArgs), - type: 'lens', }; const discoverUrl = 'https://discover-redirect-url'; @@ -123,9 +142,7 @@ describe('open in discover action', () => { true ).execute({ embeddable, - } as unknown as ActionExecutionContext<{ - embeddable: IEmbeddable; - }>); + } as ActionExecutionContext); expect(embeddable.getViewUnderlyingDataArgs).toHaveBeenCalled(); expect(locator.getRedirectUrl).toHaveBeenCalledWith(viewUnderlyingDataArgs); diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.ts b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.ts index 7fc04d84f5e15..13a44055a1cfb 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_action.ts @@ -7,16 +7,12 @@ import { i18n } from '@kbn/i18n'; import { createAction } from '@kbn/ui-actions-plugin/public'; -import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; import type { DataViewsService } from '@kbn/data-views-plugin/public'; import type { DiscoverAppLocator } from './open_in_discover_helpers'; const ACTION_OPEN_IN_DISCOVER = 'ACTION_OPEN_IN_DISCOVER'; -interface Context { - embeddable: IEmbeddable; -} - export const getDiscoverHelpersAsync = async () => await import('../async_services'); export const createOpenInDiscoverAction = ( @@ -24,7 +20,7 @@ export const createOpenInDiscoverAction = ( dataViews: Pick, hasDiscoverAccess: boolean ) => - createAction({ + createAction({ type: ACTION_OPEN_IN_DISCOVER, id: ACTION_OPEN_IN_DISCOVER, order: 19, // right after Inspect which is 20 @@ -33,7 +29,7 @@ export const createOpenInDiscoverAction = ( i18n.translate('xpack.lens.app.exploreDataInDiscover', { defaultMessage: 'Explore data in Discover', }), - getHref: async (context: Context) => { + getHref: async (context: EmbeddableApiContext) => { const { getHref } = await getDiscoverHelpersAsync(); return getHref({ locator, @@ -42,7 +38,7 @@ export const createOpenInDiscoverAction = ( ...context, }); }, - isCompatible: async (context: Context) => { + isCompatible: async (context: EmbeddableApiContext) => { const { isCompatible } = await getDiscoverHelpersAsync(); return isCompatible({ hasDiscoverAccess, @@ -51,7 +47,7 @@ export const createOpenInDiscoverAction = ( embeddable: context.embeddable, }); }, - execute: async (context: Context) => { + execute: async (context: EmbeddableApiContext) => { const { execute } = await getDiscoverHelpersAsync(); return execute({ ...context, locator, dataViews, hasDiscoverAccess }); }, diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx index bfa0036c14550..68e59debe5cfe 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.test.tsx @@ -6,7 +6,6 @@ */ import React, { FormEvent } from 'react'; -import { IEmbeddable, EmbeddableInput } from '@kbn/embeddable-plugin/public'; import type { ApplicationStart } from '@kbn/core/public'; import { DiscoverAppLocator, getHref, isCompatible } from './open_in_discover_helpers'; import { mount } from 'enzyme'; @@ -17,6 +16,7 @@ import { OpenInDiscoverDrilldown, } from './open_in_discover_drilldown'; import { DataViewsService } from '@kbn/data-views-plugin/public'; +import { LensApi } from '../embeddable'; jest.mock('./open_in_discover_helpers', () => ({ isCompatible: jest.fn(() => true), @@ -64,7 +64,7 @@ describe('open in discover drilldown', () => { const filters: Filter[] = [{ meta: { disabled: false } }]; await drilldown.isCompatible( { openInNewTab: true }, - { embeddable: { type: 'lens' } as IEmbeddable, filters } + { embeddable: { type: 'lens' } as LensApi, filters } ); expect(isCompatible).toHaveBeenCalledWith(expect.objectContaining({ filters })); }); @@ -73,7 +73,7 @@ describe('open in discover drilldown', () => { const filters: Filter[] = [{ meta: { disabled: false } }]; await drilldown.execute( { openInNewTab: true }, - { embeddable: { type: 'lens' } as IEmbeddable, filters } + { embeddable: { type: 'lens' } as LensApi, filters } ); expect(getHref).toHaveBeenCalledWith(expect.objectContaining({ filters })); }); diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.tsx b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.tsx index 9ce2ace7cf5cb..6602dc4acb69f 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.tsx +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_drilldown.tsx @@ -6,8 +6,6 @@ */ import React from 'react'; -import type { IEmbeddable, EmbeddableInput } from '@kbn/embeddable-plugin/public'; -import type { Query, Filter, TimeRange } from '@kbn/es-query'; import { APPLY_FILTER_TRIGGER } from '@kbn/data-plugin/public'; import type { ApplicationStart } from '@kbn/core/public'; import type { SerializableRecord } from '@kbn/utility-types'; @@ -20,20 +18,13 @@ import { EuiFormRow, EuiSwitch } from '@elastic/eui'; import type { ApplyGlobalFilterActionContext } from '@kbn/unified-search-plugin/public'; import { i18n } from '@kbn/i18n'; import type { DataViewsService } from '@kbn/data-views-plugin/public'; +import { apiIsOfType } from '@kbn/presentation-publishing'; import { DOC_TYPE } from '../../common/constants'; import type { DiscoverAppLocator } from './open_in_discover_helpers'; - -interface EmbeddableQueryInput extends EmbeddableInput { - query?: Query; - filters?: Filter[]; - timeRange?: TimeRange; -} +import { LensApi } from '../embeddable'; export const getDiscoverHelpersAsync = async () => await import('../async_services'); -/** @internal */ -export type EmbeddableWithQueryInput = IEmbeddable; - interface UrlDrilldownDeps { locator: () => DiscoverAppLocator | undefined; dataViews: () => Pick; @@ -41,7 +32,9 @@ interface UrlDrilldownDeps { application: () => ApplicationStart; } -export type ActionContext = ApplyGlobalFilterActionContext & { embeddable: IEmbeddable }; +export type ActionContext = ApplyGlobalFilterActionContext & { + embeddable: LensApi; +}; export interface Config extends SerializableRecord { openInNewTab: boolean; @@ -49,9 +42,7 @@ export interface Config extends SerializableRecord { export type OpenInDiscoverTrigger = typeof APPLY_FILTER_TRIGGER; -export interface ActionFactoryContext extends BaseActionFactoryContext { - embeddable?: EmbeddableWithQueryInput; -} +export type ActionFactoryContext = BaseActionFactoryContext & ActionContext; export type CollectConfigProps = CollectConfigPropsBase; export class OpenInDiscoverDrilldown @@ -109,13 +100,13 @@ export class OpenInDiscoverDrilldown dataViews: this.deps.dataViews(), hasDiscoverAccess: this.deps.hasDiscoverAccess(), ...context, - embeddable: context.embeddable as IEmbeddable, + embeddable: context.embeddable, ...config, }); }; public readonly isConfigurable = (context: ActionFactoryContext) => - this.deps.hasDiscoverAccess() && context.embeddable?.type === DOC_TYPE; + this.deps.hasDiscoverAccess() && apiIsOfType(context.embeddable, DOC_TYPE); public readonly getHref = async (config: Config, context: ActionContext) => { const { getHref } = await getDiscoverHelpersAsync(); @@ -125,7 +116,7 @@ export class OpenInDiscoverDrilldown dataViews: this.deps.dataViews(), hasDiscoverAccess: this.deps.hasDiscoverAccess(), ...context, - embeddable: context.embeddable as IEmbeddable, + embeddable: context.embeddable, }); }; @@ -140,7 +131,7 @@ export class OpenInDiscoverDrilldown dataViews: this.deps.dataViews(), hasDiscoverAccess: this.deps.hasDiscoverAccess(), ...context, - embeddable: context.embeddable as IEmbeddable, + embeddable: context.embeddable, }); await this.deps.application().navigateToApp(app, { path, state }); } diff --git a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_helpers.ts b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_helpers.ts index bd3a10536d343..0276674767120 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_in_discover_helpers.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_in_discover_helpers.ts @@ -6,11 +6,11 @@ */ import type { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; -import type { IEmbeddable } from '@kbn/embeddable-plugin/public'; import type { DataViewsService } from '@kbn/data-views-plugin/public'; import type { LocatorPublic } from '@kbn/share-plugin/public'; import type { SerializableRecord } from '@kbn/utility-types'; -import { isLensEmbeddable } from './utils'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import { isLensApi } from '../embeddable'; interface DiscoverAppLocatorParams extends SerializableRecord { timeRange?: TimeRange; @@ -22,20 +22,19 @@ interface DiscoverAppLocatorParams extends SerializableRecord { export type DiscoverAppLocator = LocatorPublic; -interface Context { - embeddable: IEmbeddable; +type Context = EmbeddableApiContext & { filters?: Filter[]; openInSameTab?: boolean; hasDiscoverAccess: boolean; dataViews: Pick; locator?: DiscoverAppLocator; timeFieldName?: string; -} +}; export async function isCompatible({ hasDiscoverAccess, embeddable }: Context) { if (!hasDiscoverAccess) return false; try { - return isLensEmbeddable(embeddable) && (await embeddable.canViewUnderlyingData()); + return isLensApi(embeddable) && (await embeddable.canViewUnderlyingData()); } catch (e) { // Fetching underlying data failed, log the error and behave as if the action is not compatible // eslint-disable-next-line no-console @@ -50,7 +49,7 @@ async function getDiscoverLocationParams({ dataViews, timeFieldName, }: Pick) { - if (!isLensEmbeddable(embeddable)) { + if (!isLensApi(embeddable)) { // shouldn't be executed because of the isCompatible check throw new Error('Can only be executed in the context of Lens visualization'); } diff --git a/x-pack/plugins/lens/readme.md b/x-pack/plugins/lens/readme.md index fc2fd5df4c85a..776718e1b9e48 100644 --- a/x-pack/plugins/lens/readme.md +++ b/x-pack/plugins/lens/readme.md @@ -236,8 +236,8 @@ Run all tests from the `x-pack` root directory - Run `node scripts/functional_tests_server` - Run `node ../scripts/functional_test_runner.js --config ./test/api_integration/config.ts --grep=Lens` - Performance journeys: - - Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts` - - Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys/data_stress_test_lens/config.ts` + - Run `node scripts/functional_tests_server.js --config x-pack/test/performance/journeys_e2e/data_stress_test_lens/config.ts` + - Run `node scripts/functional_test_runner --config x-pack/test/performance/journeys_e2e/data_stress_test_lens/config.ts` ## Developing tips diff --git a/x-pack/plugins/license_api_guard/kibana.jsonc b/x-pack/plugins/license_api_guard/kibana.jsonc index f8248bec16ca9..a8d0ed45794d5 100644 --- a/x-pack/plugins/license_api_guard/kibana.jsonc +++ b/x-pack/plugins/license_api_guard/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/license-api-guard-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "licenseApiGuard", "server": true, diff --git a/x-pack/plugins/license_management/kibana.jsonc b/x-pack/plugins/license_management/kibana.jsonc index b6113ad7a028c..72f1dc8b824ea 100644 --- a/x-pack/plugins/license_management/kibana.jsonc +++ b/x-pack/plugins/license_management/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/license-management-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "licenseManagement", "server": true, diff --git a/x-pack/plugins/ml/public/application/aiops/change_point_detection.tsx b/x-pack/plugins/ml/public/application/aiops/change_point_detection.tsx index 2401113410ec4..386210cc02d25 100644 --- a/x-pack/plugins/ml/public/application/aiops/change_point_detection.tsx +++ b/x-pack/plugins/ml/public/application/aiops/change_point_detection.tsx @@ -51,6 +51,7 @@ export const ChangePointDetectionPage: FC = () => { showFrozenDataTierChoice={showNodeInfo} appDependencies={{ ...pick(services, [ + 'analytics', 'application', 'cases', 'charts', diff --git a/x-pack/plugins/ml/public/application/aiops/log_categorization.tsx b/x-pack/plugins/ml/public/application/aiops/log_categorization.tsx index 6cc2dd6208349..d3dfb0af1bf43 100644 --- a/x-pack/plugins/ml/public/application/aiops/log_categorization.tsx +++ b/x-pack/plugins/ml/public/application/aiops/log_categorization.tsx @@ -45,6 +45,7 @@ export const LogCategorizationPage: FC = () => { savedSearch={savedSearch} showFrozenDataTierChoice={showNodeInfo} appDependencies={pick(services, [ + 'analytics', 'application', 'charts', 'data', diff --git a/x-pack/plugins/ml/public/application/aiops/log_rate_analysis.tsx b/x-pack/plugins/ml/public/application/aiops/log_rate_analysis.tsx index e7935d75e8783..eb39cd6c7a7a6 100644 --- a/x-pack/plugins/ml/public/application/aiops/log_rate_analysis.tsx +++ b/x-pack/plugins/ml/public/application/aiops/log_rate_analysis.tsx @@ -39,6 +39,7 @@ export const LogRateAnalysisPage: FC = () => { savedSearch={savedSearch} showFrozenDataTierChoice={showNodeInfo} appDependencies={pick(services, [ + 'analytics', 'application', 'charts', 'data', diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx index e2524ee015200..1b8e77514e108 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_charts/anomaly_charts_embeddable.tsx @@ -9,9 +9,11 @@ import React, { Suspense } from 'react'; import ReactDOM from 'react-dom'; import type { CoreStart } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; -import { Subject } from 'rxjs'; +import { Subject, Subscription, type BehaviorSubject } from 'rxjs'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; import type { IContainer } from '@kbn/embeddable-plugin/public'; +import { embeddableOutputToSubject } from '@kbn/embeddable-plugin/public'; +import type { MlEntityField } from '@kbn/ml-anomaly-utils'; import { EmbeddableAnomalyChartsContainer } from './embeddable_anomaly_charts_container_lazy'; import type { JobId } from '../../../common/types/anomaly_detection_jobs'; import type { MlDependencies } from '../../application/app'; @@ -40,12 +42,23 @@ export class AnomalyChartsEmbeddable extends AnomalyDetectionEmbeddable< private reload$ = new Subject(); public readonly type: string = ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE; + // API + public entityFields: BehaviorSubject; + + private apiSubscriptions = new Subscription(); + constructor( initialInput: AnomalyChartsEmbeddableInput, public services: [CoreStart, MlDependencies, AnomalyChartsServices], parent?: IContainer ) { super(initialInput, services[2].anomalyDetectorService, services[1].data.dataViews, parent); + + this.entityFields = embeddableOutputToSubject( + this.apiSubscriptions, + this, + 'entityFields' + ); } public onLoading() { @@ -108,6 +121,9 @@ export class AnomalyChartsEmbeddable extends AnomalyDetectionEmbeddable< public destroy() { super.destroy(); + + this.apiSubscriptions.unsubscribe(); + if (this.node) { ReactDOM.unmountComponentAtNode(this.node); } diff --git a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx index 21892e8c5bae2..968d505dc46ee 100644 --- a/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx +++ b/x-pack/plugins/ml/public/embeddables/anomaly_swimlane/anomaly_swimlane_embeddable.tsx @@ -5,25 +5,26 @@ * 2.0. */ -import React, { Suspense } from 'react'; -import ReactDOM from 'react-dom'; import type { CoreStart } from '@kbn/core/public'; +import type { IContainer } from '@kbn/embeddable-plugin/public'; +import { embeddableInputToSubject, embeddableOutputToSubject } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; -import { Subject } from 'rxjs'; import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; -import type { IContainer } from '@kbn/embeddable-plugin/public'; -import { EmbeddableSwimLaneContainer } from './embeddable_swim_lane_container_lazy'; -import type { JobId } from '../../../common/types/anomaly_detection_jobs'; -import type { MlDependencies } from '../../application/app'; -import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions'; +import React, { Suspense } from 'react'; +import ReactDOM from 'react-dom'; +import { Subject, Subscription, type BehaviorSubject } from 'rxjs'; import type { AnomalySwimlaneEmbeddableInput, AnomalySwimlaneEmbeddableOutput, AnomalySwimlaneServices, } from '..'; import { ANOMALY_SWIMLANE_EMBEDDABLE_TYPE } from '..'; -import { EmbeddableLoading } from '../common/components/embeddable_loading_fallback'; +import type { JobId } from '../../../common/types/anomaly_detection_jobs'; +import type { MlDependencies } from '../../application/app'; +import { SWIM_LANE_SELECTION_TRIGGER } from '../../ui_actions'; import { AnomalyDetectionEmbeddable } from '../common/anomaly_detection_embeddable'; +import { EmbeddableLoading } from '../common/components/embeddable_loading_fallback'; +import { EmbeddableSwimLaneContainer } from './embeddable_swim_lane_container_lazy'; export const getDefaultSwimlanePanelTitle = (jobIds: JobId[]) => i18n.translate('xpack.ml.swimlaneEmbeddable.title', { @@ -41,12 +42,37 @@ export class AnomalySwimlaneEmbeddable extends AnomalyDetectionEmbeddable< private reload$ = new Subject(); public readonly type: string = ANOMALY_SWIMLANE_EMBEDDABLE_TYPE; + // API + public viewBy: BehaviorSubject; + public perPage: BehaviorSubject; + public fromPage: BehaviorSubject; + + private apiSubscriptions = new Subscription(); + constructor( initialInput: AnomalySwimlaneEmbeddableInput, public services: [CoreStart, MlDependencies, AnomalySwimlaneServices], parent?: IContainer ) { super(initialInput, services[2].anomalyDetectorService, services[1].data.dataViews, parent); + + this.viewBy = embeddableInputToSubject( + this.apiSubscriptions, + this, + 'viewBy' + ); + + this.perPage = embeddableOutputToSubject( + this.apiSubscriptions, + this, + 'perPage' + ); + + this.fromPage = embeddableOutputToSubject( + this.apiSubscriptions, + this, + 'fromPage' + ); } public reportsEmbeddableLoad() { @@ -104,6 +130,7 @@ export class AnomalySwimlaneEmbeddable extends AnomalyDetectionEmbeddable< } public destroy() { + this.apiSubscriptions.unsubscribe(); super.destroy(); if (this.node) { ReactDOM.unmountComponentAtNode(this.node); diff --git a/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts b/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts index 0b24a5b47b18c..08c00273c44a0 100644 --- a/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts +++ b/x-pack/plugins/ml/public/embeddables/common/anomaly_detection_embeddable.ts @@ -15,6 +15,7 @@ import { type DataView } from '@kbn/data-views-plugin/common'; import { type DataViewsContract } from '@kbn/data-views-plugin/public'; import { firstValueFrom } from 'rxjs'; import { type AnomalyDetectorService } from '../../application/services/anomaly_detector_service'; +import type { JobId } from '../../shared'; export type CommonInput = { jobIds: string[] } & EmbeddableInput; @@ -27,6 +28,8 @@ export abstract class AnomalyDetectionEmbeddable< // Need to defer embeddable load in order to resolve data views deferEmbeddableLoad = true; + public jobIds: JobId[] = []; + protected constructor( initialInput: Input, private anomalyDetectorService: AnomalyDetectorService, @@ -43,6 +46,8 @@ export abstract class AnomalyDetectionEmbeddable< protected async initializeOutput(initialInput: CommonInput) { const { jobIds } = initialInput; + this.jobIds = jobIds; + try { const jobs = await firstValueFrom(this.anomalyDetectorService.getJobs$(jobIds)); diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx index 94f0621d747f8..fa68adf9f9955 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_initializer.tsx @@ -137,7 +137,7 @@ export const SingleMetricViewerInitializer: FC ; } + export interface AnomalyChartsFieldSelectionContext extends EditAnomalyChartsPanelContext { /** * Optional fields selected using anomaly charts */ data?: MlEntityField[]; } -export function isAnomalyExplorerEmbeddable( - arg: unknown -): arg is AnomalyChartsFieldSelectionContext { - return ( - isPopulatedObject(arg, ['embeddable']) && - isPopulatedObject(arg.embeddable, ['type']) && - arg.embeddable.type === ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE - ); -} export type MappedEmbeddableTypeOf = TEmbeddableType extends AnomalySwimLaneEmbeddableType diff --git a/x-pack/plugins/ml/public/ui_actions/index.ts b/x-pack/plugins/ml/public/ui_actions/index.ts index 46f07ed516e10..bdbd5f3f3e858 100644 --- a/x-pack/plugins/ml/public/ui_actions/index.ts +++ b/x-pack/plugins/ml/public/ui_actions/index.ts @@ -54,7 +54,6 @@ export function registerMlUiActions( // Register actions uiActions.registerAction(editSwimlanePanelAction); - uiActions.registerAction(openInExplorerAction); uiActions.registerAction(applyInfluencerFiltersAction); uiActions.registerAction(applyEntityFieldFilterAction); uiActions.registerAction(applyTimeRangeSelectionAction); diff --git a/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx b/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx index e29f1ce5cf06c..e955245adec86 100644 --- a/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/open_in_anomaly_explorer_action.tsx @@ -5,30 +5,106 @@ * 2.0. */ +import type { TimeRange } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; -import type { SerializableRecord } from '@kbn/utility-types'; -import type { UiActionsActionDefinition } from '@kbn/ui-actions-plugin/public'; +import type { MlEntityField } from '@kbn/ml-anomaly-utils'; import { ML_ENTITY_FIELD_OPERATIONS } from '@kbn/ml-anomaly-utils'; -import type { MlCoreSetup } from '../plugin'; +import { isPopulatedObject } from '@kbn/ml-is-populated-object'; +import type { + EmbeddableApiContext, + HasParentApi, + HasType, + PublishesUnifiedSearch, + PublishingSubject, +} from '@kbn/presentation-publishing'; +import { apiHasType, apiIsOfType } from '@kbn/presentation-publishing'; +import { createAction } from '@kbn/ui-actions-plugin/public'; +import type { SerializableRecord } from '@kbn/utility-types'; import { ML_APP_LOCATOR } from '../../common/constants/locator'; -import type { AnomalyChartsFieldSelectionContext, SwimLaneDrilldownContext } from '../embeddables'; +import type { ExplorerAppState } from '../../common/types/locator'; +import type { AppStateSelectedCells } from '../application/explorer/explorer_utils'; +import type { + AnomalyExplorerChartsEmbeddableType, + AnomalySwimLaneEmbeddableType, +} from '../embeddables'; import { ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE, ANOMALY_SWIMLANE_EMBEDDABLE_TYPE, - isAnomalyExplorerEmbeddable, - isSwimLaneEmbeddable, } from '../embeddables'; -import type { ExplorerAppState } from '../../common/types/locator'; +import type { MlCoreSetup } from '../plugin'; +import type { JobId } from '../shared'; + +export interface AnomalyChartsFieldSelectionApi { + entityFields: PublishingSubject; +} + +export interface SwimLaneDrilldownApi { + viewBy: PublishingSubject; + perPage: PublishingSubject; + fromPage: PublishingSubject; +} + +export interface OpenInAnomalyExplorerSwimLaneActionContext extends EmbeddableApiContext { + embeddable: OpenInAnomalyExplorerFromSwimLaneActionApi; + /** + * Optional data provided by swim lane selection + */ + data?: AppStateSelectedCells; +} + +export interface OpenInAnomalyExplorerAnomalyChartsActionContext extends EmbeddableApiContext { + embeddable: OpenInAnomalyExplorerFromAnomalyChartActionApi; + /** + * Optional fields selected using anomaly charts + */ + data?: MlEntityField[]; +} + +export type OpenInAnomalyExplorerBaseActionApi = Partial< + HasParentApi & PublishesUnifiedSearch & { jobIds: JobId[] } +>; + +export type OpenInAnomalyExplorerFromSwimLaneActionApi = HasType & + OpenInAnomalyExplorerBaseActionApi & + SwimLaneDrilldownApi; + +export type OpenInAnomalyExplorerFromAnomalyChartActionApi = + HasType & + OpenInAnomalyExplorerBaseActionApi & + AnomalyChartsFieldSelectionApi; export const OPEN_IN_ANOMALY_EXPLORER_ACTION = 'openInAnomalyExplorerAction'; -export function createOpenInExplorerAction( - getStartServices: MlCoreSetup['getStartServices'] -): UiActionsActionDefinition { - return { +export function isSwimLaneEmbeddableContext( + arg: unknown +): arg is OpenInAnomalyExplorerSwimLaneActionContext { + return ( + isPopulatedObject(arg, ['embeddable']) && + apiIsOfType(arg.embeddable, ANOMALY_SWIMLANE_EMBEDDABLE_TYPE) + ); +} + +export function isAnomalyChartsEmbeddableContext( + arg: unknown +): arg is OpenInAnomalyExplorerAnomalyChartsActionContext { + return ( + isPopulatedObject(arg, ['embeddable']) && + apiIsOfType(arg.embeddable, ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE) + ); +} + +export const isApiCompatible = (api: unknown | null): api is OpenInAnomalyExplorerBaseActionApi => + Boolean(apiHasType(api)); + +const getTimeRange = (embeddable: OpenInAnomalyExplorerBaseActionApi): TimeRange | undefined => { + return embeddable.timeRange$?.getValue() ?? embeddable.parentApi?.timeRange$?.getValue(); +}; + +export function createOpenInExplorerAction(getStartServices: MlCoreSetup['getStartServices']) { + return createAction({ id: 'open-in-anomaly-explorer', type: OPEN_IN_ANOMALY_EXPLORER_ACTION, - getIconType(context): string { + getIconType(): string { return 'visTable'; }, getDisplayName() { @@ -40,21 +116,20 @@ export function createOpenInExplorerAction( const [, pluginsStart] = await getStartServices(); const locator = pluginsStart.share.url.locators.get(ML_APP_LOCATOR)!; - if (isSwimLaneEmbeddable(context)) { - const { embeddable, data } = context; + if (isSwimLaneEmbeddableContext(context)) { + const { data, embeddable } = context; - const { jobIds, timeRange, viewBy } = embeddable.getInput(); - const { perPage, fromPage } = embeddable.getOutput(); + const { viewBy, jobIds, perPage, fromPage } = embeddable; return locator.getUrl({ page: 'explorer', pageState: { jobIds, - timeRange, + timeRange: getTimeRange(embeddable), mlExplorerSwimlane: { - viewByFromPage: fromPage, - viewByPerPage: perPage, - viewByFieldName: viewBy, + viewByFromPage: fromPage.getValue(), + viewByPerPage: perPage.getValue(), + viewByFieldName: viewBy.getValue(), ...(data ? { selectedType: data.type, @@ -65,19 +140,18 @@ export function createOpenInExplorerAction( }, }, }); - } else if (isAnomalyExplorerEmbeddable(context)) { + } else if (isAnomalyChartsEmbeddableContext(context)) { const { embeddable } = context; - - const { jobIds, timeRange } = embeddable.getInput(); - const { entityFields } = embeddable.getOutput(); + const { jobIds, entityFields } = embeddable; let mlExplorerFilter: ExplorerAppState['mlExplorerFilter'] | undefined; + const entityFieldsValue = entityFields.getValue(); if ( - Array.isArray(entityFields) && - entityFields.length === 1 && - entityFields[0].operation === ML_ENTITY_FIELD_OPERATIONS.ADD + Array.isArray(entityFieldsValue) && + entityFieldsValue.length === 1 && + entityFieldsValue[0].operation === ML_ENTITY_FIELD_OPERATIONS.ADD ) { - const { fieldName, fieldValue } = entityFields[0]; + const { fieldName, fieldValue } = entityFieldsValue[0]; if (fieldName !== undefined && fieldValue !== undefined) { const influencersFilterQuery = { bool: { @@ -104,7 +178,7 @@ export function createOpenInExplorerAction( page: 'explorer', pageState: { jobIds, - timeRange, + timeRange: getTimeRange(embeddable), // @ts-ignore QueryDslQueryContainer is not compatible with SerializableRecord ...(mlExplorerFilter ? ({ mlExplorerFilter } as SerializableRecord) : {}), query: {}, @@ -122,13 +196,8 @@ export function createOpenInExplorerAction( await application.navigateToUrl(anomalyExplorerUrl!); } }, - async isCompatible({ - embeddable, - }: SwimLaneDrilldownContext | AnomalyChartsFieldSelectionContext) { - return ( - embeddable.type === ANOMALY_SWIMLANE_EMBEDDABLE_TYPE || - embeddable.type === ANOMALY_EXPLORER_CHARTS_EMBEDDABLE_TYPE - ); + async isCompatible(context: EmbeddableApiContext) { + return isSwimLaneEmbeddableContext(context) || isAnomalyChartsEmbeddableContext(context); }, - }; + }); } diff --git a/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx b/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx index 2edec4a4aafa9..de7bc44abf8b1 100644 --- a/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx +++ b/x-pack/plugins/observability_solution/infra/public/alerting/log_threshold/components/alert_details_app_section/components/log_rate_analysis.tsx @@ -263,6 +263,7 @@ export const LogRateAnalysis: FC = ({ r barHighlightColorOverride={colorTransformer(Color.color1)} onAnalysisCompleted={onAnalysisCompleted} appDependencies={pick(services, [ + 'analytics', 'application', 'data', 'executionContext', diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx index 33fb38fa612a7..999270401efc2 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/anomalies/anomalies.tsx @@ -5,18 +5,22 @@ * 2.0. */ -import React, { useMemo, useRef } from 'react'; +import React, { useContext, useMemo, useRef } from 'react'; +import { FeatureFeedbackButton } from '@kbn/observability-shared-plugin/public'; import { AnomaliesTable } from '../../../ml/anomaly_detection/anomalies_table/anomalies_table'; import { useAssetDetailsRenderPropsContext } from '../../hooks/use_asset_details_render_props'; import { useDatePickerContext } from '../../hooks/use_date_picker'; import { useIntersectingState } from '../../hooks/use_intersecting_state'; import { useRequestObservable } from '../../hooks/use_request_observable'; +import { KibanaEnvironmentContext } from '../../../../hooks/use_kibana'; +import { INFRA_ML_FLYOUT_FEEDBACK_LINK } from '../../../ml/anomaly_detection/flyout_home'; export const Anomalies = () => { const ref = useRef(null); const { request$ } = useRequestObservable(); const { getParsedDateRange } = useDatePickerContext(); const { asset, overrides } = useAssetDetailsRenderPropsContext(); + const { kibanaVersion, isCloudEnv, isServerlessEnv } = useContext(KibanaEnvironmentContext); const { onClose = () => {} } = overrides?.anomalies ?? {}; const parsedDateRange = useMemo(() => getParsedDateRange(), [getParsedDateRange]); @@ -33,6 +37,25 @@ export const Anomalies = () => { hideDatePicker request$={request$} /> +
+ +
); }; diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/processes/process_row.tsx b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/processes/process_row.tsx index a953a970219cb..d3de526470d32 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/processes/process_row.tsx +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/processes/process_row.tsx @@ -53,9 +53,7 @@ export const ContextualInsightProcessRow = ({ command }: { command: string }) => with the arguments to the process you should then explain its arguments and how they influence the behaviour of the process. If I do not provide any arguments then explain the behaviour of the process when no arguments are provided. - If you do not recognise the process say "No information available for this process". If I provide an argument - to the process that you do not recognise then say "No information available for this argument" when explaining - that argument. + Here is an example with arguments. Process: metricbeat -c /etc/metricbeat.yml -d autodiscover,kafka -e -system.hostfs=/hostfs Explanation: Metricbeat is part of the Elastic Stack. It is a lightweight shipper that you can install on your diff --git a/x-pack/plugins/observability_solution/observability/common/constants.ts b/x-pack/plugins/observability_solution/observability/common/constants.ts index 97d3d1d9eb938..0286e4bef0825 100644 --- a/x-pack/plugins/observability_solution/observability/common/constants.ts +++ b/x-pack/plugins/observability_solution/observability/common/constants.ts @@ -5,49 +5,14 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; import { AlertConsumers } from '@kbn/rule-data-utils'; import type { ValidFeatureId } from '@kbn/rule-data-utils'; import type { RuleCreationValidConsumer } from '@kbn/triggers-actions-ui-plugin/public'; -export const SLO_BURN_RATE_RULE_TYPE_ID = 'slo.rules.burnRate'; - export const INVALID_EQUATION_REGEX = /[^A-Z|+|\-|\s|\d+|\.|\(|\)|\/|\*|>|<|=|\?|\:|&|\!|\|]+/g; export const ALERT_STATUS_ALL = 'all'; export const ALERTS_URL_STORAGE_KEY = '_a'; -export const ALERT_ACTION_ID = 'slo.burnRate.alert'; -export const ALERT_ACTION = { - id: ALERT_ACTION_ID, - name: i18n.translate('xpack.observability.slo.alerting.burnRate.alertAction', { - defaultMessage: 'Critical', - }), -}; - -export const HIGH_PRIORITY_ACTION_ID = 'slo.burnRate.high'; -export const HIGH_PRIORITY_ACTION = { - id: HIGH_PRIORITY_ACTION_ID, - name: i18n.translate('xpack.observability.slo.alerting.burnRate.highPriorityAction', { - defaultMessage: 'High', - }), -}; - -export const MEDIUM_PRIORITY_ACTION_ID = 'slo.burnRate.medium'; -export const MEDIUM_PRIORITY_ACTION = { - id: MEDIUM_PRIORITY_ACTION_ID, - name: i18n.translate('xpack.observability.slo.alerting.burnRate.mediumPriorityAction', { - defaultMessage: 'Medium', - }), -}; - -export const LOW_PRIORITY_ACTION_ID = 'slo.burnRate.low'; -export const LOW_PRIORITY_ACTION = { - id: LOW_PRIORITY_ACTION_ID, - name: i18n.translate('xpack.observability.slo.alerting.burnRate.lowPriorityAction', { - defaultMessage: 'Low', - }), -}; - export const observabilityAlertFeatureIds: ValidFeatureId[] = [ AlertConsumers.APM, AlertConsumers.INFRASTRUCTURE, diff --git a/x-pack/plugins/observability_solution/observability/common/index.ts b/x-pack/plugins/observability_solution/observability/common/index.ts index 2502639bc0d4d..6e29cf4009bc6 100644 --- a/x-pack/plugins/observability_solution/observability/common/index.ts +++ b/x-pack/plugins/observability_solution/observability/common/index.ts @@ -60,9 +60,8 @@ export { getProbabilityFromProgressiveLoadingQuality, } from './progressive_loading'; -export const sloFeatureId = 'slo'; export const casesFeatureId = 'observabilityCases'; - +export const sloFeatureId = 'slo'; // The ID of the observability app. Should more appropriately be called // 'observability' but it's used in telemetry by applicationUsage so we don't // want to change it. @@ -87,3 +86,5 @@ export const sloListLocatorID = 'SLO_LIST_LOCATOR'; import { paths } from './locators/paths'; export const observabilityPaths = paths.observability; export type { AlertsLocatorParams } from './locators/alerts'; +export { AlertsLocatorDefinition } from './locators/alerts'; +export { observabilityAlertFeatureIds } from './constants'; diff --git a/x-pack/plugins/observability_solution/observability/common/locators/paths.ts b/x-pack/plugins/observability_solution/observability/common/locators/paths.ts index 2808149c543ba..1646224a63be7 100644 --- a/x-pack/plugins/observability_solution/observability/common/locators/paths.ts +++ b/x-pack/plugins/observability_solution/observability/common/locators/paths.ts @@ -15,14 +15,17 @@ export const EXPLORATORY_VIEW_PATH = '/exploratory-view' as const; // has been m export const RULES_PATH = '/alerts/rules' as const; export const RULES_LOGS_PATH = '/alerts/rules/logs' as const; export const RULE_DETAIL_PATH = '/alerts/rules/:ruleId' as const; -export const SLOS_PATH = '/slos' as const; -export const SLOS_WELCOME_PATH = '/slos/welcome' as const; -export const SLO_DETAIL_PATH = '/slos/:sloId' as const; -export const SLO_CREATE_PATH = '/slos/create' as const; -export const SLO_EDIT_PATH = '/slos/edit/:sloId' as const; -export const SLOS_OUTDATED_DEFINITIONS_PATH = '/slos/outdated-definitions' as const; export const CASES_PATH = '/cases' as const; +// // SLOs have been moved to its own app (slo). Keeping around for redirecting purposes. +export const OLD_SLOS_PATH = '/slos' as const; +export const OLD_SLOS_WELCOME_PATH = '/slos/welcome' as const; +export const OLD_SLOS_OUTDATED_DEFINITIONS_PATH = '/slos/outdated-definitions' as const; +export const OLD_SLO_DETAIL_PATH = '/slos/:sloId' as const; +export const OLD_SLO_EDIT_PATH = '/slos/edit/:sloId' as const; + +export const SLO_DETAIL_PATH = '/:sloId' as const; + export const paths = { observability: { alerts: `${OBSERVABILITY_BASE_PATH}${ALERTS_PATH}`, @@ -31,24 +34,6 @@ export const paths = { rules: `${OBSERVABILITY_BASE_PATH}${RULES_PATH}`, ruleDetails: (ruleId: string) => `${OBSERVABILITY_BASE_PATH}${RULES_PATH}/${encodeURIComponent(ruleId)}`, - slos: `${OBSERVABILITY_BASE_PATH}${SLOS_PATH}`, - slosWelcome: `${OBSERVABILITY_BASE_PATH}${SLOS_WELCOME_PATH}`, - slosOutdatedDefinitions: `${OBSERVABILITY_BASE_PATH}${SLOS_OUTDATED_DEFINITIONS_PATH}`, - sloCreate: `${OBSERVABILITY_BASE_PATH}${SLO_CREATE_PATH}`, - sloCreateWithEncodedForm: (encodedParams: string) => - `${OBSERVABILITY_BASE_PATH}${SLO_CREATE_PATH}?_a=${encodedParams}`, - sloEdit: (sloId: string) => - `${OBSERVABILITY_BASE_PATH}${SLOS_PATH}/edit/${encodeURIComponent(sloId)}`, - sloEditWithEncodedForm: (sloId: string, encodedParams: string) => - `${OBSERVABILITY_BASE_PATH}${SLOS_PATH}/edit/${encodeURIComponent( - sloId - )}?_a=${encodedParams}`, - sloDetails: (sloId: string, instanceId?: string) => - !!instanceId - ? `${OBSERVABILITY_BASE_PATH}${SLOS_PATH}/${encodeURIComponent( - sloId - )}?instanceId=${encodeURIComponent(instanceId)}` - : `${OBSERVABILITY_BASE_PATH}${SLOS_PATH}/${encodeURIComponent(sloId)}`, }, }; diff --git a/x-pack/plugins/observability_solution/observability/kibana.jsonc b/x-pack/plugins/observability_solution/observability/kibana.jsonc index d51801cedc669..da3715c018bdc 100644 --- a/x-pack/plugins/observability_solution/observability/kibana.jsonc +++ b/x-pack/plugins/observability_solution/observability/kibana.jsonc @@ -20,7 +20,6 @@ "data", "dataViews", "dataViewEditor", - "embeddable", "fieldFormats", "uiActions", "presentationUtil", @@ -32,7 +31,6 @@ "observabilityShared", "observabilityAIAssistant", "ruleRegistry", - "taskManager", "triggersActionsUi", "security", "share", @@ -59,8 +57,6 @@ "unifiedSearch", "stackAlerts", "spaces", - "embeddable", - "ingestPipelines" ], "extraPublicDirs": [ "common" diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/use_get_alert_flyout_components.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/use_get_alert_flyout_components.tsx index 2d7e7545db736..3b7f485364293 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/use_get_alert_flyout_components.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/use_get_alert_flyout_components.tsx @@ -9,7 +9,7 @@ import React, { useCallback, useMemo } from 'react'; import { AlertsTableFlyoutBaseProps } from '@kbn/triggers-actions-ui-plugin/public'; import { useRouteMatch } from 'react-router-dom'; -import { SLO_ALERTS_TABLE_ID } from '../../pages/slo_details/components/slo_detail_alerts'; +import { SLO_ALERTS_TABLE_ID } from '@kbn/observability-shared-plugin/common'; import { SLO_DETAIL_PATH } from '../../../common/locators/paths'; import type { ObservabilityRuleTypeRegistry } from '../../rules/create_observability_rule_type_registry'; import { AlertsFlyoutHeader } from './alerts_flyout_header'; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/register_alerts_table_configuration.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/register_alerts_table_configuration.tsx index 1ac236f83608b..1fa574d1dd402 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/register_alerts_table_configuration.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/register_alerts_table_configuration.tsx @@ -32,9 +32,6 @@ export const registerAlertsTableConfiguration = ( alertTableConfigRegistry.register(ruleDetailsAlertsTableConfig); // SLO - const sloAlertsTableConfig = getSloAlertsTableConfiguration( - observabilityRuleTypeRegistry, - config - ); + const sloAlertsTableConfig = getSloAlertsTableConfiguration(observabilityRuleTypeRegistry); alertTableConfigRegistry.register(sloAlertsTableConfig); }; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx index 4872070a6c39c..ea67c7c158e83 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx @@ -25,7 +25,7 @@ export const columns: Array< { columnHeaderType: 'not-filtered', displayAsText: i18n.translate( - 'xpack.observability.sloAlertsEmbeddable.alertsTGrid.statusColumnDescription', + 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.statusColumnDescription', { defaultMessage: 'Status', } @@ -35,25 +35,34 @@ export const columns: Array< }, { columnHeaderType: 'not-filtered', - displayAsText: i18n.translate('xpack.observability.alertsTGrid.durationColumnDescription', { - defaultMessage: 'Duration', - }), + displayAsText: i18n.translate( + 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.durationColumnDescription', + { + defaultMessage: 'Duration', + } + ), id: ALERT_DURATION, initialWidth: 116, }, { columnHeaderType: 'not-filtered', - displayAsText: i18n.translate('xpack.observability.alertsTGrid.sloColumnDescription', { - defaultMessage: 'Rule name', - }), + displayAsText: i18n.translate( + 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.sloColumnDescription', + { + defaultMessage: 'Rule name', + } + ), id: ALERT_RULE_NAME, initialWidth: 110, }, { columnHeaderType: 'not-filtered', - displayAsText: i18n.translate('xpack.observability.alertsTGrid.reasonColumnDescription', { - defaultMessage: 'Reason', - }), + displayAsText: i18n.translate( + 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.reasonColumnDescription', + { + defaultMessage: 'Reason', + } + ), id: ALERT_REASON, linkField: '*', }, diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/get_slo_alerts_table_configuration.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/get_slo_alerts_table_configuration.tsx index 9bebb82234df6..80c60169253c7 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/get_slo_alerts_table_configuration.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/get_slo_alerts_table_configuration.tsx @@ -8,17 +8,18 @@ import { SortOrder } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALERT_DURATION } from '@kbn/rule-data-utils'; import { AlertsTableConfigurationRegistry } from '@kbn/triggers-actions-ui-plugin/public/types'; -import { casesFeatureId, observabilityFeatureId } from '../../../../common'; +import { + casesFeatureId, + observabilityFeatureId, + SLO_ALERTS_TABLE_CONFIG_ID, +} from '@kbn/observability-shared-plugin/public'; import { getRenderCellValue } from '../common/render_cell_value'; -import { columns } from './default_columns'; +import type { ObservabilityRuleTypeRegistry } from '../../..'; import { useGetAlertFlyoutComponents } from '../../alerts_flyout/use_get_alert_flyout_components'; -import type { ObservabilityRuleTypeRegistry } from '../../../rules/create_observability_rule_type_registry'; -import type { ConfigSchema } from '../../../plugin'; -import { SLO_ALERTS_TABLE_CONFIG_ID } from '../../../embeddable/slo/constants'; +import { columns } from './default_columns'; export const getSloAlertsTableConfiguration = ( - observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry, - config: ConfigSchema + observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry ): AlertsTableConfigurationRegistry => ({ id: SLO_ALERTS_TABLE_CONFIG_ID, cases: { featureId: casesFeatureId, owner: [observabilityFeatureId] }, diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx index ad9b0f61e4eaf..3ab5d1face9aa 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/components/alert_details_app_section/log_rate_analysis.tsx @@ -202,6 +202,7 @@ export function LogRateAnalysis({ barHighlightColorOverride={colorTransformer(Color.color1)} onAnalysisCompleted={onAnalysisCompleted} appDependencies={pick(services, [ + 'analytics', 'application', 'data', 'executionContext', diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/utils/last_duration_i18n.ts b/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/utils/last_duration_i18n.ts deleted file mode 100644 index daae6e7839129..0000000000000 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/utils/last_duration_i18n.ts +++ /dev/null @@ -1,64 +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 moment from 'moment'; -import { TimeRange } from '../../../error_rate_chart/use_lens_definition'; - -export function getLastDurationInUnit(timeRange: TimeRange): string { - const duration = moment.duration(moment(timeRange.to).diff(timeRange.from)); - const durationInSeconds = duration.asSeconds(); - - const oneMinute = 60; - if (durationInSeconds < oneMinute) { - return i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.lastDurationInSeconds', - { - defaultMessage: 'Last {duration} seconds', - values: { - duration: Math.trunc(durationInSeconds), - }, - } - ); - } - - const twoHours = 2 * 60 * 60; - if (durationInSeconds < twoHours) { - return i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.lastDurationInMinutes', - { - defaultMessage: 'Last {duration} minutes', - values: { - duration: Math.trunc(duration.asMinutes()), - }, - } - ); - } - - const twoDays = 2 * 24 * 60 * 60; - if (durationInSeconds < twoDays) { - return i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.lastDurationInHours', - { - defaultMessage: 'Last {duration} hours', - values: { - duration: Math.trunc(duration.asHours()), - }, - } - ); - } - - return i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.lastDurationInDays', - { - defaultMessage: 'Last {duration} days', - values: { - duration: Math.trunc(duration.asDays()), - }, - } - ); -} diff --git a/x-pack/plugins/observability_solution/observability/public/constants.ts b/x-pack/plugins/observability_solution/observability/public/constants.ts index cea913c2e548b..2da72ff858283 100644 --- a/x-pack/plugins/observability_solution/observability/public/constants.ts +++ b/x-pack/plugins/observability_solution/observability/public/constants.ts @@ -7,7 +7,5 @@ export const DEFAULT_INTERVAL = '60s'; export const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD HH:mm'; -export const SLO_LONG_REFETCH_INTERVAL = 60 * 1000; // 1 minute -export const SLO_SHORT_REFETCH_INTERVAL = 5 * 1000; // 5 seconds export const RULE_DETAILS_ALERTS_TABLE_CONFIG_ID = `rule-details-alerts-table`; diff --git a/x-pack/plugins/observability_solution/observability/public/index.ts b/x-pack/plugins/observability_solution/observability/public/index.ts index 9403f67a8d59b..6542e95f20123 100644 --- a/x-pack/plugins/observability_solution/observability/public/index.ts +++ b/x-pack/plugins/observability_solution/observability/public/index.ts @@ -32,6 +32,8 @@ export const plugin: PluginInitializer< return new Plugin(initializerContext); }; +export type { ConfigSchema } from './plugin'; + export { enableLegacyUptimeApp, syntheticsThrottlingEnabled, @@ -51,12 +53,10 @@ export { uptimeOverviewLocatorID, } from '../common'; -export type { SloEditLocatorParams } from './locators/slo_edit'; - +export type { RulesParams } from './locators/rules'; export { getCoreVitalsComponent } from './pages/overview/components/sections/ux/core_web_vitals/get_core_web_vitals_lazy'; - -export { DatePicker } from './pages/overview/components/date_picker/date_picker'; export { ObservabilityAlertSearchBar } from './components/alert_search_bar/get_alert_search_bar_lazy'; +export { DatePicker } from './pages/overview/components/date_picker/date_picker'; export const LazyAlertsFlyout = lazy(() => import('./components/alerts_flyout/alerts_flyout')); @@ -68,11 +68,16 @@ export type { TopAlert, AlertSummary, AlertSummaryField }; export { observabilityFeatureId, observabilityAppId } from '../common'; +export { useFetchDataViews } from './hooks/use_fetch_data_views'; export { useTimeBuckets } from './hooks/use_time_buckets'; export { createUseRulesLink } from './hooks/create_use_rules_link'; export { useSummaryTimeRange } from './hooks/use_summary_time_range'; +export { useGetFilteredRuleTypes } from './hooks/use_get_filtered_rule_types'; +export { useCreateRule } from './hooks/use_create_rule'; export { getApmTraceUrl } from './utils/get_apm_trace_url'; +export { buildEsQuery } from './utils/build_es_query'; +export { KibanaReactStorybookDecorator } from './utils/kibana_react.storybook_decorator'; export type { ObservabilityRuleTypeFormatter, @@ -86,8 +91,10 @@ export { DatePickerContextProvider } from './context/date_picker_context/date_pi export { fromQuery, toQuery } from './utils/url'; export { getAlertSummaryTimeRange } from './utils/alert_summary_widget'; export { calculateTimeRangeBucketSize } from './pages/overview/helpers/calculate_bucket_size'; +export type { render } from './utils/test_helper'; export { convertTo } from '../common/utils/formatters/duration'; +export { getElasticsearchQueryOrThrow } from '../common/utils/parse_kuery'; export { formatAlertEvaluationValue } from './utils/format_alert_evaluation_value'; export { WithKueryAutocompletion } from './components/rule_kql_filter/with_kuery_autocompletion'; export { AutocompleteField } from './components/rule_kql_filter/autocomplete_field'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx index e54c0f060d2c1..2c840babd21ef 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx @@ -22,7 +22,7 @@ import { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; import { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; import type { AlertActionsProps } from '@kbn/triggers-actions-ui-plugin/public/types'; import { useRouteMatch } from 'react-router-dom'; -import { SLO_ALERTS_TABLE_ID } from '../../slo_details/components/slo_detail_alerts'; +import { SLO_ALERTS_TABLE_ID } from '@kbn/observability-shared-plugin/common'; import { RULE_DETAILS_PAGE_ID } from '../../rule_details/constants'; import { paths, SLO_DETAIL_PATH } from '../../../../common/locators/paths'; import { isAlertDetailsEnabledPerApp } from '../../../utils/is_alert_details_enabled'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/aggregation_options.ts b/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/aggregation_options.ts deleted file mode 100644 index ab27dcd68efe5..0000000000000 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/aggregation_options.ts +++ /dev/null @@ -1,88 +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'; -export const AGGREGATION_OPTIONS = [ - { - value: 'avg', - label: i18n.translate('xpack.observability.slo.sloEdit.timesliceMetric.aggregation.average', { - defaultMessage: 'Average', - }), - }, - { - value: 'max', - label: i18n.translate('xpack.observability.slo.sloEdit.timesliceMetric.aggregation.max', { - defaultMessage: 'Max', - }), - }, - { - value: 'min', - label: i18n.translate('xpack.observability.slo.sloEdit.timesliceMetric.aggregation.min', { - defaultMessage: 'Min', - }), - }, - { - value: 'sum', - label: i18n.translate('xpack.observability.slo.sloEdit.timesliceMetric.aggregation.sum', { - defaultMessage: 'Sum', - }), - }, - { - value: 'cardinality', - label: i18n.translate( - 'xpack.observability.slo.sloEdit.timesliceMetric.aggregation.cardinality', - { - defaultMessage: 'Cardinality', - } - ), - }, - { - value: 'last_value', - label: i18n.translate( - 'xpack.observability.slo.sloEdit.timesliceMetric.aggregation.last_value', - { - defaultMessage: 'Last value', - } - ), - }, - { - value: 'std_deviation', - label: i18n.translate( - 'xpack.observability.slo.sloEdit.timesliceMetric.aggregation.std_deviation', - { - defaultMessage: 'Std. Deviation', - } - ), - }, - { - value: 'doc_count', - label: i18n.translate('xpack.observability.slo.sloEdit.timesliceMetric.aggregation.doc_count', { - defaultMessage: 'Doc count', - }), - }, - { - value: 'percentile', - label: i18n.translate( - 'xpack.observability.slo.sloEdit.timesliceMetric.aggregation.percentile', - { - defaultMessage: 'Percentile', - } - ), - }, -]; - -export const CUSTOM_METRIC_AGGREGATION_OPTIONS = AGGREGATION_OPTIONS.filter((option) => - ['doc_count', 'sum'].includes(option.value) -); - -export function aggValueToLabel(value: string) { - const aggregation = AGGREGATION_OPTIONS.find((agg) => agg.value === value); - if (aggregation) { - return aggregation.label; - } - return value; -} diff --git a/x-pack/plugins/observability_solution/observability/public/plugin.ts b/x-pack/plugins/observability_solution/observability/public/plugin.ts index 74cc276819f37..2a1cd8ad37400 100644 --- a/x-pack/plugins/observability_solution/observability/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability/public/plugin.ts @@ -66,11 +66,9 @@ import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/publi import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/public'; import type { UiActionsStart, UiActionsSetup } from '@kbn/ui-actions-plugin/public'; -import { firstValueFrom } from 'rxjs'; import type { PresentationUtilPluginStart } from '@kbn/presentation-util-plugin/public'; import { DataViewFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public'; -import { getCreateSLOFlyoutLazy } from './pages/slo_edit/shared_flyout/get_create_slo_flyout'; import { observabilityAppId, observabilityFeatureId } from '../common'; import { ALERTS_PATH, @@ -78,15 +76,11 @@ import { OBSERVABILITY_BASE_PATH, OVERVIEW_PATH, RULES_PATH, - SLOS_PATH, } from '../common/locators/paths'; import { registerDataHandler } from './context/has_data_context/data_handler'; import { createUseRulesLink } from './hooks/create_use_rules_link'; import { RulesLocatorDefinition } from './locators/rules'; import { RuleDetailsLocatorDefinition } from './locators/rule_details'; -import { SloDetailsLocatorDefinition } from './locators/slo_details'; -import { SloEditLocatorDefinition } from './locators/slo_edit'; -import { SloListLocatorDefinition } from './locators/slo_list'; import { createObservabilityRuleTypeRegistry, ObservabilityRuleTypeRegistry, @@ -213,15 +207,6 @@ export class Plugin }, ], }, - { - id: 'slos', - title: i18n.translate('xpack.observability.slosLinkTitle', { - defaultMessage: 'SLOs', - }), - visibleIn: [], - order: 8002, - path: SLOS_PATH, - }, getCasesDeepLinks({ basePath: CASES_PATH, extend: { @@ -260,12 +245,6 @@ export class Plugin new RuleDetailsLocatorDefinition() ); - const sloDetailsLocator = pluginsSetup.share.url.locators.create( - new SloDetailsLocatorDefinition() - ); - const sloEditLocator = pluginsSetup.share.url.locators.create(new SloEditLocatorDefinition()); - const sloListLocator = pluginsSetup.share.url.locators.create(new SloListLocatorDefinition()); - const logsExplorerLocator = pluginsSetup.share.url.locators.get(LOGS_EXPLORER_LOCATOR_ID); @@ -331,53 +310,6 @@ export class Plugin logsExplorerLocator ); - const assertPlatinumLicense = async () => { - const licensing = await pluginsSetup.licensing; - const license = await firstValueFrom(licensing.license$); - - const hasPlatinumLicense = license.hasAtLeast('platinum'); - if (hasPlatinumLicense) { - const registerSloOverviewEmbeddableFactory = async () => { - const { SloOverviewEmbeddableFactoryDefinition } = await import( - './embeddable/slo/overview/slo_embeddable_factory' - ); - const factory = new SloOverviewEmbeddableFactoryDefinition(coreSetup.getStartServices); - pluginsSetup.embeddable.registerEmbeddableFactory(factory.type, factory); - }; - registerSloOverviewEmbeddableFactory(); - const registerSloAlertsEmbeddableFactory = async () => { - const { SloAlertsEmbeddableFactoryDefinition } = await import( - './embeddable/slo/alerts/slo_alerts_embeddable_factory' - ); - const factory = new SloAlertsEmbeddableFactoryDefinition( - coreSetup.getStartServices, - kibanaVersion - ); - pluginsSetup.embeddable.registerEmbeddableFactory(factory.type, factory); - }; - registerSloAlertsEmbeddableFactory(); - - const registerSloErrorBudgetEmbeddableFactory = async () => { - const { SloErrorBudgetEmbeddableFactoryDefinition } = await import( - './embeddable/slo/error_budget/slo_error_budget_embeddable_factory' - ); - const factory = new SloErrorBudgetEmbeddableFactoryDefinition(coreSetup.getStartServices); - pluginsSetup.embeddable.registerEmbeddableFactory(factory.type, factory); - }; - registerSloErrorBudgetEmbeddableFactory(); - - const registerAsyncSloAlertsUiActions = async () => { - if (pluginsSetup.uiActions) { - const { registerSloAlertsUiActions } = await import('./ui_actions'); - registerSloAlertsUiActions(pluginsSetup.uiActions, coreSetup); - } - }; - registerAsyncSloAlertsUiActions(); - } - }; - - assertPlatinumLicense(); - if (pluginsSetup.home) { pluginsSetup.home.featureCatalogue.registerSolution({ id: observabilityFeatureId, @@ -439,6 +371,18 @@ export class Plugin ] : []; + const sloLink = coreStart.application.capabilities.slo?.read + ? [ + { + label: i18n.translate('xpack.observability.sloLinkTitle', { + defaultMessage: 'SLOs', + }), + app: 'slo', + path: '/', + }, + ] + : []; + // Reformat the visible links to be NavigationEntry objects instead of // AppDeepLink objects. // @@ -449,8 +393,17 @@ export class Plugin // properties used by the deepLinks. // // See https://github.com/elastic/kibana/issues/103325. - const otherLinks: NavigationEntry[] = deepLinks - .filter((link) => (link.visibleIn ?? []).length > 0) + const otherLinks = deepLinks.filter((link) => (link.visibleIn ?? []).length > 0); + const alertsLink: NavigationEntry[] = otherLinks + .filter((link) => link.id === 'alerts') + .map((link) => ({ + app: observabilityAppId, + label: link.title, + path: link.path ?? '', + })); + + const casesLink: NavigationEntry[] = otherLinks + .filter((link) => link.id === 'cases') .map((link) => ({ app: observabilityAppId, label: link.title, @@ -461,7 +414,13 @@ export class Plugin { label: '', sortKey: 100, - entries: [...overviewLink, ...otherLinks, ...aiAssistantLink], + entries: [ + ...overviewLink, + ...alertsLink, + ...sloLink, + ...casesLink, + ...aiAssistantLink, + ], }, ]; }) @@ -476,9 +435,7 @@ export class Plugin useRulesLink: createUseRulesLink(), rulesLocator, ruleDetailsLocator, - sloDetailsLocator, - sloEditLocator, - sloListLocator, + config, }; } @@ -499,22 +456,11 @@ export class Plugin deepLinks: this.deepLinks, updater$: this.appUpdater$, }); - const kibanaVersion = this.initContext.env.packageInfo.version; - const { ruleTypeRegistry, actionTypeRegistry } = pluginsStart.triggersActionsUi; return { + config, observabilityRuleTypeRegistry: this.observabilityRuleTypeRegistry, useRulesLink: createUseRulesLink(), - getCreateSLOFlyout: getCreateSLOFlyoutLazy({ - config, - core: coreStart, - isDev: this.initContext.env.mode.dev, - kibanaVersion, - observabilityRuleTypeRegistry: this.observabilityRuleTypeRegistry, - ObservabilityPageTemplate: pluginsStart.observabilityShared.navigation.PageTemplate, - plugins: { ...pluginsStart, ruleTypeRegistry, actionTypeRegistry }, - isServerless: !!pluginsStart.serverless, - }), }; } } diff --git a/x-pack/plugins/observability_solution/observability/public/routes/routes.tsx b/x-pack/plugins/observability_solution/observability/public/routes/routes.tsx index 7bfd2c2b25e08..62328fc103797 100644 --- a/x-pack/plugins/observability_solution/observability/public/routes/routes.tsx +++ b/x-pack/plugins/observability_solution/observability/public/routes/routes.tsx @@ -16,10 +16,6 @@ import { LandingPage } from '../pages/landing/landing'; import { OverviewPage } from '../pages/overview/overview'; import { RulesPage } from '../pages/rules/rules'; import { RuleDetailsPage } from '../pages/rule_details/rule_details'; -import { SlosPage } from '../pages/slos/slos'; -import { SlosWelcomePage } from '../pages/slos_welcome/slos_welcome'; -import { SloDetailsPage } from '../pages/slo_details/slo_details'; -import { SloEditPage } from '../pages/slo_edit/slo_edit'; import { ALERTS_PATH, ALERT_DETAIL_PATH, @@ -31,15 +27,13 @@ import { RULES_LOGS_PATH, RULES_PATH, RULE_DETAIL_PATH, - SLOS_OUTDATED_DEFINITIONS_PATH, - SLOS_PATH, - SLOS_WELCOME_PATH, - SLO_CREATE_PATH, - SLO_DETAIL_PATH, - SLO_EDIT_PATH, + OLD_SLOS_PATH, + OLD_SLOS_WELCOME_PATH, + OLD_SLOS_OUTDATED_DEFINITIONS_PATH, + OLD_SLO_DETAIL_PATH, + OLD_SLO_EDIT_PATH, } from '../../common/locators/paths'; import { HasDataContextProvider } from '../context/has_data_context/has_data_context'; -import { SlosOutdatedDefinitions } from '../pages/slo_outdated_definitions'; // Note: React Router DOM component was not working here // so I've recreated this simple version for this purpose. @@ -48,10 +42,15 @@ function SimpleRedirect({ to, redirectToApp }: { to: string; redirectToApp?: str application: { navigateToApp }, } = useKibana().services; const history = useHistory(); - const { search, hash } = useLocation(); - + const { search, hash, pathname } = useLocation(); if (redirectToApp) { - navigateToApp(redirectToApp, { path: `/${search}${hash}`, replace: true }); + if (to === '/:sloId') { + to = pathname.split('/slos')[1]; + } + navigateToApp(redirectToApp, { + path: `/${to}${search ? `?${search}` : ''}${hash}`, + replace: true, + }); } else if (to) { history.replace(to); } @@ -139,44 +138,37 @@ export const routes = { params: {}, exact: true, }, - [SLOS_PATH]: { - handler: () => { - return ; - }, - params: {}, - exact: true, - }, - [SLO_CREATE_PATH]: { + [OLD_SLOS_PATH]: { handler: () => { - return ; + return ; }, params: {}, exact: true, }, - [SLOS_WELCOME_PATH]: { + [OLD_SLOS_WELCOME_PATH]: { handler: () => { - return ; + return ; }, params: {}, exact: true, }, - [SLOS_OUTDATED_DEFINITIONS_PATH]: { + [OLD_SLOS_OUTDATED_DEFINITIONS_PATH]: { handler: () => { - return ; + return ; }, params: {}, exact: true, }, - [SLO_EDIT_PATH]: { + [OLD_SLO_DETAIL_PATH]: { handler: () => { - return ; + return ; }, params: {}, exact: true, }, - [SLO_DETAIL_PATH]: { + [OLD_SLO_EDIT_PATH]: { handler: () => { - return ; + return ; }, params: {}, exact: true, diff --git a/x-pack/plugins/observability_solution/observability/public/rules/register_observability_rule_types.ts b/x-pack/plugins/observability_solution/observability/public/rules/register_observability_rule_types.ts index a8dd008a673ce..694874e533191 100644 --- a/x-pack/plugins/observability_solution/observability/public/rules/register_observability_rule_types.ts +++ b/x-pack/plugins/observability_solution/observability/public/rules/register_observability_rule_types.ts @@ -27,45 +27,9 @@ import type { import type { MetricExpression } from '../components/custom_threshold/types'; import { getViewInAppUrl } from '../../common/custom_threshold_rule/get_view_in_app_url'; import { getGroups } from '../../common/custom_threshold_rule/helpers/get_group'; -import { SLO_ID_FIELD, SLO_INSTANCE_ID_FIELD } from '../../common/field_names/slo'; import { ObservabilityRuleTypeRegistry } from './create_observability_rule_type_registry'; -import { SLO_BURN_RATE_RULE_TYPE_ID } from '../../common/constants'; -import { validateBurnRateRule } from '../components/burn_rate_rule_editor/validation'; import { validateCustomThreshold } from '../components/custom_threshold/components/validation'; -const sloBurnRateDefaultActionMessage = i18n.translate( - 'xpack.observability.slo.rules.burnRate.defaultActionMessage', - { - defaultMessage: `\\{\\{context.reason\\}\\} - -\\{\\{rule.name\\}\\} is active with the following conditions: - -- SLO: \\{\\{context.sloName\\}\\}' -- The burn rate over the last \\{\\{context.longWindow.duration\\}\\} is \\{\\{context.longWindow.burnRate\\}\\} -- The burn rate over the last \\{\\{context.shortWindow.duration\\}\\} is \\{\\{context.shortWindow.burnRate\\}\\} -- Threshold: \\{\\{context.burnRateThreshold\\}\\} - -[View alert details](\\{\\{context.alertDetailsUrl\\}\\}) -`, - } -); -const sloBurnRateDefaultRecoveryMessage = i18n.translate( - 'xpack.observability.slo.rules.burnRate.defaultRecoveryMessage', - { - defaultMessage: `\\{\\{context.reason\\}\\} - -\\{\\{rule.name\\}\\} has recovered. - -- SLO: \\{\\{context.sloName\\}\\}' -- The burn rate over the last \\{\\{context.longWindow.duration\\}\\} is \\{\\{context.longWindow.burnRate\\}\\} -- The burn rate over the last \\{\\{context.shortWindow.duration\\}\\} is \\{\\{context.shortWindow.burnRate\\}\\} -- Threshold: \\{\\{context.burnRateThreshold\\}\\} - -[View alert details](\\{\\{context.alertDetailsUrl\\}\\}) -`, - } -); - const thresholdDefaultActionMessage = i18n.translate( 'xpack.observability.customThreshold.rule.alerting.threshold.defaultActionMessage', { @@ -97,33 +61,6 @@ export const registerObservabilityRuleTypes = async ( uiSettings: IUiSettingsClient, logsExplorerLocator?: LocatorPublic ) => { - observabilityRuleTypeRegistry.register({ - id: SLO_BURN_RATE_RULE_TYPE_ID, - description: i18n.translate('xpack.observability.slo.rules.burnRate.description', { - defaultMessage: 'Alert when your SLO burn rate is too high over a defined period of time.', - }), - format: ({ fields }) => { - return { - reason: fields[ALERT_REASON] ?? '-', - link: `/app/observability/slos/${fields[SLO_ID_FIELD]}?instanceId=${ - fields[SLO_INSTANCE_ID_FIELD] ?? '*' - }`, - }; - }, - iconClass: 'bell', - documentationUrl(docLinks) { - return `${docLinks.links.observability.sloBurnRateRule}`; - }, - ruleParamsExpression: lazy(() => import('../components/burn_rate_rule_editor')), - validate: validateBurnRateRule, - requiresAppContext: false, - defaultActionMessage: sloBurnRateDefaultActionMessage, - defaultRecoveryMessage: sloBurnRateDefaultRecoveryMessage, - alertDetailsAppSection: lazy( - () => import('../components/slo/burn_rate/alert_details/alert_details_app_section') - ), - priority: 100, - }); const validateCustomThresholdWithUiSettings = ({ criteria, searchConfiguration, diff --git a/x-pack/plugins/observability_solution/observability/public/typings/index.ts b/x-pack/plugins/observability_solution/observability/public/typings/index.ts index 92ee64971e30b..b0cf1484d201a 100644 --- a/x-pack/plugins/observability_solution/observability/public/typings/index.ts +++ b/x-pack/plugins/observability_solution/observability/public/typings/index.ts @@ -6,5 +6,4 @@ */ export * from './fetch_overview_data'; -export * from './slo'; export * from './utils'; diff --git a/x-pack/plugins/observability_solution/observability/public/utils/kibana_react.storybook_decorator.tsx b/x-pack/plugins/observability_solution/observability/public/utils/kibana_react.storybook_decorator.tsx index 3794fa1e269c6..b8b4fe5ad142a 100644 --- a/x-pack/plugins/observability_solution/observability/public/utils/kibana_react.storybook_decorator.tsx +++ b/x-pack/plugins/observability_solution/observability/public/utils/kibana_react.storybook_decorator.tsx @@ -12,7 +12,7 @@ import { AppMountParameters } from '@kbn/core-application-browser'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; import { CoreTheme } from '@kbn/core-theme-browser'; import { MemoryRouter } from 'react-router-dom'; -import { casesFeatureId, sloFeatureId } from '../../common'; +import { casesFeatureId, sloFeatureId } from '@kbn/observability-shared-plugin/common'; import { PluginContext } from '../context/plugin_context/plugin_context'; import { createObservabilityRuleTypeRegistryMock } from '../rules/observability_rule_type_registry_mock'; import { ConfigSchema } from '../plugin'; diff --git a/x-pack/plugins/observability_solution/observability/server/common/constants.ts b/x-pack/plugins/observability_solution/observability/server/common/constants.ts index 4a5ce7287bea0..373c6b32b3388 100644 --- a/x-pack/plugins/observability_solution/observability/server/common/constants.ts +++ b/x-pack/plugins/observability_solution/observability/server/common/constants.ts @@ -5,5 +5,4 @@ * 2.0. */ -export const SLO_RULE_REGISTRATION_CONTEXT = 'observability.slo'; export const THRESHOLD_RULE_REGISTRATION_CONTEXT = 'observability.threshold'; diff --git a/x-pack/plugins/observability_solution/observability/server/index.ts b/x-pack/plugins/observability_solution/observability/server/index.ts index 07fb79a05f412..c6c96c6599632 100644 --- a/x-pack/plugins/observability_solution/observability/server/index.ts +++ b/x-pack/plugins/observability_solution/observability/server/index.ts @@ -14,6 +14,7 @@ import type { ObservabilityPluginSetup } from './plugin'; import { createOrUpdateIndex, Mappings } from './utils/create_or_update_index'; import { createOrUpdateIndexTemplate } from './utils/create_or_update_index_template'; import { ScopedAnnotationsClient } from './lib/annotations/bootstrap_annotations'; +import { CustomThresholdLocators } from './lib/rules/custom_threshold/custom_threshold_executor'; import { unwrapEsResponse, WrappedElasticsearchClientError, @@ -57,7 +58,6 @@ const configSchema = schema.object({ }), enabled: schema.boolean({ defaultValue: true }), createO11yGenericFeatureId: schema.boolean({ defaultValue: false }), - sloOrphanSummaryCleanUpTaskEnabled: schema.boolean({ defaultValue: true }), }); export const config: PluginConfigDescriptor = { @@ -85,7 +85,12 @@ export const plugin = async (initContext: PluginInitializerContext) => { return new ObservabilityPlugin(initContext); }; -export type { Mappings, ObservabilityPluginSetup, ScopedAnnotationsClient }; +export type { + Mappings, + ObservabilityPluginSetup, + ScopedAnnotationsClient, + CustomThresholdLocators, +}; export { createOrUpdateIndex, createOrUpdateIndexTemplate, diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/register_rule_types.ts b/x-pack/plugins/observability_solution/observability/server/lib/rules/register_rule_types.ts index f705cf6416459..bc3611ac216c7 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/register_rule_types.ts +++ b/x-pack/plugins/observability_solution/observability/server/lib/rules/register_rule_types.ts @@ -15,15 +15,10 @@ import { import { mappingFromFieldMap } from '@kbn/alerting-plugin/common'; import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; import { CustomThresholdLocators } from './custom_threshold/custom_threshold_executor'; -import { sloFeatureId, observabilityFeatureId } from '../../../common'; +import { observabilityFeatureId } from '../../../common'; import { ObservabilityConfig } from '../..'; -import { - SLO_RULE_REGISTRATION_CONTEXT, - THRESHOLD_RULE_REGISTRATION_CONTEXT, -} from '../../common/constants'; -import { sloBurnRateRuleType } from './slo_burn_rate'; +import { THRESHOLD_RULE_REGISTRATION_CONTEXT } from '../../common/constants'; import { thresholdRuleType } from './custom_threshold/register_custom_threshold_rule_type'; -import { sloRuleFieldMap } from './slo_burn_rate/field_map'; export function registerRuleTypes( alertingPlugin: PluginSetupContract, @@ -33,31 +28,6 @@ export function registerRuleTypes( ruleDataService: IRuleDataService, locators: CustomThresholdLocators ) { - // SLO RULE - const ruleDataClientSLO = ruleDataService.initializeIndex({ - feature: sloFeatureId, - registrationContext: SLO_RULE_REGISTRATION_CONTEXT, - dataset: Dataset.alerts, - componentTemplateRefs: [], - componentTemplates: [ - { - name: 'mappings', - mappings: mappingFromFieldMap( - { ...legacyExperimentalFieldMap, ...sloRuleFieldMap }, - 'strict' - ), - }, - ], - }); - - const createLifecycleRuleExecutorSLO = createLifecycleExecutor( - logger.get('rules'), - ruleDataClientSLO - ); - alertingPlugin.registerType( - sloBurnRateRuleType(createLifecycleRuleExecutorSLO, basePath, locators.alertsLocator) - ); - const ruleDataClientThreshold = ruleDataService.initializeIndex({ feature: observabilityFeatureId, registrationContext: THRESHOLD_RULE_REGISTRATION_CONTEXT, diff --git a/x-pack/plugins/observability_solution/observability/server/plugin.ts b/x-pack/plugins/observability_solution/observability/server/plugin.ts index 70a6e97b344fe..805f771a67a02 100644 --- a/x-pack/plugins/observability_solution/observability/server/plugin.ts +++ b/x-pack/plugins/observability_solution/observability/server/plugin.ts @@ -18,7 +18,6 @@ import { Logger, Plugin, PluginInitializerContext, - SavedObjectsClient, } from '@kbn/core/server'; import { LogsExplorerLocatorParams, LOGS_EXPLORER_LOCATOR_ID } from '@kbn/deeplinks-observability'; import { PluginSetupContract as FeaturesSetup } from '@kbn/features-plugin/server'; @@ -31,19 +30,14 @@ import { ML_ANOMALY_DETECTION_RULE_TYPE_ID, METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, + SLO_BURN_RATE_RULE_TYPE_ID, } from '@kbn/rule-data-utils'; -import { - TaskManagerSetupContract, - TaskManagerStartContract, -} from '@kbn/task-manager-plugin/server'; import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; import { SharePluginSetup } from '@kbn/share-plugin/server'; import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; -import { SloOrphanSummaryCleanupTask } from './services/slo/tasks/orphan_summary_cleanup_task'; import { ObservabilityConfig } from '.'; -import { casesFeatureId, observabilityFeatureId, sloFeatureId } from '../common'; -import { SLO_BURN_RATE_RULE_TYPE_ID } from '../common/constants'; +import { casesFeatureId, observabilityFeatureId } from '../common'; import { kubernetesGuideConfig, kubernetesGuideId, @@ -54,14 +48,10 @@ import { bootstrapAnnotations, ScopedAnnotationsClientFactory, } from './lib/annotations/bootstrap_annotations'; -import { registerSloUsageCollector } from './lib/collectors/register'; import { registerRuleTypes } from './lib/rules/register_rule_types'; import { getObservabilityServerRouteRepository } from './routes/get_global_observability_server_route_repository'; import { registerRoutes } from './routes/register_routes'; -import { slo, SO_SLO_TYPE } from './saved_objects'; import { threshold } from './saved_objects/threshold'; -import { DefaultResourceInstaller, DefaultSLOInstaller } from './services/slo'; - import { uiSettings } from './ui_settings'; export type ObservabilityPluginSetup = ReturnType; @@ -75,17 +65,13 @@ interface PluginSetup { spaces?: SpacesPluginSetup; usageCollection?: UsageCollectionSetup; cloud?: CloudSetup; - taskManager: TaskManagerSetupContract; } interface PluginStart { alerting: PluginStartContract; - taskManager: TaskManagerStartContract; spaces?: SpacesPluginStart; } -const sloRuleTypes = [SLO_BURN_RATE_RULE_TYPE_ID]; - const o11yRuleTypes = [ SLO_BURN_RATE_RULE_TYPE_ID, OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, @@ -97,7 +83,6 @@ const o11yRuleTypes = [ export class ObservabilityPlugin implements Plugin { private logger: Logger; - private sloOrphanCleanupTask?: SloOrphanSummaryCleanupTask; constructor(private readonly initContext: PluginInitializerContext) { this.initContext = initContext; @@ -290,65 +275,12 @@ export class ObservabilityPlugin implements Plugin { const { ruleDataService } = plugins.ruleRegistry; - const savedObjectTypes = [SO_SLO_TYPE]; - plugins.features.registerKibanaFeature({ - id: sloFeatureId, - name: i18n.translate('xpack.observability.featureRegistry.linkSloTitle', { - defaultMessage: 'SLOs', - }), - order: 1200, - category: DEFAULT_APP_CATEGORIES.observability, - app: [sloFeatureId, 'kibana'], - catalogue: [sloFeatureId, 'observability'], - alerting: sloRuleTypes, - privileges: { - all: { - app: [sloFeatureId, 'kibana'], - catalogue: [sloFeatureId, 'observability'], - api: ['slo_write', 'slo_read', 'rac'], - savedObject: { - all: savedObjectTypes, - read: [], - }, - alerting: { - rule: { - all: sloRuleTypes, - }, - alert: { - all: sloRuleTypes, - }, - }, - ui: ['read', 'write'], - }, - read: { - app: [sloFeatureId, 'kibana'], - catalogue: [sloFeatureId, 'observability'], - api: ['slo_read', 'rac'], - savedObject: { - all: [], - read: savedObjectTypes, - }, - alerting: { - rule: { - read: sloRuleTypes, - }, - alert: { - read: sloRuleTypes, - }, - }, - ui: ['read'], - }, - }, - }); - - core.savedObjects.registerType(slo); core.savedObjects.registerType(threshold); registerRuleTypes(plugins.alerting, core.http.basePath, config, this.logger, ruleDataService, { alertsLocator, logsExplorerLocator, }); - registerSloUsageCollector(plugins.usageCollection); core.getStartServices().then(([coreStart, pluginStart]) => { registerRoutes({ @@ -366,24 +298,12 @@ export class ObservabilityPlugin implements Plugin { logger: this.logger, repository: getObservabilityServerRouteRepository(config), }); - - const esInternalClient = coreStart.elasticsearch.client.asInternalUser; - - const sloResourceInstaller = new DefaultResourceInstaller(esInternalClient, this.logger); - const sloInstaller = new DefaultSLOInstaller(sloResourceInstaller, this.logger); - sloInstaller.install(); }); /** * Register a config for the observability guide */ plugins.guidedOnboarding?.registerGuideConfig(kubernetesGuideId, kubernetesGuideConfig); - this.sloOrphanCleanupTask = new SloOrphanSummaryCleanupTask( - plugins.taskManager, - this.logger, - config - ); - return { getAlertDetailsConfig() { return config.unsafe.alertDetails; @@ -396,12 +316,7 @@ export class ObservabilityPlugin implements Plugin { }; } - public start(core: CoreStart, plugins: PluginStart) { - const internalSoClient = new SavedObjectsClient(core.savedObjects.createInternalRepository()); - const internalEsClient = core.elasticsearch.client.asInternalUser; - - this.sloOrphanCleanupTask?.start(plugins.taskManager, internalSoClient, internalEsClient); - } + public start(core: CoreStart, plugins: PluginStart) {} public stop() {} } diff --git a/x-pack/plugins/observability_solution/observability/server/routes/get_global_observability_server_route_repository.ts b/x-pack/plugins/observability_solution/observability/server/routes/get_global_observability_server_route_repository.ts index d6a71120bb37b..78c4a2614b528 100644 --- a/x-pack/plugins/observability_solution/observability/server/routes/get_global_observability_server_route_repository.ts +++ b/x-pack/plugins/observability_solution/observability/server/routes/get_global_observability_server_route_repository.ts @@ -7,12 +7,10 @@ import { ObservabilityConfig } from '..'; import { rulesRouteRepository } from './rules/route'; -import { sloRouteRepository } from './slo/route'; export function getObservabilityServerRouteRepository(config: ObservabilityConfig) { const repository = { ...rulesRouteRepository, - ...sloRouteRepository, }; return repository; } diff --git a/x-pack/plugins/observability_solution/observability/tsconfig.json b/x-pack/plugins/observability_solution/observability/tsconfig.json index 345ddcbba080b..31d4f84f0f9fd 100644 --- a/x-pack/plugins/observability_solution/observability/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability/tsconfig.json @@ -10,7 +10,6 @@ "server/**/*", "typings/**/*", "../../../../typings/**/*", - "../../observability/public/embeddable/slo/common" ], "kbn_references": [ "@kbn/core", @@ -47,13 +46,10 @@ "@kbn/server-route-repository", "@kbn/ui-theme", "@kbn/test-jest-helpers", - "@kbn/core-http-browser", "@kbn/config-schema", "@kbn/features-plugin", - "@kbn/core-saved-objects-server", "@kbn/logging-mocks", "@kbn/logging", - "@kbn/core-saved-objects-api-server", "@kbn/share-plugin", "@kbn/core-notifications-browser", "@kbn/slo-schema", @@ -93,27 +89,14 @@ "@kbn/react-kibana-mount", "@kbn/react-kibana-context-theme", "@kbn/shared-ux-link-redirect-app", - "@kbn/core-chrome-browser", "@kbn/lens-embeddable-utils", "@kbn/serverless", - "@kbn/dashboard-plugin", - "@kbn/calculate-auto", "@kbn/presentation-util-plugin", - "@kbn/task-manager-plugin", - "@kbn/core-elasticsearch-client-server-mocks", "@kbn/es-types", - "@kbn/ingest-pipelines-plugin", - "@kbn/core-saved-objects-api-server-mocks", "@kbn/core-ui-settings-browser-mocks", "@kbn/field-formats-plugin", "@kbn/aiops-utils", "@kbn/event-annotation-common", - "@kbn/controls-plugin", - "@kbn/core-lifecycle-browser", - "@kbn/unified-data-table", - "@kbn/cell-actions", - "@kbn/discover-utils", - "@kbn/unified-field-list", "@kbn/data-view-field-editor-plugin" ], "exclude": ["target/**/*"] 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 b5588e70638d1..d1b08ed5283f5 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 @@ -6,7 +6,7 @@ */ import { i18n } from '@kbn/i18n'; -import type { Message } from './types'; +import { TokenCount as TokenCountType, type Message } from './types'; export enum StreamingChatResponseEventType { ChatCompletionChunk = 'chatCompletionChunk', @@ -15,6 +15,7 @@ export enum StreamingChatResponseEventType { MessageAdd = 'messageAdd', ChatCompletionError = 'chatCompletionError', BufferFlush = 'bufferFlush', + TokenCount = 'tokenCount', } type StreamingChatResponseEventBase< @@ -45,6 +46,7 @@ export type ConversationCreateEvent = StreamingChatResponseEventBase< id: string; title: string; last_updated: string; + token_count?: TokenCountType; }; } >; @@ -56,6 +58,7 @@ export type ConversationUpdateEvent = StreamingChatResponseEventBase< id: string; title: string; last_updated: string; + token_count?: TokenCountType; }; } >; @@ -84,6 +87,17 @@ export type BufferFlushEvent = StreamingChatResponseEventBase< } >; +export type TokenCountEvent = StreamingChatResponseEventBase< + StreamingChatResponseEventType.TokenCount, + { + tokens: { + completion: number; + prompt: number; + total: number; + }; + } +>; + export type StreamingChatResponseEvent = | ChatCompletionChunkEvent | ConversationCreateEvent diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts index ce07d3de03308..dcfd39651bf0a 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/functions/types.ts @@ -25,14 +25,12 @@ export type FunctionResponse = } | Observable; -export interface FunctionDefinition< - TParameters extends CompatibleJSONSchema = CompatibleJSONSchema -> { +export interface FunctionDefinition { name: string; description: string; visibility?: FunctionVisibility; descriptionForUser?: string; - parameters: TParameters; + parameters?: TParameters; contexts: string[]; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts index b32161ca0195e..e30f425d5dd9a 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/types.ts @@ -4,6 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import type { ObservabilityAIAssistantChatService } from '../public'; +import type { CompatibleJSONSchema, FunctionResponse } from './functions/types'; export enum MessageRole { System = 'system', @@ -40,6 +42,12 @@ export interface Message { }; } +export interface TokenCount { + prompt: number; + completion: number; + total: number; +} + export interface Conversation { '@timestamp': string; user: { @@ -50,6 +58,7 @@ export interface Conversation { id: string; title: string; last_updated: string; + token_count?: TokenCount; }; messages: Message[]; labels: Record; @@ -59,11 +68,13 @@ export interface Conversation { } export type ConversationRequestBase = Omit & { - conversation: { title: string }; + conversation: { title: string; token_count?: TokenCount }; }; export type ConversationCreateRequest = ConversationRequestBase; -export type ConversationUpdateRequest = ConversationRequestBase & { conversation: { id: string } }; +export type ConversationUpdateRequest = ConversationRequestBase & { + conversation: { id: string }; +}; export interface KnowledgeBaseEntry { '@timestamp': string; @@ -77,6 +88,31 @@ export interface KnowledgeBaseEntry { role: KnowledgeBaseEntryRole; } +export interface ObservabilityAIAssistantScreenContextRequest { + screenDescription?: string; + data?: Array<{ + name: string; + description: string; + value: any; + }>; + actions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; +} + +export type ScreenContextActionRespondFunction = ({}: { + args: TArguments; + signal: AbortSignal; + connectorId: string; + client: Pick; + messages: Message[]; +}) => Promise; + +export interface ScreenContextActionDefinition { + name: string; + description: string; + parameters?: CompatibleJSONSchema; + respond: ScreenContextActionRespondFunction; +} + export interface ObservabilityAIAssistantScreenContext { screenDescription?: string; data?: Array<{ @@ -84,4 +120,5 @@ export interface ObservabilityAIAssistantScreenContext { description: string; value: any; }>; + actions?: ScreenContextActionDefinition[]; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_request_message.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_request_message.ts similarity index 83% rename from x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_request_message.ts rename to x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_request_message.ts index 8c38b03040794..45399ea651bb3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_request_message.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_request_message.ts @@ -6,11 +6,8 @@ */ import { v4 } from 'uuid'; -import { MessageRole } from '../../../common'; -import { - MessageAddEvent, - StreamingChatResponseEventType, -} from '../../../common/conversation_complete'; +import { MessageRole } from '..'; +import { MessageAddEvent, StreamingChatResponseEventType } from '../conversation_complete'; export function createFunctionRequestMessage({ name, 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/common/utils/create_function_response_error.ts new file mode 100644 index 0000000000000..79f6e5d4ff6df --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_error.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { createFunctionResponseMessage } from './create_function_response_message'; + +export function createFunctionResponseError({ + name, + error, + message, +}: { + name: string; + error: Error; + message?: string; +}) { + return createFunctionResponseMessage({ + name, + content: { + error: { + ...error, + name: error.name, + message: error.message, + cause: error.cause, + stack: error.stack, + }, + message: message || error.message, + }, + }); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_response_message.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_message.ts similarity index 82% rename from x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_response_message.ts rename to x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_message.ts index 186ff117734c3..b382e09c19e37 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/create_function_response_message.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/create_function_response_message.ts @@ -6,11 +6,8 @@ */ import { v4 } from 'uuid'; -import { MessageRole } from '../../../common'; -import { - type MessageAddEvent, - StreamingChatResponseEventType, -} from '../../../common/conversation_complete'; +import { MessageRole } from '..'; +import { type MessageAddEvent, StreamingChatResponseEventType } from '../conversation_complete'; export function createFunctionResponseMessage({ name, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/process_openai_stream.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/process_openai_stream.ts deleted file mode 100644 index 97a127abd0a97..0000000000000 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/common/utils/process_openai_stream.ts +++ /dev/null @@ -1,63 +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 OpenAI from 'openai'; -import { filter, map, Observable, tap } from 'rxjs'; -import { v4 } from 'uuid'; -import { - type ChatCompletionChunkEvent, - createInternalServerError, - createTokenLimitReachedError, - StreamingChatResponseEventType, -} from '../conversation_complete'; - -export type CreateChatCompletionResponseChunk = Omit & { - choices: Array< - Omit & { - delta: { content?: string; function_call?: { name?: string; arguments?: string } }; - } - >; -}; - -export function processOpenAiStream() { - return (source: Observable): Observable => { - const id = v4(); - - return source.pipe( - filter((line) => !!line && line !== '[DONE]'), - map( - (line) => - JSON.parse(line) as CreateChatCompletionResponseChunk | { error: { message: string } } - ), - tap((line) => { - if ('error' in line) { - throw createInternalServerError(line.error.message); - } - if ( - 'choices' in line && - line.choices.length && - line.choices[0].finish_reason === 'length' - ) { - throw createTokenLimitReachedError(); - } - }), - filter( - (line): line is CreateChatCompletionResponseChunk => - 'object' in line && line.object === 'chat.completion.chunk' - ), - map((chunk): ChatCompletionChunkEvent => { - return { - id, - type: StreamingChatResponseEventType.ChatCompletionChunk, - message: { - content: chunk.choices[0].delta.content || '', - function_call: chunk.choices[0].delta.function_call, - }, - }; - }) - ); - }; -} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/chat_feedback.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/chat_feedback.ts index be9c65a8e3526..fa0c670fa2988 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/chat_feedback.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/schemas/chat_feedback.ts @@ -80,6 +80,28 @@ export const chatFeedbackEventSchema: EventTypeOpts = { description: 'The timestamp of the last message in the conversation.', }, }, + token_count: { + properties: { + completion: { + type: 'long', + _meta: { + description: 'The number of tokens in the completion.', + }, + }, + prompt: { + type: 'long', + _meta: { + description: 'The number of tokens in the prompt.', + }, + }, + total: { + type: 'long', + _meta: { + description: 'The total number of tokens in the conversation.', + }, + }, + }, + }, }, }, messages: { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/components/insight/insight.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/components/insight/insight.tsx index 93f2e4c413077..6394d037de42c 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/components/insight/insight.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/components/insight/insight.tsx @@ -25,6 +25,7 @@ import { useGenAIConnectors } from '../../hooks/use_genai_connectors'; import { useKibana } from '../../hooks/use_kibana'; import { useObservabilityAIAssistant } from '../../hooks/use_observability_ai_assistant'; import { useObservabilityAIAssistantChatService } from '../../hooks/use_observability_ai_assistant_chat_service'; +import { useFlyoutState } from '../../hooks/use_flyout_state'; import { getConnectorsManagementHref } from '../../utils/get_connectors_management_href'; import { RegenerateResponseButton } from '../buttons/regenerate_response_button'; import { StartChatButton } from '../buttons/start_chat_button'; @@ -55,6 +56,8 @@ function ChatContent({ const initialMessagesRef = useRef(initialMessages); + const { flyoutState } = useFlyoutState(); + const { messages, next, state, stop } = useChat({ service, chatService, @@ -114,6 +117,7 @@ function ChatContent({ { service.conversations.openNewConversation({ messages, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts index 1ccc48ddb3934..2ab4fd294dffa 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_chat.ts @@ -161,7 +161,7 @@ function useChatWithoutContext({ setChatState(ChatState.Loading); const next$ = chatService.complete({ - screenContexts: service.getScreenContexts(), + getScreenContexts: () => service.getScreenContexts(), connectorId, messages: getWithSystemMessage(nextMessages, systemMessage), persist, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_flyout_state.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_flyout_state.ts new file mode 100644 index 0000000000000..8c5a7e16f5338 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/hooks/use_flyout_state.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. + */ + +import useLocalStorage from 'react-use/lib/useLocalStorage'; + +enum FlyoutPositionMode { + PUSH = 'push', + OVERLAY = 'overlay', +} + +interface FlyoutState { + flyoutPositionMode: FlyoutPositionMode; + isOpen: boolean; +} + +export const defaultFlyoutState: FlyoutState = { + flyoutPositionMode: FlyoutPositionMode.OVERLAY, + isOpen: false, +}; + +export const OBSERVABILITY_AI_ASSISTANT_LOCAL_STORAGE_KEY = 'observabilityAIAssistant_flyoutState'; + +export function useFlyoutState() { + const [flyoutState = defaultFlyoutState, setFlyoutState, removeFlyoutState] = useLocalStorage( + OBSERVABILITY_AI_ASSISTANT_LOCAL_STORAGE_KEY, + defaultFlyoutState + ); + return { flyoutState, setFlyoutState, removeFlyoutState }; +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts index a3bb72746a86b..80d01706700b8 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/index.ts @@ -33,6 +33,8 @@ export { useAbortableAsync, type AbortableAsyncState } from './hooks/use_abortab export { createStorybookChatService, createStorybookService } from './storybook_mock'; +export { createScreenContextAction } from './utils/create_screen_context_action'; + export { ChatState } from './hooks/use_chat'; export { FeedbackButtons, type Feedback } from './components/buttons/feedback_buttons'; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx index fb6438dbe8580..c38307e920641 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/mock.tsx @@ -7,8 +7,9 @@ import { i18n } from '@kbn/i18n'; import { noop } from 'lodash'; import React from 'react'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import type { StreamingChatResponseEventWithoutError } from '../common/conversation_complete'; +import { ScreenContextActionDefinition } from '../common/types'; import type { ObservabilityAIAssistantAPIClient } from './api'; import type { ObservabilityAIAssistantChatService, @@ -49,6 +50,7 @@ export const mockService: ObservabilityAIAssistantService = { openNewConversation: noop, predefinedConversation$: new Observable(), }, + navigate: async () => of(), }; function createSetupContract(): ObservabilityAIAssistantPublicSetup { @@ -75,6 +77,7 @@ function createStartContract(): ObservabilityAIAssistantPublicStart { getPreferredLanguage: () => 'English', }), getContextualInsightMessages: () => [], + createScreenContextAction: () => ({} as ScreenContextActionDefinition), }; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx index 1e82b135a837a..c003856b03699 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/plugin.tsx @@ -28,6 +28,7 @@ import type { } from './types'; import { useUserPreferredLanguage } from './hooks/use_user_preferred_language'; import { getContextualInsightMessages } from './utils/get_contextual_insight_messages'; +import { createScreenContextAction } from './utils/create_screen_context_action'; export class ObservabilityAIAssistantPlugin implements @@ -107,6 +108,7 @@ export class ObservabilityAIAssistantPlugin ) : null, getContextualInsightMessages, + createScreenContextAction, }; } } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.test.ts new file mode 100644 index 0000000000000..eca7b6977a7c3 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.test.ts @@ -0,0 +1,404 @@ +/* + * 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, last, lastValueFrom, map, of, throwError, toArray } from 'rxjs'; +import { v4 } from 'uuid'; +import { + type Message, + MessageRole, + StreamingChatResponseEventType, + type StreamingChatResponseEvent, + ChatCompletionErrorCode, + ChatCompletionError, + MessageAddEvent, + createInternalServerError, +} from '../../common'; +import type { ObservabilityAIAssistantChatService } from '../types'; +import { complete } from './complete'; + +const client = { + chat: jest.fn(), + complete: jest.fn(), +} as unknown as ObservabilityAIAssistantChatService; + +const connectorId = 'foo'; + +const messages: Message[] = [ + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.System, + content: 'System message', + }, + }, + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: 'User message', + }, + }, +]; + +const createLlmResponse = ( + chunks: Array<{ content: string; function_call?: { name: string; arguments: string } }> +): StreamingChatResponseEvent[] => { + const id = v4(); + const message = chunks.reduce( + (prev, current) => { + prev.content += current.content ?? ''; + prev.function_call!.name += current.function_call?.name ?? ''; + prev.function_call!.arguments! += current.function_call?.arguments ?? ''; + return prev; + }, + { + content: '', + role: MessageRole.Assistant, + function_call: { name: '', arguments: '', trigger: MessageRole.Assistant }, + } + ); + + const events: StreamingChatResponseEvent[] = [ + ...chunks.map((msg) => ({ + id, + message: msg, + type: StreamingChatResponseEventType.ChatCompletionChunk as const, + })), + { + id, + message: { + '@timestamp': new Date().toString(), + message, + }, + type: StreamingChatResponseEventType.MessageAdd as const, + }, + ]; + + return events; +}; + +type CompleteParameters = Parameters[0]; + +describe('complete', () => { + const requestCallback: jest.MockedFunction[1]> = jest.fn(); + + beforeEach(() => { + requestCallback.mockReset(); + }); + + function callComplete(params?: Partial) { + return complete( + { + client, + connectorId, + getScreenContexts: () => [], + messages, + persist: false, + signal: new AbortController().signal, + ...params, + }, + requestCallback + ); + } + + describe('when an error is emitted', () => { + beforeEach(() => { + requestCallback.mockImplementation(() => + of({ + type: StreamingChatResponseEventType.ChatCompletionError, + error: { + message: 'Not found', + code: ChatCompletionErrorCode.NotFoundError, + }, + }) + ); + }); + + it('the observable errors out', async () => { + await expect(async () => await lastValueFrom(callComplete())).rejects.toThrowError( + 'Not found' + ); + + await expect(async () => await lastValueFrom(callComplete())).rejects.toBeInstanceOf( + ChatCompletionError + ); + + await expect(async () => await lastValueFrom(callComplete())).rejects.toHaveProperty( + 'code', + ChatCompletionErrorCode.NotFoundError + ); + }); + }); + + describe('with screen context and an action is called', () => { + const respondFn: jest.MockedFn = jest.fn(); + + const getScreenContexts: CompleteParameters['getScreenContexts'] = jest.fn().mockReturnValue([ + { + actions: [ + { + name: 'my_action', + description: 'My action', + parameters: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + }, + }, + respond: respondFn, + }, + ], + }, + ]); + + beforeEach(() => { + requestCallback.mockImplementationOnce(() => + of( + ...createLlmResponse([ + { + content: '', + function_call: { name: 'my_action', arguments: JSON.stringify({ foo: 'bar' }) }, + }, + ]) + ) + ); + }); + describe('and it succeeds', () => { + let allMessages: Message[] = []; + beforeEach(async () => { + respondFn.mockResolvedValueOnce({ content: { bar: 'foo' } }); + + requestCallback.mockImplementationOnce(() => + of(...createLlmResponse([{ content: 'Great action call' }])) + ); + + allMessages = await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe( + filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ), + map((event) => event.message), + toArray(), + last() + ) + ); + }); + + it('calls the request callback again with the executed message', () => { + expect(requestCallback).toHaveBeenCalledTimes(2); + + const nextMessages = requestCallback.mock.lastCall![0].params.body.messages; + + const expectedMessages = [ + { + '@timestamp': expect.any(String), + message: { + content: '', + function_call: { + arguments: JSON.stringify({ foo: 'bar' }), + name: 'my_action', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }, + { + '@timestamp': expect.any(String), + message: { + content: JSON.stringify({ bar: 'foo' }), + name: 'my_action', + role: MessageRole.User, + }, + }, + ]; + + expect(nextMessages).toEqual([...messages, ...expectedMessages]); + }); + + it('calls the action handler with the arguments from the LLM', () => { + expect(respondFn).toHaveBeenCalledWith( + expect.objectContaining({ + args: { + foo: 'bar', + }, + }) + ); + }); + + it('returns all the messages in the created observable', () => { + expect(allMessages[allMessages.length - 1]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: 'Great action call', + function_call: { + arguments: '', + name: '', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }); + }); + }); + + describe('and it fails', () => { + beforeEach(async () => { + respondFn.mockRejectedValueOnce(new Error('foo')); + + requestCallback.mockImplementationOnce(() => + of(...createLlmResponse([{ content: 'Action call failed' }])) + ); + + await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe( + filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ), + map((event) => event.message), + toArray(), + last() + ) + ); + }); + + it('calls the request callback again with the error', () => { + expect(requestCallback).toHaveBeenCalledTimes(2); + + const nextMessages = requestCallback.mock.lastCall![0].params.body.messages; + + const errorMessage = nextMessages[nextMessages.length - 1]; + + expect(errorMessage).toEqual({ + '@timestamp': expect.any(String), + message: { + content: expect.any(String), + name: 'my_action', + role: MessageRole.User, + }, + }); + + expect(JSON.parse(errorMessage.message.content ?? '{}')).toEqual({ + error: expect.objectContaining({ + message: 'foo', + }), + message: 'foo', + }); + }); + }); + + describe('and it returns an observable that completes', () => { + let allMessages: Message[] = []; + let allEvents: StreamingChatResponseEvent[] = []; + beforeEach(async () => { + respondFn.mockResolvedValueOnce( + of(...createLlmResponse([{ content: 'My function response' }])) + ); + + allEvents = await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe(toArray(), last()) + ); + + allMessages = allEvents + .filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ) + .map((event) => event.message); + }); + + it('propagates all the events from the responded observable', () => { + expect(allEvents.length).toEqual(5); + expect( + allEvents.filter( + (event) => event.type === StreamingChatResponseEventType.ChatCompletionChunk + ).length + ).toEqual(2); + }); + + it('automatically adds a function response message', () => { + expect(allMessages[allMessages.length - 2]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: JSON.stringify({ executed: true }), + name: 'my_action', + role: MessageRole.User, + }, + }); + }); + + it('adds the messages from the observable', () => { + expect(allMessages[allMessages.length - 1]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: 'My function response', + function_call: { + name: '', + arguments: '', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }); + }); + }); + + describe('and it returns an observable that errors out', () => { + let allMessages: Message[] = []; + let allEvents: StreamingChatResponseEvent[] = []; + beforeEach(async () => { + respondFn.mockResolvedValueOnce(throwError(() => createInternalServerError('Foo'))); + + requestCallback.mockImplementationOnce(() => + of( + ...createLlmResponse([ + { + content: 'Looks like your action failed', + }, + ]) + ) + ); + + allEvents = await lastValueFrom( + callComplete({ + getScreenContexts, + }).pipe(toArray(), last()) + ); + + allMessages = allEvents + .filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ) + .map((event) => event.message); + }); + + it('appends the error message', () => { + expect(allMessages[allMessages.length - 1]).toEqual({ + '@timestamp': expect.any(String), + message: { + content: 'Looks like your action failed', + function_call: { + arguments: '', + name: '', + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }); + }); + }); + }); +}); 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 new file mode 100644 index 0000000000000..812d486317b57 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/complete.ts @@ -0,0 +1,219 @@ +/* + * 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, + combineLatest, + filter, + isObservable, + last, + map, + Observable, + of, + shareReplay, + toArray, +} from 'rxjs'; +import { + MessageRole, + StreamingChatResponseEventType, + type BufferFlushEvent, + type ConversationCreateEvent, + type ConversationUpdateEvent, + type Message, + type MessageAddEvent, + type StreamingChatResponseEvent, + 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'; + +export function complete( + { + client, + getScreenContexts, + connectorId, + conversationId, + messages: initialMessages, + persist, + signal, + }: { + client: Pick; + getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; + connectorId: string; + conversationId?: string; + messages: Message[]; + persist: boolean; + signal: AbortSignal; + }, + requestCallback: ( + params: ObservabilityAIAssistantAPIClientRequestParamsOf<'POST /internal/observability_ai_assistant/chat/complete'> + ) => Observable +): Observable { + return new Observable((subscriber) => { + const screenContexts = getScreenContexts(); + const allActions = screenContexts.flatMap((context) => context.actions ?? []); + + const response$ = requestCallback({ + params: { + body: { connectorId, messages: initialMessages, persist, screenContexts, conversationId }, + }, + }).pipe( + filter( + (event): event is StreamingChatResponseEvent => + event.type !== StreamingChatResponseEventType.BufferFlush + ), + throwSerializedChatCompletionErrors(), + shareReplay() + ); + + const messages$ = response$.pipe( + filter( + (event): event is MessageAddEvent => + event.type === StreamingChatResponseEventType.MessageAdd + ), + map((event) => event.message), + toArray(), + last() + ); + + const conversationId$ = response$.pipe( + last( + (event): event is ConversationCreateEvent | ConversationUpdateEvent => + event.type === StreamingChatResponseEventType.ConversationCreate || + event.type === StreamingChatResponseEventType.ConversationUpdate + ), + map((event) => event.conversation.id), + catchError(() => { + return of(conversationId); + }) + ); + + response$.subscribe({ + next: (val) => { + subscriber.next(val); + }, + error: (error) => { + subscriber.error(error); + }, + }); + + combineLatest([conversationId$, messages$, response$.pipe(last())]).subscribe({ + next: ([nextConversationId, allMessages]) => { + const functionCall = allMessages[allMessages.length - 1]?.message.function_call; + + if (!functionCall?.name) { + subscriber.complete(); + return; + } + + const requestedAction = allActions.find((action) => action.name === functionCall.name); + + function next(nextMessages: Message[]) { + if ( + nextMessages[nextMessages.length - 1].message.role === MessageRole.Assistant && + !persist + ) { + subscriber.complete(); + return; + } + + complete( + { + client, + getScreenContexts, + connectorId, + conversationId: nextConversationId || conversationId, + messages: initialMessages.concat(nextMessages), + signal, + persist, + }, + requestCallback + ).subscribe(subscriber); + } + + if (!requestedAction) { + const errorMessage = createFunctionResponseError({ + name: functionCall.name, + error: new Error(`Requested action ${functionCall.name} was not found`), + }); + + subscriber.next(errorMessage); + + next([...allMessages, errorMessage.message]); + return; + } + + requestedAction + .respond({ + signal, + client, + args: JSON.parse(functionCall.arguments || '{}'), + connectorId, + messages: allMessages, + }) + .then(async (functionResponse) => { + if (isObservable(functionResponse)) { + const executedMessage = createFunctionResponseMessage({ + name: functionCall.name, + content: { + executed: true, + }, + }); + + allMessages.push(executedMessage.message); + + subscriber.next(executedMessage); + + return await new Promise((resolve, reject) => { + functionResponse.subscribe({ + next: (val) => { + if (val.type === StreamingChatResponseEventType.MessageAdd) { + allMessages.push(val.message); + } + subscriber.next(val); + }, + error: (error) => { + reject(error); + }, + complete: () => { + resolve(); + }, + }); + }); + } + + return createFunctionResponseMessage({ + name: functionCall.name, + content: functionResponse.content, + data: functionResponse.data, + }); + }) + .catch((error) => { + return createFunctionResponseError({ + name: functionCall.name, + error, + }); + }) + .then((event) => { + if (event) { + allMessages.push(event.message); + + subscriber.next(event); + } + next(allMessages); + }); + }, + error: (error) => { + subscriber.error(error); + }, + }); + }); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts index 683792d5cf708..2a333d742c5ec 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.test.ts @@ -73,7 +73,7 @@ describe('createChatService', () => { reportEvent: () => {}, telemetryCounter$: new Observable(), }, - client: clientSpy, + apiClient: clientSpy, registrations: [], signal: new AbortController().signal, }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts index 257a657ce6487..c92d2f7b3daf9 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_chat_service.ts @@ -5,15 +5,27 @@ * 2.0. */ -import { AnalyticsServiceStart, HttpResponse } from '@kbn/core/public'; +import type { AnalyticsServiceStart, HttpResponse } from '@kbn/core/public'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; -import { IncomingMessage } from 'http'; +import type { IncomingMessage } from 'http'; import { pick } from 'lodash'; -import { concatMap, delay, filter, map, Observable, of, scan, shareReplay, timestamp } from 'rxjs'; import { - BufferFlushEvent, + concatMap, + delay, + filter, + from, + map, + Observable, + of, + scan, + shareReplay, + switchMap, + timestamp, +} from 'rxjs'; +import { + type BufferFlushEvent, StreamingChatResponseEventType, - StreamingChatResponseEventWithoutError, + type StreamingChatResponseEventWithoutError, type StreamingChatResponseEvent, } from '../../common/conversation_complete'; import { @@ -21,7 +33,6 @@ import { FunctionResponse, FunctionVisibility, } from '../../common/functions/types'; -import { type Message } from '../../common/types'; import { filterFunctionDefinitions } from '../../common/utils/filter_function_definitions'; import { throwSerializedChatCompletionErrors } from '../../common/utils/throw_serialized_chat_completion_errors'; import { sendEvent } from '../analytics'; @@ -32,6 +43,7 @@ import type { RenderFunction, } from '../types'; import { readableStreamReaderIntoObservable } from '../utils/readable_stream_reader_into_observable'; +import { complete } from './complete'; const MIN_DELAY = 35; @@ -82,19 +94,19 @@ export async function createChatService({ analytics, signal: setupAbortSignal, registrations, - client, + apiClient, }: { analytics: AnalyticsServiceStart; signal: AbortSignal; registrations: ChatRegistrationRenderFunction[]; - client: ObservabilityAIAssistantAPIClient; + apiClient: ObservabilityAIAssistantAPIClient; }): Promise { const functionRegistry: FunctionRegistry = new Map(); const renderFunctionRegistry: Map> = new Map(); const [{ functionDefinitions, contextDefinitions }] = await Promise.all([ - client('GET /internal/observability_ai_assistant/functions', { + apiClient('GET /internal/observability_ai_assistant/functions', { signal: setupAbortSignal, }), ...registrations.map((registration) => { @@ -117,100 +129,8 @@ export async function createChatService({ }); }; - return { - sendAnalyticsEvent: (event) => { - sendEvent(analytics, event); - }, - renderFunction: (name, args, response, onActionClick) => { - const fn = renderFunctionRegistry.get(name); - - if (!fn) { - throw new Error(`Function ${name} not found`); - } - - const parsedArguments = args ? JSON.parse(args) : {}; - - const parsedResponse = { - content: JSON.parse(response.content ?? '{}'), - data: JSON.parse(response.data ?? '{}'), - }; - - return fn?.({ - response: parsedResponse, - arguments: parsedArguments, - onActionClick, - }); - }, - getContexts: () => contextDefinitions, - getFunctions, - hasFunction: (name: string) => { - return functionRegistry.has(name); - }, - hasRenderFunction: (name: string) => { - return renderFunctionRegistry.has(name); - }, - complete({ - screenContexts, - connectorId, - conversationId, - messages, - persist, - signal, - responseLanguage, - }) { - return new Observable((subscriber) => { - client('POST /internal/observability_ai_assistant/chat/complete', { - params: { - body: { - connectorId, - conversationId, - screenContexts, - messages, - persist, - responseLanguage, - }, - }, - signal, - asResponse: true, - rawResponse: true, - }) - .then((_response) => { - const response = _response as unknown as HttpResponse; - const response$ = toObservable(response) - .pipe( - map((line) => JSON.parse(line) as StreamingChatResponseEvent | BufferFlushEvent), - filter( - (line): line is StreamingChatResponseEvent => - line.type !== StreamingChatResponseEventType.BufferFlush - ), - throwSerializedChatCompletionErrors() - ) - .subscribe(subscriber); - - signal.addEventListener('abort', () => { - response$.unsubscribe(); - }); - }) - .catch((err) => { - subscriber.error(err); - subscriber.complete(); - }); - }); - }, - chat( - name: string, - { - connectorId, - messages, - function: callFunctions = 'auto', - signal, - }: { - connectorId: string; - messages: Message[]; - function?: 'none' | 'auto'; - signal: AbortSignal; - } - ) { + const client: Pick = { + chat(name: string, { connectorId, messages, function: callFunctions = 'auto', signal }) { return new Observable((subscriber) => { const contexts = ['core', 'apm']; @@ -222,7 +142,7 @@ export async function createChatService({ ); }); - client('POST /internal/observability_ai_assistant/chat', { + apiClient('POST /internal/observability_ai_assistant/chat', { params: { body: { name, @@ -279,5 +199,68 @@ export async function createChatService({ shareReplay() ); }, + complete({ getScreenContexts, connectorId, conversationId, messages, persist, signal }) { + return complete( + { + getScreenContexts, + connectorId, + conversationId, + messages, + persist, + signal, + client, + }, + ({ params }) => { + return from( + apiClient('POST /internal/observability_ai_assistant/chat/complete', { + params, + signal, + asResponse: true, + rawResponse: true, + }) + ).pipe( + map((_response) => toObservable(_response as unknown as HttpResponse)), + switchMap((response$) => response$), + map((line) => JSON.parse(line) as StreamingChatResponseEvent | BufferFlushEvent), + shareReplay() + ); + } + ); + }, + }; + + return { + sendAnalyticsEvent: (event) => { + sendEvent(analytics, event); + }, + renderFunction: (name, args, response, onActionClick) => { + const fn = renderFunctionRegistry.get(name); + + if (!fn) { + throw new Error(`Function ${name} not found`); + } + + const parsedArguments = args ? JSON.parse(args) : {}; + + const parsedResponse = { + content: JSON.parse(response.content ?? '{}'), + data: JSON.parse(response.data ?? '{}'), + }; + + return fn?.({ + response: parsedResponse, + arguments: parsedArguments, + onActionClick, + }); + }, + getContexts: () => contextDefinitions, + getFunctions, + hasFunction: (name: string) => { + return functionRegistry.has(name); + }, + hasRenderFunction: (name: string) => { + return renderFunctionRegistry.has(name); + }, + ...client, }; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts index 0db5b9cf8b5ba..9ccfca66e53b3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/service/create_service.ts @@ -6,9 +6,11 @@ */ import type { AnalyticsServiceStart, CoreStart } from '@kbn/core/public'; -import { without } from 'lodash'; -import { BehaviorSubject, Subject } from 'rxjs'; +import { compact, without } from 'lodash'; +import { BehaviorSubject, debounceTime, filter, lastValueFrom, of, Subject, take } from 'rxjs'; import type { Message, ObservabilityAIAssistantScreenContext } from '../../common/types'; +import { createFunctionRequestMessage } from '../../common/utils/create_function_request_message'; +import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; import { createCallObservabilityAIAssistantAPI } from '../api'; import type { ChatRegistrationRenderFunction, ObservabilityAIAssistantService } from '../types'; @@ -21,7 +23,7 @@ export function createService({ coreStart: CoreStart; enabled: boolean; }): ObservabilityAIAssistantService { - const client = createCallObservabilityAIAssistantAPI(coreStart); + const apiClient = createCallObservabilityAIAssistantAPI(coreStart); const registrations: ChatRegistrationRenderFunction[] = []; @@ -37,17 +39,50 @@ export function createService({ }, start: async ({ signal }) => { const mod = await import('./create_chat_service'); - return await mod.createChatService({ analytics, client, signal, registrations }); + return await mod.createChatService({ analytics, apiClient, signal, registrations }); }, - callApi: client, + callApi: apiClient, getScreenContexts() { return screenContexts$.value; }, setScreenContext: (context: ObservabilityAIAssistantScreenContext) => { screenContexts$.next(screenContexts$.value.concat(context)); - return () => { + + function unsubscribe() { screenContexts$.next(without(screenContexts$.value, context)); - }; + } + + return unsubscribe; + }, + navigate: async (cb) => { + cb(); + + // wait for at least 1s of no network activity + await lastValueFrom( + coreStart.http.getLoadingCount$().pipe( + filter((count) => count === 0), + debounceTime(1000), + take(1) + ) + ); + + return of( + createFunctionRequestMessage({ + name: 'context', + args: { + queries: [], + categories: [], + }, + }), + createFunctionResponseMessage({ + name: 'context', + content: { + screenDescription: compact( + screenContexts$.value.map((context) => context.screenDescription) + ).join('\n\n'), + }, + }) + ); }, conversations: { openNewConversation: ({ messages, title }: { messages: Message[]; title?: string }) => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx index 1b2d71a71b345..01c2f658e360b 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/storybook_mock.tsx @@ -7,7 +7,7 @@ import { i18n } from '@kbn/i18n'; import { noop } from 'lodash'; import React from 'react'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import type { StreamingChatResponseEventWithoutError } from '../common/conversation_complete'; import type { ObservabilityAIAssistantAPIClient } from './api'; import type { ObservabilityAIAssistantChatService, ObservabilityAIAssistantService } from './types'; @@ -44,4 +44,5 @@ export const createStorybookService = (): ObservabilityAIAssistantService => ({ openNewConversation: noop, predefinedConversation$: new Observable(), }, + navigate: async () => of(), }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts index d8c719dfa0364..bf26ce44eb81f 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/types.ts @@ -9,7 +9,10 @@ import type { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import type { MlPluginSetup, MlPluginStart } from '@kbn/ml-plugin/public'; import type { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public'; import type { Observable } from 'rxjs'; -import type { StreamingChatResponseEventWithoutError } from '../common/conversation_complete'; +import type { + MessageAddEvent, + StreamingChatResponseEventWithoutError, +} from '../common/conversation_complete'; import type { ContextDefinition, FunctionDefinition, @@ -30,6 +33,7 @@ import { useChat } from './hooks/use_chat'; import type { UseGenAIConnectorsResult } from './hooks/use_genai_connectors'; import { useObservabilityAIAssistantChatService } from './hooks/use_observability_ai_assistant_chat_service'; import type { UseUserPreferredLanguageResult } from './hooks/use_user_preferred_language'; +import { createScreenContextAction } from './utils/create_screen_context_action'; /* eslint-disable @typescript-eslint/no-empty-interface*/ @@ -47,7 +51,7 @@ export interface ObservabilityAIAssistantChatService { } ) => Observable; complete: (options: { - screenContexts: ObservabilityAIAssistantScreenContext[]; + getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; conversationId?: string; connectorId: string; messages: Message[]; @@ -80,6 +84,7 @@ export interface ObservabilityAIAssistantService { setScreenContext: (screenContext: ObservabilityAIAssistantScreenContext) => () => void; getScreenContexts: () => ObservabilityAIAssistantScreenContext[]; conversations: ObservabilityAIAssistantConversationService; + navigate: (callback: () => void) => Promise>; } export type RenderFunction = (options: { @@ -123,4 +128,5 @@ export interface ObservabilityAIAssistantPublicStart { useChat: typeof useChat; useUserPreferredLanguage: () => UseUserPreferredLanguageResult; getContextualInsightMessages: ({}: { message: string; instructions: string }) => Message[]; + createScreenContextAction: typeof createScreenContextAction; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.ts new file mode 100644 index 0000000000000..3dbc4dbaf36f0 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/public/utils/create_screen_context_action.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 type { FromSchema } from 'json-schema-to-ts'; +import { CompatibleJSONSchema } from '../../common/functions/types'; +import type { + ScreenContextActionDefinition, + ScreenContextActionRespondFunction, +} from '../../common/types'; + +type ReturnOf> = + TActionDefinition['parameters'] extends CompatibleJSONSchema + ? FromSchema + : undefined; + +export function createScreenContextAction< + TActionDefinition extends Omit, + TResponse = ReturnOf +>( + definition: TActionDefinition, + respond: ScreenContextActionRespondFunction +): ScreenContextActionDefinition { + return { + ...definition, + respond, + }; +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts index 225a248b160ac..422c0287e15d7 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/context.ts @@ -18,8 +18,9 @@ import { MessageAddEvent } from '../../common/conversation_complete'; import { FunctionVisibility } from '../../common/functions/types'; import { MessageRole, type Message } from '../../common/types'; import { concatenateChatCompletionChunks } from '../../common/utils/concatenate_chat_completion_chunks'; +import { createFunctionResponseMessage } from '../../common/utils/create_function_response_message'; import type { ObservabilityAIAssistantClient } from '../service/client'; -import { createFunctionResponseMessage } from '../service/util/create_function_response_message'; +import { ChatFn } from '../service/types'; import { parseSuggestionScores } from './parse_suggestion_scores'; const MAX_TOKEN_COUNT_FOR_DATA_ON_SCREEN = 1000; @@ -65,7 +66,7 @@ export function registerContextFunction({ required: ['queries', 'categories'], } as const, }, - async ({ arguments: args, messages, connectorId, screenContexts }, signal) => { + async ({ arguments: args, messages, connectorId, screenContexts, chat }, signal) => { const { queries, categories } = args; async function getContext() { @@ -127,7 +128,7 @@ export function registerContextFunction({ suggestions, queries: queriesOrUserPrompt, messages, - client, + chat, connectorId, signal, logger: resources.logger, @@ -198,7 +199,7 @@ async function scoreSuggestions({ suggestions, messages, queries, - client, + chat, connectorId, signal, logger, @@ -206,7 +207,7 @@ async function scoreSuggestions({ suggestions: Awaited>; messages: Message[]; queries: string[]; - client: ObservabilityAIAssistantClient; + chat: ChatFn; connectorId: string; signal: AbortSignal; logger: Logger; @@ -263,7 +264,7 @@ async function scoreSuggestions({ const response = await lastValueFrom( ( - await client.chat('score_suggestions', { + await chat('score_suggestions', { connectorId, messages: [...messages.slice(0, -1), newUserMessage], functions: [scoreFunction], diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts index 0fc17d894830f..de3ada6d5f029 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/get_dataset_info.ts @@ -13,7 +13,6 @@ import { MessageRole } from '../../common/types'; import { concatenateChatCompletionChunks } from '../../common/utils/concatenate_chat_completion_chunks'; export function registerGetDatasetInfoFunction({ - client, resources, functions, }: FunctionRegistrationParameters) { @@ -42,7 +41,7 @@ export function registerGetDatasetInfoFunction({ required: ['index'], } as const, }, - async ({ arguments: { index }, messages, connectorId }, signal) => { + async ({ arguments: { index }, messages, connectorId, chat }, signal) => { const coreContext = await resources.context.core; const esClient = coreContext.elasticsearch.client.asCurrentUser; @@ -116,7 +115,7 @@ export function registerGetDatasetInfoFunction({ const relevantFields = await Promise.all( chunk(fieldNames, 500).map(async (fieldsInChunk) => { const chunkResponse$ = ( - await client.chat('get_relevent_dataset_names', { + await chat('get_relevent_dataset_names', { connectorId, signal, messages: [ diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts index 84057b04e3bd4..7d375a6ae9d2c 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/chat/route.ts @@ -25,11 +25,15 @@ const chatRoute = createObservabilityAIAssistantServerRoute({ messages: t.array(messageRt), connectorId: t.string, functions: t.array( - t.type({ - name: t.string, - description: t.string, - parameters: t.any, - }) + t.intersection([ + t.type({ + name: t.string, + description: t.string, + }), + t.partial({ + parameters: t.any, + }), + ]) ), }), t.partial({ diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/conversations/route.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/conversations/route.ts index b39468c3e06c0..7e59be004cac9 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/conversations/route.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/conversations/route.ts @@ -6,7 +6,6 @@ */ import { notImplemented } from '@hapi/boom'; import * as t from 'io-ts'; -import { merge } from 'lodash'; import { Conversation } from '../../../common/types'; import { createObservabilityAIAssistantServerRoute } from '../create_observability_ai_assistant_server_route'; import { conversationCreateRt, conversationUpdateRt } from '../runtime_types'; @@ -102,9 +101,7 @@ const updateConversationRoute = createObservabilityAIAssistantServerRoute({ throw notImplemented(); } - return client.update( - merge({}, params.body.conversation, { conversation: { id: params.path.conversationId } }) - ); + return client.update(params.path.conversationId, params.body.conversation); }, }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts index cef56f673e235..689a3e677cdc1 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/routes/runtime_types.ts @@ -13,7 +13,7 @@ import { type ConversationUpdateRequest, type Message, MessageRole, - type ObservabilityAIAssistantScreenContext, + type ObservabilityAIAssistantScreenContextRequest, } from '../../common/types'; const serializeableRt = t.any; @@ -52,11 +52,22 @@ export const messageRt: t.Type = t.type({ ]), }); +const tokenCountRt = t.type({ + prompt: t.number, + completion: t.number, + total: t.number, +}); + export const baseConversationRt: t.Type = t.type({ '@timestamp': t.string, - conversation: t.type({ - title: t.string, - }), + conversation: t.intersection([ + t.type({ + title: t.string, + }), + t.partial({ + token_count: tokenCountRt, + }), + ]), messages: t.array(messageRt), labels: t.record(t.string, t.string), numeric_labels: t.record(t.string, t.number), @@ -75,10 +86,15 @@ export const conversationCreateRt: t.Type = t.interse export const conversationUpdateRt: t.Type = t.intersection([ baseConversationRt, t.type({ - conversation: t.type({ - id: t.string, - title: t.string, - }), + conversation: t.intersection([ + t.type({ + id: t.string, + title: t.string, + }), + t.partial({ + token_count: tokenCountRt, + }), + ]), }), ]); @@ -87,14 +103,19 @@ export const conversationRt: t.Type = t.intersection([ t.type({ user: t.intersection([t.type({ name: t.string }), t.partial({ id: t.string })]), namespace: t.string, - conversation: t.type({ - id: t.string, - last_updated: t.string, - }), + conversation: t.intersection([ + t.type({ + id: t.string, + last_updated: t.string, + }), + t.partial({ + token_count: tokenCountRt, + }), + ]), }), ]); -export const screenContextRt: t.Type = t.partial({ +export const screenContextRt: t.Type = t.partial({ description: t.string, data: t.array( t.type({ @@ -103,4 +124,15 @@ export const screenContextRt: t.Type = t. value: t.any, }) ), + actions: t.array( + t.intersection([ + t.type({ + name: t.string, + description: t.string, + }), + t.partial({ + parameters: t.record(t.string, t.any), + }), + ]) + ), }); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.test.ts index 1b1ba0d474df5..a55098c5ec4fe 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.test.ts @@ -46,6 +46,7 @@ describe('chatFunctionClient', () => { it('throws an error', async () => { await expect(async () => { await client.executeFunction({ + chat: jest.fn(), name: 'myFunction', args: JSON.stringify({ foo: 0, @@ -108,6 +109,7 @@ describe('chatFunctionClient', () => { ); const result = await client.executeFunction({ + chat: jest.fn(), name: 'get_data_on_screen', args: JSON.stringify({ data: ['my_dummy_data'] }), messages: [], diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts index 618f7eef00276..28a9d2860885f 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/chat_function_client/index.ts @@ -10,15 +10,15 @@ import Ajv, { type ErrorObject, type ValidateFunction } from 'ajv'; import dedent from 'dedent'; import { compact, keyBy } from 'lodash'; import { - type ContextRegistry, FunctionVisibility, - type RegisterContextDefinition, type ContextDefinition, + type ContextRegistry, type FunctionResponse, + type RegisterContextDefinition, } from '../../../common/functions/types'; -import type { Message, ObservabilityAIAssistantScreenContext } from '../../../common/types'; +import type { Message, ObservabilityAIAssistantScreenContextRequest } from '../../../common/types'; import { filterFunctionDefinitions } from '../../../common/utils/filter_function_definitions'; -import type { FunctionHandler, FunctionHandlerRegistry, RegisterFunction } from '../types'; +import type { ChatFn, FunctionHandler, FunctionHandlerRegistry, RegisterFunction } from '../types'; export class FunctionArgsValidationError extends Error { constructor(public readonly errors: ErrorObject[]) { @@ -35,9 +35,13 @@ export class ChatFunctionClient { private readonly functionRegistry: FunctionHandlerRegistry = new Map(); private readonly validators: Map = new Map(); - constructor(private readonly screenContexts: ObservabilityAIAssistantScreenContext[]) { + private readonly actions: Required['actions']; + + constructor(private readonly screenContexts: ObservabilityAIAssistantScreenContextRequest[]) { const allData = compact(screenContexts.flatMap((context) => context.data)); + this.actions = compact(screenContexts.flatMap((context) => context.actions)); + if (allData.length) { this.registerFunction( { @@ -74,10 +78,18 @@ export class ChatFunctionClient { } ); } + + this.actions.forEach((action) => { + if (action.parameters) { + this.validators.set(action.name, ajv.compile(action.parameters)); + } + }); } registerFunction: RegisterFunction = (definition, respond) => { - this.validators.set(definition.name, ajv.compile(definition.parameters)); + if (definition.parameters) { + this.validators.set(definition.name, ajv.compile(definition.parameters)); + } this.functionRegistry.set(definition.name, { definition, respond }); }; @@ -85,8 +97,12 @@ export class ChatFunctionClient { this.contextRegistry.set(context.name, context); }; - private validate(name: string, parameters: unknown) { + validate(name: string, parameters: unknown) { const validator = this.validators.get(name)!; + if (!validator) { + return; + } + const result = validator(parameters); if (!result) { throw new FunctionArgsValidationError(validator.errors!); @@ -97,6 +113,10 @@ export class ChatFunctionClient { return Array.from(this.contextRegistry.values()); } + hasAction(name: string) { + return !!this.actions.find((action) => action.name === name)!; + } + getFunctions({ contexts, filter, @@ -117,17 +137,23 @@ export class ChatFunctionClient { return matchingDefinitions.map((definition) => functionsByName[definition.name]); } + getActions() { + return this.actions; + } + hasFunction(name: string): boolean { return this.functionRegistry.has(name); } async executeFunction({ + chat, name, args, messages, signal, connectorId, }: { + chat: ChatFn; name: string; args: string | undefined; messages: Message[]; @@ -145,7 +171,13 @@ export class ChatFunctionClient { this.validate(name, parsedArguments); return await fn.respond( - { arguments: parsedArguments, messages, connectorId, screenContexts: this.screenContexts }, + { + arguments: parsedArguments, + messages, + connectorId, + screenContexts: this.screenContexts, + chat, + }, signal ); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts index f864ba02c8ac5..de727f1168aa0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/bedrock_claude_adapter.ts @@ -90,7 +90,9 @@ export const createBedrockClaudeAdapter: LlmApiAdapterFactory = ({ (fn) => ` ${fn.name} ${fn.description} - + ${ + fn.parameters + ? ` ${jsonSchemaToFlatParameters(fn.parameters).map((param) => { return ` ${param.name} @@ -107,7 +109,9 @@ export const createBedrockClaudeAdapter: LlmApiAdapterFactory = ({ `; })} - + ` + : '' + } ` ) .join('\n')} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts index 61935d891a1db..cbcf6a2c3c29d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/openai_adapter.ts @@ -5,19 +5,62 @@ * 2.0. */ -import { compact, isEmpty, omit } from 'lodash'; +import { encode } from 'gpt-tokenizer'; +import { compact, isEmpty, merge, omit } from 'lodash'; import OpenAI from 'openai'; -import { MessageRole } from '../../../../common'; -import { processOpenAiStream } from '../../../../common/utils/process_openai_stream'; +import { CompatibleJSONSchema } from '../../../../common/functions/types'; +import { Message, MessageRole } from '../../../../common'; +import { processOpenAiStream } from './process_openai_stream'; import { eventsourceStreamIntoObservable } from '../../util/eventsource_stream_into_observable'; import { LlmApiAdapterFactory } from './types'; +function getOpenAIPromptTokenCount({ + messages, + functions, +}: { + messages: Message[]; + functions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; +}) { + // per https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb + const tokensFromMessages = encode( + messages + .map( + ({ message }) => + `<|start|>${message.role}\n${message.content}\n${ + 'name' in message + ? message.name + : 'function_call' in message && message.function_call + ? message.function_call.name + '\n' + message.function_call.arguments + : '' + }<|end|>` + ) + .join('\n') + ).length; + + // this is an approximation. OpenAI cuts off a function schema + // at a certain level of nesting, so their token count might + // be lower than what we are calculating here. + const tokensFromFunctions = functions + ? encode( + functions + ?.map( + (fn) => + `<|start|>${fn.name}\n${fn.description}\n${JSON.stringify(fn.parameters)}<|end|>` + ) + .join('\n') + ).length + : 0; + + return tokensFromMessages + tokensFromFunctions; +} + export const createOpenAiAdapter: LlmApiAdapterFactory = ({ messages, functions, functionCall, - logger, }) => { + const promptTokens = getOpenAIPromptTokenCount({ messages, functions }); + return { getSubAction: () => { const messagesForOpenAI: Array< @@ -44,7 +87,16 @@ export const createOpenAiAdapter: LlmApiAdapterFactory = ({ }) ); - const functionsForOpenAI = functions; + const functionsForOpenAI = functions?.map((fn) => ({ + ...fn, + parameters: merge( + { + type: 'object', + properties: {}, + }, + fn.parameters + ), + })); const request: Omit & { model?: string } = { messages: messagesForOpenAI as OpenAI.ChatCompletionCreateParams['messages'], @@ -63,7 +115,7 @@ export const createOpenAiAdapter: LlmApiAdapterFactory = ({ }; }, streamIntoObservable: (readable) => { - return eventsourceStreamIntoObservable(readable).pipe(processOpenAiStream()); + return eventsourceStreamIntoObservable(readable).pipe(processOpenAiStream(promptTokens)); }, }; }; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.test.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.test.ts index 78775b4d79d51..338e5836de686 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.test.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.test.ts @@ -11,6 +11,7 @@ import { Logger } from '@kbn/logging'; import { concatenateChatCompletionChunks } from '../../../../common/utils/concatenate_chat_completion_chunks'; import { processBedrockStream } from './process_bedrock_stream'; import { MessageRole } from '../../../../common'; +import { rejectTokenCountEvents } from '../../util/reject_token_count_events'; describe('processBedrockStream', () => { const encode = (completion: string, stop?: string) => { @@ -39,6 +40,7 @@ describe('processBedrockStream', () => { await lastValueFrom( of(encode('This'), encode(' is'), encode(' some normal'), encode(' text')).pipe( processBedrockStream({ logger: getLoggerMock() }), + rejectTokenCountEvents(), concatenateChatCompletionChunks() ) ) @@ -81,6 +83,7 @@ describe('processBedrockStream', () => { }, ], }), + rejectTokenCountEvents(), concatenateChatCompletionChunks() ) ) @@ -124,6 +127,7 @@ describe('processBedrockStream', () => { }, ], }), + rejectTokenCountEvents(), concatenateChatCompletionChunks() ) ) @@ -141,36 +145,38 @@ describe('processBedrockStream', () => { }); it('throws an error if the XML cannot be parsed', async () => { - expect( - async () => - await lastValueFrom( - of( - encode('my_toolmy_value', '') - ).pipe( - processBedrockStream({ - logger: getLoggerMock(), - functions: [ - { - name: 'my_tool', - description: '', - parameters: { - properties: { - my_param: { - type: 'string', - }, + async function fn() { + return lastValueFrom( + of( + encode('my_toolmy_value', '') + ).pipe( + processBedrockStream({ + logger: getLoggerMock(), + functions: [ + { + name: 'my_tool', + description: '', + parameters: { + properties: { + my_param: { + type: 'string', }, }, }, - ], - }), - concatenateChatCompletionChunks() - ) + }, + ], + }), + rejectTokenCountEvents(), + concatenateChatCompletionChunks() ) - ).rejects.toThrowErrorMatchingInlineSnapshot(` + ); + } + + await expect(fn).rejects.toThrowErrorMatchingInlineSnapshot(` "Unexpected close tag Line: 0 Column: 49 @@ -205,6 +211,7 @@ describe('processBedrockStream', () => { }, ], }), + rejectTokenCountEvents(), concatenateChatCompletionChunks() ) ) @@ -238,6 +245,7 @@ describe('processBedrockStream', () => { }, ], }), + rejectTokenCountEvents(), concatenateChatCompletionChunks() ) ) diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts index 03fa2fa86461b..f46f15fb724e4 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_bedrock_stream.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Observable } from 'rxjs'; +import { Observable, Subscriber } from 'rxjs'; import { v4 } from 'uuid'; import { Parser } from 'xml2js'; import type { Logger } from '@kbn/logging'; @@ -14,6 +14,7 @@ import { ChatCompletionChunkEvent, createInternalServerError, StreamingChatResponseEventType, + TokenCountEvent, } from '../../../../common/conversation_complete'; import type { BedrockChunkMember } from '../../util/eventstream_serde_into_observable'; import { convertDeserializedXmlWithJsonSchema } from '../../util/convert_deserialized_xml_with_json_schema'; @@ -24,7 +25,7 @@ async function parseFunctionCallXml({ functions, }: { xml: string; - functions?: Array<{ name: string; description: string; parameters: JSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: JSONSchema }>; }) { const parser = new Parser(); @@ -45,7 +46,9 @@ async function parseFunctionCallXml({ ); } - const args = convertDeserializedXmlWithJsonSchema(parameters, functionDef.parameters); + const args = functionDef.parameters + ? convertDeserializedXmlWithJsonSchema(parameters, functionDef.parameters) + : {}; return { name: fnName, @@ -58,10 +61,10 @@ export function processBedrockStream({ functions, }: { logger: Logger; - functions?: Array<{ name: string; description: string; parameters: JSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: JSONSchema }>; }) { return (source: Observable) => - new Observable((subscriber) => { + new Observable((subscriber) => { let functionCallsBuffer: string = ''; const id = v4(); @@ -74,17 +77,17 @@ export function processBedrockStream({ // spot the stop sequence. async function handleNext(value: BedrockChunkMember) { - const response: { - completion: string; - stop_reason: string | null; - stop: null | string; - } = parseSerdeChunkBody(value.chunk); + const chunkBody: CompletionChunk = parseSerdeChunkBody(value.chunk); - let completion = response.completion; + if (isTokenCountCompletionChunk(chunkBody)) { + return emitTokenCountEvent(subscriber, chunkBody); + } + + let completion = chunkBody.completion; const isStartOfFunctionCall = !functionCallsBuffer && completion.includes(''; + const isEndOfFunctionCall = functionCallsBuffer && chunkBody.stop === ''; const isInFunctionCall = !!functionCallsBuffer; @@ -94,7 +97,7 @@ export function processBedrockStream({ completion = before.trimEnd(); } else if (isEndOfFunctionCall) { completion = ''; - functionCallsBuffer += response.completion + response.stop; + functionCallsBuffer += chunkBody.completion + chunkBody.stop; logger.debug(`Parsing xml:\n${functionCallsBuffer}`); @@ -113,7 +116,7 @@ export function processBedrockStream({ functionCallsBuffer = ''; } else if (isInFunctionCall) { completion = ''; - functionCallsBuffer += response.completion; + functionCallsBuffer += chunkBody.completion; } if (completion.trim()) { @@ -148,3 +151,38 @@ export function processBedrockStream({ }); }); } + +interface TokenCountChunk extends CompletionChunk { + 'amazon-bedrock-invocationMetrics': { + inputTokenCount: number; + outputTokenCount: number; + invocationLatency: number; + firstByteLatency: number; + }; +} + +interface CompletionChunk { + completion: string; + stop_reason: string | null; + stop: null | string; +} + +function isTokenCountCompletionChunk(value: any): value is TokenCountChunk { + return 'amazon-bedrock-invocationMetrics' in value; +} + +function emitTokenCountEvent( + subscriber: Subscriber, + chunk: TokenCountChunk +) { + const { inputTokenCount, outputTokenCount } = chunk['amazon-bedrock-invocationMetrics']; + + subscriber.next({ + type: StreamingChatResponseEventType.TokenCount, + tokens: { + completion: outputTokenCount, + prompt: inputTokenCount, + total: inputTokenCount + outputTokenCount, + }, + }); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_openai_stream.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_openai_stream.ts new file mode 100644 index 0000000000000..ae6b55055ce2d --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/process_openai_stream.ts @@ -0,0 +1,105 @@ +/* + * 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 { encode } from 'gpt-tokenizer'; +import { first, sum } from 'lodash'; +import OpenAI from 'openai'; +import { filter, map, Observable, tap } from 'rxjs'; +import { v4 } from 'uuid'; +import { TokenCountEvent } from '../../../../common/conversation_complete'; +import { + ChatCompletionChunkEvent, + createInternalServerError, + createTokenLimitReachedError, + StreamingChatResponseEventType, +} from '../../../../common'; + +export type CreateChatCompletionResponseChunk = Omit & { + choices: Array< + Omit & { + delta: { content?: string; function_call?: { name?: string; arguments?: string } }; + } + >; +}; + +export function processOpenAiStream(promptTokenCount: number) { + return (source: Observable): Observable => { + return new Observable((subscriber) => { + const id = v4(); + + let completionTokenCount = 0; + + function emitTokenCountEvent() { + subscriber.next({ + type: StreamingChatResponseEventType.TokenCount, + tokens: { + completion: completionTokenCount, + prompt: promptTokenCount, + total: completionTokenCount + promptTokenCount, + }, + }); + } + + const parsed$ = source.pipe( + filter((line) => !!line && line !== '[DONE]'), + map( + (line) => + JSON.parse(line) as CreateChatCompletionResponseChunk | { error: { message: string } } + ), + tap((line) => { + if ('error' in line) { + throw createInternalServerError(line.error.message); + } + if ( + 'choices' in line && + line.choices.length && + line.choices[0].finish_reason === 'length' + ) { + throw createTokenLimitReachedError(); + } + + const firstChoice = first(line.choices); + + completionTokenCount += sum( + [ + firstChoice?.delta.content, + firstChoice?.delta.function_call?.name, + firstChoice?.delta.function_call?.arguments, + ].map((val) => encode(val || '').length) || 0 + ); + }), + filter( + (line): line is CreateChatCompletionResponseChunk => + 'object' in line && line.object === 'chat.completion.chunk' + ), + map((chunk): ChatCompletionChunkEvent => { + return { + id, + type: StreamingChatResponseEventType.ChatCompletionChunk, + message: { + content: chunk.choices[0].delta.content || '', + function_call: chunk.choices[0].delta.function_call, + }, + }; + }) + ); + + parsed$.subscribe({ + next: (val) => { + subscriber.next(val); + }, + error: (error) => { + emitTokenCountEvent(); + subscriber.error(error); + }, + complete: () => { + emitTokenCountEvent(); + subscriber.complete(); + }, + }); + }); + }; +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts index fff3edeccb7db..b9f1403cb5e8e 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/client/adapters/types.ts @@ -9,17 +9,28 @@ import type { Readable } from 'node:stream'; import type { Observable } from 'rxjs'; import type { Logger } from '@kbn/logging'; import type { Message } from '../../../../common'; -import type { ChatCompletionChunkEvent } from '../../../../common/conversation_complete'; +import type { + ChatCompletionChunkEvent, + TokenCountEvent, +} from '../../../../common/conversation_complete'; import { CompatibleJSONSchema } from '../../../../common/functions/types'; +export interface LlmFunction { + name: string; + description: string; + parameters: CompatibleJSONSchema; +} + export type LlmApiAdapterFactory = (options: { logger: Logger; messages: Message[]; - functions?: Array<{ name: string; description: string; parameters: CompatibleJSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; functionCall?: string; }) => LlmApiAdapter; export interface LlmApiAdapter { getSubAction: () => { subAction: string; subActionParams: Record }; - streamIntoObservable: (readable: Readable) => Observable; + streamIntoObservable: ( + readable: Readable + ) => Observable; } 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 96ef44adfee64..694849476586e 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 @@ -23,11 +23,11 @@ import { MessageAddEvent, StreamingChatResponseEventType, } from '../../../common/conversation_complete'; -import type { CreateChatCompletionResponseChunk } from '../../../common/utils/process_openai_stream'; -import type { ChatFunctionClient } from '../chat_function_client'; +import { createFunctionResponseMessage } from '../../../common/utils/create_function_response_message'; +import { ChatFunctionClient } from '../chat_function_client'; import type { KnowledgeBaseService } from '../knowledge_base_service'; -import { createFunctionResponseMessage } from '../util/create_function_response_message'; import { observableIntoStream } from '../util/observable_into_stream'; +import { CreateChatCompletionResponseChunk } from './adapters/process_openai_stream'; type ChunkDelta = CreateChatCompletionResponseChunk['choices'][number]['delta']; @@ -116,6 +116,9 @@ describe('Observability AI Assistant client', () => { executeFunction: jest.fn(), getFunctions: jest.fn(), hasFunction: jest.fn(), + hasAction: jest.fn(), + getActions: jest.fn(), + validate: jest.fn(), } as any; let llmSimulator: LlmSimulator; @@ -128,6 +131,9 @@ describe('Observability AI Assistant client', () => { return name !== 'context'; }); + functionClientMock.hasAction.mockReturnValue(false); + functionClientMock.getActions.mockReturnValue([]); + actionsClientMock.get.mockResolvedValue({ actionTypeId: ObservabilityAIAssistantConnectorType.OpenAI, id: 'foo', @@ -331,6 +337,11 @@ describe('Observability AI Assistant client', () => { title: 'New conversation', id: expect.any(String), last_updated: expect.any(String), + token_count: { + completion: 2, + prompt: 100, + total: 102, + }, }, type: StreamingChatResponseEventType.ConversationCreate, }); @@ -384,6 +395,11 @@ describe('Observability AI Assistant client', () => { title: 'An auto-generated title', id: expect.any(String), last_updated: expect.any(String), + token_count: { + completion: 8, + prompt: 284, + total: 292, + }, }, type: StreamingChatResponseEventType.ConversationCreate, }); @@ -397,6 +413,11 @@ describe('Observability AI Assistant client', () => { id: expect.any(String), last_updated: expect.any(String), title: 'An auto-generated title', + token_count: { + completion: 8, + prompt: 284, + total: 292, + }, }, labels: {}, numeric_labels: {}, @@ -519,6 +540,11 @@ describe('Observability AI Assistant client', () => { title: 'My stored conversation', id: expect.any(String), last_updated: expect.any(String), + token_count: { + completion: 2, + prompt: 100, + total: 102, + }, }, type: StreamingChatResponseEventType.ConversationUpdate, }); @@ -533,6 +559,11 @@ describe('Observability AI Assistant client', () => { id: expect.any(String), last_updated: expect.any(String), title: 'My stored conversation', + token_count: { + completion: 2, + prompt: 100, + total: 102, + }, }, labels: {}, numeric_labels: {}, @@ -759,6 +790,7 @@ describe('Observability AI Assistant client', () => { expect(functionClientMock.executeFunction).toHaveBeenCalledWith({ connectorId: 'foo', name: 'my-function', + chat: expect.any(Function), args: JSON.stringify({ foo: 'bar' }), signal: expect.any(AbortSignal), messages: [ @@ -883,6 +915,11 @@ describe('Observability AI Assistant client', () => { id: expect.any(String), last_updated: expect.any(String), title: 'My predefined title', + token_count: { + completion: 24, + prompt: 458, + total: 482, + }, }, }); @@ -1468,4 +1505,123 @@ describe('Observability AI Assistant client', () => { 'You MUST respond in the users preferred language which is: Orcish. This is a system message' ); }); + + describe('when executing an action', () => { + let completePromise: Promise; + + beforeEach(async () => { + client = createClient(); + + llmSimulator = createLlmSimulator(); + + actionsClientMock.execute.mockImplementation(async () => { + llmSimulator = createLlmSimulator(); + return { + actionId: '', + status: 'ok', + data: llmSimulator.stream, + }; + }); + + const complete$ = await client.complete({ + connectorId: 'foo', + messages: [ + system('This is a system message'), + user('Can you call the my_action function?'), + ], + functionClient: new ChatFunctionClient([ + { + actions: [ + { + name: 'my_action', + description: 'My action description', + parameters: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + }, + required: ['foo'], + }, + }, + ], + }, + ]), + signal: new AbortController().signal, + title: 'My predefined title', + persist: false, + }); + + const messages: Message[] = []; + + completePromise = new Promise((resolve, reject) => { + complete$.subscribe({ + next: (event) => { + if (event.type === StreamingChatResponseEventType.MessageAdd) { + messages.push(event.message); + } + }, + complete: () => resolve(messages), + }); + }); + }); + + describe('and validation succeeds', () => { + beforeEach(async () => { + await llmSimulator.next({ + function_call: { name: 'my_action', arguments: JSON.stringify({ foo: 'bar' }) }, + }); + await llmSimulator.complete(); + }); + + it('completes the observable function request being the last event', async () => { + const messages = await completePromise; + expect(messages.length).toBe(1); + + expect(messages[0].message.function_call).toEqual({ + name: 'my_action', + arguments: JSON.stringify({ foo: 'bar' }), + trigger: MessageRole.Assistant, + }); + }); + }); + + describe('and validation fails', () => { + beforeEach(async () => { + await llmSimulator.next({ + function_call: { name: 'my_action', arguments: JSON.stringify({ bar: 'foo' }) }, + }); + + await llmSimulator.complete(); + + await waitFor(() => + actionsClientMock.execute.mock.calls.length === 2 + ? Promise.resolve() + : Promise.reject(new Error('Waiting until execute is called again')) + ); + + await nextTick(); + + await llmSimulator.next({ + content: 'Looks like the function call failed', + }); + + await llmSimulator.complete(); + }); + + it('appends a function response error and sends it back to the LLM', async () => { + const messages = await completePromise; + expect(messages.length).toBe(3); + + expect(messages[0].message.function_call?.name).toBe('my_action'); + + expect(messages[1].message.name).toBe('my_action'); + + expect(JSON.parse(messages[1].message.content ?? '{}')).toHaveProperty('error'); + + expect(messages[2].message.content).toBe('Looks like the function call failed'); + }); + }); + }); }); 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 cec07bc949cab..a11e314603757 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 @@ -20,6 +20,7 @@ import { lastValueFrom, Observable, shareReplay, + tap, toArray, } from 'rxjs'; import { Readable } from 'stream'; @@ -32,6 +33,7 @@ import { createTokenLimitReachedError, MessageAddEvent, StreamingChatResponseEventType, + TokenCountEvent, type StreamingChatResponseEvent, } from '../../../common/conversation_complete'; import { @@ -48,6 +50,7 @@ import { type Message, } from '../../../common/types'; import { concatenateChatCompletionChunks } from '../../../common/utils/concatenate_chat_completion_chunks'; +import { createFunctionResponseError } from '../../../common/utils/create_function_response_error'; import { emitWithConcatenatedMessage } from '../../../common/utils/emit_with_concatenated_message'; import type { ChatFunctionClient } from '../chat_function_client'; import { @@ -55,8 +58,9 @@ import { KnowledgeBaseService, RecalledEntry, } from '../knowledge_base_service'; -import type { ObservabilityAIAssistantResourceNames } from '../types'; +import type { ChatFn, ObservabilityAIAssistantResourceNames } from '../types'; import { getAccessQuery } from '../util/get_access_query'; +import { rejectTokenCountEvents } from '../util/reject_token_count_events'; import { createBedrockClaudeAdapter } from './adapters/bedrock_claude_adapter'; import { createOpenAiAdapter } from './adapters/openai_adapter'; import { LlmApiAdapter } from './adapters/types'; @@ -103,10 +107,10 @@ export class ObservabilityAIAssistantClient { return response.hits.hits[0]; }; - private getConversationUpdateValues = (now: string) => { + private getConversationUpdateValues = (lastUpdated: string) => { return { conversation: { - last_updated: now, + last_updated: lastUpdated, }, user: this.dependencies.user, namespace: this.dependencies.namespace, @@ -154,11 +158,52 @@ export class ObservabilityAIAssistantClient { const title = params.title || ''; const responseLanguage = params.responseLanguage || 'English'; + const tokenCountResult = { + prompt: 0, + completion: 0, + total: 0, + }; + + const chatWithTokenCountIncrement: ChatFn = async (...chatArgs) => { + const response$ = await this.chat(...chatArgs); + + const incrementTokenCount = () => { + return ( + source: Observable + ): Observable => { + return source.pipe( + tap((event) => { + if (event.type === StreamingChatResponseEventType.TokenCount) { + tokenCountResult.prompt += event.tokens.prompt; + tokenCountResult.completion += event.tokens.completion; + tokenCountResult.total += event.tokens.total; + } + }) + ); + }; + }; + + return response$.pipe(incrementTokenCount(), rejectTokenCountEvents()); + }; + let numFunctionsCalled: number = 0; const MAX_FUNCTION_CALLS = 5; const MAX_FUNCTION_RESPONSE_TOKEN_COUNT = 4000; + const allFunctions = functionClient + .getFunctions() + .filter((fn) => { + const visibility = fn.definition.visibility ?? FunctionVisibility.All; + return ( + visibility === FunctionVisibility.All || + visibility === FunctionVisibility.AssistantOnly + ); + }) + .map((fn) => pick(fn.definition, 'name', 'description', 'parameters')); + + const allActions = functionClient.getActions(); + const next = async (nextMessages: Message[]): Promise => { const lastMessage = last(nextMessages); @@ -199,27 +244,10 @@ export class ObservabilityAIAssistantClient { return await next(nextMessages.concat(addedMessage)); } else if (isUserMessage) { const functions = - numFunctionsCalled >= MAX_FUNCTION_CALLS - ? [] - : functionClient - .getFunctions() - .filter((fn) => { - const visibility = fn.definition.visibility ?? FunctionVisibility.All; - return ( - visibility === FunctionVisibility.All || - visibility === FunctionVisibility.AssistantOnly - ); - }) - .map((fn) => pick(fn.definition, 'name', 'description', 'parameters')); - - if (numFunctionsCalled >= MAX_FUNCTION_CALLS) { - this.dependencies.logger.debug( - `Max function calls exceeded, no longer sending over functions` - ); - } + numFunctionsCalled >= MAX_FUNCTION_CALLS ? [] : allFunctions.concat(allActions); const response$ = ( - await this.chat( + await chatWithTokenCountIncrement( lastMessage.message.name && lastMessage.message.name !== 'context' ? 'function_response' : 'user_message', @@ -254,9 +282,37 @@ export class ObservabilityAIAssistantClient { } if (isAssistantMessageWithFunctionRequest) { - const span = apm.startSpan( - `execute_function ${lastMessage.message.function_call!.name}` - ); + const functionCallName = lastMessage.message.function_call!.name; + + if (functionClient.hasAction(functionCallName)) { + this.dependencies.logger.debug(`Executing client-side action: ${functionCallName}`); + + // if validation fails, return the error to the LLM. + // otherwise, close the stream. + + try { + functionClient.validate( + functionCallName, + JSON.parse(lastMessage.message.function_call!.arguments || '{}') + ); + } catch (error) { + const functionResponseMessage = createFunctionResponseError({ + name: functionCallName, + error, + }); + nextMessages = nextMessages.concat(functionResponseMessage.message); + + subscriber.next(functionResponseMessage); + + return await next(nextMessages); + } + + subscriber.complete(); + + return; + } + + const span = apm.startSpan(`execute_function ${functionCallName}`); span?.addLabels({ ai_assistant_args: JSON.stringify(lastMessage.message.function_call!.arguments ?? {}), @@ -272,8 +328,9 @@ export class ObservabilityAIAssistantClient { } : await functionClient .executeFunction({ + chat: chatWithTokenCountIncrement, connectorId, - name: lastMessage.message.function_call!.name, + name: functionCallName, messages: nextMessages, args: lastMessage.message.function_call!.arguments, signal, @@ -313,6 +370,7 @@ export class ObservabilityAIAssistantClient { numFunctionsCalled++; if (signal.aborted) { + span?.end(); return; } @@ -374,6 +432,16 @@ export class ObservabilityAIAssistantClient { return; } + this.dependencies.logger.debug( + `Token count for conversation: ${JSON.stringify(tokenCountResult)}` + ); + + apm.addLabels({ + tokenCountPrompt: tokenCountResult.prompt, + tokenCountCompletion: tokenCountResult.completion, + tokenCountTotal: tokenCountResult.total, + }); + // store the updated conversation and close the stream if (conversationId) { const conversation = await this.getConversationWithMetaFields(conversationId); @@ -385,8 +453,32 @@ export class ObservabilityAIAssistantClient { return; } + const persistedTokenCount = conversation._source?.conversation.token_count; + const updatedConversation = await this.update( - merge({}, omit(conversation._source, 'messages'), { messages: nextMessages }) + conversationId, + + merge( + {}, + + // base conversation without messages + omit(conversation._source, 'messages'), + + // update messages + { messages: nextMessages }, + + // update token count + { + conversation: { + token_count: { + prompt: (persistedTokenCount?.prompt || 0) + tokenCountResult.prompt, + completion: + (persistedTokenCount?.completion || 0) + tokenCountResult.completion, + total: (persistedTokenCount?.total || 0) + tokenCountResult.total, + }, + }, + } + ) ); subscriber.next({ type: StreamingChatResponseEventType.ConversationUpdate, @@ -402,6 +494,7 @@ export class ObservabilityAIAssistantClient { '@timestamp': new Date().toISOString(), conversation: { title: generatedTitle || title || 'New conversation', + token_count: tokenCountResult, }, messages: nextMessages, labels: {}, @@ -428,6 +521,7 @@ export class ObservabilityAIAssistantClient { const titlePromise = !conversationId && !title && persist ? this.getGeneratedTitle({ + chat: chatWithTokenCountIncrement, messages, connectorId, signal, @@ -455,11 +549,11 @@ export class ObservabilityAIAssistantClient { }: { messages: Message[]; connectorId: string; - functions?: Array<{ name: string; description: string; parameters: CompatibleJSONSchema }>; + functions?: Array<{ name: string; description: string; parameters?: CompatibleJSONSchema }>; functionCall?: string; signal: AbortSignal; } - ): Promise> => { + ): Promise> => { const span = apm.startSpan(`chat ${name}`); const spanId = (span?.ids['span.id'] || '').substring(0, 6); @@ -473,22 +567,24 @@ export class ObservabilityAIAssistantClient { let adapter: LlmApiAdapter; + this.dependencies.logger.debug(`Creating "${connector.actionTypeId}" adapter`); + switch (connector.actionTypeId) { case ObservabilityAIAssistantConnectorType.OpenAI: adapter = createOpenAiAdapter({ - logger: this.dependencies.logger, messages, - functionCall, functions, + functionCall, + logger: this.dependencies.logger, }); break; case ObservabilityAIAssistantConnectorType.Bedrock: adapter = createBedrockClaudeAdapter({ - logger: this.dependencies.logger, messages, - functionCall, functions, + functionCall, + logger: this.dependencies.logger, }); break; @@ -536,18 +632,17 @@ export class ObservabilityAIAssistantClient { signal.addEventListener('abort', () => response.destroy()); const response$ = adapter.streamIntoObservable(response).pipe(shareReplay()); - - response$.pipe(concatenateChatCompletionChunks(), lastOperator()).subscribe({ - error: (error) => { - this.dependencies.logger.debug(`${loggerPrefix}: Error in chat response`); - this.dependencies.logger.debug(error); - }, - next: (message) => { - this.dependencies.logger.debug( - `${loggerPrefix}: Received message:\n${JSON.stringify(message)}` - ); - }, - }); + response$ + .pipe(rejectTokenCountEvents(), concatenateChatCompletionChunks(), lastOperator()) + .subscribe({ + error: (error) => { + this.dependencies.logger.debug('Error in chat response'); + this.dependencies.logger.debug(error); + }, + next: (message) => { + this.dependencies.logger.debug(`Received message:\n${JSON.stringify(message)}`); + }, + }); lastValueFrom(response$) .then(() => { @@ -593,10 +688,13 @@ export class ObservabilityAIAssistantClient { }; }; - update = async (conversation: ConversationUpdateRequest): Promise => { - const document = await this.getConversationWithMetaFields(conversation.conversation.id); + update = async ( + conversationId: string, + conversation: ConversationUpdateRequest + ): Promise => { + const persistedConversation = await this.getConversationWithMetaFields(conversationId); - if (!document) { + if (!persistedConversation) { throw notFound(); } @@ -607,8 +705,8 @@ export class ObservabilityAIAssistantClient { ); await this.dependencies.esClient.asInternalUser.update({ - id: document._id, - index: document._index, + id: persistedConversation._id, + index: persistedConversation._index, doc: updatedConversation, refresh: true, }); @@ -617,17 +715,21 @@ export class ObservabilityAIAssistantClient { }; getGeneratedTitle = async ({ + chat, messages, connectorId, signal, responseLanguage, }: { + chat: ( + ...chatParams: Parameters['chat']> + ) => Promise>; messages: Message[]; connectorId: string; signal: AbortSignal; responseLanguage: string; }) => { - const response$ = await this.chat('generate_title', { + const response$ = await chat('generate_title', { messages: [ { '@timestamp': new Date().toString(), diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/conversation_component_template.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/conversation_component_template.ts index c00e2c5e3a1fb..5a8ad441b8e54 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/conversation_component_template.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/conversation_component_template.ts @@ -25,6 +25,10 @@ const dynamic = { dynamic: true, }; +const integer = { + type: 'integer' as const, +}; + export const conversationComponentTemplate: ClusterComponentTemplate['component_template']['template'] = { mappings: { @@ -55,6 +59,13 @@ export const conversationComponentTemplate: ClusterComponentTemplate['component_ id: keyword, title: text, last_updated: date, + token_count: { + properties: { + prompt: integer, + completion: integer, + total: integer, + }, + }, }, }, namespace: keyword, diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts index 1df243fc2ba35..e1a19df6b44b0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/index.ts @@ -13,7 +13,10 @@ import type { SecurityPluginStart } from '@kbn/security-plugin/server'; import { getSpaceIdFromPath } from '@kbn/spaces-plugin/common'; import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; import { once } from 'lodash'; -import { KnowledgeBaseEntryRole, ObservabilityAIAssistantScreenContext } from '../../common/types'; +import { + KnowledgeBaseEntryRole, + ObservabilityAIAssistantScreenContextRequest, +} from '../../common/types'; import type { ObservabilityAIAssistantPluginStartDependencies } from '../types'; import { ChatFunctionClient } from './chat_function_client'; import { ObservabilityAIAssistantClient } from './client'; @@ -291,7 +294,7 @@ export class ObservabilityAIAssistantService { resources, client, }: { - screenContexts: ObservabilityAIAssistantScreenContext[]; + screenContexts: ObservabilityAIAssistantScreenContextRequest[]; signal: AbortSignal; resources: RespondFunctionResources; client: ObservabilityAIAssistantClient; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts index 1ade4fc0e179a..90cc6f3693e41 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/types.ts @@ -6,12 +6,14 @@ */ import type { FromSchema } from 'json-schema-to-ts'; +import { Observable } from 'rxjs'; +import { ChatCompletionChunkEvent } from '../../common/conversation_complete'; import type { CompatibleJSONSchema, FunctionDefinition, FunctionResponse, } from '../../common/functions/types'; -import type { Message, ObservabilityAIAssistantScreenContext } from '../../common/types'; +import type { Message, ObservabilityAIAssistantScreenContextRequest } from '../../common/types'; import type { ObservabilityAIAssistantRouteHandlerResources } from '../routes/types'; import { ChatFunctionClient } from './chat_function_client'; import type { ObservabilityAIAssistantClient } from './client'; @@ -21,12 +23,17 @@ export type RespondFunctionResources = Pick< 'context' | 'logger' | 'plugins' | 'request' >; +export type ChatFn = ( + ...args: Parameters +) => Promise>; + type RespondFunction = ( options: { arguments: TArguments; messages: Message[]; connectorId: string; - screenContexts: ObservabilityAIAssistantScreenContext[]; + screenContexts: ObservabilityAIAssistantScreenContextRequest[]; + chat: ChatFn; }, signal: AbortSignal ) => Promise; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/flush_buffer.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/flush_buffer.ts index 22723f1e49966..eb494ec80bb50 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/flush_buffer.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/flush_buffer.ts @@ -11,6 +11,7 @@ import { BufferFlushEvent, StreamingChatResponseEventType, StreamingChatResponseEventWithoutError, + TokenCountEvent, } from '../../../common/conversation_complete'; // The Cloud proxy currently buffers 4kb or 8kb of data until flushing. @@ -18,7 +19,7 @@ import { // so we manually insert some data every 250ms if needed to force it // to flush. -export function flushBuffer( +export function flushBuffer( isCloud: boolean ): OperatorFunction { if (!isCloud) { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/observable_into_stream.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/observable_into_stream.ts index 3ca09acde2b6f..f6fe506367f2f 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/observable_into_stream.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/observable_into_stream.ts @@ -13,10 +13,11 @@ import { isChatCompletionError, StreamingChatResponseEventType, StreamingChatResponseEventWithoutError, + TokenCountEvent, } from '../../../common/conversation_complete'; export function observableIntoStream( - source: Observable + source: Observable ) { const stream = new PassThrough(); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/reject_token_count_events.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/reject_token_count_events.ts new file mode 100644 index 0000000000000..b8e563495d1d7 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/util/reject_token_count_events.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 { filter, Observable } from 'rxjs'; +import { + ChatCompletionChunkEvent, + StreamingChatResponseEventType, + TokenCountEvent, +} from '../../../common/conversation_complete'; + +export function rejectTokenCountEvents() { + return ( + source: Observable + ): Observable> => { + return source.pipe( + filter( + (event): event is Exclude => + event.type !== StreamingChatResponseEventType.TokenCount + ) + ); + }; +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx index 2d7387d9a1040..6dadba00f2394 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/buttons/new_chat_button.tsx @@ -11,8 +11,9 @@ import { i18n } from '@kbn/i18n'; export function NewChatButton( props: React.ComponentProps & { collapsed?: boolean } ) { + const { collapsed, ...nextProps } = props; return !props.collapsed ? ( - + {i18n.translate('xpack.observabilityAiAssistant.newChatButton', { defaultMessage: 'New chat', @@ -23,7 +24,7 @@ export function NewChatButton( data-test-subj="observabilityAiAssistantNewChatButtonButton" iconType={EuiIconNewChat} size="xs" - {...props} + {...nextProps} /> ); } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_actions_menu.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_actions_menu.tsx index ecf32865e425f..f06dc126e7667 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_actions_menu.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_actions_menu.tsx @@ -10,7 +10,6 @@ import { i18n } from '@kbn/i18n'; import { EuiButtonIcon, EuiContextMenu, EuiPanel, EuiPopover, EuiToolTip } from '@elastic/eui'; import { ConnectorSelectorBase } from '@kbn/observability-ai-assistant-plugin/public'; import { useKibana } from '../../hooks/use_kibana'; -import { useObservabilityAIAssistantRouter } from '../../hooks/use_observability_ai_assistant_router'; import { getSettingsHref } from '../../utils/get_settings_href'; import { getSettingsKnowledgeBaseHref } from '../../utils/get_settings_kb_href'; import type { UseGenAIConnectorsResult } from '../../hooks/use_genai_connectors'; @@ -19,13 +18,11 @@ export function ChatActionsMenu({ connectors, conversationId, disabled, - showLinkToConversationsApp, onCopyConversationClick, }: { connectors: UseGenAIConnectorsResult; conversationId?: string; disabled: boolean; - showLinkToConversationsApp: boolean; onCopyConversationClick: () => void; }) { const { @@ -34,8 +31,6 @@ export function ChatActionsMenu({ } = useKibana().services; const [isOpen, setIsOpen] = useState(false); - const router = useObservabilityAIAssistantRouter(); - const toggleActionsMenu = () => { setIsOpen(!isOpen); }; @@ -83,30 +78,6 @@ export function ChatActionsMenu({ defaultMessage: 'Actions', }), items: [ - ...(showLinkToConversationsApp - ? [ - { - name: conversationId - ? i18n.translate( - 'xpack.observabilityAiAssistant.chatHeader.actions.openInConversationsApp', - { - defaultMessage: 'Open in Conversations app', - } - ) - : i18n.translate( - 'xpack.observabilityAiAssistant.chatHeader.actions.goToConversationsApp', - { - defaultMessage: 'Go to Conversations app', - } - ), - href: conversationId - ? router.link('/conversations/{conversationId}', { - path: { conversationId }, - }) - : router.link('/conversations/new'), - }, - ] - : []), { name: i18n.translate( 'xpack.observabilityAiAssistant.chatHeader.actions.knowledgeBase', diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.stories.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.stories.tsx index c49450f896e69..a6768198441da 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.stories.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.stories.tsx @@ -65,6 +65,7 @@ const defaultProps: ComponentStoryObj = { }, currentUser: { username: 'elastic', + full_name: '', }, }, render: (props) => { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.tsx index 261e328656509..b5cd2cd0683e3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_body.tsx @@ -18,16 +18,14 @@ import { import { css, keyframes } from '@emotion/css'; import { i18n } from '@kbn/i18n'; import type { Conversation, Message } from '@kbn/observability-ai-assistant-plugin/common'; -import { - MessageRole, - type Feedback, - VisualizeESQLUserIntention, - ObservabilityAIAssistantTelemetryEventType, -} from '@kbn/observability-ai-assistant-plugin/public'; import { ChatActionClickType, ChatState, + MessageRole, + ObservabilityAIAssistantTelemetryEventType, + VisualizeESQLUserIntention, type ChatActionClickPayload, + type Feedback, } from '@kbn/observability-ai-assistant-plugin/public'; import type { AuthenticatedUser } from '@kbn/security-plugin/common'; import { euiThemeVars } from '@kbn/ui-theme'; @@ -40,7 +38,7 @@ import { useLicense } from '../../hooks/use_license'; import { useObservabilityAIAssistantChatService } from '../../hooks/use_observability_ai_assistant_chat_service'; import { ASSISTANT_SETUP_TITLE, EMPTY_CONVERSATION_TITLE, UPGRADE_LICENSE_TITLE } from '../../i18n'; import { PromptEditor } from '../prompt_editor/prompt_editor'; -import { FlyoutWidthMode } from './chat_flyout'; +import { FlyoutPositionMode } from './chat_flyout'; import { ChatHeader } from './chat_header'; import { ChatTimeline } from './chat_timeline'; import { IncorrectLicensePanel } from './incorrect_license_panel'; @@ -97,25 +95,25 @@ const PADDING_AND_BORDER = 32; export function ChatBody({ connectors, currentUser, - flyoutWidthMode, + flyoutPositionMode, initialConversationId, initialMessages, initialTitle, knowledgeBase, showLinkToConversationsApp, onConversationUpdate, - onToggleFlyoutWidthMode, + onToggleFlyoutPositionMode, }: { connectors: ReturnType; currentUser?: Pick; - flyoutWidthMode?: FlyoutWidthMode; + flyoutPositionMode?: FlyoutPositionMode; initialTitle?: string; initialMessages?: Message[]; initialConversationId?: string; knowledgeBase: UseKnowledgeBaseResult; showLinkToConversationsApp: boolean; onConversationUpdate: (conversation: { conversation: Conversation['conversation'] }) => void; - onToggleFlyoutWidthMode?: (flyoutWidthMode: FlyoutWidthMode) => void; + onToggleFlyoutPositionMode?: (flyoutPositionMode: FlyoutPositionMode) => void; }) { const license = useLicense(); const hasCorrectLicense = license?.hasAtLeast('enterprise'); @@ -362,9 +360,7 @@ export function ChatBody({ onSendTelemetry={(eventWithPayload) => chatService.sendAnalyticsEvent(eventWithPayload) } - onStopGenerating={() => { - stop(); - }} + onStopGenerating={stop} onActionClick={handleActionClick} /> )} @@ -468,16 +464,15 @@ export function ChatBody({ ? conversation.value.conversation.id : undefined } - flyoutWidthMode={flyoutWidthMode} + flyoutPositionMode={flyoutPositionMode} licenseInvalid={!hasCorrectLicense && !initialConversationId} loading={isLoading} - showLinkToConversationsApp={showLinkToConversationsApp} title={title} onCopyConversation={handleCopyConversation} onSaveTitle={(newTitle) => { saveTitle(newTitle); }} - onToggleFlyoutWidthMode={onToggleFlyoutWidthMode} + onToggleFlyoutPositionMode={onToggleFlyoutPositionMode} /> diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_flyout.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_flyout.tsx index 90aedc0796900..46f64e7a9f003 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_flyout.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_flyout.tsx @@ -8,7 +8,7 @@ import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, - EuiFlyout, + EuiFlyoutResizable, EuiPopover, EuiToolTip, useCurrentEuiBreakpoint, @@ -35,16 +35,21 @@ const CONVERSATIONS_SIDEBAR_WIDTH_COLLAPSED = 34; const SIDEBAR_WIDTH = 400; -export type FlyoutWidthMode = 'side' | 'full'; +export enum FlyoutPositionMode { + PUSH = 'push', + OVERLAY = 'overlay', +} export function ChatFlyout({ initialTitle, initialMessages, - onClose, + initialFlyoutPositionMode, isOpen, + onClose, }: { initialTitle: string; initialMessages: Message[]; + initialFlyoutPositionMode?: FlyoutPositionMode; isOpen: boolean; onClose: () => void; }) { @@ -59,7 +64,9 @@ export function ChatFlyout({ const [conversationId, setConversationId] = useState(undefined); - const [flyoutWidthMode, setFlyoutWidthMode] = useState('side'); + const [flyoutPositionMode, setFlyoutPositionMode] = useState( + initialFlyoutPositionMode || FlyoutPositionMode.OVERLAY + ); const [conversationsExpanded, setConversationsExpanded] = useState(false); @@ -128,8 +135,8 @@ export function ChatFlyout({ z-index: 1; `; - const handleToggleFlyoutWidthMode = (newFlyoutWidthMode: FlyoutWidthMode) => { - setFlyoutWidthMode(newFlyoutWidthMode); + const handleToggleFlyoutPositionMode = (newFlyoutPositionMode: FlyoutPositionMode) => { + setFlyoutPositionMode(newFlyoutPositionMode); }; return isOpen ? ( @@ -139,7 +146,7 @@ export function ChatFlyout({ setVisibility: setIsSecondSlotVisible, }} > - { onClose(); setIsSecondSlotVisible(false); @@ -247,7 +256,7 @@ export function ChatFlyout({ key={bodyKey} connectors={connectors} currentUser={currentUser} - flyoutWidthMode={flyoutWidthMode} + flyoutPositionMode={flyoutPositionMode} initialTitle={initialTitle} initialMessages={initialMessages} initialConversationId={conversationId} @@ -260,7 +269,7 @@ export function ChatFlyout({ setConversationId(conversation.conversation.id); conversationList.conversations.refresh(); }} - onToggleFlyoutWidthMode={handleToggleFlyoutWidthMode} + onToggleFlyoutPositionMode={handleToggleFlyoutPositionMode} /> @@ -280,7 +289,7 @@ export function ChatFlyout({ /> - + ) : null; } @@ -289,16 +298,11 @@ const getFlyoutWidth = ({ breakpoint, expanded, isSecondSlotVisible, - flyoutWidthMode, }: { breakpoint?: string; expanded: boolean; isSecondSlotVisible: boolean; - flyoutWidthMode?: FlyoutWidthMode; }) => { - if (flyoutWidthMode === 'full') { - return '100%'; - } if (breakpoint === 'xs') { return '90vw'; } diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_header.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_header.tsx index 55ad14e9bfdd5..4d5a824ebe304 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_header.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_header.tsx @@ -21,9 +21,9 @@ import { i18n } from '@kbn/i18n'; import { css } from '@emotion/css'; import { AssistantAvatar } from '@kbn/observability-ai-assistant-plugin/public'; import { ChatActionsMenu } from './chat_actions_menu'; -import type { UseGenAIConnectorsResult } from '../../hooks/use_genai_connectors'; -import type { FlyoutWidthMode } from './chat_flyout'; import { useObservabilityAIAssistantRouter } from '../../hooks/use_observability_ai_assistant_router'; +import type { UseGenAIConnectorsResult } from '../../hooks/use_genai_connectors'; +import { FlyoutPositionMode } from './chat_flyout'; // needed to prevent InlineTextEdit component from expanding container const minWidthClassName = css` @@ -43,25 +43,23 @@ const chatHeaderMobileClassName = css` export function ChatHeader({ connectors, conversationId, - flyoutWidthMode, + flyoutPositionMode, licenseInvalid, loading, - showLinkToConversationsApp, title, onCopyConversation, onSaveTitle, - onToggleFlyoutWidthMode, + onToggleFlyoutPositionMode, }: { connectors: UseGenAIConnectorsResult; conversationId?: string; - flyoutWidthMode?: FlyoutWidthMode; + flyoutPositionMode?: FlyoutPositionMode; licenseInvalid: boolean; loading: boolean; - showLinkToConversationsApp: boolean; title: string; onCopyConversation: () => void; onSaveTitle: (title: string) => void; - onToggleFlyoutWidthMode?: (newFlyoutWidthMode: FlyoutWidthMode) => void; + onToggleFlyoutPositionMode?: (newFlyoutPositionMode: FlyoutPositionMode) => void; }) { const theme = useEuiTheme(); const breakpoint = useCurrentEuiBreakpoint(); @@ -74,10 +72,6 @@ export function ChatHeader({ setNewTitle(title); }, [title]); - const handleToggleFlyoutWidthMode = () => { - onToggleFlyoutWidthMode?.(flyoutWidthMode === 'side' ? 'full' : 'side'); - }; - const handleNavigateToConversations = () => { if (conversationId) { router.push('/conversations/{conversationId}', { @@ -91,6 +85,16 @@ export function ChatHeader({ } }; + const handleToggleFlyoutPositionMode = () => { + if (flyoutPositionMode) { + onToggleFlyoutPositionMode?.( + flyoutPositionMode === FlyoutPositionMode.OVERLAY + ? FlyoutPositionMode.PUSH + : FlyoutPositionMode.OVERLAY + ); + } + }; + return ( - {flyoutWidthMode && onToggleFlyoutWidthMode ? ( + {flyoutPositionMode && onToggleFlyoutPositionMode ? ( <> } @@ -174,27 +185,20 @@ export function ChatHeader({ anchorPosition="downLeft" button={ } @@ -208,7 +212,6 @@ export function ChatHeader({ connectors={connectors} conversationId={conversationId} disabled={licenseInvalid} - showLinkToConversationsApp={showLinkToConversationsApp} onCopyConversationClick={onCopyConversation} /> diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_item_avatar.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_item_avatar.tsx index d286fb7e39172..ae78d55dd43ff 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_item_avatar.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/chat_item_avatar.tsx @@ -7,6 +7,7 @@ import React from 'react'; import { UserAvatar } from '@kbn/user-profile-components'; +import { css } from '@emotion/css'; import { EuiAvatar, EuiLoadingSpinner } from '@elastic/eui'; import type { AuthenticatedUser } from '@kbn/security-plugin/common'; import { AssistantAvatar, MessageRole } from '@kbn/observability-ai-assistant-plugin/public'; @@ -17,6 +18,13 @@ interface ChatAvatarProps { loading: boolean; } +const assistantAvatarClassName = css` + svg { + width: 16px; + height: 16px; + } +`; + export function ChatItemAvatar({ currentUser, role, loading }: ChatAvatarProps) { const isLoading = loading || !currentUser; @@ -31,7 +39,14 @@ export function ChatItemAvatar({ currentUser, role, loading }: ChatAvatarProps) case MessageRole.Assistant: case MessageRole.Elastic: case MessageRole.Function: - return ; + return ( + + ); case MessageRole.System: return ; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/welcome_message_connectors.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/welcome_message_connectors.tsx index f51532c80e58f..77e8289deb6c5 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/welcome_message_connectors.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/components/chat/welcome_message_connectors.tsx @@ -76,7 +76,7 @@ export function WelcomeMessageConnectors({ 'xpack.observabilityAiAssistant.initialSetupPanel.setupConnector.description2', { defaultMessage: - 'Start working with the Elastic AI Assistant by setting up a connector for your AI provider. The OpenAI model needs to support function calls. We strongly recommend using GPT4.', + 'Start working with the Elastic AI Assistant by setting up a connector for your AI provider. The model needs to support function calls. When using OpenAI or Azure, we recommend using GPT4.', } )} { return hasBeenOpened ? service.start({ signal }) : undefined; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx index 2f7d872d191d7..e190cc0c34782 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_conversation.test.tsx @@ -13,7 +13,7 @@ import { } from '@testing-library/react-hooks'; import { merge } from 'lodash'; import React from 'react'; -import { Observable, Subject } from 'rxjs'; +import { Observable, of, Subject } from 'rxjs'; import { MessageRole, StreamingChatResponseEventType, @@ -54,6 +54,7 @@ const mockService: MockedService = { openNewConversation: jest.fn(), predefinedConversation$: new Observable(), }, + navigate: jest.fn().mockReturnValue(of()), }; const mockChatService = createMockChatService(); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_nav_control_screen_context.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_nav_control_screen_context.ts new file mode 100644 index 0000000000000..7baf9aae82512 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/hooks/use_nav_control_screen_context.ts @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useEffect, useState } from 'react'; +import datemath from '@elastic/datemath'; +import moment from 'moment'; +import { useKibana } from './use_kibana'; +import { useObservabilityAIAssistantAppService } from './use_observability_ai_assistant_app_service'; + +export function useNavControlScreenContext() { + const service = useObservabilityAIAssistantAppService(); + + const { + services: { + plugins: { + start: { data }, + }, + }, + } = useKibana(); + + const { from, to } = data.query.timefilter.timefilter.getTime(); + + const [href, setHref] = useState(window.location.href); + + useEffect(() => { + const originalPushState = window.history.pushState.bind(window.history); + const originalReplaceState = window.history.replaceState.bind(window.history); + + let unmounted: boolean = false; + + function updateHref() { + if (!unmounted) { + setHref(window.location.href); + } + } + + window.history.pushState = (...args: Parameters) => { + originalPushState(...args); + updateHref(); + }; + + window.history.replaceState = (...args: Parameters) => { + originalReplaceState(...args); + updateHref(); + }; + window.addEventListener('popstate', updateHref); + + window.addEventListener('hashchange', updateHref); + + return () => { + unmounted = true; + window.removeEventListener('popstate', updateHref); + window.removeEventListener('hashchange', updateHref); + }; + }, []); + + useEffect(() => { + const start = datemath.parse(from)?.format() ?? moment().subtract(1, 'day').toISOString(); + const end = datemath.parse(to)?.format() ?? moment().toISOString(); + + return service.setScreenContext({ + screenDescription: `The user is looking at ${href}. The current time range is ${start} - ${end}.`, + }); + }, [service, from, to, href]); +} diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts index 5bce062b9eecd..2876ddaf3332d 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/types.ts @@ -27,6 +27,7 @@ import type { TriggersAndActionsUIPublicPluginSetup, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface ObservabilityAIAssistantAppPublicStart {} @@ -44,6 +45,7 @@ export interface ObservabilityAIAssistantAppPluginStartDependencies { observabilityShared: ObservabilitySharedPluginStart; ml: MlPluginStart; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + data: DataPublicPluginStart; } export interface ObservabilityAIAssistantAppPluginSetupDependencies { diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts index ff36484381b2a..43cfbf912b598 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/server/functions/query/index.ts @@ -9,7 +9,7 @@ import Fs from 'fs'; import { keyBy, mapValues, once, pick } from 'lodash'; import pLimit from 'p-limit'; import Path from 'path'; -import { lastValueFrom, startWith, type Observable } from 'rxjs'; +import { lastValueFrom, startWith } from 'rxjs'; import { promisify } from 'util'; import { FunctionVisibility, MessageRole } from '@kbn/observability-ai-assistant-plugin/common'; import { @@ -20,9 +20,8 @@ import { concatenateChatCompletionChunks, ConcatenatedMessage, } from '@kbn/observability-ai-assistant-plugin/common/utils/concatenate_chat_completion_chunks'; -import { ChatCompletionChunkEvent } from '@kbn/observability-ai-assistant-plugin/common/conversation_complete'; import { emitWithConcatenatedMessage } from '@kbn/observability-ai-assistant-plugin/common/utils/emit_with_concatenated_message'; -import { createFunctionResponseMessage } from '@kbn/observability-ai-assistant-plugin/server/service/util/create_function_response_message'; +import { createFunctionResponseMessage } from '@kbn/observability-ai-assistant-plugin/common/utils/create_function_response_message'; import type { FunctionRegistrationParameters } from '..'; import { correctCommonEsqlMistakes } from './correct_common_esql_mistakes'; @@ -120,7 +119,7 @@ export function registerQueryFunction({ required: ['switch'], } as const, }, - async ({ messages, connectorId }, signal) => { + async ({ messages, connectorId, chat }, signal) => { const [systemMessage, esqlDocs] = await Promise.all([loadSystemMessage(), loadEsqlDocs()]); const withEsqlSystemMessage = (message?: string) => [ @@ -132,7 +131,7 @@ export function registerQueryFunction({ ]; const source$ = ( - await client.chat('classify_esql', { + await chat('classify_esql', { connectorId, messages: withEsqlSystemMessage().concat({ '@timestamp': new Date().toISOString(), @@ -262,38 +261,36 @@ export function registerQueryFunction({ break; } - const esqlResponse$: Observable = await client.chat( - 'answer_esql_question', - { - messages: [ - ...withEsqlSystemMessage(), - { - '@timestamp': new Date().toISOString(), - message: { - role: MessageRole.Assistant, - content: '', - function_call: { - name: 'get_esql_info', - arguments: JSON.stringify(args), - trigger: MessageRole.Assistant as const, - }, - }, - }, - { - '@timestamp': new Date().toISOString(), - message: { - role: MessageRole.User, + const esqlResponse$ = await chat('answer_esql_question', { + messages: [ + ...withEsqlSystemMessage(), + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.Assistant, + content: '', + function_call: { name: 'get_esql_info', - content: JSON.stringify({ - documentation: messagesToInclude, - }), + arguments: JSON.stringify(args), + trigger: MessageRole.Assistant as const, }, }, - { - '@timestamp': new Date().toISOString(), - message: { - role: MessageRole.User, - content: `Answer the user's question that was previously asked using the attached documentation. + }, + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + name: 'get_esql_info', + content: JSON.stringify({ + documentation: messagesToInclude, + }), + }, + }, + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: `Answer the user's question that was previously asked using the attached documentation. Format any ES|QL query as follows: \`\`\`esql @@ -347,16 +344,20 @@ export function registerQueryFunction({ \`\`\` `, - }, }, - ], - connectorId, - signal, - } - ); + }, + ], + connectorId, + signal, + functions: functions.getActions(), + }); return esqlResponse$.pipe( emitWithConcatenatedMessage((msg) => { + if (msg.message.function_call.name) { + return msg; + } + const esqlQuery = correctCommonEsqlMistakes(msg.message.content, resources.logger).match( /```esql([\s\S]*?)```/ )?.[1]; diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json b/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json index ac80f9b74f1cf..65fe909cd7e04 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.json @@ -48,7 +48,8 @@ "@kbn/ml-plugin", "@kbn/react-kibana-context-theme", "@kbn/shared-ux-link-redirect-app", - "@kbn/shared-ux-utility" + "@kbn/shared-ux-utility", + "@kbn/data-plugin" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/kibana.jsonc b/x-pack/plugins/observability_solution/observability_logs_explorer/kibana.jsonc index 98b24afc4e6f6..6fbbde284e78e 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/kibana.jsonc +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/kibana.jsonc @@ -18,7 +18,7 @@ "logsShared", "observabilityAIAssistant", "observabilityShared", - "observability", + "slo", "share", "kibanaUtils", "datasetQuality" diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx index fc224093dfe60..6766bdf70ab39 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/components/alerts_popover.tsx @@ -20,7 +20,7 @@ import { hydrateDataSourceSelection } from '@kbn/logs-explorer-plugin/common'; import { getDiscoverFiltersFromState } from '@kbn/logs-explorer-plugin/public'; import type { AlertParams } from '@kbn/observability-plugin/public/components/custom_threshold/types'; import { useLinkProps } from '@kbn/observability-shared-plugin/public'; -import { sloFeatureId } from '@kbn/observability-plugin/common'; +import { sloFeatureId } from '@kbn/observability-shared-plugin/common'; import { loadRuleTypes } from '@kbn/triggers-actions-ui-plugin/public'; import useAsync from 'react-use/lib/useAsync'; import { useKibanaContextForPlugin } from '../utils/use_kibana'; @@ -78,9 +78,8 @@ function alertsPopoverReducer(state: AlertsPopoverState, action: AlertsPopoverAc export const AlertsPopover = () => { const { - services: { triggersActionsUi, observability, application, http }, + services: { triggersActionsUi, slo, application, http }, } = useKibanaContextForPlugin(); - const manageRulesLinkProps = useLinkProps({ app: 'observability', pathname: '/alerts/rules' }); const [pageState] = useActor(useObservabilityLogsExplorerPageStateContext()); @@ -144,7 +143,7 @@ export const AlertsPopover = () => { logsExplorerState?.query && 'query' in logsExplorerState.query ? String(logsExplorerState.query.query) : undefined; - return observability.getCreateSLOFlyout({ + return slo.getCreateSLOFlyout({ initialValues: { indicator: { type: 'sli.kql.custom', @@ -166,7 +165,7 @@ export const AlertsPopover = () => { onClose: closeCreateSLOFlyout, }); } - }, [observability, pageState, state.isCreateSLOFlyoutOpen]); + }, [slo, pageState, state.isCreateSLOFlyoutOpen]); // Check whether the user has the necessary permissions to create an SLO const canCreateSLOs = !!application.capabilities[sloFeatureId]?.write; diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/public/types.ts b/x-pack/plugins/observability_solution/observability_logs_explorer/public/types.ts index d73d4c372e2f0..94209c0b80d69 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/public/types.ts +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/public/types.ts @@ -20,7 +20,7 @@ import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/publi import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public'; import { LensPublicStart } from '@kbn/lens-plugin/public'; -import { ObservabilityPublicStart } from '@kbn/observability-plugin/public'; +import { SloPublicStart } from '@kbn/slo-plugin/public'; import { ObservabilityLogsExplorerLocators, ObservabilityLogsExplorerLocationState, @@ -46,7 +46,7 @@ export interface ObservabilityLogsExplorerStartDeps { logsShared: LogsSharedClientStartExports; observabilityAIAssistant: ObservabilityAIAssistantPublicStart; observabilityShared: ObservabilitySharedPluginStart; - observability: ObservabilityPublicStart; + slo: SloPublicStart; serverless?: ServerlessPluginStart; triggersActionsUi?: TriggersAndActionsUIPublicPluginStart; unifiedSearch?: UnifiedSearchPublicPluginStart; diff --git a/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json b/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json index 471ae17fd4029..6d1f864890e57 100644 --- a/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_logs_explorer/tsconfig.json @@ -46,6 +46,7 @@ "@kbn/data-view-editor-plugin", "@kbn/lens-plugin", "@kbn/shared-ux-prompt-not-found", + "@kbn/slo-plugin", ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_solution/observability_shared/common/index.ts b/x-pack/plugins/observability_solution/observability_shared/common/index.ts index ded7a14c7d1e8..a213f029aa759 100644 --- a/x-pack/plugins/observability_solution/observability_shared/common/index.ts +++ b/x-pack/plugins/observability_solution/observability_shared/common/index.ts @@ -4,12 +4,18 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { AlertConsumers } from '@kbn/rule-data-utils'; export const observabilityFeatureId = 'observability'; export const observabilityAppId = 'observability-overview'; export const casesFeatureId = 'observabilityCases'; export const sloFeatureId = 'slo'; +// SLO alerts table in slo detail page +export const SLO_ALERTS_TABLE_ID = 'xpack.observability.slo.sloDetails.alertTable'; +// Emebeddable SLO alerts table +export const SLO_ALERTS_TABLE_CONFIG_ID = `${AlertConsumers.SLO}-embeddable-alerts-table`; + export { CLOUD, CLOUD_AVAILABILITY_ZONE, diff --git a/x-pack/plugins/observability_solution/observability_shared/public/index.ts b/x-pack/plugins/observability_solution/observability_shared/public/index.ts index 9b4ef62271697..3dd3dd52055d2 100644 --- a/x-pack/plugins/observability_solution/observability_shared/public/index.ts +++ b/x-pack/plugins/observability_solution/observability_shared/public/index.ts @@ -80,6 +80,7 @@ export { observabilityAppId, casesFeatureId, sloFeatureId, + SLO_ALERTS_TABLE_CONFIG_ID, } from '../common'; export { diff --git a/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.test.tsx b/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.test.tsx index 868a1638a2775..1230ec5034742 100644 --- a/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.test.tsx +++ b/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.test.tsx @@ -7,7 +7,7 @@ import { Subject } from 'rxjs'; import { App, AppDeepLink, ApplicationStart, AppUpdater } from '@kbn/core/public'; -import { casesFeatureId, sloFeatureId } from '../../common'; +import { casesFeatureId } from '../../common'; import { updateGlobalNavigation } from './update_global_navigation'; // Used in updater callback @@ -157,70 +157,5 @@ describe('updateGlobalNavigation', () => { }); }); }); - - it("hides the slo link when the capabilities don't include it", () => { - const capabilities = { - navLinks: { apm: true, logs: false, metrics: false, uptime: false }, - } as unknown as ApplicationStart['capabilities']; - - const sloRoute = { - id: 'slos', - title: 'SLOs', - order: 8002, - path: '/slos', - visibleIn: [], - }; - - const deepLinks = [sloRoute]; - - const callback = jest.fn(); - const updater$ = { - next: (cb: AppUpdater) => callback(cb(app)), - } as unknown as Subject; - - updateGlobalNavigation({ capabilities, deepLinks, updater$ }); - - expect(callback).toHaveBeenCalledWith({ - deepLinks: [], // Deeplink has been filtered out - visibleIn: ['sideNav', 'globalSearch', 'home', 'kibanaOverview'], - }); - }); - - describe('when slos are enabled', () => { - it('shows the slos deep link', () => { - const capabilities = { - [casesFeatureId]: { read_cases: true }, - [sloFeatureId]: { read: true }, - navLinks: { apm: false, logs: false, metrics: false, uptime: false }, - } as unknown as ApplicationStart['capabilities']; - - const sloRoute = { - id: 'slos', - title: 'SLOs', - order: 8002, - path: '/slos', - visibleIn: [], - }; - - const deepLinks = [sloRoute]; - - const callback = jest.fn(); - const updater$ = { - next: (cb: AppUpdater) => callback(cb(app)), - } as unknown as Subject; - - updateGlobalNavigation({ capabilities, deepLinks, updater$ }); - - expect(callback).toHaveBeenCalledWith({ - deepLinks: [ - { - ...sloRoute, - visibleIn: ['sideNav', 'globalSearch'], - }, - ], - visibleIn: ['sideNav', 'globalSearch', 'home', 'kibanaOverview'], - }); - }); - }); }); }); diff --git a/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.tsx b/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.tsx index 07f92546a09f7..2c854c9b2dcd9 100644 --- a/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.tsx +++ b/x-pack/plugins/observability_solution/observability_shared/public/services/update_global_navigation.tsx @@ -8,7 +8,7 @@ import { Subject } from 'rxjs'; import { AppUpdater, ApplicationStart, AppDeepLink } from '@kbn/core/public'; import { CasesDeepLinkId } from '@kbn/cases-plugin/public'; -import { casesFeatureId, sloFeatureId } from '../../common'; +import { casesFeatureId } from '../../common'; export function updateGlobalNavigation({ capabilities, @@ -19,12 +19,13 @@ export function updateGlobalNavigation({ deepLinks: AppDeepLink[]; updater$: Subject; }) { - const { apm, logs, metrics, uptime } = capabilities.navLinks; + const { apm, logs, metrics, uptime, slo } = capabilities.navLinks; const someVisible = Object.values({ apm, logs, metrics, uptime, + slo, }).some((visible) => visible); const updatedDeepLinks = deepLinks @@ -54,14 +55,6 @@ export function updateGlobalNavigation({ }; } return null; - case 'slos': - if (!!capabilities[sloFeatureId]?.read) { - return { - ...link, - visibleIn: ['sideNav', 'globalSearch'], - }; - } - return null; default: return link; } @@ -70,9 +63,6 @@ export function updateGlobalNavigation({ updater$.next(() => ({ deepLinks: updatedDeepLinks, - visibleIn: - someVisible || !!capabilities[sloFeatureId]?.read - ? ['sideNav', 'globalSearch', 'home', 'kibanaOverview'] - : [], + visibleIn: someVisible ? ['sideNav', 'globalSearch', 'home', 'kibanaOverview'] : [], })); } diff --git a/x-pack/plugins/observability_solution/observability_shared/tsconfig.json b/x-pack/plugins/observability_solution/observability_shared/tsconfig.json index ced2b3bed57fd..3e62cf75a4d07 100644 --- a/x-pack/plugins/observability_solution/observability_shared/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_shared/tsconfig.json @@ -41,6 +41,7 @@ "@kbn/management-settings-types", "@kbn/management-settings-utilities", "@kbn/core-chrome-browser", + "@kbn/rule-data-utils", ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/observability_solution/slo/.storybook/jest_setup.js b/x-pack/plugins/observability_solution/slo/.storybook/jest_setup.js new file mode 100644 index 0000000000000..32071b8aa3f62 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/.storybook/jest_setup.js @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { setGlobalConfig } from '@storybook/testing-react'; +import * as globalStorybookConfig from './preview'; + +setGlobalConfig(globalStorybookConfig); diff --git a/x-pack/plugins/observability_solution/slo/.storybook/main.js b/x-pack/plugins/observability_solution/slo/.storybook/main.js new file mode 100644 index 0000000000000..86b48c32f103e --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/.storybook/main.js @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = require('@kbn/storybook').defaultConfig; diff --git a/x-pack/plugins/observability_solution/slo/.storybook/preview.js b/x-pack/plugins/observability_solution/slo/.storybook/preview.js new file mode 100644 index 0000000000000..3200746243d47 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/.storybook/preview.js @@ -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. + */ + +import { EuiThemeProviderDecorator } from '@kbn/kibana-react-plugin/common'; + +export const decorators = [EuiThemeProviderDecorator]; diff --git a/x-pack/plugins/observability_solution/slo/README.md b/x-pack/plugins/observability_solution/slo/README.md new file mode 100755 index 0000000000000..f577b2da35ec9 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/README.md @@ -0,0 +1,22 @@ +# slos + +A Kibana plugin + +--- + +## Development + +See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions setting up your development environment. + +## Scripts + +
+
yarn kbn bootstrap
+
Execute this to install node_modules and setup the dependencies in your plugin and in Kibana
+ +
yarn plugin-helpers build
+
Execute this to create a distributable version of this plugin that can be installed in Kibana
+ +
yarn plugin-helpers dev --watch
+
Execute this to build your plugin ui browser side so Kibana could pick up when started in development
+
diff --git a/x-pack/plugins/observability_solution/observability/common/slo/constants.ts b/x-pack/plugins/observability_solution/slo/common/constants.ts similarity index 68% rename from x-pack/plugins/observability_solution/observability/common/slo/constants.ts rename to x-pack/plugins/observability_solution/slo/common/constants.ts index f98586bf0aea7..31c7be796d7a5 100644 --- a/x-pack/plugins/observability_solution/observability/common/slo/constants.ts +++ b/x-pack/plugins/observability_solution/slo/common/constants.ts @@ -5,6 +5,42 @@ * 2.0. */ +import { i18n } from '@kbn/i18n'; + +export const INVALID_EQUATION_REGEX = /[^A-Z|+|\-|\s|\d+|\.|\(|\)|\/|\*|>|<|=|\?|\:|&|\!|\|]+/g; + +export const ALERT_ACTION_ID = 'slo.burnRate.alert'; +export const ALERT_ACTION = { + id: ALERT_ACTION_ID, + name: i18n.translate('xpack.slo.alerting.burnRate.alertAction', { + defaultMessage: 'Critical', + }), +}; + +export const HIGH_PRIORITY_ACTION_ID = 'slo.burnRate.high'; +export const HIGH_PRIORITY_ACTION = { + id: HIGH_PRIORITY_ACTION_ID, + name: i18n.translate('xpack.slo.alerting.burnRate.highPriorityAction', { + defaultMessage: 'High', + }), +}; + +export const MEDIUM_PRIORITY_ACTION_ID = 'slo.burnRate.medium'; +export const MEDIUM_PRIORITY_ACTION = { + id: MEDIUM_PRIORITY_ACTION_ID, + name: i18n.translate('xpack.slo.alerting.burnRate.mediumPriorityAction', { + defaultMessage: 'Medium', + }), +}; + +export const LOW_PRIORITY_ACTION_ID = 'slo.burnRate.low'; +export const LOW_PRIORITY_ACTION = { + id: LOW_PRIORITY_ACTION_ID, + name: i18n.translate('xpack.slo.alerting.burnRate.lowPriorityAction', { + defaultMessage: 'Low', + }), +}; + export const SLO_MODEL_VERSION = 2; export const SLO_RESOURCES_VERSION = 3; diff --git a/x-pack/plugins/observability_solution/observability/common/field_names/slo.ts b/x-pack/plugins/observability_solution/slo/common/field_names/slo.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/common/field_names/slo.ts rename to x-pack/plugins/observability_solution/slo/common/field_names/slo.ts diff --git a/x-pack/plugins/observability_solution/slo/common/i18n.ts b/x-pack/plugins/observability_solution/slo/common/i18n.ts new file mode 100644 index 0000000000000..2b5f2a782bb3b --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/common/i18n.ts @@ -0,0 +1,12 @@ +/* + * 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'; + +export const NOT_AVAILABLE_LABEL = i18n.translate('xpack.slo.notAvailable', { + defaultMessage: 'N/A', +}); diff --git a/x-pack/plugins/observability_solution/slo/common/index.ts b/x-pack/plugins/observability_solution/slo/common/index.ts new file mode 100644 index 0000000000000..a280f7eaedd90 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/common/index.ts @@ -0,0 +1,12 @@ +/* + * 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 sloAppId = 'slo'; +export const PLUGIN_NAME = 'SLOs'; + +import { paths } from './locators/paths'; +export const sloPaths = paths; diff --git a/x-pack/plugins/observability_solution/slo/common/locators/paths.ts b/x-pack/plugins/observability_solution/slo/common/locators/paths.ts new file mode 100644 index 0000000000000..420688da09201 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/common/locators/paths.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export const SLOS_BASE_PATH = '/app/slos'; +export const SLO_PREFIX = '/slos'; +export const SLOS_PATH = '/' as const; +export const SLOS_WELCOME_PATH = '/welcome' as const; +export const SLO_DETAIL_PATH = '/:sloId' as const; +export const SLO_CREATE_PATH = '/create' as const; +export const SLO_EDIT_PATH = '/edit/:sloId' as const; +export const SLOS_OUTDATED_DEFINITIONS_PATH = '/outdated-definitions' as const; + +export const paths = { + slos: `${SLOS_BASE_PATH}${SLOS_PATH}`, + slosWelcome: `${SLOS_BASE_PATH}${SLOS_WELCOME_PATH}`, + slosOutdatedDefinitions: `${SLOS_BASE_PATH}${SLOS_OUTDATED_DEFINITIONS_PATH}`, + sloCreate: `${SLOS_BASE_PATH}${SLO_CREATE_PATH}`, + sloCreateWithEncodedForm: (encodedParams: string) => + `${SLOS_BASE_PATH}${SLO_CREATE_PATH}?_a=${encodedParams}`, + sloEdit: (sloId: string) => `${SLOS_BASE_PATH}${SLOS_PATH}/edit/${encodeURIComponent(sloId)}`, + sloEditWithEncodedForm: (sloId: string, encodedParams: string) => + `${SLOS_BASE_PATH}${SLOS_PATH}/edit/${encodeURIComponent(sloId)}?_a=${encodedParams}`, + sloDetails: (sloId: string, instanceId?: string) => + !!instanceId + ? `${SLOS_BASE_PATH}${SLOS_PATH}/${encodeURIComponent(sloId)}?instanceId=${encodeURIComponent( + instanceId + )}` + : `${SLOS_BASE_PATH}${SLOS_PATH}/${encodeURIComponent(sloId)}`, +}; diff --git a/x-pack/plugins/observability_solution/observability/dev_docs/slo.md b/x-pack/plugins/observability_solution/slo/dev_docs/slo.md similarity index 100% rename from x-pack/plugins/observability_solution/observability/dev_docs/slo.md rename to x-pack/plugins/observability_solution/slo/dev_docs/slo.md diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/README.md b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/README.md similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/README.md rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/README.md diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/bundled.json b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.json similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/bundled.json rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.json diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/bundled.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/bundled.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/README.md b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/README.md similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/README.md rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/README.md diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/headers/kbn_xsrf.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/headers/kbn_xsrf.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/headers/kbn_xsrf.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/headers/kbn_xsrf.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/parameters/slo_id.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/parameters/slo_id.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/parameters/slo_id.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/parameters/slo_id.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/parameters/space_id.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/parameters/space_id.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/parameters/space_id.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/parameters/space_id.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/400_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/400_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/400_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/400_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/401_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/401_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/401_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/401_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/403_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/403_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/403_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/403_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/404_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/404_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/404_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/404_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/409_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/409_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/409_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/409_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/budgeting_method.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/budgeting_method.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/budgeting_method.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/budgeting_method.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/create_slo_request.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/create_slo_request.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/create_slo_request.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/create_slo_request.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/create_slo_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/create_slo_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/create_slo_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/create_slo_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/delete_slo_instances_request.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/delete_slo_instances_request.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/delete_slo_instances_request.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/delete_slo_instances_request.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/error_budget.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/error_budget.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/error_budget.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/error_budget.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/filter.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/filter.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/filter.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/filter.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/filter_meta.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/filter_meta.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/filter_meta.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/filter_meta.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/find_slo_definitions_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/find_slo_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/find_slo_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/find_slo_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/find_slo_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/historical_summary_request.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/historical_summary_request.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/historical_summary_request.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/historical_summary_request.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/historical_summary_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/historical_summary_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/historical_summary_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/historical_summary_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_apm_availability.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_apm_availability.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_apm_availability.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_apm_availability.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_apm_latency.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_apm_latency.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_apm_latency.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_apm_latency.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_custom_kql.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_custom_kql.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_custom_kql.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_custom_kql.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_custom_metric.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_custom_metric.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_custom_metric.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_custom_metric.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_histogram.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_histogram.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_histogram.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_histogram.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_timeslice_metric.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_timeslice_metric.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/indicator_properties_timeslice_metric.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/indicator_properties_timeslice_metric.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/kql_with_filters.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/kql_with_filters.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/kql_with_filters.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/kql_with_filters.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/objective.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/objective.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/objective.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/objective.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/settings.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/settings.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/settings.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/settings.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/slo_definition_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/slo_definition_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/slo_definition_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/slo_definition_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/slo_with_summary_response.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/summary.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/summary.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/summary.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/summary.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/summary_status.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/summary_status.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/summary_status.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/summary_status.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/time_window.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/time_window.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/time_window.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/time_window.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/timeslice_metric_basic_metric_with_field.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/timeslice_metric_basic_metric_with_field.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/timeslice_metric_basic_metric_with_field.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/timeslice_metric_basic_metric_with_field.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/timeslice_metric_doc_count_metric.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/timeslice_metric_doc_count_metric.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/timeslice_metric_doc_count_metric.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/timeslice_metric_doc_count_metric.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/timeslice_metric_percentile_metric.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/timeslice_metric_percentile_metric.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/timeslice_metric_percentile_metric.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/timeslice_metric_percentile_metric.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/update_slo_request.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/update_slo_request.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/components/schemas/update_slo_request.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/components/schemas/update_slo_request.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/entrypoint.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/entrypoint.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/entrypoint.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/entrypoint.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/makefile b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/makefile similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/makefile rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/makefile diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/README.md b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/README.md similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/README.md rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/README.md diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@_definitions.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_delete_instances.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@_delete_instances.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_delete_instances.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@_delete_instances.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_historical_summary.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@_historical_summary.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@_historical_summary.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@_historical_summary.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@_reset.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@disable.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@disable.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@disable.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@disable.yaml diff --git a/x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@enable.yaml b/x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@enable.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@enable.yaml rename to x-pack/plugins/observability_solution/slo/docs/openapi/slo/paths/s@{spaceid}@api@slos@{sloid}@enable.yaml diff --git a/x-pack/plugins/observability_solution/slo/jest.config.js b/x-pack/plugins/observability_solution/slo/jest.config.js new file mode 100644 index 0000000000000..fa7ff9c84deca --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/jest.config.js @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../../..', + roots: ['/x-pack/plugins/observability_solution/slo'], + setupFiles: ['/x-pack/plugins/observability_solution/slo/.storybook/jest_setup.js'], + coverageDirectory: + '/target/kibana-coverage/jest/x-pack/plugins/observability_solution/slo', + coverageReporters: ['text', 'html'], + collectCoverageFrom: [ + '/x-pack/plugins/observability_solution/slo/{common,public,server}/**/*.{js,ts,tsx}', + ], +}; diff --git a/x-pack/plugins/observability_solution/slo/kibana.jsonc b/x-pack/plugins/observability_solution/slo/kibana.jsonc new file mode 100644 index 0000000000000..a36cdae8cf897 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/kibana.jsonc @@ -0,0 +1,54 @@ +{ + "type": "plugin", + "id": "@kbn/slo-plugin", + "owner": "@elastic/obs-ux-management-team", + "plugin": { + "id": "slo", + "server": true, + "browser": true, + "configPath": [ + "xpack", + "slo" + ], + "requiredPlugins": [ + "alerting", + "cases", + "charts", + "contentManagement", + "controls", + "data", + "dataViews", + "lens", + "dataViewEditor", + "fieldFormats", + "observability", + "observabilityShared", + "ruleRegistry", + "security", + "taskManager", + "triggersActionsUi", + "share", + "unifiedSearch", + "uiActions", + "embeddable", + "presentationUtil", + "features", + "licensing", + "observabilityAIAssistant", + "usageCollection", + ], + "optionalPlugins": [ + "cloud", + "spaces", + "serverless", + "discover" + ], + "requiredBundles": [ + "kibanaReact", + "kibanaUtils", + "unifiedSearch", + "embeddable", + "ingestPipelines" + ] + } +} diff --git a/x-pack/plugins/observability_solution/slo/public/application.tsx b/x-pack/plugins/observability_solution/slo/public/application.tsx new file mode 100644 index 0000000000000..2e2d01f83409d --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/application.tsx @@ -0,0 +1,137 @@ +/* + * 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 ReactDOM from 'react-dom'; +import { EuiErrorBoundary } from '@elastic/eui'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; +import { AppMountParameters, APP_WRAPPER_CLASS, CoreStart } from '@kbn/core/public'; +import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { Router, Routes, Route } from '@kbn/shared-ux-router'; +import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; +import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public'; + +import { PluginContext } from './context/plugin_context'; + +import { SloPublicPluginsStart } from './types'; +import { routes } from './routes/routes'; + +function App() { + return ( + <> + + {Object.keys(routes).map((key) => { + const path = key as keyof typeof routes; + const { handler, exact } = routes[path]; + const Wrapper = () => { + return handler(); + }; + return ; + })} + + + ); +} + +export const renderApp = ({ + core, + plugins, + appMountParameters, + ObservabilityPageTemplate, + usageCollection, + isDev, + kibanaVersion, + isServerless, + observabilityRuleTypeRegistry, +}: { + core: CoreStart; + plugins: SloPublicPluginsStart; + appMountParameters: AppMountParameters; + observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry; + ObservabilityPageTemplate: React.ComponentType; + usageCollection: UsageCollectionSetup; + isDev?: boolean; + kibanaVersion: string; + isServerless?: boolean; +}) => { + const { element, history, theme$ } = appMountParameters; + const i18nCore = core.i18n; + const isDarkMode = core.theme.getTheme().darkMode; + + // ensure all divs are .kbnAppWrappers + element.classList.add(APP_WRAPPER_CLASS); + + const queryClient = new QueryClient(); + + const ApplicationUsageTrackingProvider = + usageCollection?.components.ApplicationUsageTrackingProvider ?? React.Fragment; + const CloudProvider = plugins.cloud?.CloudContextProvider ?? React.Fragment; + + const PresentationContextProvider = plugins.presentationUtil?.ContextProvider ?? React.Fragment; + + ReactDOM.render( + + + + + + + + + + + + + + + + + + + + + + + + + , + element + ); + + return () => { + // This needs to be present to fix https://github.com/elastic/kibana/issues/155704 + // as the Overview page renders the UX Section component. That component renders a Lens embeddable + // via the ExploratoryView app, which uses search sessions. Therefore on unmounting we need to clear + // these sessions. + plugins.data.search.session.clear(); + ReactDOM.unmountComponentAtNode(element); + }; +}; diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/alert_time_table.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/alert_time_table.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/alert_time_table.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/alert_time_table.tsx index 9a12f79b6c1b7..b2c582fc019ca 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/alert_time_table.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/alert_time_table.tsx @@ -24,12 +24,12 @@ function formatTime(minutes: number) { if (minutes > 59) { const mins = minutes % 60; const hours = (minutes - mins) / 60; - return i18n.translate('xpack.observability.slo.rules.timeTable.minuteHoursLabel', { + return i18n.translate('xpack.slo.rules.timeTable.minuteHoursLabel', { defaultMessage: '{hours}h {mins}m', values: { hours, mins }, }); } - return i18n.translate('xpack.observability.slo.rules.timeTable.minuteLabel', { + return i18n.translate('xpack.slo.rules.timeTable.minuteLabel', { defaultMessage: '{minutes}m', values: { minutes }, }); @@ -55,7 +55,7 @@ export function AlertTimeTable({ windows, slo }: AlertTimeTableProps) { const columns = [ { field: 'rate', - name: i18n.translate('xpack.observability.slo.rules.timeTable.rateColumnLabel', { + name: i18n.translate('xpack.slo.rules.timeTable.rateColumnLabel', { defaultMessage: 'Error rate', }), render: (rate: number) => numeral(rate).format('0%'), @@ -73,7 +73,7 @@ export function AlertTimeTable({ windows, slo }: AlertTimeTableProps) { <>
- {i18n.translate('xpack.observability.slo.rules.timeTable.title', { + {i18n.translate('xpack.slo.rules.timeTable.title', { defaultMessage: 'How long will it take for the alert to fire?', })}
@@ -81,7 +81,7 @@ export function AlertTimeTable({ windows, slo }: AlertTimeTableProps) {

- {i18n.translate('xpack.observability.slo.rules.timeTable.description', { + {i18n.translate('xpack.slo.rules.timeTable.description', { defaultMessage: 'The table below lists the error rates and approximately how long it would take to receive your first alert with the current configuration.', })} @@ -89,7 +89,7 @@ export function AlertTimeTable({ windows, slo }: AlertTimeTableProps) { - tableCaption={i18n.translate('xpack.observability.slo.rules.tableCaption', { + tableCaption={i18n.translate('xpack.slo.rules.tableCaption', { defaultMessage: 'Alerting time table', })} items={rows} diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/budget_consumed.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/budget_consumed.tsx index 005cefec1e30f..ef0126a2e7686 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/budget_consumed.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/budget_consumed.tsx @@ -41,12 +41,12 @@ export function BudgetConsumed({ - {i18n.translate('xpack.observability.slo.rules.budgetConsumed.rowLabel', { + {i18n.translate('xpack.slo.rules.budgetConsumed.rowLabel', { defaultMessage: '% Budget consumed', })}{' '} diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/burn_rate.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/burn_rate.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/burn_rate.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/burn_rate.tsx index 1e76ddec456e2..91ce6491911e0 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/burn_rate.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/burn_rate.tsx @@ -31,12 +31,12 @@ export function BurnRate({ onChange, initialBurnRate = 1, maxBurnRate, errors }: - {i18n.translate('xpack.observability.slo.rules.burnRate.rowLabel', { + {i18n.translate('xpack.slo.rules.burnRate.rowLabel', { defaultMessage: 'Burn rate threshold', })}{' '}

- {i18n.translate('xpack.observability.burnRateRuleEditor.h5.chooseASLOToMonitorLabel', { + {i18n.translate('xpack.slo.burnRateRuleEditor.h5.chooseASLOToMonitorLabel', { defaultMessage: 'Choose a SLO to monitor', })}
@@ -74,7 +74,7 @@ export function BurnRateRuleEditor(props: Props) { ( <> - {i18n.translate('xpack.observability.slo.rules.longWindow.rowLabel', { + {i18n.translate('xpack.slo.rules.longWindow.rowLabel', { defaultMessage: 'Lookback (hours)', })}{' '} @@ -62,7 +62,7 @@ const getRowLabel = (shortWindowDuration: Duration) => ( ); const getTooltipText = (shortWindowDuration: Duration) => - i18n.translate('xpack.observability.slo.rules.longWindowDuration.tooltip', { + i18n.translate('xpack.slo.rules.longWindowDuration.tooltip', { defaultMessage: 'Lookback period over which the burn rate is computed. A shorter lookback period of {shortWindowDuration} minutes (1/12 the lookback period) will be used for faster recovery', values: { shortWindowDuration: toMinutes(shortWindowDuration) }, diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.stories.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.stories.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.stories.tsx index f0f3a4cf44733..b69861b45103b 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { SLOResponse } from '@kbn/slo-schema'; -import { KibanaReactStorybookDecorator } from '../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloSelector as Component } from './slo_selector'; export default { @@ -19,6 +19,7 @@ export default { }; const Template: ComponentStory = () => ( + // eslint-disable-next-line no-console console.log(slo)} /> ); const defaultProps = {}; diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.test.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.test.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.test.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.test.tsx index ce401e7e0f1c2..e3dc1fb24bda2 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.test.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.test.tsx @@ -11,11 +11,11 @@ import { wait } from '@testing-library/user-event/dist/utils'; import React from 'react'; import { emptySloList } from '../../data/slo/slo'; -import { useFetchSloDefinitions } from '../../hooks/slo/use_fetch_slo_definitions'; +import { useFetchSloDefinitions } from '../../hooks/use_fetch_slo_definitions'; import { render } from '../../utils/test_helper'; import { SloSelector } from './slo_selector'; -jest.mock('../../hooks/slo/use_fetch_slo_definitions'); +jest.mock('../../hooks/use_fetch_slo_definitions'); const useFetchSloDefinitionsMock = useFetchSloDefinitions as jest.Mock; diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.tsx index 6e35ce265bad5..b860502dc57a9 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/slo_selector.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/slo_selector.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import { SLOResponse } from '@kbn/slo-schema'; import { debounce } from 'lodash'; import React, { useEffect, useMemo, useState } from 'react'; -import { useFetchSloDefinitions } from '../../hooks/slo/use_fetch_slo_definitions'; +import { useFetchSloDefinitions } from '../../hooks/use_fetch_slo_definitions'; interface Props { initialSlo?: SLOResponse; @@ -54,10 +54,10 @@ function SloSelector({ initialSlo, onSelected, errors }: Props) { error={hasError ? errors[0] : undefined} > { return unit === 'h' && value >= MIN_DURATION_IN_HOURS && value <= MAX_DURATION_IN_HOURS; }; -const SLO_REQUIRED = i18n.translate('xpack.observability.slo.rules.burnRate.errors.sloRequired', { +const SLO_REQUIRED = i18n.translate('xpack.slo.rules.burnRate.errors.sloRequired', { defaultMessage: 'SLO is required.', }); const LONG_WINDOW_DURATION_REQUIRED = i18n.translate( - 'xpack.observability.slo.rules.burnRate.errors.windowDurationRequired', + 'xpack.slo.rules.burnRate.errors.windowDurationRequired', { defaultMessage: 'The lookback period is required.' } ); -const LONG_WINDOW_DURATION_INVALID = i18n.translate( - 'xpack.observability.slo.rules.longWindow.errorText', - { - defaultMessage: 'The lookback period must be between 1 and 72 hours.', - } -); +const LONG_WINDOW_DURATION_INVALID = i18n.translate('xpack.slo.rules.longWindow.errorText', { + defaultMessage: 'The lookback period must be between 1 and 72 hours.', +}); const BURN_RATE_THRESHOLD_REQUIRED = i18n.translate( - 'xpack.observability.slo.rules.burnRate.errors.burnRateThresholdRequired', + 'xpack.slo.rules.burnRate.errors.burnRateThresholdRequired', { defaultMessage: 'Burn rate threshold is required.' } ); const getInvalidThresholdValueError = (maxBurnRate: number) => - i18n.translate('xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue', { + i18n.translate('xpack.slo.rules.burnRate.errors.invalidThresholdValue', { defaultMessage: 'Burn rate threshold must be between 0.01 and {maxBurnRate}.', values: { maxBurnRate }, }); diff --git a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/windows.tsx b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/windows.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/windows.tsx rename to x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/windows.tsx index 69e05a4537d75..ab01fee1b97ee 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/burn_rate_rule_editor/windows.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/burn_rate_rule_editor/windows.tsx @@ -167,7 +167,7 @@ function Window({ )} @@ -176,7 +176,7 @@ function Window({ options={ACTION_GROUP_OPTIONS} value={actionGroup} onChange={onActionGroupChange} - aria-label={i18n.translate('xpack.observability.slo.rules.actionGroupSelectorLabel', { + aria-label={i18n.translate('xpack.slo.rules.actionGroupSelectorLabel', { defaultMessage: 'Action Group', })} /> @@ -190,10 +190,10 @@ function Window({ style={{ marginBottom: '-1em' }} onClick={() => onDelete(id)} disabled={disableDelete} - title={i18n.translate('xpack.observability.slo.rules.deleteWindowLabel', { + title={i18n.translate('xpack.slo.rules.deleteWindowLabel', { defaultMessage: 'Delete window', })} - aria-label={i18n.translate('xpack.observability.slo.rules.deleteWindowLabel', { + aria-label={i18n.translate('xpack.slo.rules.deleteWindowLabel', { defaultMessage: 'Delete window', })} /> @@ -229,7 +229,7 @@ const getErrorBudgetExhaustionText = ( budgetMode = false ) => budgetMode - ? i18n.translate('xpack.observability.slo.rules.errorBudgetExhaustion.budgetMode.text', { + ? i18n.translate('xpack.slo.rules.errorBudgetExhaustion.budgetMode.text', { defaultMessage: '{formatedHours} hours until error budget exhaustion. The burn rate threshold is {burnRateThreshold}x.', values: { @@ -237,7 +237,7 @@ const getErrorBudgetExhaustionText = ( burnRateThreshold: numeral(burnRateThreshold).format('0[.0]'), }, }) - : i18n.translate('xpack.observability.slo.rules.errorBudgetExhaustion.burnRateMode.text', { + : i18n.translate('xpack.slo.rules.errorBudgetExhaustion.burnRateMode.text', { defaultMessage: '{formatedHours} hours until error budget exhaustion. {budgetConsumed} budget consumed before first alert.', values: { @@ -245,7 +245,6 @@ const getErrorBudgetExhaustionText = ( budgetConsumed: numeral(budgetConsumed).format('0.00%'), }, }); - export const createNewWindow = ( slo?: SLOResponse | CreateSLOInput, partialWindow: Partial = {} @@ -292,7 +291,7 @@ export function Windows({ slo, windows, errors, onChange, totalNumberOfWindows } <>
- {i18n.translate('xpack.observability.burnRateRuleEditor.h5.defineMultipleBurnRateLabel', { + {i18n.translate('xpack.slo.burnRateRuleEditor.h5.defineMultipleBurnRateLabel', { defaultMessage: 'Define multiple burn rate windows', })}
@@ -325,14 +324,11 @@ export function Windows({ slo, windows, errors, onChange, totalNumberOfWindows } iconType={'plusInCircleFilled'} onClick={handleAddWindow} isDisabled={windows.length === (totalNumberOfWindows || 4)} - aria-label={i18n.translate('xpack.observability.slo.rules.addWindowAriaLabel', { + aria-label={i18n.translate('xpack.slo.rules.addWindowAriaLabel', { defaultMessage: 'Add window', })} > - +
@@ -340,7 +336,7 @@ export function Windows({ slo, windows, errors, onChange, totalNumberOfWindows } compressed onChange={handleModeChange} checked={!budgetMode} - label={i18n.translate('xpack.observability.slo.rules.useBurnRateModeLabel', { + label={i18n.translate('xpack.slo.rules.useBurnRateModeLabel', { defaultMessage: 'Burn rate mode', })} /> diff --git a/x-pack/plugins/observability_solution/slo/public/components/header_menu/header_menu.tsx b/x-pack/plugins/observability_solution/slo/public/components/header_menu/header_menu.tsx new file mode 100644 index 0000000000000..2b76afab609e1 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/components/header_menu/header_menu.tsx @@ -0,0 +1,42 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { EuiFlexGroup, EuiFlexItem, EuiHeaderLink, EuiHeaderLinks } from '@elastic/eui'; +import { HeaderMenuPortal } from '@kbn/observability-shared-plugin/public'; +import { useKibana } from '../../utils/kibana_react'; +import { usePluginContext } from '../../hooks/use_plugin_context'; + +export function HeaderMenu(): React.ReactElement | null { + const { http, theme } = useKibana().services; + + const { appMountParameters } = usePluginContext(); + + return ( + + + + + + {i18n.translate('xpack.slo.headerMenu.addData', { + defaultMessage: 'Add integrations', + })} + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/auto_refresh_button.stories.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/auto_refresh_button.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/auto_refresh_button.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/auto_refresh_button.stories.tsx index 5a5b94401253e..e892ebe5d2090 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/auto_refresh_button.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/auto_refresh_button.stories.tsx @@ -8,7 +8,7 @@ import React, { useState } from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { AutoRefreshButton as Component } from './auto_refresh_button'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/auto_refresh_button.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/auto_refresh_button.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/auto_refresh_button.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/auto_refresh_button.tsx index c19c3d19e54d9..bb766f2ad4230 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/auto_refresh_button.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/auto_refresh_button.tsx @@ -23,7 +23,7 @@ export function AutoRefreshButton({ disabled, isAutoRefreshing, onClick }: Props iconType="pause" onClick={onClick} > - {i18n.translate('xpack.observability.slosPage.stopRefreshingButtonLabel', { + {i18n.translate('xpack.slo.slosPage.stopRefreshingButtonLabel', { defaultMessage: 'Stop refreshing', })} @@ -35,7 +35,7 @@ export function AutoRefreshButton({ disabled, isAutoRefreshing, onClick }: Props iconType="play" onClick={onClick} > - {i18n.translate('xpack.observability.slosPage.autoRefreshButtonLabel', { + {i18n.translate('xpack.slo.slosPage.autoRefreshButtonLabel', { defaultMessage: 'Auto-refresh', })} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/hooks/use_auto_refresh_storage.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/hooks/use_auto_refresh_storage.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/hooks/use_auto_refresh_storage.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/hooks/use_auto_refresh_storage.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/index.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/index.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/auto_refresh_button/index.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/auto_refresh_button/index.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/alert_details_app_section.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/alert_details_app_section.tsx similarity index 78% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/alert_details_app_section.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/alert_details_app_section.tsx index 26512aef807d5..8646f38fe83d6 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/alert_details_app_section.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/alert_details_app_section.tsx @@ -9,11 +9,10 @@ import { EuiFlexGroup, EuiLink } from '@elastic/eui'; import { Rule } from '@kbn/alerting-plugin/common'; import { i18n } from '@kbn/i18n'; import React, { useEffect } from 'react'; -import { useFetchSloDetails } from '../../../../hooks/slo/use_fetch_slo_details'; -import { AlertSummaryField } from '../../../../pages/alert_details/components/alert_summary'; -import { TopAlert } from '../../../../typings/alerts'; -import { BurnRateRuleParams } from '../../../../typings/slo'; +import { AlertSummaryField, TopAlert } from '@kbn/observability-plugin/public'; import { useKibana } from '../../../../utils/kibana_react'; +import { useFetchSloDetails } from '../../../../hooks/use_fetch_slo_details'; +import { BurnRateRuleParams } from '../../../../typings/slo'; import { AlertsHistoryPanel } from './components/alerts_history/alerts_history_panel'; import { ErrorRatePanel } from './components/error_rate/error_rate_panel'; @@ -48,12 +47,9 @@ export default function AlertDetailsAppSection({ useEffect(() => { setAlertSummaryFields([ { - label: i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.summaryField.slo', - { - defaultMessage: 'Source SLO', - } - ), + label: i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.summaryField.slo', { + defaultMessage: 'Source SLO', + }), value: ( {slo?.name ?? '-'} @@ -61,12 +57,9 @@ export default function AlertDetailsAppSection({ ), }, { - label: i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.summaryField.rule', - { - defaultMessage: 'Rule', - } - ), + label: i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.summaryField.rule', { + defaultMessage: 'Rule', + }), value: ( {rule.name} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/components/alerts_history/alerts_history_panel.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/alerts_history/alerts_history_panel.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/components/alerts_history/alerts_history_panel.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/alerts_history/alerts_history_panel.tsx index 47320da6cce5a..7232fa860791c 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/components/alerts_history/alerts_history_panel.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/alerts_history/alerts_history_panel.tsx @@ -26,9 +26,9 @@ import { ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; import { GetSLOResponse } from '@kbn/slo-schema'; import moment from 'moment'; import React from 'react'; -import { convertTo } from '../../../../../../../common/utils/formatters'; -import { WindowSchema } from '../../../../../../typings'; +import { convertTo } from '@kbn/observability-plugin/public'; import { useKibana } from '../../../../../../utils/kibana_react'; +import { WindowSchema } from '../../../../../../typings'; import { ErrorRateChart } from '../../../../error_rate_chart'; import { BurnRateAlert, BurnRateRule } from '../../alert_details_app_section'; import { getActionGroupFromReason } from '../../utils/alert'; @@ -85,7 +85,7 @@ export function AlertsHistoryPanel({ rule, slo, alert, isLoading }: Props) {

{i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.alertsHistory.title', + 'xpack.slo.burnRateRule.alertDetailsAppSection.alertsHistory.title', { defaultMessage: '{sloName} alerts history', values: { sloName: slo.name } } )}

@@ -95,7 +95,7 @@ export function AlertsHistoryPanel({ rule, slo, alert, isLoading }: Props) { @@ -106,7 +106,7 @@ export function AlertsHistoryPanel({ rule, slo, alert, isLoading }: Props) { {i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.alertsHistory.subtitle', + 'xpack.slo.burnRateRule.alertDetailsAppSection.alertsHistory.subtitle', { defaultMessage: 'Last 30 days', } @@ -138,7 +138,7 @@ export function AlertsHistoryPanel({ rule, slo, alert, isLoading }: Props) { {i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.alertsHistory.triggeredAlertsStatsTitle', + 'xpack.slo.burnRateRule.alertDetailsAppSection.alertsHistory.triggeredAlertsStatsTitle', { defaultMessage: 'Alerts triggered' } )} @@ -171,7 +171,7 @@ export function AlertsHistoryPanel({ rule, slo, alert, isLoading }: Props) { {i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.alertsHistory.avgTimeToRecoverStatsTitle', + 'xpack.slo.burnRateRule.alertDetailsAppSection.alertsHistory.avgTimeToRecoverStatsTitle', { defaultMessage: 'Avg time to recover' } )} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/components/error_rate/error_rate_panel.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/error_rate/error_rate_panel.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/components/error_rate/error_rate_panel.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/error_rate/error_rate_panel.tsx index 59725b64c2401..d8a2808ef5d1e 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/components/error_rate/error_rate_panel.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/components/error_rate/error_rate_panel.tsx @@ -91,10 +91,10 @@ export function ErrorRatePanel({ alert, slo, isLoading }: Props) {

- {i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.burnRate.title', - { defaultMessage: '{sloName} burn rate', values: { sloName: slo.name } } - )} + {i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.burnRate.title', { + defaultMessage: '{sloName} burn rate', + values: { sloName: slo.name }, + })}

@@ -106,7 +106,7 @@ export function ErrorRatePanel({ alert, slo, isLoading }: Props) { >
@@ -130,7 +130,7 @@ export function ErrorRatePanel({ alert, slo, isLoading }: Props) { {i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.burnRate.thresholdBreachedTitle', + 'xpack.slo.burnRateRule.alertDetailsAppSection.burnRate.thresholdBreachedTitle', { defaultMessage: 'Threshold breached' } )} @@ -150,7 +150,7 @@ export function ErrorRatePanel({ alert, slo, isLoading }: Props) { {i18n.translate( - 'xpack.observability.slo.burnRateRule.alertDetailsAppSection.burnRate.tresholdSubtitle', + 'xpack.slo.burnRateRule.alertDetailsAppSection.burnRate.tresholdSubtitle', { defaultMessage: 'Alert when > {threshold}x', values: { diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/utils/alert.ts b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/utils/alert.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/alert_details/utils/alert.ts rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/utils/alert.ts diff --git a/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/utils/last_duration_i18n.ts b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/utils/last_duration_i18n.ts new file mode 100644 index 0000000000000..cda5f292a8a8e --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/alert_details/utils/last_duration_i18n.ts @@ -0,0 +1,52 @@ +/* + * 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 moment from 'moment'; +import { TimeRange } from '../../../error_rate_chart/use_lens_definition'; + +export function getLastDurationInUnit(timeRange: TimeRange): string { + const duration = moment.duration(moment(timeRange.to).diff(timeRange.from)); + const durationInSeconds = duration.asSeconds(); + + const oneMinute = 60; + if (durationInSeconds < oneMinute) { + return i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.lastDurationInSeconds', { + defaultMessage: 'Last {duration} seconds', + values: { + duration: Math.trunc(durationInSeconds), + }, + }); + } + + const twoHours = 2 * 60 * 60; + if (durationInSeconds < twoHours) { + return i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.lastDurationInMinutes', { + defaultMessage: 'Last {duration} minutes', + values: { + duration: Math.trunc(duration.asMinutes()), + }, + }); + } + + const twoDays = 2 * 24 * 60 * 60; + if (durationInSeconds < twoDays) { + return i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.lastDurationInHours', { + defaultMessage: 'Last {duration} hours', + values: { + duration: Math.trunc(duration.asHours()), + }, + }); + } + + return i18n.translate('xpack.slo.burnRateRule.alertDetailsAppSection.lastDurationInDays', { + defaultMessage: 'Last {duration} days', + values: { + duration: Math.trunc(duration.asDays()), + }, + }); +} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rate.test.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rate.test.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rate.test.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rate.test.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rate.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rate.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rate.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rate.tsx index 910818a846a91..3c630263fedb1 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rate.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rate.tsx @@ -24,15 +24,15 @@ type Status = 'NO_DATA' | 'BREACHED' | 'OK'; function getTitleFromStatus(status: Status): string { if (status === 'NO_DATA') - return i18n.translate('xpack.observability.slo.burnRate.noDataStatusTitle', { + return i18n.translate('xpack.slo.burnRate.noDataStatusTitle', { defaultMessage: 'No value', }); if (status === 'BREACHED') - return i18n.translate('xpack.observability.slo.burnRate.breachedStatustTitle', { + return i18n.translate('xpack.slo.burnRate.breachedStatustTitle', { defaultMessage: 'Critical value breached', }); - return i18n.translate('xpack.observability.slo.burnRate.okStatusTitle', { + return i18n.translate('xpack.slo.burnRate.okStatusTitle', { defaultMessage: 'Acceptable value', }); } @@ -43,11 +43,11 @@ function getSubtitleFromStatus( slo: SLOResponse ): string { if (status === 'NO_DATA') - return i18n.translate('xpack.observability.slo.burnRate.noDataStatusSubtitle', { + return i18n.translate('xpack.slo.burnRate.noDataStatusSubtitle', { defaultMessage: 'Waiting for more data.', }); if (status === 'BREACHED') - return i18n.translate('xpack.observability.slo.burnRate.breachedStatustSubtitle', { + return i18n.translate('xpack.slo.burnRate.breachedStatustSubtitle', { defaultMessage: 'At current rate, the error budget will be exhausted in {hour} hours.', values: { hour: numeral( @@ -58,7 +58,7 @@ function getSubtitleFromStatus( }, }); - return i18n.translate('xpack.observability.slo.burnRate.okStatusSubtitle', { + return i18n.translate('xpack.slo.burnRate.okStatusSubtitle', { defaultMessage: 'There is no risk of error budget exhaustion.', }); } @@ -96,7 +96,7 @@ export function BurnRate({ threshold, burnRate, slo, isLoading }: BurnRateParams description={ - {i18n.translate('xpack.observability.slo.burnRate.threshold', { + {i18n.translate('xpack.slo.burnRate.threshold', { defaultMessage: 'Threshold is {threshold}x', values: { threshold: numeral(threshold).format('0.[00]') }, })} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rates.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rates.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rates.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rates.tsx index 7c45954fda0d9..1ab81f668bdbe 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/burn_rate/burn_rates.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/burn_rate/burn_rates.tsx @@ -17,7 +17,7 @@ import { i18n } from '@kbn/i18n'; import { SLOWithSummaryResponse } from '@kbn/slo-schema'; import moment from 'moment'; import React, { useEffect, useState } from 'react'; -import { useFetchSloBurnRates } from '../../../hooks/slo/use_fetch_slo_burn_rates'; +import { useFetchSloBurnRates } from '../../../hooks/use_fetch_slo_burn_rates'; import { ErrorRateChart } from '../error_rate_chart'; import { BurnRate } from './burn_rate'; @@ -76,7 +76,7 @@ export function BurnRates({ slo, isAutoRefreshing, burnRateOptions }: Props) {

- {i18n.translate('xpack.observability.slo.burnRate.title', { + {i18n.translate('xpack.slo.burnRate.title', { defaultMessage: 'Burn rate', })}

@@ -84,16 +84,13 @@ export function BurnRates({ slo, isAutoRefreshing, burnRateOptions }: Props) {
({ id: opt.id, label: opt.label }))} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.stories.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.stories.tsx index 675aba1158010..d004e2131bdeb 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloDeleteConfirmationModal as Component, SloDeleteConfirmationModalProps, diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx similarity index 70% rename from x-pack/plugins/observability_solution/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx index 2c8ae6272d916..d14a36e77f88f 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/delete_confirmation_modal/slo_delete_confirmation_modal.tsx @@ -27,28 +27,26 @@ export function SloDeleteConfirmationModal({ {groupBy !== ALL_VALUE - ? i18n.translate('xpack.observability.slo.deleteConfirmationModal.groupByDisclaimerText', { + ? i18n.translate('xpack.slo.deleteConfirmationModal.groupByDisclaimerText', { defaultMessage: 'This SLO has been generated with a group key on {groupKey}. Deleting this SLO definition will result in all instances being deleted.', values: { groupKey: getGroupKeysProse(slo.groupBy) }, }) - : i18n.translate('xpack.observability.slo.deleteConfirmationModal.descriptionText', { + : i18n.translate('xpack.slo.deleteConfirmationModal.descriptionText', { defaultMessage: "You can't recover this SLO after deleting it.", })} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/error_rate_chart.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/error_rate_chart.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/error_rate_chart.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/error_rate_chart.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/index.ts b/x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/index.ts rename to x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/index.ts diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/use_lens_definition.ts b/x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/use_lens_definition.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/use_lens_definition.ts rename to x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/use_lens_definition.ts index a062f120fa473..1624418a1e986 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/error_rate_chart/use_lens_definition.ts +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/error_rate_chart/use_lens_definition.ts @@ -12,7 +12,7 @@ import { TypedLensByValueInput } from '@kbn/lens-plugin/public'; import { ALL_VALUE, SLOResponse } from '@kbn/slo-schema'; import moment from 'moment'; import { v4 as uuidv4 } from 'uuid'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../common/slo/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../common/constants'; export interface TimeRange { from: Date; @@ -110,7 +110,7 @@ export function useLensDefinition( { type: 'manual', id: uuidv4(), - label: i18n.translate('xpack.observability.slo.errorRateChart.alertLabel', { + label: i18n.translate('xpack.slo.errorRateChart.alertLabel', { defaultMessage: 'Alert', }), key: { @@ -123,12 +123,9 @@ export function useLensDefinition( }, { type: 'manual', - label: i18n.translate( - 'xpack.observability.slo.errorRateChart.activeAlertLabel', - { - defaultMessage: 'Active alert', - } - ), + label: i18n.translate('xpack.slo.errorRateChart.activeAlertLabel', { + defaultMessage: 'Active alert', + }), key: { type: 'range', timestamp: moment(alertTimeRange.from).toISOString(), @@ -151,10 +148,10 @@ export function useLensDefinition( { type: 'manual', id: uuidv4(), - label: i18n.translate( - 'xpack.observability.slo.errorRateChart.alertAnnotationLabel', - { defaultMessage: '{total} alert', values: { total: annotation.total } } - ), + label: i18n.translate('xpack.slo.errorRateChart.alertAnnotationLabel', { + defaultMessage: '{total} alert', + values: { total: annotation.total }, + }), key: { type: 'point_in_time', timestamp: moment(annotation.date).toISOString(), @@ -262,7 +259,7 @@ export function useLensDefinition( customLabel: true, }, '9f69a7b0-34b9-4b76-9ff7-26dc1a06ec14': { - label: i18n.translate('xpack.observability.slo.errorRateChart.errorRateLabel', { + label: i18n.translate('xpack.slo.errorRateChart.errorRateLabel', { defaultMessage: 'Error rate', }), dataType: 'number', @@ -352,7 +349,7 @@ export function useLensDefinition( customLabel: true, }, '9f69a7b0-34b9-4b76-9ff7-26dc1a06ec14': { - label: i18n.translate('xpack.observability.slo.errorRateChart.errorRateLabel', { + label: i18n.translate('xpack.slo.errorRateChart.errorRateLabel', { defaultMessage: 'Error rate', }), dataType: 'number', diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.tsx similarity index 68% rename from x-pack/plugins/observability_solution/observability/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.tsx index 9fabcb61efc96..96d62ddff8d49 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/reset_confirmation_modal/slo_reset_confirmation_modal.tsx @@ -26,22 +26,20 @@ export function SloResetConfirmationModal({ - {i18n.translate('xpack.observability.slo.resetConfirmationModal.descriptionText', { + {i18n.translate('xpack.slo.resetConfirmationModal.descriptionText', { defaultMessage: 'Resetting this SLO will also regenerate the historical data.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_outdated_callout/index.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_outdated_callout/index.tsx similarity index 83% rename from x-pack/plugins/observability_solution/observability/public/components/slo/slo_outdated_callout/index.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/slo_outdated_callout/index.tsx index de09904d0637c..8495c43d677b3 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_outdated_callout/index.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_outdated_callout/index.tsx @@ -8,8 +8,8 @@ import { EuiButton, EuiCallOut, EuiSpacer } from '@elastic/eui'; import React from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { useFetchSloDefinitions } from '../../../hooks/slo/use_fetch_slo_definitions'; import { useKibana } from '../../../utils/kibana_react'; +import { useFetchSloDefinitions } from '../../../hooks/use_fetch_slo_definitions'; import { paths } from '../../../../common/locators/paths'; export function SloOutdatedCallout() { @@ -19,7 +19,7 @@ export function SloOutdatedCallout() { } = useKibana().services; const handleClick = () => { - navigateToUrl(basePath.prepend(paths.observability.slosOutdatedDefinitions)); + navigateToUrl(basePath.prepend(paths.slosOutdatedDefinitions)); }; const { isLoading, data } = useFetchSloDefinitions({ includeOutdatedOnly: true }); @@ -29,7 +29,7 @@ export function SloOutdatedCallout() {

@@ -51,7 +51,7 @@ export function SloOutdatedCallout() { onClick={handleClick} > diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/index.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/index.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/index.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/index.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_active_alerts_badge.stories.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_active_alerts_badge.stories.tsx similarity index 89% rename from x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_active_alerts_badge.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_active_alerts_badge.stories.tsx index c9f07555897c5..487dc17eba66c 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_active_alerts_badge.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_active_alerts_badge.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { EuiFlexGroup } from '@elastic/eui'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloActiveAlertsBadge as Component, Props } from './slo_active_alerts_badge'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_active_alerts_badge.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_active_alerts_badge.tsx similarity index 82% rename from x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_active_alerts_badge.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_active_alerts_badge.tsx index 991f534815f24..75a08174ac60b 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_active_alerts_badge.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_active_alerts_badge.tsx @@ -9,8 +9,7 @@ import { EuiBadge, EuiFlexItem } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { SLOWithSummaryResponse } from '@kbn/slo-schema'; - -import { paths } from '../../../../common/locators/paths'; +import { observabilityPaths } from '@kbn/observability-plugin/common'; import { useKibana } from '../../../utils/kibana_react'; export interface Props { @@ -32,7 +31,7 @@ export function SloActiveAlertsBadge({ slo, activeAlerts, viewMode = 'default' } ); navigateToUrl( `${basePath.prepend( - paths.observability.alerts + observabilityPaths.alerts )}?_a=(kuery:${kuery},rangeFrom:now-15m,rangeTo:now,status:active)` ); } @@ -48,15 +47,14 @@ export function SloActiveAlertsBadge({ slo, activeAlerts, viewMode = 'default' } iconType="warning" color="danger" onClick={handleActiveAlertsClick} - onClickAriaLabel={i18n.translate( - 'xpack.observability.slo.slo.activeAlertsBadge.ariaLabel', - { defaultMessage: 'active alerts badge' } - )} + onClickAriaLabel={i18n.translate('xpack.slo.slo.activeAlertsBadge.ariaLabel', { + defaultMessage: 'active alerts badge', + })} data-test-subj="o11ySloActiveAlertsBadge" > {viewMode !== 'default' ? activeAlerts - : i18n.translate('xpack.observability.slo.slo.activeAlertsBadge.label', { + : i18n.translate('xpack.slo.slo.activeAlertsBadge.label', { defaultMessage: '{count, plural, one {# alert} other {# alerts}}', values: { count: activeAlerts }, })} diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_status_badge.stories.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_status_badge.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_status_badge.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_status_badge.stories.tsx index a7acf522c0b46..e14af67c323ca 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_status_badge.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_status_badge.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { EuiFlexGroup } from '@elastic/eui'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloStatusBadge as Component, SloStatusProps } from './slo_status_badge'; import { buildSlo } from '../../../data/slo/slo'; diff --git a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_status_badge.tsx b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_status_badge.tsx similarity index 79% rename from x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_status_badge.tsx rename to x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_status_badge.tsx index 6d39133d25776..df38bdace3360 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/slo/slo_status_badge/slo_status_badge.tsx +++ b/x-pack/plugins/observability_solution/slo/public/components/slo/slo_status_badge/slo_status_badge.tsx @@ -21,12 +21,12 @@ export function SloStatusBadge({ slo }: SloStatusProps) { {slo.summary.status === 'NO_DATA' && ( - {i18n.translate('xpack.observability.slo.sloStatusBadge.noData', { + {i18n.translate('xpack.slo.sloStatusBadge.noData', { defaultMessage: 'No data', })} @@ -34,21 +34,21 @@ export function SloStatusBadge({ slo }: SloStatusProps) { )} {slo.summary.status === 'HEALTHY' && ( - {i18n.translate('xpack.observability.slo.sloStatusBadge.healthy', { + {i18n.translate('xpack.slo.sloStatusBadge.healthy', { defaultMessage: 'Healthy', })} )} {slo.summary.status === 'DEGRADING' && ( - {i18n.translate('xpack.observability.slo.sloStatusBadge.degrading', { + {i18n.translate('xpack.slo.sloStatusBadge.degrading', { defaultMessage: 'Degrading', })} )} {slo.summary.status === 'VIOLATED' && ( - {i18n.translate('xpack.observability.slo.sloStatusBadge.violated', { + {i18n.translate('xpack.slo.sloStatusBadge.violated', { defaultMessage: 'Violated', })} @@ -60,7 +60,7 @@ export function SloStatusBadge({ slo }: SloStatusProps) { {/* Prevent badges from growing when inside an EuiFlexGroup by wrapping content with div */}

- {i18n.translate('xpack.observability.slo.sloStatusBadge.forecasted', { + {i18n.translate('xpack.slo.sloStatusBadge.forecasted', { defaultMessage: 'Forecasted', })} diff --git a/x-pack/plugins/observability_solution/slo/public/constants.ts b/x-pack/plugins/observability_solution/slo/public/constants.ts new file mode 100644 index 0000000000000..07b79e5505736 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/constants.ts @@ -0,0 +1,8 @@ +/* + * 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 SLO_LONG_REFETCH_INTERVAL = 60 * 1000; // 1 minute +export const SLO_SHORT_REFETCH_INTERVAL = 5 * 1000; // 5 seconds diff --git a/x-pack/plugins/observability_solution/slo/public/context/plugin_context.tsx b/x-pack/plugins/observability_solution/slo/public/context/plugin_context.tsx new file mode 100644 index 0000000000000..b402a5839111b --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/context/plugin_context.tsx @@ -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 { createContext } from 'react'; +import type { AppMountParameters } from '@kbn/core/public'; +import type { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; +import type { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public'; + +export interface PluginContextValue { + isDev?: boolean; + appMountParameters?: AppMountParameters; + observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry; + ObservabilityPageTemplate: React.ComponentType; +} + +export const PluginContext = createContext({} as PluginContextValue); diff --git a/x-pack/plugins/observability_solution/observability/public/data/slo/common.ts b/x-pack/plugins/observability_solution/slo/public/data/slo/common.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/data/slo/common.ts rename to x-pack/plugins/observability_solution/slo/public/data/slo/common.ts diff --git a/x-pack/plugins/observability_solution/observability/public/data/slo/historical_summary_data.ts b/x-pack/plugins/observability_solution/slo/public/data/slo/historical_summary_data.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/data/slo/historical_summary_data.ts rename to x-pack/plugins/observability_solution/slo/public/data/slo/historical_summary_data.ts diff --git a/x-pack/plugins/observability_solution/observability/public/data/slo/indicator.ts b/x-pack/plugins/observability_solution/slo/public/data/slo/indicator.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/data/slo/indicator.ts rename to x-pack/plugins/observability_solution/slo/public/data/slo/indicator.ts diff --git a/x-pack/plugins/observability_solution/observability/public/data/slo/slo.ts b/x-pack/plugins/observability_solution/slo/public/data/slo/slo.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/data/slo/slo.ts rename to x-pack/plugins/observability_solution/slo/public/data/slo/slo.ts diff --git a/x-pack/plugins/observability_solution/observability/public/data/slo/time_window.ts b/x-pack/plugins/observability_solution/slo/public/data/slo/time_window.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/data/slo/time_window.ts rename to x-pack/plugins/observability_solution/slo/public/data/slo/time_window.ts diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_alerts_summary.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_alerts_summary.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_alerts_summary.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_alerts_summary.tsx index 5d2a11765583b..0e8f8fe2b3dee 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_alerts_summary.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_alerts_summary.tsx @@ -6,11 +6,12 @@ */ import React, { useMemo } from 'react'; import type { TimeRange } from '@kbn/es-query'; +import { useTimeBuckets } from '@kbn/observability-plugin/public'; +import { getAlertSummaryTimeRange } from '@kbn/observability-plugin/public'; +import { calculateTimeRangeBucketSize } from '@kbn/observability-plugin/public'; +import { observabilityAlertFeatureIds } from '@kbn/observability-plugin/common'; import { useSloAlertsQuery } from './slo_alerts_table'; -import { getAlertSummaryTimeRange } from '../../../../utils/alert_summary_widget'; -import { observabilityAlertFeatureIds } from '../../../../../common/constants'; -import { useTimeBuckets } from '../../../../hooks/use_time_buckets'; -import { calculateTimeRangeBucketSize } from '../../../../pages/overview/helpers/calculate_bucket_size'; + import { SloEmbeddableDeps } from '../slo_alerts_embeddable'; import { SloItem } from '../types'; diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_alerts_table.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_alerts_table.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_alerts_table.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_alerts_table.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_included_count.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_included_count.tsx similarity index 80% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_included_count.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_included_count.tsx index a8822ae0e2a2f..be3d358c96889 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/components/slo_included_count.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/components/slo_included_count.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import { useFetchSloList } from '../../../../hooks/slo/use_fetch_slo_list'; +import { useFetchSloList } from '../../../../hooks/use_fetch_slo_list'; import { SloItem } from '../types'; export function SloIncludedCount({ slos }: { slos: SloItem[] }) { @@ -18,12 +18,12 @@ export function SloIncludedCount({ slos }: { slos: SloItem[] }) { return ( { const { overlays } = coreStart; diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/index.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/index.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/index.ts diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx similarity index 98% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx index aba254429c730..c0eb269f35f1d 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_embeddable.tsx @@ -84,7 +84,7 @@ export class SLOAlertsEmbeddable extends AbstractEmbeddable< this.setTitle( this.input.title || - i18n.translate('xpack.observability.sloAlertsEmbeddable.displayTitle', { + i18n.translate('xpack.slo.sloAlertsEmbeddable.displayTitle', { defaultMessage: 'SLO Alerts', }) ); diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts similarity index 84% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts index dcdd632d6edb0..513fc314cd20d 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_embeddable_factory.ts @@ -15,7 +15,7 @@ import { } from '@kbn/embeddable-plugin/public'; import { COMMON_SLO_GROUPING } from '../overview/slo_embeddable_factory'; import { SLO_ALERTS_EMBEDDABLE, SLOAlertsEmbeddable } from './slo_alerts_embeddable'; -import { ObservabilityPublicPluginsStart, ObservabilityPublicStart } from '../../..'; +import { SloPublicPluginsStart, SloPublicStart } from '../../..'; import { SloAlertsEmbeddableInput } from './types'; export type SloAlertsEmbeddableFactory = EmbeddableFactory; @@ -25,10 +25,7 @@ export class SloAlertsEmbeddableFactoryDefinition implements EmbeddableFactoryDe public readonly grouping = COMMON_SLO_GROUPING; constructor( - private getStartServices: CoreSetup< - ObservabilityPublicPluginsStart, - ObservabilityPublicStart - >['getStartServices'], + private getStartServices: CoreSetup['getStartServices'], private kibanaVersion: string ) {} @@ -57,13 +54,13 @@ export class SloAlertsEmbeddableFactoryDefinition implements EmbeddableFactoryDe } public getDescription() { - return i18n.translate('xpack.observability.sloAlertsEmbeddable.description', { + return i18n.translate('xpack.slo.sloAlertsEmbeddable.description', { defaultMessage: 'Get an overview of your SLO alerts', }); } public getDisplayName() { - return i18n.translate('xpack.observability.sloAlertsEmbeddable.displayName', { + return i18n.translate('xpack.slo.sloAlertsEmbeddable.displayName', { defaultMessage: 'SLO Alerts', }); } diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_wrapper.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_wrapper.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_wrapper.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_wrapper.tsx index d6ccf1746c154..413f92418d2cb 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_alerts_wrapper.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_alerts_wrapper.tsx @@ -14,6 +14,7 @@ import { IEmbeddable, EmbeddableOutput } from '@kbn/embeddable-plugin/public'; import { ActionExecutionContext } from '@kbn/ui-actions-plugin/public'; import { Subject } from 'rxjs'; import styled from 'styled-components'; +import { observabilityPaths } from '@kbn/observability-plugin/common'; import { SloIncludedCount } from './components/slo_included_count'; import { SloAlertsSummary } from './components/slo_alerts_summary'; import { SloAlertsTable } from './components/slo_alerts_table'; @@ -21,7 +22,6 @@ import type { SloItem } from './types'; import { SloEmbeddableDeps } from './slo_alerts_embeddable'; import { SloAlertsEmbeddableInput } from './types'; import { EDIT_SLO_ALERTS_ACTION } from '../../../ui_actions/edit_slo_alerts_panel'; -import { paths } from '../../../../common/locators/paths'; interface Props { deps: SloEmbeddableDeps; @@ -95,7 +95,7 @@ export function SloAlertsWrapper({ } }); navigateToUrl( - `${basePath.prepend(paths.observability.alerts)}?_a=(kuery:'${kuery}',rangeFrom:${ + `${basePath.prepend(observabilityPaths.alerts)}?_a=(kuery:'${kuery}',rangeFrom:${ timeRange.from },rangeTo:${timeRange.to})` ); @@ -124,7 +124,7 @@ export function SloAlertsWrapper({ {showAllGroupByInstances ? ( ) : ( - i18n.translate('xpack.observability.sloAlertsWrapper.sLOsIncludedFlexItemLabel', { + i18n.translate('xpack.slo.sloAlertsWrapper.sLOsIncludedFlexItemLabel', { defaultMessage: '{numOfSlos, number} {numOfSlos, plural, one {SLO} other {SLOs}} included', values: { @@ -140,7 +140,7 @@ export function SloAlertsWrapper({ onClick={handleGoToAlertsClick} > diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_configuration.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_configuration.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_configuration.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_configuration.tsx index 5011135d89b5f..39e1707dccca3 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_configuration.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_configuration.tsx @@ -53,9 +53,9 @@ export function SloConfiguration({ initialInput, onCreate, onCancel }: SloConfig > - {i18n.translate('xpack.observability.sloEmbeddable.config.sloSelector.headerTitle', { + {i18n.translate('xpack.slo.sloEmbeddable.config.sloSelector.headerTitle', { defaultMessage: 'SLO configuration', - })} + })}{' '} @@ -85,10 +85,9 @@ export function SloConfiguration({ initialInput, onCreate, onCancel }: SloConfig <> { setShowAllGroupByInstances(e.target.checked); @@ -100,7 +99,7 @@ export function SloConfiguration({ initialInput, onCreate, onCancel }: SloConfig @@ -112,7 +111,7 @@ export function SloConfiguration({ initialInput, onCreate, onCancel }: SloConfig fill > diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_selector.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx similarity index 84% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_selector.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx index 627bf039652c8..65f2c254c60b8 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/alerts/slo_selector.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/alerts/slo_selector.tsx @@ -10,7 +10,7 @@ import { EuiComboBox, EuiComboBoxOptionOption, EuiFormRow } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { debounce } from 'lodash'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; -import { useFetchSloList } from '../../../hooks/slo/use_fetch_slo_list'; +import { useFetchSloList } from '../../../hooks/use_fetch_slo_list'; import { SloItem } from './types'; interface Props { @@ -20,10 +20,9 @@ interface Props { singleSelection?: boolean; } -const SLO_REQUIRED = i18n.translate('xpack.observability.sloEmbeddable.config.errors.sloRequired', { +const SLO_REQUIRED = i18n.translate('xpack.slo.sloEmbeddable.config.errors.sloRequired', { defaultMessage: 'SLO is required.', }); - export function SloSelector({ initialSlos, onSelected, hasError, singleSelection }: Props) { const mapSlosToOptions = (slos: SloItem[] | SLOWithSummaryResponse[] | undefined) => slos?.map((slo) => ({ @@ -71,18 +70,12 @@ export function SloSelector({ initialSlos, onSelected, hasError, singleSelection return (

- {i18n.translate('xpack.observability.sloOverviewDetails.h2.detailsLabel', { + {i18n.translate('xpack.slo.sloOverviewDetails.h2.detailsLabel', { defaultMessage: '{sloName}', values: { sloName: slo.name }, })} @@ -96,7 +96,7 @@ export function SloOverviewDetails({ - {i18n.translate('xpack.observability.sloOverviewDetails.button.closeLabel', { + {i18n.translate('xpack.slo.sloOverviewDetails.button.closeLabel', { defaultMessage: 'Close', })} @@ -110,7 +110,7 @@ export function SloOverviewDetails({ }} data-test-subj="o11ySloOverviewDetailsDetailsButton" > - {i18n.translate('xpack.observability.sloOverviewDetails.button.detailsLabel', { + {i18n.translate('xpack.slo.sloOverviewDetails.button.detailsLabel', { defaultMessage: 'Details', })} diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/constants.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/constants.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/constants.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/constants.ts diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/handle_explicit_input.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/handle_explicit_input.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/handle_explicit_input.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/handle_explicit_input.tsx index 52ddee5ac64f1..786783eb7527b 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/handle_explicit_input.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/handle_explicit_input.tsx @@ -13,11 +13,11 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import type { SloErrorBudgetEmbeddableInput, EmbeddableSloProps } from './types'; -import { ObservabilityPublicPluginsStart } from '../../..'; +import { SloPublicPluginsStart } from '../../..'; import { SloConfiguration } from './slo_configuration'; export async function resolveEmbeddableSloUserInput( coreStart: CoreStart, - pluginStart: ObservabilityPublicPluginsStart, + pluginStart: SloPublicPluginsStart, input?: SloErrorBudgetEmbeddableInput ): Promise { const { overlays } = coreStart; diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/index.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/index.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/index.ts diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_configuration.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_configuration.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_configuration.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_configuration.tsx index 40347d543eced..5cb1eb084593a 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_configuration.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_configuration.tsx @@ -41,7 +41,7 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) - {i18n.translate('xpack.observability.sloEmbeddable.config.sloSelector.headerTitle', { + {i18n.translate('xpack.slo.sloEmbeddable.config.sloSelector.headerTitle', { defaultMessage: 'SLO configuration', })} @@ -65,7 +65,7 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) @@ -77,7 +77,7 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) fill > diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_burn_down.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_burn_down.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_burn_down.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_burn_down.tsx index 340ffd0344695..a7cf47ab4758d 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_burn_down.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_burn_down.tsx @@ -12,8 +12,8 @@ import { EuiFlexGroup, EuiFlexItem, EuiLoadingChart, EuiLink } from '@elastic/eu import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { formatHistoricalData } from '../../../utils/slo/chart_data_formatter'; -import { useFetchHistoricalSummary } from '../../../hooks/slo/use_fetch_historical_summary'; -import { useFetchSloDetails } from '../../../hooks/slo/use_fetch_slo_details'; +import { useFetchHistoricalSummary } from '../../../hooks/use_fetch_historical_summary'; +import { useFetchSloDetails } from '../../../hooks/use_fetch_slo_details'; import { ErrorBudgetChart } from '../../../pages/slo_details/components/error_budget_chart'; import { EmbeddableSloProps } from './types'; @@ -94,7 +94,7 @@ export function SloErrorBudget({ return ( - {i18n.translate('xpack.observability.sloEmbeddable.overview.sloNotFoundText', { + {i18n.translate('xpack.slo.sloEmbeddable.overview.sloNotFoundText', { defaultMessage: 'The SLO has been deleted. You can safely delete the widget from the dashboard.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_embeddable.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_embeddable.tsx similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_embeddable.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_embeddable.tsx index 8e47234492faf..9f1d9f5a9f003 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_embeddable.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_embeddable.tsx @@ -53,7 +53,7 @@ export class SLOErrorBudgetEmbeddable extends AbstractEmbeddable< this.setTitle( this.input.title || - i18n.translate('xpack.observability.sloErrorBudgetEmbeddable.displayTitle', { + i18n.translate('xpack.slo.sloErrorBudgetEmbeddable.displayTitle', { defaultMessage: 'SLO Error Budget burn down', }) ); diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_embeddable_factory.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_embeddable_factory.ts similarity index 83% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_embeddable_factory.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_embeddable_factory.ts index 010a4118c1781..8563d793a0913 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/slo_error_budget_embeddable_factory.ts +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/slo_error_budget_embeddable_factory.ts @@ -18,7 +18,7 @@ import { SLO_ERROR_BUDGET_EMBEDDABLE, SLOErrorBudgetEmbeddable, } from './slo_error_budget_embeddable'; -import { ObservabilityPublicPluginsStart, ObservabilityPublicStart } from '../../..'; +import { SloPublicPluginsStart, SloPublicStart } from '../../..'; import { SloErrorBudgetEmbeddableInput } from './types'; export type SloErrorBudgetEmbeddableFactory = EmbeddableFactory; @@ -28,10 +28,7 @@ export class SloErrorBudgetEmbeddableFactoryDefinition implements EmbeddableFact public readonly grouping = COMMON_SLO_GROUPING; constructor( - private getStartServices: CoreSetup< - ObservabilityPublicPluginsStart, - ObservabilityPublicStart - >['getStartServices'] + private getStartServices: CoreSetup['getStartServices'] ) {} public async isEditable() { @@ -59,13 +56,13 @@ export class SloErrorBudgetEmbeddableFactoryDefinition implements EmbeddableFact } public getDescription() { - return i18n.translate('xpack.observability.sloErrorBudgetEmbeddable.description', { + return i18n.translate('xpack.slo.sloErrorBudgetEmbeddable.description', { defaultMessage: 'Get an error budget burn down chart of your SLOs', }); } public getDisplayName() { - return i18n.translate('xpack.observability.sloErrorBudgetEmbeddable.displayName', { + return i18n.translate('xpack.slo.sloErrorBudgetEmbeddable.displayName', { defaultMessage: 'SLO Error budget burn down', }); } diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/types.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/types.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/error_budget/types.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/error_budget/types.ts diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/handle_explicit_input.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/handle_explicit_input.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/handle_explicit_input.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/handle_explicit_input.tsx index 72e460e6f1890..4ebbd14b50055 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/handle_explicit_input.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/handle_explicit_input.tsx @@ -13,11 +13,11 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import type { SloEmbeddableInput, EmbeddableSloProps } from './types'; -import { ObservabilityPublicPluginsStart } from '../../..'; +import { SloPublicPluginsStart } from '../../..'; import { SloConfiguration } from './slo_configuration'; export async function resolveEmbeddableSloUserInput( coreStart: CoreStart, - pluginStart: ObservabilityPublicPluginsStart, + pluginStart: SloPublicPluginsStart, input?: SloEmbeddableInput ): Promise { const { overlays } = coreStart; diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/index.ts b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/index.ts rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/index.ts diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_configuration.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_configuration.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_configuration.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_configuration.tsx index 223c350124e76..82e836a526f86 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_configuration.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_configuration.tsx @@ -46,7 +46,7 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) - {i18n.translate('xpack.observability.sloEmbeddable.config.sloSelector.headerTitle', { + {i18n.translate('xpack.slo.sloEmbeddable.config.sloSelector.headerTitle', { defaultMessage: 'SLO configuration', })} @@ -70,10 +70,9 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) <> { setShowAllGroupByInstances(e.target.checked); @@ -85,7 +84,7 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) @@ -97,7 +96,7 @@ export function SloConfiguration({ onCreate, onCancel }: SloConfigurationProps) fill > diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_embeddable.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable.tsx similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_embeddable.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable.tsx index da4a50ca219b0..2e0ce844a54cf 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_embeddable.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_embeddable.tsx @@ -56,7 +56,7 @@ export class SLOEmbeddable extends AbstractEmbeddable['getStartServices'] + private getStartServices: CoreSetup['getStartServices'] ) {} public async isEditable() { @@ -76,13 +73,13 @@ export class SloOverviewEmbeddableFactoryDefinition } public getDescription() { - return i18n.translate('xpack.observability.sloEmbeddable.description', { + return i18n.translate('xpack.slo.sloEmbeddable.description', { defaultMessage: 'Get an overview of your SLO health', }); } public getDisplayName() { - return i18n.translate('xpack.observability.sloEmbeddable.displayName', { + return i18n.translate('xpack.slo.sloEmbeddable.displayName', { defaultMessage: 'SLO Overview', }); } diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_overview.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_overview.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx index 49cdd96bb3459..25ee1b1d03547 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_overview.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview.tsx @@ -12,12 +12,12 @@ import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { SloOverviewDetails } from '../common/slo_overview_details'; import { formatHistoricalData } from '../../../utils/slo/chart_data_formatter'; -import { useFetchHistoricalSummary } from '../../../hooks/slo/use_fetch_historical_summary'; -import { useFetchActiveAlerts } from '../../../hooks/slo/use_fetch_active_alerts'; -import { useFetchRulesForSlo } from '../../../hooks/slo/use_fetch_rules_for_slo'; +import { useFetchHistoricalSummary } from '../../../hooks/use_fetch_historical_summary'; +import { useFetchActiveAlerts } from '../../../hooks/use_fetch_active_alerts'; +import { useFetchRulesForSlo } from '../../../hooks/use_fetch_rules_for_slo'; import { SloCardItemBadges } from '../../../pages/slos/components/card_view/slo_card_item_badges'; import { SloCardChart } from '../../../pages/slos/components/card_view/slo_card_item'; -import { useFetchSloDetails } from '../../../hooks/slo/use_fetch_slo_details'; +import { useFetchSloDetails } from '../../../hooks/use_fetch_slo_details'; import { EmbeddableSloProps } from './types'; @@ -89,7 +89,7 @@ export function SloOverview({ return ( - {i18n.translate('xpack.observability.sloEmbeddable.overview.sloNotFoundText', { + {i18n.translate('xpack.slo.sloEmbeddable.overview.sloNotFoundText', { defaultMessage: 'The SLO has been deleted. You can safely delete the widget from the dashboard.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_overview_grid.tsx b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview_grid.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_overview_grid.tsx rename to x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview_grid.tsx index 030e619d7f379..abe30a84e5527 100644 --- a/x-pack/plugins/observability_solution/observability/public/embeddable/slo/overview/slo_overview_grid.tsx +++ b/x-pack/plugins/observability_solution/slo/public/embeddable/slo/overview/slo_overview_grid.tsx @@ -19,19 +19,19 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiLoadingSpinner } from '@elastic/eui'; +import { useKibana } from '../../../utils/kibana_react'; import { SloOverviewDetails } from '../common/slo_overview_details'; -import { useFetchSloList } from '../../../hooks/slo/use_fetch_slo_list'; +import { useFetchSloList } from '../../../hooks/use_fetch_slo_list'; import { formatHistoricalData } from '../../../utils/slo/chart_data_formatter'; -import { useFetchRulesForSlo } from '../../../hooks/slo/use_fetch_rules_for_slo'; -import { useFetchActiveAlerts } from '../../../hooks/slo/use_fetch_active_alerts'; +import { useFetchRulesForSlo } from '../../../hooks/use_fetch_rules_for_slo'; +import { useFetchActiveAlerts } from '../../../hooks/use_fetch_active_alerts'; import { SloCardItemBadges } from '../../../pages/slos/components/card_view/slo_card_item_badges'; import { getSloFormattedSummary } from '../../../pages/slos/hooks/use_slo_summary'; -import { useKibana } from '../../../utils/kibana_react'; import { getSubTitle, useSloCardColor, } from '../../../pages/slos/components/card_view/slo_card_item'; -import { useFetchHistoricalSummary } from '../../../hooks/slo/use_fetch_historical_summary'; +import { useFetchHistoricalSummary } from '../../../hooks/use_fetch_historical_summary'; const getSloChartData = ({ slo, @@ -61,7 +61,7 @@ const getSloChartData = ({ })), extra: ( { diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/active_alerts.ts b/x-pack/plugins/observability_solution/slo/public/hooks/active_alerts.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/active_alerts.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/active_alerts.ts diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/helpers/convert_error_for_use_in_toast.ts b/x-pack/plugins/observability_solution/slo/public/hooks/helpers/convert_error_for_use_in_toast.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/helpers/convert_error_for_use_in_toast.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/helpers/convert_error_for_use_in_toast.ts diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/query_key_factory.ts b/x-pack/plugins/observability_solution/slo/public/hooks/query_key_factory.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/query_key_factory.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/query_key_factory.ts diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_capabilities.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_capabilities.ts similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_capabilities.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_capabilities.ts index b2bc20d11fcbd..bc1856681b930 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_capabilities.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_capabilities.ts @@ -4,8 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { sloFeatureId } from '../../../common'; -import { useKibana } from '../../utils/kibana_react'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; +import { useKibana } from '../utils/kibana_react'; export function useCapabilities() { const { diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_clone_slo.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_clone_slo.ts similarity index 82% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_clone_slo.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_clone_slo.ts index 652b4cbaf52b6..076e6c0b001a3 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_clone_slo.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_clone_slo.ts @@ -8,8 +8,8 @@ import { encode } from '@kbn/rison'; import { useCallback } from 'react'; import { SLOWithSummaryResponse } from '@kbn/slo-schema'; -import { paths } from '../../../common/locators/paths'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; +import { paths } from '../../common/locators/paths'; export function useCloneSlo() { const { @@ -21,7 +21,7 @@ export function useCloneSlo() { (slo: SLOWithSummaryResponse) => { navigateToUrl( basePath.prepend( - paths.observability.sloCreateWithEncodedForm( + paths.sloCreateWithEncodedForm( encode({ ...slo, name: `[Copy] ${slo.name}`, id: undefined }) ) ) diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/use_create_data_view.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_create_data_view.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/hooks/use_create_data_view.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_create_data_view.ts diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_create_slo.tsx b/x-pack/plugins/observability_solution/slo/public/hooks/use_create_slo.tsx similarity index 82% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_create_slo.tsx rename to x-pack/plugins/observability_solution/slo/public/hooks/use_create_slo.tsx index 4ce4451c68094..fcb02315a847a 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_create_slo.tsx +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_create_slo.tsx @@ -15,8 +15,8 @@ import { toMountPoint } from '@kbn/react-kibana-mount'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; -import { paths } from '../../../common/locators/paths'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; +import { paths } from '../../common/locators/paths'; import { sloKeys } from './query_key_factory'; type ServerError = IHttpFetchError; @@ -47,20 +47,20 @@ export function useCreateSlo() { onSuccess: (data, { slo }) => { queryClient.invalidateQueries({ queryKey: sloKeys.lists(), exact: false }); - const sloEditUrl = http.basePath.prepend(paths.observability.sloEdit(data.id)); + const sloEditUrl = http.basePath.prepend(paths.sloEdit(data.id)); toasts.addSuccess( { title: toMountPoint( - {i18n.translate('xpack.observability.useCreateSlo.editSLOLinkLabel', { + {i18n.translate('xpack.slo.useCreateSlo.editSLOLinkLabel', { defaultMessage: 'Edit SLO', })} @@ -81,15 +81,13 @@ export function useCreateSlo() { }, onError: (error, { slo }, context) => { toasts.addError(new Error(error.body?.message ?? error.message), { - title: i18n.translate('xpack.observability.slo.create.errorNotification', { + title: i18n.translate('xpack.slo.create.errorNotification', { defaultMessage: 'Something went wrong while creating {name}', values: { name: slo.name }, }), }); - navigateToUrl( - http.basePath.prepend(paths.observability.sloCreateWithEncodedForm(encode(slo))) - ); + navigateToUrl(http.basePath.prepend(paths.sloCreateWithEncodedForm(encode(slo)))); }, } ); diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_delete_slo.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_delete_slo.ts similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_delete_slo.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_delete_slo.ts index 2e77623fc991f..23d0d2f4407f0 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_delete_slo.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_delete_slo.ts @@ -9,7 +9,7 @@ import { IHttpFetchError, ResponseErrorBody } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { FindSLOResponse } from '@kbn/slo-schema'; import { QueryKey, useMutation, useQueryClient } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; type ServerError = IHttpFetchError; @@ -38,7 +38,7 @@ export function useDeleteSlo() { { onError: (error, { name }, context) => { toasts.addError(new Error(error.body?.message ?? error.message), { - title: i18n.translate('xpack.observability.slo.slo.delete.errorNotification', { + title: i18n.translate('xpack.slo.slo.delete.errorNotification', { defaultMessage: 'Failed to delete {name}', values: { name }, }), @@ -48,7 +48,7 @@ export function useDeleteSlo() { queryClient.invalidateQueries({ queryKey: sloKeys.lists(), exact: false }); toasts.addSuccess( - i18n.translate('xpack.observability.slo.slo.delete.successNotification', { + i18n.translate('xpack.slo.slo.delete.successNotification', { defaultMessage: 'Deleted {name}', values: { name }, }) diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_active_alerts.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_active_alerts.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts index d59ff20a6064d..1f353e6a38558 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_active_alerts.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_active_alerts.ts @@ -9,11 +9,11 @@ import { useQuery } from '@tanstack/react-query'; import { BASE_RAC_ALERTS_API_PATH } from '@kbn/rule-registry-plugin/common'; import { AlertConsumers } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; import { ActiveAlerts } from './active_alerts'; -import { SLO_LONG_REFETCH_INTERVAL } from '../../constants'; +import { SLO_LONG_REFETCH_INTERVAL } from '../constants'; type SloIdAndInstanceId = [string, string]; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_apm_indices.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_apm_indices.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_apm_indices.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_apm_indices.ts index 702573fa570dd..e21df7b56a964 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_apm_indices.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_apm_indices.ts @@ -7,7 +7,7 @@ import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; type ApmIndex = string; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_apm_suggestions.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_apm_suggestions.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_apm_suggestions.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_apm_suggestions.ts index df90faf6bb734..c6484076b1d72 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_apm_suggestions.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_apm_suggestions.ts @@ -7,8 +7,7 @@ import { useQuery } from '@tanstack/react-query'; import moment from 'moment'; - -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; export type Suggestion = string; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_global_diagnosis.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_global_diagnosis.ts similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_global_diagnosis.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_global_diagnosis.ts index 45ef877bf2472..22862110910da 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_global_diagnosis.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_global_diagnosis.ts @@ -9,7 +9,7 @@ import type { SecurityHasPrivilegesResponse } from '@elastic/elasticsearch/lib/a import { i18n } from '@kbn/i18n'; import type { PublicLicenseJSON } from '@kbn/licensing-plugin/public'; import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { convertErrorForUseInToast } from './helpers/convert_error_for_use_in_toast'; import { sloKeys } from './query_key_factory'; @@ -55,7 +55,7 @@ export function useFetchSloGlobalDiagnosis(): UseFetchSloGlobalDiagnoseResponse retry: false, onError: (error: Error) => { toasts.addError(error, { - title: i18n.translate('xpack.observability.slo.globalDiagnosis.errorNotification', { + title: i18n.translate('xpack.slo.globalDiagnosis.errorNotification', { defaultMessage: 'You do not have the right permissions to use this feature.', }), }); diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_group_by_cardinality.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_group_by_cardinality.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_group_by_cardinality.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_group_by_cardinality.ts index db791c3ba5b42..a5a193db672fb 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_group_by_cardinality.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_group_by_cardinality.ts @@ -9,8 +9,8 @@ import { debounce } from 'lodash'; import { ALL_VALUE, QuerySchema } from '@kbn/slo-schema'; import { useQuery } from '@tanstack/react-query'; import { lastValueFrom } from 'rxjs'; -import { useKibana } from '../../utils/kibana_react'; -import { getElasticsearchQueryOrThrow } from '../../../common/utils/parse_kuery'; +import { getElasticsearchQueryOrThrow } from '@kbn/observability-plugin/public'; +import { useKibana } from '../utils/kibana_react'; export interface UseFetchGroupByCardinalityResponse { isLoading: boolean; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_historical_summary.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_historical_summary.ts similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_historical_summary.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_historical_summary.ts index afa1c6e597723..e17c6a8f65557 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_historical_summary.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_historical_summary.ts @@ -7,10 +7,9 @@ import { useQuery } from '@tanstack/react-query'; import { FetchHistoricalSummaryResponse } from '@kbn/slo-schema'; - -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; -import { SLO_LONG_REFETCH_INTERVAL } from '../../constants'; +import { SLO_LONG_REFETCH_INTERVAL } from '../constants'; export interface UseFetchHistoricalSummaryResponse { data: FetchHistoricalSummaryResponse | undefined; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_indices.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_indices.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_indices.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_indices.ts index bd5aae9c30df8..e5c4f3db3493d 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/use_fetch_indices.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_indices.ts @@ -6,7 +6,7 @@ */ import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../utils/kibana_react'; +import { useKibana } from '@kbn/observability-plugin/public/utils/kibana_react'; export type Index = string; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_rules_for_slo.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_rules_for_slo.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_rules_for_slo.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_rules_for_slo.ts index d3c9626fe9f17..80c3b315bfa48 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_rules_for_slo.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_rules_for_slo.ts @@ -7,8 +7,8 @@ import type { Rule } from '@kbn/triggers-actions-ui-plugin/public'; import { useQuery } from '@tanstack/react-query'; -import { BurnRateRuleParams } from '../../typings'; -import { useKibana } from '../../utils/kibana_react'; +import { BurnRateRuleParams } from '../typings'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; type SloId = string; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_burn_rates.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_burn_rates.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts index 61017d6339b80..30793619dd255 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_burn_rates.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_burn_rates.ts @@ -11,9 +11,9 @@ import { useQuery, } from '@tanstack/react-query'; import { ALL_VALUE, GetSLOBurnRatesResponse, SLOWithSummaryResponse } from '@kbn/slo-schema'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; -import { SLO_LONG_REFETCH_INTERVAL } from '../../constants'; +import { SLO_LONG_REFETCH_INTERVAL } from '../constants'; export interface UseFetchSloBurnRatesResponse { isInitialLoading: boolean; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_definitions.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_definitions.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_definitions.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_definitions.ts index 6b6893afb1189..8aae512faab44 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_definitions.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_definitions.ts @@ -7,7 +7,7 @@ import { FindSLODefinitionsResponse } from '@kbn/slo-schema'; import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; export interface UseFetchSloDefinitionsResponse { diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_details.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_details.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts index 76864996168bb..d835a94e77031 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_details.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_details.ts @@ -12,8 +12,8 @@ import { RefetchQueryFilters, useQuery, } from '@tanstack/react-query'; -import { SLO_LONG_REFETCH_INTERVAL } from '../../constants'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; +import { SLO_LONG_REFETCH_INTERVAL } from '../constants'; import { sloKeys } from './query_key_factory'; export interface UseFetchSloDetailsResponse { diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_groups.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_groups.ts similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_groups.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_groups.ts index 9ca0ffa0cbfb7..d595211b0106f 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_groups.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_groups.ts @@ -9,12 +9,12 @@ import { i18n } from '@kbn/i18n'; import { buildQueryFromFilters, Filter } from '@kbn/es-query'; import { useMemo } from 'react'; import { FindSLOGroupsResponse } from '@kbn/slo-schema'; -import { useKibana } from '../../utils/kibana_react'; -import { useCreateDataView } from '../use_create_data_view'; +import { useKibana } from '../utils/kibana_react'; +import { useCreateDataView } from './use_create_data_view'; import { sloKeys } from './query_key_factory'; -import { DEFAULT_SLO_GROUPS_PAGE_SIZE } from '../../../common/slo/constants'; -import { SearchState } from '../../pages/slos/hooks/use_url_search_state'; -import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../../common/slo/constants'; +import { DEFAULT_SLO_GROUPS_PAGE_SIZE } from '../../common/constants'; +import { SearchState } from '../pages/slos/hooks/use_url_search_state'; +import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../common/constants'; interface SLOGroupsParams { page?: number; @@ -102,7 +102,7 @@ export function useFetchSloGroups({ }, onError: (error: Error) => { toasts.addError(error, { - title: i18n.translate('xpack.observability.slo.groups.list.errorNotification', { + title: i18n.translate('xpack.slo.groups.list.errorNotification', { defaultMessage: 'Something went wrong while fetching SLO Groups', }), }); diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_inspect.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_inspect.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_inspect.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_inspect.ts index c83b398a8fb3b..983097a5eb721 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_inspect.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_inspect.ts @@ -8,7 +8,7 @@ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { CreateSLOInput, SLOResponse } from '@kbn/slo-schema'; import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; interface SLOInspectResponse { slo: SLOResponse; diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_instances.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_instances.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_instances.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_instances.ts index 0e1e50d32a397..26367dcad3f6b 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_instances.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_instances.ts @@ -7,8 +7,7 @@ import { GetSLOInstancesResponse } from '@kbn/slo-schema'; import { useQuery } from '@tanstack/react-query'; - -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; export interface UseFetchSloInstancesResponse { diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_list.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_list.ts similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_list.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_list.ts index 762c49439f416..96769f93d5027 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_slo_list.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_slo_list.ts @@ -10,14 +10,11 @@ import { FindSLOResponse } from '@kbn/slo-schema'; import { useQuery, useQueryClient } from '@tanstack/react-query'; import { useMemo } from 'react'; import { buildQueryFromFilters, Filter } from '@kbn/es-query'; -import { SearchState } from '../../pages/slos/hooks/use_url_search_state'; -import { useCreateDataView } from '../use_create_data_view'; -import { - DEFAULT_SLO_PAGE_SIZE, - SLO_SUMMARY_DESTINATION_INDEX_NAME, -} from '../../../common/slo/constants'; +import { useKibana } from '../utils/kibana_react'; +import { SearchState } from '../pages/slos/hooks/use_url_search_state'; +import { useCreateDataView } from './use_create_data_view'; +import { DEFAULT_SLO_PAGE_SIZE, SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../common/constants'; -import { useKibana } from '../../utils/kibana_react'; import { sloKeys } from './query_key_factory'; export interface SLOListParams { @@ -123,7 +120,7 @@ export function useFetchSloList({ }, onError: (error: Error) => { toasts.addError(error, { - title: i18n.translate('xpack.observability.slo.list.errorNotification', { + title: i18n.translate('xpack.slo.list.errorNotification', { defaultMessage: 'Something went wrong while fetching SLOs', }), }); diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_synthetics_suggestions.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_synthetics_suggestions.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_synthetics_suggestions.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_synthetics_suggestions.ts index 8510f5d059fea..f985b1f53ca94 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_fetch_synthetics_suggestions.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_fetch_synthetics_suggestions.ts @@ -7,7 +7,7 @@ import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; export interface Suggestion { label: string; diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_get_filtered_rule_types.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_get_filtered_rule_types.ts new file mode 100644 index 0000000000000..99a448a36405d --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_get_filtered_rule_types.ts @@ -0,0 +1,22 @@ +/* + * 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 { ES_QUERY_ID, ML_ANOMALY_DETECTION_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { usePluginContext } from './use_plugin_context'; + +export function useGetFilteredRuleTypes() { + const { observabilityRuleTypeRegistry } = usePluginContext(); + + return useMemo(() => { + return [ + ES_QUERY_ID, + ML_ANOMALY_DETECTION_RULE_TYPE_ID, + ...observabilityRuleTypeRegistry.list(), + ]; + }, [observabilityRuleTypeRegistry]); +} diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_get_preview_data.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_get_preview_data.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_get_preview_data.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_get_preview_data.ts index 23d90f487dab0..427db4546ee6c 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_get_preview_data.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_get_preview_data.ts @@ -7,7 +7,7 @@ import { GetPreviewDataResponse, Indicator, Objective } from '@kbn/slo-schema'; import { useQuery } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; export interface UseGetPreviewData { diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_license.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_license.ts new file mode 100644 index 0000000000000..823c9e4135bf7 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_license.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useCallback } from 'react'; +import { Observable } from 'rxjs'; +import useObservable from 'react-use/lib/useObservable'; +import type { ILicense, LicenseType } from '@kbn/licensing-plugin/public'; +import { useKibana } from '../utils/kibana_react'; + +interface UseLicenseReturnValue { + getLicense: () => ILicense | null; + hasAtLeast: (level: LicenseType) => boolean | undefined; +} + +export const useLicense = (): UseLicenseReturnValue => { + const { licensing } = useKibana().services; + const license = useObservable(licensing?.license$ ?? new Observable(), null); + + return { + getLicense: () => license, + hasAtLeast: useCallback( + (level: LicenseType) => { + if (!license) return; + + return !!license && license.isAvailable && license.isActive && license.hasAtLeast(level); + }, + [license] + ), + }; +}; diff --git a/x-pack/plugins/observability_solution/slo/public/hooks/use_plugin_context.tsx b/x-pack/plugins/observability_solution/slo/public/hooks/use_plugin_context.tsx new file mode 100644 index 0000000000000..5ea1d46ac7af3 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_plugin_context.tsx @@ -0,0 +1,13 @@ +/* + * 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 { useContext } from 'react'; +import { PluginContext } from '../context/plugin_context'; + +export function usePluginContext() { + return useContext(PluginContext); +} diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_reset_slo.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_reset_slo.ts similarity index 84% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_reset_slo.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_reset_slo.ts index 9f67c5efe3972..e1a3a5a1dac1b 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_reset_slo.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_reset_slo.ts @@ -7,7 +7,7 @@ import { IHttpFetchError, ResponseErrorBody } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; import { sloKeys } from './query_key_factory'; type ServerError = IHttpFetchError; @@ -26,7 +26,7 @@ export function useResetSlo() { return http.post(`/api/observability/slos/${id}/_reset`); } catch (error) { return Promise.reject( - i18n.translate('xpack.observability.slo.slo.reset.errorMessage', { + i18n.translate('xpack.slo.slo.reset.errorMessage', { defaultMessage: 'Failed to reset {name} (id: {id}), something went wrong: {error}', values: { error: String(error), name, id }, }) @@ -36,7 +36,7 @@ export function useResetSlo() { { onError: (error, { name, id }) => { toasts.addError(new Error(error.body?.message ?? error.message), { - title: i18n.translate('xpack.observability.slo.slo.reset.errorNotification', { + title: i18n.translate('xpack.slo.slo.reset.errorNotification', { defaultMessage: 'Failed to reset {name} (id: {id})', values: { name, id }, }), @@ -45,7 +45,7 @@ export function useResetSlo() { onSuccess: (_data, { name }) => { queryClient.invalidateQueries({ queryKey: sloKeys.lists(), exact: false }); toasts.addSuccess( - i18n.translate('xpack.observability.slo.slo.reset.successNotification', { + i18n.translate('xpack.slo.slo.reset.successNotification', { defaultMessage: '{name} reset successfully', values: { name }, }) diff --git a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_update_slo.ts b/x-pack/plugins/observability_solution/slo/public/hooks/use_update_slo.ts similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/hooks/slo/use_update_slo.ts rename to x-pack/plugins/observability_solution/slo/public/hooks/use_update_slo.ts index ff12ab2acdfe2..21e9aa57c142d 100644 --- a/x-pack/plugins/observability_solution/observability/public/hooks/slo/use_update_slo.ts +++ b/x-pack/plugins/observability_solution/slo/public/hooks/use_update_slo.ts @@ -10,8 +10,8 @@ import { i18n } from '@kbn/i18n'; import { encode } from '@kbn/rison'; import type { FindSLOResponse, UpdateSLOInput, UpdateSLOResponse } from '@kbn/slo-schema'; import { QueryKey, useMutation, useQueryClient } from '@tanstack/react-query'; -import { paths } from '../../../common/locators/paths'; -import { useKibana } from '../../utils/kibana_react'; +import { useKibana } from '../utils/kibana_react'; +import { paths } from '../../common/locators/paths'; import { sloKeys } from './query_key_factory'; type ServerError = IHttpFetchError; @@ -40,7 +40,7 @@ export function useUpdateSlo() { queryClient.invalidateQueries({ queryKey: sloKeys.lists(), exact: false }); toasts.addSuccess( - i18n.translate('xpack.observability.slo.update.successNotification', { + i18n.translate('xpack.slo.update.successNotification', { defaultMessage: 'Successfully updated {name}', values: { name }, }) @@ -48,15 +48,13 @@ export function useUpdateSlo() { }, onError: (error, { slo, sloId }, context) => { toasts.addError(new Error(error.body?.message ?? error.message), { - title: i18n.translate('xpack.observability.slo.update.errorNotification', { + title: i18n.translate('xpack.slo.update.errorNotification', { defaultMessage: 'Something went wrong when updating {name}', values: { name: slo.name }, }), }); - navigateToUrl( - http.basePath.prepend(paths.observability.sloEditWithEncodedForm(sloId, encode(slo))) - ); + navigateToUrl(http.basePath.prepend(paths.sloEditWithEncodedForm(sloId, encode(slo)))); }, } ); diff --git a/x-pack/plugins/observability_solution/slo/public/index.ts b/x-pack/plugins/observability_solution/slo/public/index.ts new file mode 100644 index 0000000000000..e57edb2205208 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/index.ts @@ -0,0 +1,24 @@ +/* + * 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 { PluginInitializer, PluginInitializerContext } from '@kbn/core/public'; +import { SloPlugin } from './plugin'; +import type { + SloPublicSetup, + SloPublicStart, + SloPublicPluginsSetup, + SloPublicPluginsStart, +} from './types'; + +export const plugin: PluginInitializer< + SloPublicSetup, + SloPublicStart, + SloPublicPluginsSetup, + SloPublicPluginsStart +> = (initializerContext: PluginInitializerContext) => { + return new SloPlugin(initializerContext); +}; +export type { SloPublicPluginsSetup, SloPublicPluginsStart, SloPublicStart } from './types'; diff --git a/x-pack/plugins/observability_solution/observability/public/locators/slo_details.test.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_details.test.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/locators/slo_details.test.ts rename to x-pack/plugins/observability_solution/slo/public/locators/slo_details.test.ts index 9c5440232457a..08d0c948002fc 100644 --- a/x-pack/plugins/observability_solution/observability/public/locators/slo_details.test.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_details.test.ts @@ -12,7 +12,7 @@ describe('SloDetailsLocator', () => { it('returns correct url when empty params are provided', async () => { const location = await locator.getLocation({}); - expect(location.app).toEqual('observability'); + expect(location.app).toEqual('slo'); expect(location.path).toEqual('/slos'); }); diff --git a/x-pack/plugins/observability_solution/observability/public/locators/slo_details.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_details.ts similarity index 78% rename from x-pack/plugins/observability_solution/observability/public/locators/slo_details.ts rename to x-pack/plugins/observability_solution/slo/public/locators/slo_details.ts index e07648f71bd56..1e9063b9c7a37 100644 --- a/x-pack/plugins/observability_solution/observability/public/locators/slo_details.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_details.ts @@ -7,8 +7,8 @@ import type { SerializableRecord } from '@kbn/utility-types'; import type { LocatorDefinition } from '@kbn/share-plugin/public'; -import { sloDetailsLocatorID } from '../../common'; -import { SLOS_PATH } from '../../common/locators/paths'; +import { sloDetailsLocatorID } from '@kbn/observability-plugin/common'; +import { SLO_PREFIX } from '../../common/locators/paths'; export interface SloDetailsLocatorParams extends SerializableRecord { sloId?: string; @@ -21,10 +21,10 @@ export class SloDetailsLocatorDefinition implements LocatorDefinition { const queryParams = !!instanceId && instanceId !== '*' ? `?instanceId=${encodeURIComponent(instanceId)}` : ''; - const path = !!sloId ? `${SLOS_PATH}/${encodeURIComponent(sloId)}${queryParams}` : SLOS_PATH; + const path = !!sloId ? `${SLO_PREFIX}/${encodeURIComponent(sloId)}${queryParams}` : SLO_PREFIX; return { - app: 'observability', + app: 'slo', path, state: {}, }; diff --git a/x-pack/plugins/observability_solution/observability/public/locators/slo_edit.test.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/public/locators/slo_edit.test.ts rename to x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts index c75b1100fa6ff..7d25405daaf33 100644 --- a/x-pack/plugins/observability_solution/observability/public/locators/slo_edit.test.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.test.ts @@ -13,7 +13,7 @@ describe('SloEditLocator', () => { it('should return correct url when empty params are provided', async () => { const location = await locator.getLocation({}); - expect(location.app).toEqual('observability'); + expect(location.app).toEqual('slo'); expect(location.path).toEqual('/slos/create?_a=()'); }); diff --git a/x-pack/plugins/observability_solution/observability/public/locators/slo_edit.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts similarity index 79% rename from x-pack/plugins/observability_solution/observability/public/locators/slo_edit.ts rename to x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts index f5442ce31c3c9..5ea89ac66d546 100644 --- a/x-pack/plugins/observability_solution/observability/public/locators/slo_edit.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_edit.ts @@ -9,9 +9,9 @@ import { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/public'; import type { RecursivePartial } from '@elastic/charts'; import type { SerializableRecord } from '@kbn/utility-types'; import type { LocatorDefinition } from '@kbn/share-plugin/public'; +import { sloEditLocatorID } from '@kbn/observability-plugin/common'; import type { CreateSLOForm } from '../pages/slo_edit/types'; -import { sloEditLocatorID } from '../../common'; -import { SLO_CREATE_PATH, SLOS_PATH } from '../../common/locators/paths'; +import { SLO_CREATE_PATH, SLO_PREFIX } from '../../common/locators/paths'; export type SloEditParams = RecursivePartial; @@ -22,14 +22,16 @@ export class SloEditLocatorDefinition implements LocatorDefinition { return { - app: 'observability', + app: 'slo', path: setStateToKbnUrl( '_a', { ...slo, }, { useHash: false, storeInHashQuery: false }, - slo.id ? `${SLOS_PATH}/edit/${encodeURIComponent(String(slo.id))}` : SLO_CREATE_PATH + slo.id + ? `${SLO_PREFIX}/edit/${encodeURIComponent(String(slo.id))}` + : `${SLO_PREFIX}${SLO_CREATE_PATH}` ), state: {}, }; diff --git a/x-pack/plugins/observability_solution/observability/public/locators/slo_list.test.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_list.test.ts similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/locators/slo_list.test.ts rename to x-pack/plugins/observability_solution/slo/public/locators/slo_list.test.ts index f78746964334c..ea4ef901acd0e 100644 --- a/x-pack/plugins/observability_solution/observability/public/locators/slo_list.test.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_list.test.ts @@ -12,7 +12,7 @@ describe('SloListLocator', () => { it("returns the correct url with the default search state when no 'kqlQuery' provided", async () => { const location = await locator.getLocation({}); - expect(location.app).toEqual('observability'); + expect(location.app).toEqual('slo'); expect(location.path).toMatchInlineSnapshot( `"/slos?search=(filters:!(),groupBy:ungrouped,kqlQuery:'',lastRefresh:0,page:0,perPage:25,sort:(by:status,direction:desc),view:cardView)"` ); @@ -22,7 +22,7 @@ describe('SloListLocator', () => { const location = await locator.getLocation({ kqlQuery: 'slo.name: "Service Availability" and slo.indicator.type : "sli.kql.custom"', }); - expect(location.app).toEqual('observability'); + expect(location.app).toEqual('slo'); expect(location.path).toMatchInlineSnapshot( `"/slos?search=(filters:!(),groupBy:ungrouped,kqlQuery:'slo.name:%20%22Service%20Availability%22%20and%20slo.indicator.type%20:%20%22sli.kql.custom%22',lastRefresh:0,page:0,perPage:25,sort:(by:status,direction:desc),view:cardView)"` ); diff --git a/x-pack/plugins/observability_solution/observability/public/locators/slo_list.ts b/x-pack/plugins/observability_solution/slo/public/locators/slo_list.ts similarity index 88% rename from x-pack/plugins/observability_solution/observability/public/locators/slo_list.ts rename to x-pack/plugins/observability_solution/slo/public/locators/slo_list.ts index 49acf4154afdc..1e4d1ee87cf8f 100644 --- a/x-pack/plugins/observability_solution/observability/public/locators/slo_list.ts +++ b/x-pack/plugins/observability_solution/slo/public/locators/slo_list.ts @@ -9,8 +9,8 @@ import { setStateToKbnUrl } from '@kbn/kibana-utils-plugin/public'; import type { LocatorDefinition } from '@kbn/share-plugin/public'; import type { SerializableRecord } from '@kbn/utility-types'; import deepmerge from 'deepmerge'; -import { sloListLocatorID } from '../../common'; -import { SLOS_PATH } from '../../common/locators/paths'; +import { sloListLocatorID } from '@kbn/observability-plugin/common'; +import { SLO_PREFIX } from '../../common/locators/paths'; import { DEFAULT_STATE, SearchState, @@ -28,7 +28,7 @@ export class SloListLocatorDefinition implements LocatorDefinition(DEFAULT_STATE, { kqlQuery }); return { - app: 'observability', + app: 'slo', path: setStateToKbnUrl( SLO_LIST_SEARCH_URL_STORAGE_KEY, state, @@ -36,7 +36,7 @@ export class SloListLocatorDefinition implements LocatorDefinition + + } + data-test-subj={'observabilityPageNotFoundBanner'} + > +

+ +

+
+ + ); +} + +// eslint-disable-next-line import/no-default-export +export default PageNotFound; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/error_budget_actions.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/error_budget_actions.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/error_budget_actions.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/error_budget_actions.tsx index 8770375530e1e..c224fbb6d7bee 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/error_budget_actions.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/error_budget_actions.tsx @@ -42,7 +42,7 @@ export function ErrorBudgetActions({ setDashboardAttachmentReady }: Props) { onClick={handleAddToDashboard} data-test-subj="sloActionsAddToDashboard" > - {i18n.translate('xpack.observability.slo.item.actions.addToDashboard', { + {i18n.translate('xpack.slo.item.actions.addToDashboard', { defaultMessage: 'Add to Dashboard', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/error_budget_chart.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/error_budget_chart.tsx similarity index 74% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/error_budget_chart.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/error_budget_chart.tsx index 857c37d050e13..552198aec1fa1 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/error_budget_chart.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/error_budget_chart.tsx @@ -19,15 +19,12 @@ function formatTime(minutes: number) { if (minutes > 59) { const mins = minutes % 60; const hours = (minutes - mins) / 60; - return i18n.translate( - 'xpack.observability.slo.sloDetails.errorBudgetChartPanel.minuteHoursLabel', - { - defaultMessage: '{hours}h {mins}m', - values: { hours: Math.trunc(hours), mins: Math.trunc(mins) }, - } - ); + return i18n.translate('xpack.slo.sloDetails.errorBudgetChartPanel.minuteHoursLabel', { + defaultMessage: '{hours}h {mins}m', + values: { hours: Math.trunc(hours), mins: Math.trunc(mins) }, + }); } - return i18n.translate('xpack.observability.slo.sloDetails.errorBudgetChartPanel.minuteLabel', { + return i18n.translate('xpack.slo.sloDetails.errorBudgetChartPanel.minuteLabel', { defaultMessage: '{minutes}m', values: { minutes }, }); @@ -62,10 +59,9 @@ export function ErrorBudgetChart({ data, isLoading, slo }: Props) { titleColor={isSloFailed ? 'danger' : 'success'} title={numeral(slo.summary.errorBudget.remaining).format(percentFormat)} titleSize="s" - description={i18n.translate( - 'xpack.observability.slo.sloDetails.errorBudgetChartPanel.remaining', - { defaultMessage: 'Remaining' } - )} + description={i18n.translate('xpack.slo.sloDetails.errorBudgetChartPanel.remaining', { + defaultMessage: 'Remaining', + })} reverse />
@@ -75,10 +71,9 @@ export function ErrorBudgetChart({ data, isLoading, slo }: Props) { titleColor={isSloFailed ? 'danger' : 'success'} title={errorBudgetTimeRemainingFormatted} titleSize="s" - description={i18n.translate( - 'xpack.observability.slo.sloDetails.errorBudgetChartPanel.remaining', - { defaultMessage: 'Remaining' } - )} + description={i18n.translate('xpack.slo.sloDetails.errorBudgetChartPanel.remaining', { + defaultMessage: 'Remaining', + })} reverse /> @@ -88,12 +83,9 @@ export function ErrorBudgetChart({ data, isLoading, slo }: Props) {

- {i18n.translate( - 'xpack.observability.slo.sloDetails.errorBudgetChartPanel.title', - { - defaultMessage: 'Error budget burn down', - } - )} + {i18n.translate('xpack.slo.sloDetails.errorBudgetChartPanel.title', { + defaultMessage: 'Error budget burn down', + })}

@@ -63,7 +60,7 @@ export function ErrorBudgetHeader({ {rollingTimeWindowTypeSchema.is(slo.timeWindow.type) - ? i18n.translate('xpack.observability.slo.sloDetails.errorBudgetChartPanel.duration', { + ? i18n.translate('xpack.slo.sloDetails.errorBudgetChartPanel.duration', { defaultMessage: 'Last {duration}', values: { duration: toDurationLabel(slo.timeWindow.duration) }, }) diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/events_chart_panel.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/events_chart_panel.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/events_chart_panel.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/events_chart_panel.tsx index 96b0f0b29e998..764dcda8e04b3 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/events_chart_panel.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/events_chart_panel.tsx @@ -36,7 +36,7 @@ import { max, min } from 'lodash'; import moment from 'moment'; import React, { useRef } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; -import { useGetPreviewData } from '../../../hooks/slo/use_get_preview_data'; +import { useGetPreviewData } from '../../../hooks/use_get_preview_data'; import { useKibana } from '../../../utils/kibana_react'; import { COMPARATOR_MAPPING } from '../../slo_edit/constants'; import { GoodBadEventsChart } from '../../slos/components/common/good_bad_events_chart'; @@ -73,7 +73,7 @@ export function EventsChartPanel({ slo, range }: Props) { slo.indicator.type !== 'sli.metric.timeslice' ? (

- {i18n.translate('xpack.observability.slo.sloDetails.eventsChartPanel.title', { + {i18n.translate('xpack.slo.sloDetails.eventsChartPanel.title', { defaultMessage: 'Good vs bad events', })}

@@ -81,7 +81,7 @@ export function EventsChartPanel({ slo, range }: Props) { ) : (

- {i18n.translate('xpack.observability.slo.sloDetails.eventsChartPanel.timesliceTitle', { + {i18n.translate('xpack.slo.sloDetails.eventsChartPanel.timesliceTitle', { defaultMessage: 'Timeslice metric', })}

@@ -158,7 +158,7 @@ export function EventsChartPanel({ slo, range }: Props) { {title} - {i18n.translate('xpack.observability.slo.sloDetails.eventsChartPanel.duration', { + {i18n.translate('xpack.slo.sloDetails.eventsChartPanel.duration', { defaultMessage: 'Last 24h', })} @@ -177,7 +177,7 @@ export function EventsChartPanel({ slo, range }: Props) { > diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_control.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_control.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_control.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_control.stories.tsx index af6338d4a3977..3f4efc2f9bf73 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_control.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_control.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { buildSlo } from '../../../data/slo/slo'; import { HeaderControl as Component, Props } from './header_control'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_control.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_control.tsx similarity index 82% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_control.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_control.tsx index b8bad5b98c4c5..5e0652e85cdff 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_control.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_control.tsx @@ -10,15 +10,16 @@ import { i18n } from '@kbn/i18n'; import { SLOWithSummaryResponse } from '@kbn/slo-schema'; import React, { useCallback, useState } from 'react'; -import { rulesLocatorID, sloFeatureId } from '../../../../common'; -import { SLO_BURN_RATE_RULE_TYPE_ID } from '../../../../common/constants'; +import type { RulesParams } from '@kbn/observability-plugin/public'; +import { rulesLocatorID } from '@kbn/observability-plugin/common'; +import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; +import { useKibana } from '../../../utils/kibana_react'; import { paths } from '../../../../common/locators/paths'; import { SloDeleteConfirmationModal } from '../../../components/slo/delete_confirmation_modal/slo_delete_confirmation_modal'; -import { useCapabilities } from '../../../hooks/slo/use_capabilities'; -import { useCloneSlo } from '../../../hooks/slo/use_clone_slo'; -import { useDeleteSlo } from '../../../hooks/slo/use_delete_slo'; -import type { RulesParams } from '../../../locators/rules'; -import { useKibana } from '../../../utils/kibana_react'; +import { useCapabilities } from '../../../hooks/use_capabilities'; +import { useCloneSlo } from '../../../hooks/use_clone_slo'; +import { useDeleteSlo } from '../../../hooks/use_delete_slo'; import { convertSliApmParamsToApmAppDeeplinkUrl } from '../../../utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url'; import { isApmIndicatorType } from '../../../utils/slo/indicator'; @@ -50,7 +51,7 @@ export function HeaderControl({ isLoading, slo }: Props) { const handleEdit = () => { if (slo) { - navigate(basePath.prepend(paths.observability.sloEdit(slo.id))); + navigate(basePath.prepend(paths.sloEdit(slo.id))); } }; @@ -103,7 +104,7 @@ export function HeaderControl({ isLoading, slo }: Props) { const handleDeleteConfirm = async () => { if (slo) { deleteSlo({ id: slo.id, name: slo.name }); - navigate(basePath.prepend(paths.observability.slos)); + navigate(basePath.prepend(paths.slos)); } }; @@ -126,7 +127,7 @@ export function HeaderControl({ isLoading, slo }: Props) { onClick={handleActionsClick} disabled={isLoading || !slo} > - {i18n.translate('xpack.observability.slo.sloDetails.headerControl.actions', { + {i18n.translate('xpack.slo.sloDetails.headerControl.actions', { defaultMessage: 'Actions', })} @@ -144,7 +145,7 @@ export function HeaderControl({ isLoading, slo }: Props) { onClick={handleEdit} data-test-subj="sloDetailsHeaderControlPopoverEdit" > - {i18n.translate('xpack.observability.slo.sloDetails.headerControl.edit', { + {i18n.translate('xpack.slo.sloDetails.headerControl.edit', { defaultMessage: 'Edit', })} , @@ -155,12 +156,9 @@ export function HeaderControl({ isLoading, slo }: Props) { onClick={handleOpenRuleFlyout} data-test-subj="sloDetailsHeaderControlPopoverCreateRule" > - {i18n.translate( - 'xpack.observability.slo.sloDetails.headerControl.createBurnRateRule', - { - defaultMessage: 'Create new alert rule', - } - )} + {i18n.translate('xpack.slo.sloDetails.headerControl.createBurnRateRule', { + defaultMessage: 'Create new alert rule', + })} , - {i18n.translate('xpack.observability.slo.sloDetails.headerControl.manageRules', { + {i18n.translate('xpack.slo.sloDetails.headerControl.manageRules', { defaultMessage: 'Manage rules', })} , @@ -183,12 +181,9 @@ export function HeaderControl({ isLoading, slo }: Props) { onClick={handleNavigateToApm} data-test-subj="sloDetailsHeaderControlPopoverExploreInApm" > - {i18n.translate( - 'xpack.observability.slos.sloDetails.headerControl.exploreInApm', - { - defaultMessage: 'Service details', - } - )} + {i18n.translate('xpack.slo.sloDetails.headerControl.exploreInApm', { + defaultMessage: 'Service details', + })} ) : ( [] @@ -202,7 +197,7 @@ export function HeaderControl({ isLoading, slo }: Props) { onClick={handleClone} data-test-subj="sloDetailsHeaderControlPopoverClone" > - {i18n.translate('xpack.observability.slo.slo.item.actions.clone', { + {i18n.translate('xpack.slo.slo.item.actions.clone', { defaultMessage: 'Clone', })} , @@ -213,7 +208,7 @@ export function HeaderControl({ isLoading, slo }: Props) { onClick={handleDelete} data-test-subj="sloDetailsHeaderControlPopoverDelete" > - {i18n.translate('xpack.observability.slo.slo.item.actions.delete', { + {i18n.translate('xpack.slo.slo.item.actions.delete', { defaultMessage: 'Delete', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_title.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_title.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_title.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_title.stories.tsx index daf5e8038fdd3..3a4289a840765 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_title.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_title.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { buildSlo } from '../../../data/slo/slo'; import { HeaderTitle as Component, Props } from './header_title'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_title.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_title.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_title.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_title.tsx index 151d459cab667..4fa331b3e847b 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/header_title.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/header_title.tsx @@ -45,7 +45,7 @@ export function HeaderTitle({ isLoading, slo, showTitle = true }: Props) { - {i18n.translate('xpack.observability.slo.sloDetails.headerTitle.lastUpdatedMessage', { + {i18n.translate('xpack.slo.sloDetails.headerTitle.lastUpdatedMessage', { defaultMessage: 'Last updated on', })} @@ -56,7 +56,7 @@ export function HeaderTitle({ isLoading, slo, showTitle = true }: Props) { - {i18n.translate('xpack.observability.slo.sloDetails.headerTitle.createdMessage', { + {i18n.translate('xpack.slo.sloDetails.headerTitle.createdMessage', { defaultMessage: 'Created on', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/apm_indicator_overview.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/apm_indicator_overview.tsx similarity index 69% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/apm_indicator_overview.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/apm_indicator_overview.tsx index 1441f8752d296..6520c061d6d07 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/apm_indicator_overview.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/apm_indicator_overview.tsx @@ -46,46 +46,46 @@ export function ApmIndicatorOverview({ slo }: Props) { return ( - {i18n.translate( - 'xpack.observability.slo.sloDetails.overview.apmSource.serviceLabel', - { defaultMessage: 'service: {value}', values: { value: service } } - )} + {i18n.translate('xpack.slo.sloDetails.overview.apmSource.serviceLabel', { + defaultMessage: 'service: {value}', + values: { value: service }, + })} {environment !== ALL_VALUE && ( - {i18n.translate( - 'xpack.observability.slo.sloDetails.overview.apmSource.environmentLabel', - { defaultMessage: 'environment: {value}', values: { value: environment } } - )} + {i18n.translate('xpack.slo.sloDetails.overview.apmSource.environmentLabel', { + defaultMessage: 'environment: {value}', + values: { value: environment }, + })} )} {transactionType !== ALL_VALUE && ( - {i18n.translate( - 'xpack.observability.slo.sloDetails.overview.apmSource.transactionTypeLabel', - { defaultMessage: 'transactionType: {value}', values: { value: transactionType } } - )} + {i18n.translate('xpack.slo.sloDetails.overview.apmSource.transactionTypeLabel', { + defaultMessage: 'transactionType: {value}', + values: { value: transactionType }, + })} )} {transactionName !== ALL_VALUE && ( - {i18n.translate( - 'xpack.observability.slo.sloDetails.overview.apmSource.transactionNameLabel', - { defaultMessage: 'transactionName: {value}', values: { value: transactionName } } - )} + {i18n.translate('xpack.slo.sloDetails.overview.apmSource.transactionNameLabel', { + defaultMessage: 'transactionName: {value}', + values: { value: transactionName }, + })} )} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/display_query.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/display_query.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/display_query.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/display_query.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/overview.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.stories.tsx similarity index 88% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/overview.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.stories.tsx index c393846e23a7d..4e04957b631fd 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/overview.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { buildSlo } from '../../../../data/slo/slo'; import { Overview as Component, Props } from './overview'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/overview.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx similarity index 79% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/overview.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx index 303fc6d66a3eb..c974c91b00a69 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/overview/overview.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/overview/overview.tsx @@ -54,12 +54,12 @@ export function Overview({ slo }: Props) { - {i18n.translate('xpack.observability.slo.sloDetails.overview.observedValueSubtitle', { + {i18n.translate('xpack.slo.sloDetails.overview.observedValueSubtitle', { defaultMessage: '{value} (objective is {objective})', values: { value: hasNoData ? '-' : numeral(slo.summary.sliValue).format(percentFormat), @@ -70,22 +70,21 @@ export function Overview({ slo }: Props) { } /> {toIndicatorTypeLabel(slo.indicator.type)}} /> {BUDGETING_METHOD_OCCURRENCES} @@ -94,7 +93,7 @@ export function Overview({ slo }: Props) { {BUDGETING_METHOD_TIMESLICES} ( {slo.indicator.type === 'sli.metric.timeslice' ? i18n.translate( - 'xpack.observability.slo.sloDetails.overview.timeslicesBudgetingMethodDetailsForTimesliceMetric', + 'xpack.slo.sloDetails.overview.timeslicesBudgetingMethodDetailsForTimesliceMetric', { defaultMessage: '{duration} slices', values: { @@ -103,7 +102,7 @@ export function Overview({ slo }: Props) { } ) : i18n.translate( - 'xpack.observability.slo.sloDetails.overview.timeslicesBudgetingMethodDetails', + 'xpack.slo.sloDetails.overview.timeslicesBudgetingMethodDetails', { defaultMessage: '{duration} slices, {target} target', values: { @@ -118,13 +117,13 @@ export function Overview({ slo }: Props) { } /> {!!slo.description ? slo.description : '-'}
} /> } @@ -132,7 +131,7 @@ export function Overview({ slo }: Props) { {IndicatorOverview} {'index' in slo.indicator.params && ( - {i18n.translate( - 'xpack.observability.slo.sloDetails.overview.syntheticsMonitor.name', - { defaultMessage: 'Name: {value}', values: { value: name } } - )} + {i18n.translate('xpack.slo.sloDetails.overview.syntheticsMonitor.name', { + defaultMessage: 'Name: {value}', + values: { value: name }, + })}
)} {location && ( - {i18n.translate( - 'xpack.observability.slo.sloDetails.overview.syntheticsMonitor.locationName', - { defaultMessage: 'Location: {value}', values: { value: location } } - )} + {i18n.translate('xpack.slo.sloDetails.overview.syntheticsMonitor.locationName', { + defaultMessage: 'Location: {value}', + values: { value: location }, + })} )} @@ -78,15 +78,12 @@ export function SyntheticsIndicatorOverview({ slo }: Props) { ); } -const MONITOR_LABEL = i18n.translate( - 'xpack.observability.slo.sloDetails.overview.syntheticsMonitor', - { - defaultMessage: 'Synthetics monitor', - } -); +const MONITOR_LABEL = i18n.translate('xpack.slo.sloDetails.overview.syntheticsMonitor', { + defaultMessage: 'Synthetics monitor', +}); const MONITOR_ARIA_LABEL = i18n.translate( - 'xpack.observability.slo.sloDetails.overview.syntheticsMonitorDetails', + 'xpack.slo.sloDetails.overview.syntheticsMonitorDetails', { defaultMessage: 'Synthetics monitor details', } diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/sli_chart_panel.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/sli_chart_panel.tsx similarity index 73% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/sli_chart_panel.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/sli_chart_panel.tsx index cbda5b41cb0ca..788303b43ffa1 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/sli_chart_panel.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/sli_chart_panel.tsx @@ -10,8 +10,8 @@ import numeral from '@elastic/numeral'; import { i18n } from '@kbn/i18n'; import { rollingTimeWindowTypeSchema, SLOWithSummaryResponse } from '@kbn/slo-schema'; import React from 'react'; -import { ChartData } from '../../../typings/slo'; import { useKibana } from '../../../utils/kibana_react'; +import { ChartData } from '../../../typings/slo'; import { toDurationAdverbLabel, toDurationLabel } from '../../../utils/slo/labels'; import { WideChart } from './wide_chart'; @@ -35,7 +35,7 @@ export function SliChartPanel({ data, isLoading, slo }: Props) {

- {i18n.translate('xpack.observability.slo.sloDetails.sliHistoryChartPanel.title', { + {i18n.translate('xpack.slo.sloDetails.sliHistoryChartPanel.title', { defaultMessage: 'Historical SLI', })}

@@ -44,13 +44,10 @@ export function SliChartPanel({ data, isLoading, slo }: Props) { {rollingTimeWindowTypeSchema.is(slo.timeWindow.type) - ? i18n.translate( - 'xpack.observability.slo.sloDetails.sliHistoryChartPanel.duration', - { - defaultMessage: 'Last {duration}', - values: { duration: toDurationLabel(slo.timeWindow.duration) }, - } - ) + ? i18n.translate('xpack.slo.sloDetails.sliHistoryChartPanel.duration', { + defaultMessage: 'Last {duration}', + values: { duration: toDurationLabel(slo.timeWindow.duration) }, + }) : toDurationAdverbLabel(slo.timeWindow.duration)} @@ -62,10 +59,9 @@ export function SliChartPanel({ data, isLoading, slo }: Props) { titleColor={isSloFailed ? 'danger' : 'success'} title={hasNoData ? '-' : numeral(slo.summary.sliValue).format(percentFormat)} titleSize="s" - description={i18n.translate( - 'xpack.observability.slo.sloDetails.sliHistoryChartPanel.current', - { defaultMessage: 'Observed value' } - )} + description={i18n.translate('xpack.slo.sloDetails.sliHistoryChartPanel.current', { + defaultMessage: 'Observed value', + })} reverse />
@@ -73,10 +69,9 @@ export function SliChartPanel({ data, isLoading, slo }: Props) { @@ -85,12 +80,9 @@ export function SliChartPanel({ data, isLoading, slo }: Props) { ({ id: htmlIdGenerator()(), - label: i18n.translate('xpack.observability.slo.burnRates.fromRange.label', { + label: i18n.translate('xpack.slo.burnRates.fromRange.label', { defaultMessage: '{duration}h', values: { duration: window.longWindow.value }, }), diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/wide_chart.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/wide_chart.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/wide_chart.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/wide_chart.tsx index ee3a475e13110..d737590b190a5 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/components/wide_chart.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/components/wide_chart.tsx @@ -24,8 +24,8 @@ import moment from 'moment'; import React, { useRef } from 'react'; import { i18n } from '@kbn/i18n'; -import { ChartData } from '../../../typings'; import { useKibana } from '../../../utils/kibana_react'; +import { ChartData } from '../../../typings'; type ChartType = 'area' | 'line'; type State = 'success' | 'error'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_error_budget_actions.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_error_budget_actions.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_error_budget_actions.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_error_budget_actions.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_get_instance_id_query_param.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_get_instance_id_query_param.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_get_instance_id_query_param.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_get_instance_id_query_param.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_slo_details_tabs.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_slo_details_tabs.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_slo_details_tabs.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_slo_details_tabs.tsx index b687616b747b7..b49446f1651a6 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/hooks/use_slo_details_tabs.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/hooks/use_slo_details_tabs.tsx @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import { EuiNotificationBadge } from '@elastic/eui'; import React from 'react'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; -import { useFetchActiveAlerts } from '../../../hooks/slo/use_fetch_active_alerts'; +import { useFetchActiveAlerts } from '../../../hooks/use_fetch_active_alerts'; import { ALERTS_TAB_ID, OVERVIEW_TAB_ID, SloTabId } from '../components/slo_details'; export const useSloDetailsTabs = ({ @@ -31,7 +31,7 @@ export const useSloDetailsTabs = ({ const tabs = [ { id: OVERVIEW_TAB_ID, - label: i18n.translate('xpack.observability.slo.sloDetails.tab.overviewLabel', { + label: i18n.translate('xpack.slo.sloDetails.tab.overviewLabel', { defaultMessage: 'Overview', }), 'data-test-subj': 'overviewTab', @@ -40,7 +40,7 @@ export const useSloDetailsTabs = ({ }, { id: ALERTS_TAB_ID, - label: i18n.translate('xpack.observability.slo.sloDetails.tab.alertsLabel', { + label: i18n.translate('xpack.slo.sloDetails.tab.alertsLabel', { defaultMessage: 'Alerts', }), 'data-test-subj': 'alertsTab', diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/slo_details.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/slo_details.test.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/slo_details.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/slo_details.test.tsx index d01151d943264..af985a8363493 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/slo_details.test.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/slo_details.test.tsx @@ -20,17 +20,17 @@ import { } from '../../data/slo/historical_summary_data'; import { buildApmAvailabilityIndicator } from '../../data/slo/indicator'; import { buildSlo } from '../../data/slo/slo'; -import { ActiveAlerts } from '../../hooks/slo/active_alerts'; -import { useCapabilities } from '../../hooks/slo/use_capabilities'; -import { useDeleteSlo } from '../../hooks/slo/use_delete_slo'; -import { useFetchActiveAlerts } from '../../hooks/slo/use_fetch_active_alerts'; -import { useFetchHistoricalSummary } from '../../hooks/slo/use_fetch_historical_summary'; -import { useFetchSloDetails } from '../../hooks/slo/use_fetch_slo_details'; +import { ActiveAlerts } from '../../hooks/active_alerts'; +import { useCapabilities } from '../../hooks/use_capabilities'; +import { useDeleteSlo } from '../../hooks/use_delete_slo'; +import { useFetchActiveAlerts } from '../../hooks/use_fetch_active_alerts'; +import { useFetchHistoricalSummary } from '../../hooks/use_fetch_historical_summary'; +import { useFetchSloDetails } from '../../hooks/use_fetch_slo_details'; import { useLicense } from '../../hooks/use_license'; import { useKibana } from '../../utils/kibana_react'; import { render } from '../../utils/test_helper'; import { SloDetailsPage } from './slo_details'; -import { TagsList } from '@kbn/observability-shared-plugin/public'; +import { TagsList, HeaderMenuPortal } from '@kbn/observability-shared-plugin/public'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), @@ -40,11 +40,11 @@ jest.mock('react-router-dom', () => ({ jest.mock('@kbn/observability-shared-plugin/public'); jest.mock('../../utils/kibana_react'); jest.mock('../../hooks/use_license'); -jest.mock('../../hooks/slo/use_capabilities'); -jest.mock('../../hooks/slo/use_fetch_active_alerts'); -jest.mock('../../hooks/slo/use_fetch_slo_details'); -jest.mock('../../hooks/slo/use_fetch_historical_summary'); -jest.mock('../../hooks/slo/use_delete_slo'); +jest.mock('../../hooks/use_capabilities'); +jest.mock('../../hooks/use_fetch_active_alerts'); +jest.mock('../../hooks/use_fetch_slo_details'); +jest.mock('../../hooks/use_fetch_historical_summary'); +jest.mock('../../hooks/use_delete_slo'); const useKibanaMock = useKibana as jest.Mock; @@ -57,6 +57,9 @@ const useDeleteSloMock = useDeleteSlo as jest.Mock; const TagsListMock = TagsList as jest.Mock; TagsListMock.mockReturnValue(
Tags list
); +const HeaderMenuPortalMock = HeaderMenuPortal as jest.Mock; +HeaderMenuPortalMock.mockReturnValue(
Portal node
); + const mockNavigate = jest.fn(); const mockLocator = jest.fn(); const mockDelete = jest.fn(); @@ -144,7 +147,7 @@ describe('SLO Details Page', () => { render(); - expect(mockNavigate).toBeCalledWith(paths.observability.slos); + expect(mockNavigate).toBeCalledWith(paths.slos); }); }); @@ -260,7 +263,7 @@ describe('SLO Details Page', () => { await waitFor(() => { expect(mockNavigate).toBeCalledWith( - paths.observability.sloCreateWithEncodedForm( + paths.sloCreateWithEncodedForm( encode({ ...slo, name: `[Copy] ${slo.name}`, id: undefined }) ) ); @@ -293,7 +296,7 @@ describe('SLO Details Page', () => { }); await waitFor(() => { - expect(mockNavigate).toBeCalledWith(paths.observability.slos); + expect(mockNavigate).toBeCalledWith(paths.slos); }); }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/slo_details.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/slo_details.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/slo_details.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/slo_details.tsx index 19e032bbad8a3..d5e2665d4a9cb 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/slo_details.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/slo_details.tsx @@ -16,10 +16,11 @@ import type { SLOWithSummaryResponse } from '@kbn/slo-schema'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; import dedent from 'dedent'; +import { HeaderMenu } from '../../components/header_menu/header_menu'; import { useSloDetailsTabs } from './hooks/use_slo_details_tabs'; import { useKibana } from '../../utils/kibana_react'; import { usePluginContext } from '../../hooks/use_plugin_context'; -import { useFetchSloDetails } from '../../hooks/slo/use_fetch_slo_details'; +import { useFetchSloDetails } from '../../hooks/use_fetch_slo_details'; import { useLicense } from '../../hooks/use_license'; import PageNotFound from '../404'; import { @@ -36,7 +37,6 @@ import type { SloDetailsPathParams } from './types'; import { AutoRefreshButton } from '../../components/slo/auto_refresh_button'; import { useGetInstanceIdQueryParam } from './hooks/use_get_instance_id_query_param'; import { useAutoRefreshStorage } from '../../components/slo/auto_refresh_button/hooks/use_auto_refresh_storage'; -import { HeaderMenu } from '../overview/components/header_menu/header_menu'; export function SloDetailsPage() { const { @@ -111,7 +111,7 @@ export function SloDetailsPage() { } if (hasRightLicense === false) { - navigateToUrl(basePath.prepend(paths.observability.slos)); + navigateToUrl(basePath.prepend(paths.slos)); } const isPerformingAction = isLoading || isDeleting; @@ -152,16 +152,16 @@ function getBreadcrumbs( ): ChromeBreadcrumb[] { return [ { - href: basePath.prepend(paths.observability.slos), - text: i18n.translate('xpack.observability.breadcrumbs.slosLinkText', { + href: basePath.prepend(paths.slos), + text: i18n.translate('xpack.slo.breadcrumbs.slosLinkText', { defaultMessage: 'SLOs', }), - deepLinkId: 'observability-overview:slos', + deepLinkId: 'slo', }, { text: slo?.name ?? - i18n.translate('xpack.observability.breadcrumbs.sloDetailsLinkText', { + i18n.translate('xpack.slo.breadcrumbs.sloDetailsLinkText', { defaultMessage: 'Details', }), }, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_details/types.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_details/types.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_details/types.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_details/types.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.stories.tsx index c3c506eb484eb..235c45db8c986 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { ApmAvailabilityIndicatorTypeForm as Component } from './apm_availability_indicator_type_form'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx similarity index 70% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx index ade6cc5c32008..cb50694027c14 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/apm_availability/apm_availability_indicator_type_form.tsx @@ -11,7 +11,7 @@ import React, { useEffect } from 'react'; import { useFormContext } from 'react-hook-form'; import { useCreateDataView } from '../../../../hooks/use_create_data_view'; import { GroupByField } from '../common/group_by_field'; -import { useFetchApmIndex } from '../../../../hooks/slo/use_fetch_apm_indices'; +import { useFetchApmIndex } from '../../../../hooks/use_fetch_apm_indices'; import { CreateSLOForm } from '../../types'; import { FieldSelector } from '../apm_common/field_selector'; import { DataPreviewChart } from '../common/data_preview_chart'; @@ -36,19 +36,18 @@ export function ApmAvailabilityIndicatorTypeForm() { - {i18n.translate( - 'xpack.observability.slo.sloEdit.apmLatency.threshold.placeholder', - { defaultMessage: 'Threshold (ms)' } - )}{' '} + {i18n.translate('xpack.slo.sloEdit.apmLatency.threshold.placeholder', { + defaultMessage: 'Threshold (ms)', + })}{' '} @@ -153,19 +140,16 @@ export function ApmLatencyIndicatorTypeForm() {

@@ -136,13 +136,10 @@ export function DataPreviewChart({ - {i18n.translate( - 'xpack.observability.slo.sloEdit.dataPreviewChart.explanationMessage', - { - defaultMessage: - 'Fill the indicator fields to see visualisation of the current metrics', - } - )} + {i18n.translate('xpack.slo.sloEdit.dataPreviewChart.explanationMessage', { + defaultMessage: + 'Fill the indicator fields to see visualisation of the current metrics', + })} @@ -223,7 +220,7 @@ export function DataPreviewChart({ } {isError && ( - {i18n.translate( - 'xpack.observability.slo.sloEdit.dataPreviewChart.errorMessage', - { - defaultMessage: 'The current indicator settings are invalid', - } - )} + {i18n.translate('xpack.slo.sloEdit.dataPreviewChart.errorMessage', { + defaultMessage: 'The current indicator settings are invalid', + })} )}
@@ -272,23 +266,17 @@ export function DataPreviewChart({ ...firstItem, formattedValue: events.good, value: events.good, - label: i18n.translate( - 'xpack.observability.slo.sloEdit.dataPreviewChart.goodEvents', - { - defaultMessage: 'Good events', - } - ), + label: i18n.translate('xpack.slo.sloEdit.dataPreviewChart.goodEvents', { + defaultMessage: 'Good events', + }), }); rows.push({ ...firstItem, value: events.total, formattedValue: events.total, - label: i18n.translate( - 'xpack.observability.slo.sloEdit.dataPreviewChart.badEvents', - { - defaultMessage: 'Total events', - } - ), + label: i18n.translate('xpack.slo.sloEdit.dataPreviewChart.badEvents', { + defaultMessage: 'Total events', + }), }); } @@ -315,7 +303,7 @@ export function DataPreviewChart({

- {i18n.translate( - 'xpack.observability.equivalentApiRequest.h2.equivalentAPIRequestToLabel', - { defaultMessage: 'Equivalent API request' } - )} + {i18n.translate('xpack.slo.equivalentApiRequest.h2.equivalentAPIRequestToLabel', { + defaultMessage: 'Equivalent API request', + })}

@@ -75,7 +74,7 @@ export function EquivalentApiRequest({ disabled, isEditMode, slo }: Props) { @@ -85,10 +84,9 @@ export function EquivalentApiRequest({ disabled, isEditMode, slo }: Props) { ) : ( - {i18n.translate( - 'xpack.observability.equivalentApiRequest.formIsNotValidCodeBlockLabel', - { defaultMessage: 'Form is not valid' } - )} + {i18n.translate('xpack.slo.equivalentApiRequest.formIsNotValidCodeBlockLabel', { + defaultMessage: 'Form is not valid', + })} )} @@ -99,7 +97,7 @@ export function EquivalentApiRequest({ disabled, isEditMode, slo }: Props) { onClick={() => setIsFlyoutVisible(false)} flush="left" > - {i18n.translate('xpack.observability.equivalentApiRequest.closeButtonEmptyLabel', { + {i18n.translate('xpack.slo.equivalentApiRequest.closeButtonEmptyLabel', { defaultMessage: 'Close', })} @@ -116,7 +114,7 @@ export function EquivalentApiRequest({ disabled, isEditMode, slo }: Props) { disabled={disabled} onClick={() => setIsFlyoutVisible(true)} > - {i18n.translate('xpack.observability.slo.sloEdit.equivalentApiRequest', { + {i18n.translate('xpack.slo.sloEdit.equivalentApiRequest', { defaultMessage: 'Equivalent API request', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/group_by_field.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/group_by_field.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/group_by_field.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/group_by_field.tsx index ff50fa882cd06..b8dd052f61ebc 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/group_by_field.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/group_by_field.tsx @@ -12,7 +12,7 @@ import React from 'react'; import { DataView } from '@kbn/data-views-plugin/common'; import { useFormContext } from 'react-hook-form'; import { OptionalText } from './optional_text'; -import { useFetchGroupByCardinality } from '../../../../hooks/slo/use_fetch_group_by_cardinality'; +import { useFetchGroupByCardinality } from '../../../../hooks/use_fetch_group_by_cardinality'; import { CreateSLOForm } from '../../types'; import { IndexFieldSelector } from './index_field_selector'; import { getGroupKeysProse } from '../../../../utils/slo/groupings'; @@ -39,11 +39,11 @@ export function GroupByField({ dataView, isLoading }: { dataView?: DataView; isL defaultValue={ALL_VALUE} label={ - {i18n.translate('xpack.observability.slo.sloEdit.groupBy.label', { + {i18n.translate('xpack.slo.sloEdit.groupBy.label', { defaultMessage: 'Group by', })}{' '} } labelAppend={} - placeholder={i18n.translate('xpack.observability.slo.sloEdit.groupBy.placeholder', { + placeholder={i18n.translate('xpack.slo.sloEdit.groupBy.placeholder', { defaultMessage: 'Select an optional field to group by', })} isLoading={!!index && isLoading} @@ -62,7 +62,7 @@ export function GroupByField({ dataView, isLoading }: { dataView?: DataView; isL size="s" iconType={groupByCardinality.isHighCardinality ? 'warning' : ''} color={groupByCardinality.isHighCardinality ? 'warning' : 'primary'} - title={i18n.translate('xpack.observability.slo.sloEdit.groupBy.cardinalityInfo', { + title={i18n.translate('xpack.slo.sloEdit.groupBy.cardinalityInfo', { defaultMessage: 'Selected group by field {groupBy} will generate at least {card} SLO instances based on the last 24h sample data.', values: { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/index_field_selector.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/index_field_selector.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/index_field_selector.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/index_field_selector.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/optional_text.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/optional_text.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/optional_text.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/optional_text.tsx index b73ef8c08098e..863c1e498dca7 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/optional_text.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/optional_text.tsx @@ -12,7 +12,7 @@ import React from 'react'; export function OptionalText() { return ( - {i18n.translate('xpack.observability.slo.sloEdit.optionalLabel', { + {i18n.translate('xpack.slo.sloEdit.optionalLabel', { defaultMessage: 'Optional', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_builder.stories.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_builder.stories.tsx index 88d2679ceb6e9..a20e00985a66e 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_builder.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { QueryBuilder as Component, SearchBarProps } from './query_builder'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_builder.tsx similarity index 95% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_builder.tsx index 63252f2286157..b3847404f4995 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_builder.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_builder.tsx @@ -51,7 +51,7 @@ export function QueryBuilder(props: SearchBarProps) { data-test-subj="o11yQueryBuilderButton" iconType="documents" onClick={() => setIsFlyoutOpen(true)} - aria-label={i18n.translate('xpack.observability.queryBuilder.documentsButtonLabel', { + aria-label={i18n.translate('xpack.slo.queryBuilder.documentsButtonLabel', { defaultMessage: 'View documents', })} /> diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_documents_flyout.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_documents_flyout.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_documents_flyout.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_documents_flyout.tsx index d11b9bb496b64..1f2760a1bdd56 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_documents_flyout.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_documents_flyout.tsx @@ -47,7 +47,7 @@ export function QueryDocumentsFlyout({

- {i18n.translate('xpack.observability.queryBuilder.h2.documentsLabel', { + {i18n.translate('xpack.slo.queryBuilder.h2.documentsLabel', { defaultMessage: 'Documents for {indexPattern}', values: { indexPattern: dataView.getIndexPattern() }, })} @@ -70,7 +70,7 @@ export function QueryDocumentsFlyout({ data-test-subj="o11yQueryBuilderCloseButton" onClick={() => setIsFlyoutOpen(false)} > - {i18n.translate('xpack.observability.queryBuilder.closeButtonLabel', { + {i18n.translate('xpack.slo.queryBuilder.closeButtonLabel', { defaultMessage: 'Close', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_search_bar.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_search_bar.tsx similarity index 98% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_search_bar.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_search_bar.tsx index f3b6279ed39ed..49ddd17e65a4e 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/query_search_bar.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/query_search_bar.tsx @@ -11,11 +11,11 @@ import { fromKueryExpression, Query, TimeRange, toElasticsearchQuery } from '@kb import { kqlQuerySchema, kqlWithFiltersSchema } from '@kbn/slo-schema'; import React, { memo } from 'react'; import styled from 'styled-components'; +import { observabilityAppId } from '@kbn/observability-shared-plugin/common'; import { useCreateDataView } from '../../../../hooks/use_create_data_view'; import { SearchBarProps } from './query_builder'; import { useKibana } from '../../../../utils/kibana_react'; import { CreateSLOForm } from '../../types'; -import { observabilityAppId } from '../../../../../common'; import { OptionalText } from './optional_text'; export const QuerySearchBar = memo( diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/slo_inspect.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/slo_inspect.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/slo_inspect.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/slo_inspect.tsx index 9f911bb1787ea..223105572f667 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/slo_inspect.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/slo_inspect.tsx @@ -27,14 +27,13 @@ import { INGEST_PIPELINES_APP_LOCATOR, INGEST_PIPELINES_PAGES, } from '@kbn/ingest-pipelines-plugin/public'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; import { useFetcher } from '@kbn/observability-shared-plugin/public'; import { GetSLOResponse } from '@kbn/slo-schema'; import React, { ReactNode, useState } from 'react'; import { useFormContext } from 'react-hook-form'; -import { ObservabilityPublicPluginsStart } from '../../../..'; -import { enableInspectEsQueries } from '../../../../../common'; -import { useFetchSloInspect } from '../../../../hooks/slo/use_fetch_slo_inspect'; +import { enableInspectEsQueries } from '@kbn/observability-plugin/common'; +import { useKibana } from '../../../../utils/kibana_react'; +import { useFetchSloInspect } from '../../../../hooks/use_fetch_slo_inspect'; import { usePluginContext } from '../../../../hooks/use_plugin_context'; import { transformCreateSLOFormToCreateSLOInput } from '../../helpers/process_slo_form_values'; import { CreateSLOForm } from '../../types'; @@ -56,7 +55,7 @@ export function SLOInspectWrapper({ slo, disabled }: Props) { } function SLOInspect({ slo, disabled }: Props) { - const { share, http } = useKibana().services; + const { share, http } = useKibana().services; const { trigger, getValues } = useFormContext(); const [isFlyoutVisible, setIsFlyoutVisible] = useState(false); @@ -102,7 +101,7 @@ function SLOInspect({ slo, disabled }: Props) {

- {i18n.translate('xpack.observability.monitorInspect.configLabel', { + {i18n.translate('xpack.slo.monitorInspect.configLabel', { defaultMessage: 'SLO Configurations', })}

@@ -116,7 +115,7 @@ function SLOInspect({ slo, disabled }: Props) { - {i18n.translate('xpack.observability.sLOInspect.closeButtonLabel', { + {i18n.translate('xpack.slo.sLOInspect.closeButtonLabel', { defaultMessage: 'Close', })} @@ -204,10 +203,10 @@ function SLOInspect({ slo, disabled }: Props) { - {i18n.translate('xpack.observability.sLOInspect.sLOInspectButtonLabel', { + {i18n.translate('xpack.slo.sLOInspect.sLOInspectButtonLabel', { defaultMessage: 'SLO Inspect', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/use_field_sidebar.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/use_field_sidebar.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/use_field_sidebar.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/use_field_sidebar.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/use_table_docs.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/use_table_docs.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/use_table_docs.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/use_table_docs.tsx index 7ecc90dddcdb6..d1b17b6747fa1 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/common/use_table_docs.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/common/use_table_docs.tsx @@ -10,7 +10,7 @@ import { FieldPath, useFormContext } from 'react-hook-form'; import { DataView } from '@kbn/data-views-plugin/common'; import { TimeRange } from '@kbn/es-query'; import { QuerySchema } from '@kbn/slo-schema'; -import { getElasticsearchQueryOrThrow } from '../../../../../common/utils/parse_kuery'; +import { getElasticsearchQueryOrThrow } from '@kbn/observability-plugin/public'; import { CreateSLOForm } from '../../types'; export const useTableDocs = ({ diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx index 4b8dce62f43bb..d9a8386b7ed84 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { IndexSelection as Component } from './index_selection'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_common/index_selection.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.tsx similarity index 88% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_common/index_selection.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.tsx index 45ce367c9ca79..880c15e6a67be 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_common/index_selection.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_common/index_selection.tsx @@ -11,9 +11,8 @@ import { i18n } from '@kbn/i18n'; import React, { useEffect, useState } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import { DataViewPicker } from '@kbn/unified-search-plugin/public'; +import { useFetchDataViews } from '@kbn/observability-plugin/public'; import { useKibana } from '../../../../utils/kibana_react'; -import { ObservabilityPublicPluginsStart } from '../../../..'; -import { useFetchDataViews } from '../../../../hooks/use_fetch_data_views'; import { CreateSLOForm } from '../../types'; export function IndexSelection() { @@ -22,7 +21,7 @@ export function IndexSelection() { const { isLoading: isDataViewsLoading, data: dataViews = [] } = useFetchDataViews(); - const { dataViewEditor } = useKibana().services; + const { dataViewEditor } = useKibana().services; const [adHocDataViews, setAdHocDataViews] = useState([]); @@ -116,16 +115,10 @@ export function IndexSelection() { ); } -const SELECT_DATA_VIEW = i18n.translate( - 'xpack.observability.slo.sloEdit.customKql.dataViewSelection.label', - { - defaultMessage: 'Select a Data view', - } -); +const SELECT_DATA_VIEW = i18n.translate('xpack.slo.sloEdit.customKql.dataViewSelection.label', { + defaultMessage: 'Select a Data view', +}); -const INDEX_LABEL = i18n.translate( - 'xpack.observability.slo.sloEdit.customKql.indexSelection.label', - { - defaultMessage: 'Index', - } -); +const INDEX_LABEL = i18n.translate('xpack.slo.sloEdit.customKql.indexSelection.label', { + defaultMessage: 'Index', +}); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.stories.tsx index 5eb0b68070789..24342ce10a64c 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { CustomKqlIndicatorTypeForm as Component } from './custom_kql_indicator_type_form'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx similarity index 56% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx index f76dd7fabcfb2..b1dc9da27762f 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_kql/custom_kql_indicator_type_form.tsx @@ -36,13 +36,12 @@ export function CustomKqlIndicatorTypeForm() { } @@ -80,26 +75,20 @@ export function CustomKqlIndicatorTypeForm() { } @@ -110,25 +99,19 @@ export function CustomKqlIndicatorTypeForm() { } diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.stories.tsx index 1abbff61a0dc8..499e87f04d09f 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { CustomMetricIndicatorTypeForm as Component } from './custom_metric_type_form'; import { SLO_EDIT_FORM_DEFAULT_VALUES_CUSTOM_METRIC } from '../../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx similarity index 80% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx index b40a7cd43227a..5dfbb381f6924 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/custom_metric_type_form.tsx @@ -48,7 +48,7 @@ export function CustomMetricIndicatorTypeForm() {

@@ -63,13 +63,12 @@ export function CustomMetricIndicatorTypeForm() {

@@ -136,7 +131,7 @@ export function CustomMetricIndicatorTypeForm() {

diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx similarity index 79% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx index 3e077ab2280a6..de19f2f5146c9 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/custom_metric/metric_indicator.tsx @@ -51,42 +51,33 @@ function createEquationFromMetric(names: string[]) { return names.join(' + '); } -const metricLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.metricLabel', - { defaultMessage: 'Metric' } -); +const metricLabel = i18n.translate('xpack.slo.sloEdit.sliType.customMetric.metricLabel', { + defaultMessage: 'Metric', +}); -const filterLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.filterLabel', - { defaultMessage: 'Filter' } -); +const filterLabel = i18n.translate('xpack.slo.sloEdit.sliType.customMetric.filterLabel', { + defaultMessage: 'Filter', +}); const metricTooltip = ( ); -const equationLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.equationLabel', - { defaultMessage: 'Equation' } -); +const equationLabel = i18n.translate('xpack.slo.sloEdit.sliType.customMetric.equationLabel', { + defaultMessage: 'Equation', +}); const equationTooltip = ( ); @@ -145,10 +136,9 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn } label={ - {i18n.translate( - 'xpack.observability.slo.sloEdit.customMetric.aggregationLabel', - { defaultMessage: 'Aggregation' } - )}{' '} + {i18n.translate('xpack.slo.sloEdit.customMetric.aggregationLabel', { + defaultMessage: 'Aggregation', + })}{' '} {metric.name} } @@ -165,11 +155,11 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn fullWidth singleSelection={{ asPlainText: true }} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.aggregation.placeholder', + 'xpack.slo.sloEdit.sliType.customMetric.aggregation.placeholder', { defaultMessage: 'Select an aggregation' } )} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.aggregation.placeholder', + 'xpack.slo.sloEdit.sliType.customMetric.aggregation.placeholder', { defaultMessage: 'Select an aggregation' } )} isClearable @@ -233,11 +223,11 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn fullWidth singleSelection={{ asPlainText: true }} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.metricField.placeholder', + 'xpack.slo.sloEdit.sliType.customMetric.metricField.placeholder', { defaultMessage: 'Select a metric field' } )} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.metricField.placeholder', + 'xpack.slo.sloEdit.sliType.customMetric.metricField.placeholder', { defaultMessage: 'Select a metric field' } )} isClearable @@ -282,19 +272,15 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn indexPatternString={watch('indicator.params.index')} label={`${filterLabel} ${metric.name}`} name={`indicator.params.${type}.metrics.${index}.filter`} - placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.placeholder', - { defaultMessage: 'KQL filter' } - )} + placeholder={i18n.translate('xpack.slo.sloEdit.sliType.customMetric.placeholder', { + defaultMessage: 'KQL filter', + })} required={false} tooltip={ } @@ -308,14 +294,12 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn style={{ marginTop: '1.5em' }} onClick={handleDeleteMetric(index)} disabled={disableDelete} - title={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.deleteLabel', - { defaultMessage: 'Delete metric' } - )} - aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.deleteLabel', - { defaultMessage: 'Delete metric' } - )} + title={i18n.translate('xpack.slo.sloEdit.sliType.customMetric.deleteLabel', { + defaultMessage: 'Delete metric', + })} + aria-label={i18n.translate('xpack.slo.sloEdit.sliType.customMetric.deleteLabel', { + defaultMessage: 'Delete metric', + })} /> @@ -331,12 +315,12 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn onClick={handleAddMetric} isDisabled={disableAdd} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.addMetricAriaLabel', + 'xpack.slo.sloEdit.sliType.customMetric.addMetricAriaLabel', { defaultMessage: 'Add metric' } )} > @@ -361,17 +345,14 @@ export function MetricIndicator({ type, metricFields, isLoadingIndex }: MetricIn {equationLabel} {equationTooltip} } - helpText={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.equationHelpText', - { - defaultMessage: - 'Supports basic math equations, valid charaters are: A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =', - } - )} + helpText={i18n.translate('xpack.slo.sloEdit.sliType.customMetric.equationHelpText', { + defaultMessage: + 'Supports basic math equations, valid charaters are: A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =', + })} isInvalid={fieldState.invalid} error={[ i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.customMetric.equation.invalidCharacters', + 'xpack.slo.sloEdit.sliType.customMetric.equation.invalidCharacters', { defaultMessage: 'The equation field only supports the following characters: A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =', diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/histogram/histogram_indicator.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator.tsx similarity index 80% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/histogram/histogram_indicator.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator.tsx index 4efcc1bfb5b8b..3cbe4dcb798e4 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/histogram/histogram_indicator.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator.tsx @@ -32,13 +32,13 @@ interface HistogramIndicatorProps { const AGGREGATIONS = { value_count: { value: 'value_count', - label: i18n.translate('xpack.observability.slo.sloEdit.sliType.histogram.valueCountLabel', { + label: i18n.translate('xpack.slo.sloEdit.sliType.histogram.valueCountLabel', { defaultMessage: 'Value count', }), }, range: { value: 'range', - label: i18n.translate('xpack.observability.slo.sloEdit.sliType.histogram.rangeLabel', { + label: i18n.translate('xpack.slo.sloEdit.sliType.histogram.rangeLabel', { defaultMessage: 'Range', }), }, @@ -48,20 +48,17 @@ const AGGREGATION_OPTIONS = Object.values(AGGREGATIONS); const aggregationTooltip = ( ); const fromTooltip = ( ); -const aggregationLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.histogram.aggregationLabel', - { defaultMessage: 'Aggregation' } -); +const aggregationLabel = i18n.translate('xpack.slo.sloEdit.sliType.histogram.aggregationLabel', { + defaultMessage: 'Aggregation', +}); -const metricLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.histogram.metricLabel', - { defaultMessage: 'Field' } -); +const metricLabel = i18n.translate('xpack.slo.sloEdit.sliType.histogram.metricLabel', { + defaultMessage: 'Field', +}); -const toLabel = i18n.translate('xpack.observability.slo.sloEdit.sliType.histogram.toLabel', { +const toLabel = i18n.translate('xpack.slo.sloEdit.sliType.histogram.toLabel', { defaultMessage: 'To', }); -const fromLabel = i18n.translate('xpack.observability.slo.sloEdit.sliType.histogram.fromLabel', { +const fromLabel = i18n.translate('xpack.slo.sloEdit.sliType.histogram.fromLabel', { defaultMessage: 'From', }); @@ -133,11 +128,11 @@ export function HistogramIndicator({ fullWidth singleSelection={{ asPlainText: true }} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.histogram.aggregation.placeholder', + 'xpack.slo.sloEdit.sliType.histogram.aggregation.placeholder', { defaultMessage: 'Select an aggregation' } )} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.histogram.aggregation.placeholder', + 'xpack.slo.sloEdit.sliType.histogram.aggregation.placeholder', { defaultMessage: 'Select an aggregation' } )} isInvalid={fieldState.invalid} @@ -174,11 +169,11 @@ export function HistogramIndicator({ fullWidth singleSelection={{ asPlainText: true }} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.histogram.metricField.placeholder', + 'xpack.slo.sloEdit.sliType.histogram.metricField.placeholder', { defaultMessage: 'Select a histogram field' } )} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.histogram.metricField.placeholder', + 'xpack.slo.sloEdit.sliType.histogram.metricField.placeholder', { defaultMessage: 'Select a histogram field' } )} isInvalid={fieldState.invalid} @@ -288,24 +283,18 @@ export function HistogramIndicator({ } diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx index 9abe0828b6695..2451dbe1baaba 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/histogram/histogram_indicator_type_form.tsx @@ -42,7 +42,7 @@ export function HistogramIndicatorTypeForm() {

@@ -57,13 +57,12 @@ export function HistogramIndicatorTypeForm() {

@@ -123,7 +121,7 @@ export function HistogramIndicatorTypeForm() {

diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form.stories.tsx index ace1088d4a3bb..9e90d5e315db8 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloEditForm as Component, Props } from './slo_edit_form'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form.tsx index 111d4cf5243d8..6c0c90de89386 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form.tsx @@ -65,21 +65,21 @@ export function SloEditForm({ slo, initialValues, onSave }: Props) { , status: isIndicatorSectionValid ? 'complete' : 'incomplete', }, { - title: i18n.translate('xpack.observability.slo.sloEdit.objectives.title', { + title: i18n.translate('xpack.slo.sloEdit.objectives.title', { defaultMessage: 'Set objectives', }), children: showObjectiveSection ? : null, status: showObjectiveSection && isObjectiveSectionValid ? 'complete' : 'incomplete', }, { - title: i18n.translate('xpack.observability.slo.sloEdit.description.title', { + title: i18n.translate('xpack.slo.sloEdit.description.title', { defaultMessage: 'Describe SLO', }), children: showDescriptionSection ? : null, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_description_section.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_description_section.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_description_section.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_description_section.stories.tsx index 8365b8ef27545..bac591b6ec365 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_description_section.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_description_section.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloEditFormDescriptionSection as Component } from './slo_edit_form_description_section'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_description_section.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_description_section.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_description_section.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_description_section.tsx index 8e4e2f26ea19a..0e9af3602b9db 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_description_section.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_description_section.tsx @@ -42,7 +42,7 @@ export function SloEditFormDescriptionSection() { @@ -57,12 +57,9 @@ export function SloEditFormDescriptionSection() { isInvalid={fieldState.invalid} id={sloNameId} data-test-subj="sloFormNameInput" - placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.description.sloNamePlaceholder', - { - defaultMessage: 'Name for the SLO', - } - )} + placeholder={i18n.translate('xpack.slo.sloEdit.description.sloNamePlaceholder', { + defaultMessage: 'Name for the SLO', + })} /> )} /> @@ -72,7 +69,7 @@ export function SloEditFormDescriptionSection() { } @@ -89,7 +86,7 @@ export function SloEditFormDescriptionSection() { id={descriptionId} data-test-subj="sloFormDescriptionTextArea" placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.description.sloDescriptionPlaceholder', + 'xpack.slo.sloEdit.description.sloDescriptionPlaceholder', { defaultMessage: 'A short description of the SLO', } @@ -103,7 +100,7 @@ export function SloEditFormDescriptionSection() { @@ -117,10 +114,10 @@ export function SloEditFormDescriptionSection() { {...field} id={tagsId} fullWidth - aria-label={i18n.translate('xpack.observability.slo.sloEdit.tags.placeholder', { + aria-label={i18n.translate('xpack.slo.sloEdit.tags.placeholder', { defaultMessage: 'Add tags', })} - placeholder={i18n.translate('xpack.observability.slo.sloEdit.tags.placeholder', { + placeholder={i18n.translate('xpack.slo.sloEdit.tags.placeholder', { defaultMessage: 'Add tags', })} isInvalid={fieldState.invalid} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_footer.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_footer.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_footer.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_footer.tsx index 4b0e75f30c981..7a52a07c6d0b0 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_footer.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_footer.tsx @@ -11,13 +11,13 @@ import type { GetSLOResponse } from '@kbn/slo-schema'; import React, { useCallback, useMemo } from 'react'; import { useFormContext } from 'react-hook-form'; import { InPortal } from 'react-reverse-portal'; +import { useCreateRule } from '@kbn/observability-plugin/public'; +import { useKibana } from '../../../utils/kibana_react'; import { sloEditFormFooterPortal } from '../shared_flyout/slo_add_form_flyout'; import { paths } from '../../../../common/locators/paths'; -import { useCreateSlo } from '../../../hooks/slo/use_create_slo'; -import { useUpdateSlo } from '../../../hooks/slo/use_update_slo'; -import { useCreateRule } from '../../../hooks/use_create_rule'; +import { useCreateSlo } from '../../../hooks/use_create_slo'; +import { useUpdateSlo } from '../../../hooks/use_update_slo'; import { BurnRateRuleParams } from '../../../typings'; -import { useKibana } from '../../../utils/kibana_react'; import { createBurnRateRuleRequestBody } from '../helpers/create_burn_rate_rule_request_body'; import { transformCreateSLOFormToCreateSLOInput, @@ -66,7 +66,7 @@ export function SloEditFormFooter({ slo, onSave }: Props) { if (isEditMode) { const processedValues = transformValuesToUpdateSLOInput(values); await updateSlo({ sloId: slo.id, slo: processedValues }); - navigate(basePath.prepend(paths.observability.slos)); + navigate(basePath.prepend(paths.slos)); } else { const processedValues = transformCreateSLOFormToCreateSLOInput(values); const resp = await createSlo({ slo: processedValues }); @@ -76,7 +76,7 @@ export function SloEditFormFooter({ slo, onSave }: Props) { if (onSave) { onSave(); } else { - navigate(basePath.prepend(paths.observability.slos)); + navigate(basePath.prepend(paths.slos)); } } }, [ @@ -104,10 +104,10 @@ export function SloEditFormFooter({ slo, onSave }: Props) { onClick={handleSubmit} > {isEditMode - ? i18n.translate('xpack.observability.slo.sloEdit.editSloButton', { + ? i18n.translate('xpack.slo.sloEdit.editSloButton', { defaultMessage: 'Update SLO', }) - : i18n.translate('xpack.observability.slo.sloEdit.createSloButton', { + : i18n.translate('xpack.slo.sloEdit.createSloButton', { defaultMessage: 'Create SLO', })} @@ -117,13 +117,9 @@ export function SloEditFormFooter({ slo, onSave }: Props) { color="primary" data-test-subj="sloFormCancelButton" disabled={isCreateSloLoading || isUpdateSloLoading || isCreateBurnRateRuleLoading} - onClick={ - onSave - ? () => onSave() - : () => navigateToUrl(basePath.prepend(paths.observability.slos)) - } + onClick={onSave ? () => onSave() : () => navigateToUrl(basePath.prepend(paths.slos))} > - {i18n.translate('xpack.observability.slo.sloEdit.cancelButton', { + {i18n.translate('xpack.slo.sloEdit.cancelButton', { defaultMessage: 'Cancel', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_indicator_section.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_indicator_section.tsx similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_indicator_section.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_indicator_section.tsx index 099ae458a8ca4..156f45c2c982c 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_indicator_section.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_indicator_section.tsx @@ -86,6 +86,6 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator ); } -const indicatorLabel = i18n.translate('xpack.observability.slo.sloEdit.definition.sliType', { +const indicatorLabel = i18n.translate('xpack.slo.sloEdit.definition.sliType', { defaultMessage: 'Choose the SLI type', }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_objective_section.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_objective_section.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_objective_section.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_objective_section.stories.tsx index ee2938321d136..8f5a0e73d424c 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_objective_section.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_objective_section.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { FormProvider, useForm } from 'react-hook-form'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloEditFormObjectiveSection as Component } from './slo_edit_form_objective_section'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from '../constants'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_objective_section.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_objective_section.tsx similarity index 84% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_objective_section.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_objective_section.tsx index 073248d844fed..ad8baf52be88f 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/slo_edit_form_objective_section.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/slo_edit_form_objective_section.tsx @@ -97,16 +97,13 @@ export function SloEditFormObjectiveSection() { - {i18n.translate('xpack.observability.slo.sloEdit.timeWindowType.label', { + {i18n.translate('xpack.slo.sloEdit.timeWindowType.label', { defaultMessage: 'Time window', })}{' '} @@ -133,16 +130,13 @@ export function SloEditFormObjectiveSection() { - {i18n.translate('xpack.observability.slo.sloEdit.timeWindowDuration.label', { + {i18n.translate('xpack.slo.sloEdit.timeWindowDuration.label', { defaultMessage: 'Duration', })}{' '} @@ -177,7 +171,7 @@ export function SloEditFormObjectiveSection() {

@@ -191,7 +185,7 @@ export function SloEditFormObjectiveSection() {

@@ -205,17 +199,14 @@ export function SloEditFormObjectiveSection() { - {i18n.translate('xpack.observability.slo.sloEdit.budgetingMethod.label', { + {i18n.translate('xpack.slo.sloEdit.budgetingMethod.label', { defaultMessage: 'Budgeting method', })}{' '} @@ -255,11 +246,11 @@ export function SloEditFormObjectiveSection() { isInvalid={getFieldState('objective.target').invalid} label={ - {i18n.translate('xpack.observability.slo.sloEdit.targetSlo.label', { + {i18n.translate('xpack.slo.sloEdit.targetSlo.label', { defaultMessage: 'Target / SLO (%)', })}{' '} - {i18n.translate('xpack.observability.slo.sloEdit.timeSliceTarget.label', { + {i18n.translate('xpack.slo.sloEdit.timeSliceTarget.label', { defaultMessage: 'Timeslice target (%)', })}{' '} - {i18n.translate('xpack.observability.slo.sloEdit.timesliceWindow.label', { + {i18n.translate('xpack.slo.sloEdit.timesliceWindow.label', { defaultMessage: 'Timeslice window (in minutes)', })}{' '} } /> } @@ -141,9 +132,6 @@ export function SyntheticsAvailabilityIndicatorTypeForm() { ); } -const LABEL = i18n.translate( - 'xpack.observability.slo.sloEdit.dataPreviewChart.syntheticsAvailability.xTitle', - { - defaultMessage: 'Last 24 hours', - } -); +const LABEL = i18n.translate('xpack.slo.sloEdit.dataPreviewChart.syntheticsAvailability.xTitle', { + defaultMessage: 'Last 24 hours', +}); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/synthetics_common/field_selector.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_common/field_selector.tsx similarity index 95% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/synthetics_common/field_selector.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_common/field_selector.tsx index 1f4b27b3b135f..5bc77b186f960 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/synthetics_common/field_selector.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/synthetics_common/field_selector.tsx @@ -15,7 +15,7 @@ import { OptionalText } from '../common/optional_text'; import { useFetchSyntheticsSuggestions, Suggestion, -} from '../../../../hooks/slo/use_fetch_synthetics_suggestions'; +} from '../../../../hooks/use_fetch_synthetics_suggestions'; import { CreateSLOForm } from '../../types'; interface Option { @@ -62,9 +62,7 @@ export function FieldSelector({ const ALL_VALUE_OPTION = { value: ALL_VALUE, - label: i18n.translate('xpack.observability.slo.sloEdit.fieldSelector.all', { - defaultMessage: 'All', - }), + label: i18n.translate('xpack.slo.fieldSelector.all', { defaultMessage: 'All' }), }; const options = (allowAllOption ? [ALL_VALUE_OPTION] : []).concat(createOptions(suggestions)); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/timeslice_metric/metric_indicator.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_indicator.tsx similarity index 82% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/timeslice_metric/metric_indicator.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_indicator.tsx index d3098208fa6c1..cc10844c3c9d7 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/timeslice_metric/metric_indicator.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_indicator.tsx @@ -48,39 +48,29 @@ function createEquationFromMetric(names: string[]) { return names.join(' + '); } -const equationLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.equationLabel', - { defaultMessage: 'Equation' } -); +const equationLabel = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.equationLabel', { + defaultMessage: 'Equation', +}); const equationTooltip = ( ); -const thresholdLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.thresholdLabel', - { - defaultMessage: 'Threshold', - } -); +const thresholdLabel = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.thresholdLabel', { + defaultMessage: 'Threshold', +}); const thresholdTooltip = ( ); @@ -140,12 +130,11 @@ export function MetricIndicator({ indexFields, isLoadingIndex }: MetricIndicator style={{ marginTop: '1.5em' }} onClick={handleDeleteMetric(index)} disabled={disableDelete} - title={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.deleteLabel', - { defaultMessage: 'Delete metric' } - )} + title={i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.deleteLabel', { + defaultMessage: 'Delete metric', + })} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.deleteLabel', + 'xpack.slo.sloEdit.sliType.timesliceMetric.deleteLabel', { defaultMessage: 'Delete metric' } )} /> @@ -165,12 +154,12 @@ export function MetricIndicator({ indexFields, isLoadingIndex }: MetricIndicator onClick={handleAddMetric} isDisabled={disableAdd} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.addMetricAriaLabel', + 'xpack.slo.sloEdit.sliType.timesliceMetric.addMetricAriaLabel', { defaultMessage: 'Add metric' } )} > @@ -200,7 +189,7 @@ export function MetricIndicator({ indexFields, isLoadingIndex }: MetricIndicator isInvalid={fieldState.invalid} error={[ i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.equation.invalidCharacters', + 'xpack.slo.sloEdit.sliType.timesliceMetric.equation.invalidCharacters', { defaultMessage: 'The equation field only supports the following characters: A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =', @@ -233,7 +222,7 @@ export function MetricIndicator({ indexFields, isLoadingIndex }: MetricIndicator fullWidth isInvalid={fieldState.invalid} label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.comparatorLabel', + 'xpack.slo.sloEdit.sliType.timesliceMetric.comparatorLabel', { defaultMessage: 'Comparator', } @@ -288,13 +277,10 @@ export function MetricIndicator({ indexFields, isLoadingIndex }: MetricIndicator

- {i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.equationHelpText', - { - defaultMessage: - 'Supports basic math equations, valid charaters are: A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =', - } - )} + {i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.equationHelpText', { + defaultMessage: + 'Supports basic math equations, valid charaters are: A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =', + })}

diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx index 22cbc42366baa..f4cb60d81daf2 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/components/timeslice_metric/metric_input.tsx @@ -21,29 +21,24 @@ import { createOptionsFromFields, Option } from '../../helpers/create_options'; import { CreateSLOForm } from '../../types'; import { QueryBuilder } from '../common/query_builder'; -const fieldLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.fieldLabel', - { defaultMessage: 'Field' } -); +const fieldLabel = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.fieldLabel', { + defaultMessage: 'Field', +}); const aggregationLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.aggregationLabel', + 'xpack.slo.sloEdit.sliType.timesliceMetric.aggregationLabel', { defaultMessage: 'Aggregation' } ); -const filterLabel = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.filterLabel', - { defaultMessage: 'Filter' } -); +const filterLabel = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.filterLabel', { + defaultMessage: 'Filter', +}); const fieldTooltip = ( ); @@ -113,11 +108,11 @@ export function MetricInput({ isClearable={false} singleSelection={{ asPlainText: true }} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.aggregationField.placeholder', + 'xpack.slo.sloEdit.sliType.timesliceMetric.aggregationField.placeholder', { defaultMessage: 'Select an aggregation' } )} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.aggregationField.placeholder', + 'xpack.slo.sloEdit.sliType.timesliceMetric.aggregationField.placeholder', { defaultMessage: 'Select an aggregation' } )} isInvalid={fieldState.invalid} @@ -170,10 +165,9 @@ export function MetricInput({ isInvalid={fieldState.invalid} label={ - {i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.percentileLabel', - { defaultMessage: 'Percentile' } - )}{' '} + {i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.percentileLabel', { + defaultMessage: 'Percentile', + })}{' '} {metric.name} } @@ -221,11 +215,11 @@ export function MetricInput({ fullWidth singleSelection={{ asPlainText: true }} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.metricField.placeholder', + 'xpack.slo.sloEdit.sliType.timesliceMetric.metricField.placeholder', { defaultMessage: 'Select a metric field' } )} aria-label={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.metricField.placeholder', + 'xpack.slo.sloEdit.sliType.timesliceMetric.metricField.placeholder', { defaultMessage: 'Select a metric field' } )} isInvalid={fieldState.invalid} @@ -270,14 +264,14 @@ export function MetricInput({ label={`${filterLabel} ${metric.name}`} name={`indicator.params.metric.metrics.${index}.filter`} placeholder={i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.goodQuery.placeholder', + 'xpack.slo.sloEdit.sliType.timesliceMetric.goodQuery.placeholder', { defaultMessage: 'KQL filter' } )} required={false} tooltip={

- +

@@ -65,13 +62,12 @@ export function TimesliceMetricIndicatorTypeForm() {

diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/constants.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts similarity index 83% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/constants.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts index 9ad1e622a2fa5..0259095558a6d 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/constants.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/constants.ts @@ -30,7 +30,7 @@ import { INDICATOR_HISTOGRAM, INDICATOR_TIMESLICE_METRIC, } from '../../utils/slo/labels'; -import { SYNTHETICS_INDEX_PATTERN } from '../../../common/slo/constants'; +import { SYNTHETICS_INDEX_PATTERN } from '../../../common/constants'; import { CreateSLOForm } from './types'; export const SLI_OPTIONS: Array<{ @@ -81,13 +81,13 @@ export const BUDGETING_METHOD_OPTIONS: Array<{ value: BudgetingMethod; text: str export const TIMEWINDOW_TYPE_OPTIONS: Array<{ value: TimeWindow; text: string }> = [ { value: 'rolling', - text: i18n.translate('xpack.observability.slo.sloEdit.timeWindow.rolling', { + text: i18n.translate('xpack.slo.sloEdit.timeWindow.rolling', { defaultMessage: 'Rolling', }), }, { value: 'calendarAligned', - text: i18n.translate('xpack.observability.slo.sloEdit.timeWindow.calendarAligned', { + text: i18n.translate('xpack.slo.sloEdit.timeWindow.calendarAligned', { defaultMessage: 'Calendar aligned', }), }, @@ -96,13 +96,13 @@ export const TIMEWINDOW_TYPE_OPTIONS: Array<{ value: TimeWindow; text: string }> export const CALENDARALIGNED_TIMEWINDOW_OPTIONS = [ { value: '1w', - text: i18n.translate('xpack.observability.slo.sloEdit.calendarTimeWindow.weekly', { + text: i18n.translate('xpack.slo.sloEdit.calendarTimeWindow.weekly', { defaultMessage: 'Weekly', }), }, { value: '1M', - text: i18n.translate('xpack.observability.slo.sloEdit.calendarTimeWindow.monthly', { + text: i18n.translate('xpack.slo.sloEdit.calendarTimeWindow.monthly', { defaultMessage: 'Monthly', }), }, @@ -110,7 +110,7 @@ export const CALENDARALIGNED_TIMEWINDOW_OPTIONS = [ export const ROLLING_TIMEWINDOW_OPTIONS = [90, 30, 7].map((number) => ({ value: `${number}d`, - text: i18n.translate('xpack.observability.slo.sloEdit.rollingTimeWindow.days', { + text: i18n.translate('xpack.slo.sloEdit.rollingTimeWindow.days', { defaultMessage: '{number} days', values: { number }, }), @@ -253,33 +253,21 @@ export const SLO_EDIT_FORM_DEFAULT_VALUES_SYNTHETICS_AVAILABILITY: CreateSLOForm groupBy: ['monitor.name', 'observer.geo.name'], }; -export const COMPARATOR_GT = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.gtLabel', - { - defaultMessage: 'Greater than', - } -); +export const COMPARATOR_GT = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.gtLabel', { + defaultMessage: 'Greater than', +}); -export const COMPARATOR_GTE = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.gteLabel', - { - defaultMessage: 'Greater than or equal to', - } -); +export const COMPARATOR_GTE = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.gteLabel', { + defaultMessage: 'Greater than or equal to', +}); -export const COMPARATOR_LT = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.ltLabel', - { - defaultMessage: 'Less than', - } -); +export const COMPARATOR_LT = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.ltLabel', { + defaultMessage: 'Less than', +}); -export const COMPARATOR_LTE = i18n.translate( - 'xpack.observability.slo.sloEdit.sliType.timesliceMetric.lteLabel', - { - defaultMessage: 'Less than or equal to', - } -); +export const COMPARATOR_LTE = i18n.translate('xpack.slo.sloEdit.sliType.timesliceMetric.lteLabel', { + defaultMessage: 'Less than or equal to', +}); export const COMPARATOR_MAPPING = { GT: COMPARATOR_GT, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/__snapshots__/process_slo_form_values.test.ts.snap b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/__snapshots__/process_slo_form_values.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/__snapshots__/process_slo_form_values.test.ts.snap rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/__snapshots__/process_slo_form_values.test.ts.snap diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/aggregation_options.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/aggregation_options.ts new file mode 100644 index 0000000000000..d116ad5f0f138 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/aggregation_options.ts @@ -0,0 +1,76 @@ +/* + * 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'; +export const AGGREGATION_OPTIONS = [ + { + value: 'avg', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.average', { + defaultMessage: 'Average', + }), + }, + { + value: 'max', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.max', { + defaultMessage: 'Max', + }), + }, + { + value: 'min', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.min', { + defaultMessage: 'Min', + }), + }, + { + value: 'sum', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.sum', { + defaultMessage: 'Sum', + }), + }, + { + value: 'cardinality', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.cardinality', { + defaultMessage: 'Cardinality', + }), + }, + { + value: 'last_value', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.last_value', { + defaultMessage: 'Last value', + }), + }, + { + value: 'std_deviation', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.std_deviation', { + defaultMessage: 'Std. Deviation', + }), + }, + { + value: 'doc_count', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.doc_count', { + defaultMessage: 'Doc count', + }), + }, + { + value: 'percentile', + label: i18n.translate('xpack.slo.sloEdit.timesliceMetric.aggregation.percentile', { + defaultMessage: 'Percentile', + }), + }, +]; + +export const CUSTOM_METRIC_AGGREGATION_OPTIONS = AGGREGATION_OPTIONS.filter((option) => + ['doc_count', 'sum'].includes(option.value) +); + +export function aggValueToLabel(value: string) { + const aggregation = AGGREGATION_OPTIONS.find((agg) => agg.value === value); + if (aggregation) { + return aggregation.label; + } + return value; +} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/create_burn_rate_rule_request_body.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/create_burn_rate_rule_request_body.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/create_burn_rate_rule_request_body.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/create_burn_rate_rule_request_body.ts index 0128d6c7d6360..da1ce026a1525 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/create_burn_rate_rule_request_body.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/create_burn_rate_rule_request_body.ts @@ -30,7 +30,7 @@ export function createBurnRateRuleRequestBody( consumer: 'slo', schedule: { interval: '1m' }, tags: [], - name: i18n.translate('xpack.observability.slo.burnRateRule.name', { + name: i18n.translate('xpack.slo.burnRateRule.name', { defaultMessage: '{name} Burn Rate rule', values: { name: slo.name }, }), diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/create_options.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/create_options.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/create_options.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/create_options.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/process_slo_form_values.test.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/process_slo_form_values.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/process_slo_form_values.test.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/process_slo_form_values.test.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/process_slo_form_values.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/process_slo_form_values.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/helpers/process_slo_form_values.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/helpers/process_slo_form_values.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_add_rule_flyout_state.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_add_rule_flyout_state.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_add_rule_flyout_state.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_add_rule_flyout_state.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_parse_url_state.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_parse_url_state.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_parse_url_state.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_parse_url_state.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_preview.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_preview.ts similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_preview.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_preview.ts index 146fe5ec737d7..8d21ac3938b8d 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_preview.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_preview.ts @@ -8,7 +8,7 @@ import { Indicator } from '@kbn/slo-schema'; import { debounce } from 'lodash'; import { useCallback, useEffect, useState } from 'react'; -import { useGetPreviewData } from '../../../hooks/slo/use_get_preview_data'; +import { useGetPreviewData } from '../../../hooks/use_get_preview_data'; export function useDebouncedGetPreviewData( isIndicatorValid: boolean, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_section_form_validation.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_section_form_validation.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_section_form_validation.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_section_form_validation.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_show_sections.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_show_sections.test.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_show_sections.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_show_sections.test.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_show_sections.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_show_sections.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_show_sections.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_show_sections.ts diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_unregister_fields.ts b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_unregister_fields.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_unregister_fields.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_unregister_fields.ts index 11d0ed133f7de..9d7752f190344 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/hooks/use_unregister_fields.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/hooks/use_unregister_fields.ts @@ -10,7 +10,7 @@ import { assertNever } from '@kbn/std'; import deepmerge from 'deepmerge'; import { useEffect, useState } from 'react'; import { useFormContext } from 'react-hook-form'; -import { useFetchApmIndex } from '../../../hooks/slo/use_fetch_apm_indices'; +import { useFetchApmIndex } from '../../../hooks/use_fetch_apm_indices'; import { APM_AVAILABILITY_DEFAULT_VALUES, APM_LATENCY_DEFAULT_VALUES, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx similarity index 86% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx index 085e6a176b68d..b7d3dd47819c2 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/get_create_slo_flyout.tsx @@ -13,15 +13,14 @@ import { CoreStart } from '@kbn/core-lifecycle-browser'; import { LazyObservabilityPageTemplateProps } from '@kbn/observability-shared-plugin/public'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { RecursivePartial } from '@kbn/utility-types'; +import { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public'; import { CreateSLOForm } from '../types'; -import { PluginContext } from '../../../context/plugin_context/plugin_context'; -import { ObservabilityRuleTypeRegistry } from '../../..'; -import { ObservabilityPublicPluginsStart, ConfigSchema } from '../../../plugin'; +import { PluginContext } from '../../../context/plugin_context'; +import { SloPublicPluginsStart } from '../../../types'; import { SloAddFormFlyout } from './slo_form'; export const getCreateSLOFlyoutLazy = ({ core, - config, plugins, observabilityRuleTypeRegistry, ObservabilityPageTemplate, @@ -30,8 +29,7 @@ export const getCreateSLOFlyoutLazy = ({ isServerless, }: { core: CoreStart; - config: ConfigSchema; - plugins: ObservabilityPublicPluginsStart; + plugins: SloPublicPluginsStart; observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry; ObservabilityPageTemplate: React.ComponentType; isDev?: boolean; @@ -60,7 +58,6 @@ export const getCreateSLOFlyoutLazy = ({

- +

diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/shared_flyout/slo_form.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/slo_form.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/shared_flyout/slo_form.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/shared_flyout/slo_form.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/slo_edit.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/slo_edit.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx index 78a99d80790d7..8925c22f82050 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/slo_edit.test.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.test.tsx @@ -15,19 +15,19 @@ import Router from 'react-router-dom'; import { BehaviorSubject } from 'rxjs'; import { paths } from '../../../common/locators/paths'; import { buildSlo } from '../../data/slo/slo'; -import { useCapabilities } from '../../hooks/slo/use_capabilities'; -import { useCreateSlo } from '../../hooks/slo/use_create_slo'; -import { useFetchApmSuggestions } from '../../hooks/slo/use_fetch_apm_suggestions'; -import { useFetchSloDetails } from '../../hooks/slo/use_fetch_slo_details'; -import { useUpdateSlo } from '../../hooks/slo/use_update_slo'; -import { useCreateRule } from '../../hooks/use_create_rule'; -import { useFetchDataViews } from '../../hooks/use_fetch_data_views'; +import { useCapabilities } from '../../hooks/use_capabilities'; +import { useCreateSlo } from '../../hooks/use_create_slo'; +import { useFetchApmSuggestions } from '../../hooks/use_fetch_apm_suggestions'; +import { useFetchSloDetails } from '../../hooks/use_fetch_slo_details'; +import { useUpdateSlo } from '../../hooks/use_update_slo'; +import { useCreateRule, useFetchDataViews } from '@kbn/observability-plugin/public'; import { useFetchIndices } from '../../hooks/use_fetch_indices'; import { useKibana } from '../../utils/kibana_react'; import { kibanaStartMock } from '../../utils/kibana_react.mock'; import { render } from '../../utils/test_helper'; import { SLO_EDIT_FORM_DEFAULT_VALUES } from './constants'; import { SloEditPage } from './slo_edit'; +import { HeaderMenuPortal } from '@kbn/observability-shared-plugin/public'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), @@ -36,13 +36,12 @@ jest.mock('react-router-dom', () => ({ jest.mock('@kbn/observability-shared-plugin/public'); jest.mock('../../hooks/use_fetch_indices'); -jest.mock('../../hooks/use_fetch_data_views'); -jest.mock('../../hooks/slo/use_fetch_slo_details'); -jest.mock('../../hooks/slo/use_create_slo'); -jest.mock('../../hooks/slo/use_update_slo'); -jest.mock('../../hooks/use_create_rule'); -jest.mock('../../hooks/slo/use_fetch_apm_suggestions'); -jest.mock('../../hooks/slo/use_capabilities'); +jest.mock('../../hooks/use_fetch_slo_details'); +jest.mock('../../hooks/use_create_slo'); +jest.mock('../../hooks/use_update_slo'); +jest.mock('@kbn/observability-plugin/public'); +jest.mock('../../hooks/use_fetch_apm_suggestions'); +jest.mock('../../hooks/use_capabilities'); const mockUseKibanaReturnValue = kibanaStartMock.startContract(); @@ -60,6 +59,9 @@ const useCreateRuleMock = useCreateRule as jest.Mock; const useFetchApmSuggestionsMock = useFetchApmSuggestions as jest.Mock; const useCapabilitiesMock = useCapabilities as jest.Mock; +const HeaderMenuPortalMock = HeaderMenuPortal as jest.Mock; +HeaderMenuPortalMock.mockReturnValue(
Portal node
); + const mockAddSuccess = jest.fn(); const mockAddError = jest.fn(); const mockNavigate = jest.fn(); @@ -204,7 +206,7 @@ describe('SLO Edit Page', () => { render(); - expect(mockNavigate).toBeCalledWith(mockBasePathPrepend(paths.observability.slos)); + expect(mockNavigate).toBeCalledWith(mockBasePathPrepend(paths.slos)); }); }); @@ -227,7 +229,7 @@ describe('SLO Edit Page', () => { render(); - expect(mockNavigate).not.toBeCalledWith(mockBasePathPrepend(paths.observability.slos)); + expect(mockNavigate).not.toBeCalledWith(mockBasePathPrepend(paths.slos)); }); }); @@ -258,7 +260,7 @@ describe('SLO Edit Page', () => { render(); - expect(mockNavigate).toBeCalledWith(mockBasePathPrepend(paths.observability.slos)); + expect(mockNavigate).toBeCalledWith(mockBasePathPrepend(paths.slos)); }); }); @@ -423,7 +425,7 @@ describe('SLO Edit Page', () => { fireEvent.click(getByTestId('sloFormSubmitButton')); }); await waitFor(() => { - expect(mockNavigate).toBeCalledWith(mockBasePathPrepend(paths.observability.slos)); + expect(mockNavigate).toBeCalledWith(mockBasePathPrepend(paths.slos)); }); }); }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/slo_edit.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx similarity index 68% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_edit/slo_edit.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx index 09eafbfdcc8c7..09f3b257e6542 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_edit/slo_edit.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_edit/slo_edit.tsx @@ -9,14 +9,14 @@ import { i18n } from '@kbn/i18n'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; import React from 'react'; import { useParams } from 'react-router-dom'; +import { HeaderMenu } from '../../components/header_menu/header_menu'; +import { useKibana } from '../../utils/kibana_react'; import { paths } from '../../../common/locators/paths'; -import { useCapabilities } from '../../hooks/slo/use_capabilities'; -import { useFetchSloGlobalDiagnosis } from '../../hooks/slo/use_fetch_global_diagnosis'; -import { useFetchSloDetails } from '../../hooks/slo/use_fetch_slo_details'; +import { useCapabilities } from '../../hooks/use_capabilities'; +import { useFetchSloGlobalDiagnosis } from '../../hooks/use_fetch_global_diagnosis'; +import { useFetchSloDetails } from '../../hooks/use_fetch_slo_details'; import { useLicense } from '../../hooks/use_license'; import { usePluginContext } from '../../hooks/use_plugin_context'; -import { useKibana } from '../../utils/kibana_react'; -import { HeaderMenu } from '../overview/components/header_menu/header_menu'; import { SloEditForm } from './components/slo_edit_form'; export function SloEditPage() { @@ -35,43 +35,43 @@ export function SloEditPage() { useBreadcrumbs([ { - href: basePath.prepend(paths.observability.slos), - text: i18n.translate('xpack.observability.breadcrumbs.sloLabel', { + href: basePath.prepend(paths.slos), + text: i18n.translate('xpack.slo.breadcrumbs.sloLabel', { defaultMessage: 'SLOs', }), - deepLinkId: 'observability-overview:slos', + deepLinkId: 'slo', }, ...(!!slo ? [ { - href: basePath.prepend(paths.observability.sloDetails(slo!.id)), + href: basePath.prepend(paths.sloDetails(slo!.id)), text: slo!.name, }, ] : []), { text: slo - ? i18n.translate('xpack.observability.breadcrumbs.sloEditLabel', { + ? i18n.translate('xpack.slo.breadcrumbs.sloEditLabel', { defaultMessage: 'Edit', }) - : i18n.translate('xpack.observability.breadcrumbs.sloCreateLabel', { + : i18n.translate('xpack.slo.breadcrumbs.sloCreateLabel', { defaultMessage: 'Create', }), }, ]); if (hasRightLicense === false || !hasWriteCapabilities || hasErrorInGlobalDiagnosis) { - navigateToUrl(basePath.prepend(paths.observability.slos)); + navigateToUrl(basePath.prepend(paths.slos)); } return ( - {i18n.translate('xpack.observability.slo.slosOutdatedDefinitions.sloPermissionsError', { + {i18n.translate('xpack.slo.slosOutdatedDefinitions.sloPermissionsError', { defaultMessage: 'You must have write permissions for SLOs to access this page', })} ) : !hasPlatinumLicense ? ( - {i18n.translate('xpack.observability.slo.slosOutdatedDefinitions.licenseError', { + {i18n.translate('xpack.slo.slosOutdatedDefinitions.licenseError', { defaultMessage: 'You must have atleast a platinum license to access this page', })} @@ -89,7 +89,7 @@ export function SlosOutdatedDefinitions() {

- {i18n.translate('xpack.observability.slo.slosOutdatedDefinitions.description', { + {i18n.translate('xpack.slo.slosOutdatedDefinitions.description', { defaultMessage: 'The following SLOs are from a previous version and need to either be reset to upgrade to the latest version OR deleted and removed from the system. When you reset the SLO, the transform will be updated to the latest version and the historical data will be regenerated from the source data.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_outdated_definitions/outdated_slo.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_outdated_definitions/outdated_slo.tsx similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_outdated_definitions/outdated_slo.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_outdated_definitions/outdated_slo.tsx index f8f5cfeb46848..ad38471a15095 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_outdated_definitions/outdated_slo.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_outdated_definitions/outdated_slo.tsx @@ -11,8 +11,8 @@ import { SLOResponse } from '@kbn/slo-schema'; import { SloDeleteConfirmationModal } from '../../components/slo/delete_confirmation_modal/slo_delete_confirmation_modal'; import { SloTimeWindowBadge } from '../slos/components/badges/slo_time_window_badge'; import { SloIndicatorTypeBadge } from '../slos/components/badges/slo_indicator_type_badge'; -import { useDeleteSlo } from '../../hooks/slo/use_delete_slo'; -import { useResetSlo } from '../../hooks/slo/use_reset_slo'; +import { useDeleteSlo } from '../../hooks/use_delete_slo'; +import { useResetSlo } from '../../hooks/use_reset_slo'; import { SloResetConfirmationModal } from '../../components/slo/reset_confirmation_modal/slo_reset_confirmation_modal'; interface OutdatedSloProps { @@ -85,7 +85,7 @@ export function OutdatedSlo({ slo, onReset, onDelete }: OutdatedSloProps) { onClick={handleReset} > @@ -99,7 +99,7 @@ export function OutdatedSlo({ slo, onReset, onDelete }: OutdatedSloProps) { onClick={handleDelete} > diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slo_outdated_definitions/outdated_slo_search_bar.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slo_outdated_definitions/outdated_slo_search_bar.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slo_outdated_definitions/outdated_slo_search_bar.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slo_outdated_definitions/outdated_slo_search_bar.tsx index 7e491f4933e20..0284ac8e7403e 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slo_outdated_definitions/outdated_slo_search_bar.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slo_outdated_definitions/outdated_slo_search_bar.tsx @@ -58,7 +58,7 @@ export function OutdatedSloSearchBar({ iconType="refresh" onClick={refreshOrUpdateSearch} > - {i18n.translate('xpack.observability.slosOutdatedDefinitions.refreshButtonLabel', { + {i18n.translate('xpack.slo.slosOutdatedDefinitions.refreshButtonLabel', { defaultMessage: 'Refresh', })} @@ -71,7 +71,7 @@ export function OutdatedSloSearchBar({ fill onClick={refreshOrUpdateSearch} > - {i18n.translate('xpack.observability.slosOutdatedDefinitions.updateButtonLabel', { + {i18n.translate('xpack.slo.slosOutdatedDefinitions.updateButtonLabel', { defaultMessage: 'Update', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_badges.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_badges.stories.tsx similarity index 90% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_badges.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_badges.stories.tsx index 67869e7f0e76e..7c84e7e570b3b 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_badges.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_badges.stories.tsx @@ -9,8 +9,8 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { EuiFlexGroup } from '@elastic/eui'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { buildForecastedSlo } from '../../../../data/slo/slo'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; import { SloBadges as Component, SloBadgesProps } from './slo_badges'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_badges.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_badges.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_badges.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_badges.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx index c8536bdc93ddd..727189580382b 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_indicator_type_badge.stories.tsx @@ -9,12 +9,12 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; import { EuiFlexGroup } from '@elastic/eui'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { buildCustomKqlIndicator, buildApmAvailabilityIndicator, buildApmLatencyIndicator, } from '../../../../data/slo/indicator'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; import { SloIndicatorTypeBadge as Component, Props } from './slo_indicator_type_badge'; import { buildSlo } from '../../../../data/slo/slo'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_indicator_type_badge.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_indicator_type_badge.tsx similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_indicator_type_badge.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_indicator_type_badge.tsx index 0196b1e174f77..727c3af91e5f5 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_indicator_type_badge.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_indicator_type_badge.tsx @@ -59,13 +59,10 @@ export function SloIndicatorTypeBadge({ slo, color }: Props) { onMouseDown={(e: MouseEvent) => { if (isSloPage) e.stopPropagation(); // stops propagation of metric onElementClick }} - onClickAriaLabel={i18n.translate( - 'xpack.observability.slo.indicatorTypeBadge.clickToFilter', - { - defaultMessage: 'Click to filter by {indicatorType} SLOs', - values: { indicatorType: toIndicatorTypeLabel(slo.indicator.type) }, - } - )} + onClickAriaLabel={i18n.translate('xpack.slo.sloIndicatorTypeBadge.clickToFilter', { + defaultMessage: 'Click to filter by {indicatorType} SLOs', + values: { indicatorType: toIndicatorTypeLabel(slo.indicator.type) }, + })} > {toIndicatorTypeLabel(slo.indicator.type)} @@ -75,7 +72,7 @@ export function SloIndicatorTypeBadge({ slo, color }: Props) { ) => { e.stopPropagation(); // stops propagation of metric onElementClick }} - onClickAriaLabel={i18n.translate( - 'xpack.observability.slo.indicatorTypeBadge.exploreInApm', - { - defaultMessage: 'View {service} details', - values: { service: slo.indicator.params.service }, - } - )} + onClickAriaLabel={i18n.translate('xpack.slo.indicatorTypeBadge.exploreInApm', { + defaultMessage: 'View {service} details', + values: { service: slo.indicator.params.service }, + })} > {slo.indicator.params.service} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_rules_badge.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_rules_badge.stories.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_rules_badge.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_rules_badge.stories.tsx index b88971e2a1355..ff11b8035d8b4 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_rules_badge.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_rules_badge.stories.tsx @@ -10,7 +10,7 @@ import { ComponentStory } from '@storybook/react'; import { EuiFlexGroup } from '@elastic/eui'; import { Rule } from '@kbn/triggers-actions-ui-plugin/public'; -import { KibanaReactStorybookDecorator } from '../../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloRulesBadge as Component, Props } from './slo_rules_badge'; import { BurnRateRuleParams } from '../../../../typings'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_rules_badge.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_rules_badge.tsx similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_rules_badge.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_rules_badge.tsx index c38bc204f7679..0f20ee3ef0b3a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/badges/slo_rules_badge.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/badges/slo_rules_badge.tsx @@ -20,7 +20,7 @@ export function SloRulesBadge({ rules, onClick }: Props) { return rules === undefined || rules.length > 0 ? null : ( - {i18n.translate('xpack.observability.slo.slo.timeWindow.calendar', { + {i18n.translate('xpack.slo.slo.timeWindow.calendar', { defaultMessage: '{elapsed}/{total} days', values: { elapsed: Math.min(elapsedDurationInDays, totalDurationInDays), diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/card_view/slo_card_item.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/card_view/slo_card_item.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx index e0dd19f34a7f5..802faafc014ce 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/card_view/slo_card_item.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slo_card_item.tsx @@ -148,15 +148,13 @@ export function SloCardItem({ slo, rules, activeAlerts, historicalSummary, cards ) : null} {isDashboardAttachmentReady ? ( { @@ -219,7 +217,7 @@ export function SloCardChart({ })), extra: ( { setIsPopoverOpen(!isPopoverOpen); }} - onClickAriaLabel={i18n.translate('xpack.observability.slo.instances.seeAllBadge', { + onClickAriaLabel={i18n.translate('xpack.slo.instances.seeAllBadge', { defaultMessage: 'see all instance ids', })} data-test-subj="o11ySlosSeeAllInstanceIdsBadge" > - {`${i18n.translate('xpack.observability.slos.extraInstanceIds.badge', { + {`${i18n.translate('xpack.slo.extraInstanceIds.badge', { defaultMessage: '+{count, plural, one {# more instance} other {# more instances}}', values: { count: entries.length - 1, diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/card_view/slos_card_view.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slos_card_view.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/card_view/slos_card_view.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slos_card_view.tsx index 8397a8ce99472..e662fb19f1035 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/card_view/slos_card_view.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/card_view/slos_card_view.tsx @@ -15,9 +15,9 @@ import { import { EuiFlexGridProps } from '@elastic/eui/src/components/flex/flex_grid'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import React from 'react'; -import { useFetchActiveAlerts } from '../../../../hooks/slo/use_fetch_active_alerts'; -import { useFetchHistoricalSummary } from '../../../../hooks/slo/use_fetch_historical_summary'; -import { useFetchRulesForSlo } from '../../../../hooks/slo/use_fetch_rules_for_slo'; +import { useFetchActiveAlerts } from '../../../../hooks/use_fetch_active_alerts'; +import { useFetchHistoricalSummary } from '../../../../hooks/use_fetch_historical_summary'; +import { useFetchRulesForSlo } from '../../../../hooks/use_fetch_rules_for_slo'; import { SloCardItem } from './slo_card_item'; export interface Props { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/burn_rate_rule_flyout.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/burn_rate_rule_flyout.tsx similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/burn_rate_rule_flyout.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/burn_rate_rule_flyout.tsx index 871c11d39bdde..609e4d02cd19a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/burn_rate_rule_flyout.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/burn_rate_rule_flyout.tsx @@ -8,12 +8,12 @@ import React from 'react'; import { SLOWithSummaryResponse } from '@kbn/slo-schema'; import { useQueryClient } from '@tanstack/react-query'; -import { paths } from '../../../../../common/locators/paths'; +import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; import { useGetFilteredRuleTypes } from '../../../../hooks/use_get_filtered_rule_types'; -import { sloKeys } from '../../../../hooks/slo/query_key_factory'; import { useKibana } from '../../../../utils/kibana_react'; -import { SLO_BURN_RATE_RULE_TYPE_ID } from '../../../../../common/constants'; -import { sloFeatureId } from '../../../../../common'; +import { paths } from '../../../../../common/locators/paths'; +import { sloKeys } from '../../../../hooks/query_key_factory'; export function BurnRateRuleFlyout({ slo, @@ -40,7 +40,7 @@ export function BurnRateRuleFlyout({ if (setIsAddRuleFlyoutOpen) { queryClient.invalidateQueries({ queryKey: sloKeys.rules(), exact: false }); } else { - navigateToUrl(basePath.prepend(paths.observability.slos)); + navigateToUrl(basePath.prepend(paths.slos)); } }; @@ -48,7 +48,7 @@ export function BurnRateRuleFlyout({ if (setIsAddRuleFlyoutOpen) { setIsAddRuleFlyoutOpen(false); } else { - navigateToUrl(basePath.prepend(paths.observability.slos)); + navigateToUrl(basePath.prepend(paths.slos)); } }; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/create_slo_btn.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/create_slo_btn.tsx similarity index 77% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/create_slo_btn.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/create_slo_btn.tsx index 1a71c82e23d3f..14701ef9e4f60 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/create_slo_btn.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/create_slo_btn.tsx @@ -10,7 +10,7 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { useKibana } from '../../../../utils/kibana_react'; import { paths } from '../../../../../common/locators/paths'; -import { useCapabilities } from '../../../../hooks/slo/use_capabilities'; +import { useCapabilities } from '../../../../hooks/use_capabilities'; export function CreateSloBtn() { const { @@ -21,7 +21,7 @@ export function CreateSloBtn() { const { hasWriteCapabilities } = useCapabilities(); const handleClickCreateSlo = () => { - navigateToUrl(basePath.prepend(paths.observability.sloCreate)); + navigateToUrl(basePath.prepend(paths.sloCreate)); }; return ( - {i18n.translate('xpack.observability.slo.sloList.pageHeader.create', { - defaultMessage: 'Create SLO', - })} + {i18n.translate('xpack.slo.sloList.pageHeader.create', { defaultMessage: 'Create SLO' })} ); } diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/feedback_button.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/feedback_button.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/feedback_button.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/feedback_button.tsx index dbd45bf74dee4..4641f8bd1d028 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/feedback_button.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/feedback_button.tsx @@ -25,7 +25,7 @@ export function FeedbackButton({ disabled }: Props) { color="warning" iconType="editorComment" > - {i18n.translate('xpack.observability.slo.feedbackButtonLabel', { + {i18n.translate('xpack.slo.feedbackButtonLabel', { defaultMessage: 'Tell us what you think!', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/good_bad_events_chart.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/good_bad_events_chart.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/good_bad_events_chart.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/good_bad_events_chart.tsx index 666a9a783f56f..f4d2b7aa2ceee 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/good_bad_events_chart.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/good_bad_events_chart.tsx @@ -64,15 +64,13 @@ export function GoodBadEventsChart({ ? moment(data[1].date).valueOf() - moment(data[0].date).valueOf() : 10 * 60000; - const goodEventId = i18n.translate( - 'xpack.observability.slo.sloDetails.eventsChartPanel.goodEventsLabel', - { defaultMessage: 'Good events' } - ); + const goodEventId = i18n.translate('xpack.slo.sloDetails.eventsChartPanel.goodEventsLabel', { + defaultMessage: 'Good events', + }); - const badEventId = i18n.translate( - 'xpack.observability.slo.sloDetails.eventsChartPanel.badEventsLabel', - { defaultMessage: 'Bad events' } - ); + const badEventId = i18n.translate('xpack.slo.sloDetails.eventsChartPanel.badEventsLabel', { + defaultMessage: 'Bad events', + }); const barClickHandler = (params: XYChartElementEvent[]) => { if (slo?.indicator?.type === 'sli.kql.custom') { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/quick_filters.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.test.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/quick_filters.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.test.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/quick_filters.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.tsx similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/quick_filters.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.tsx index 7d3d663b1bb8f..4636e68e3877d 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/quick_filters.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/quick_filters.tsx @@ -14,7 +14,7 @@ import { Filter } from '@kbn/es-query'; import { isEmpty } from 'lodash'; import { useCreateDataView } from '../../../../hooks/use_create_data_view'; import { SearchState } from '../../hooks/use_url_search_state'; -import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../../../../common/slo/constants'; +import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../../../../common/constants'; interface Props { initialState: SearchState; @@ -110,19 +110,21 @@ export const getSelectedOptions = (filter?: Filter) => { }; const Container = styled.div` + .controlsWrapper { + align-items: flex-start; + min-height: initial; + } .controlGroup { min-height: initial; } `; -const TAGS_LABEL = i18n.translate('xpack.observability.slo.list.tags', { +const TAGS_LABEL = i18n.translate('xpack.slo.list.tags', { defaultMessage: 'Tags', }); - -const STATUS_LABEL = i18n.translate('xpack.observability.slo.list.status', { +const STATUS_LABEL = i18n.translate('xpack.slo.list.status', { defaultMessage: 'Status', }); - -const ALL_LABEL = i18n.translate('xpack.observability.slo.list.all', { +const ALL_LABEL = i18n.translate('xpack.slo.list.all', { defaultMessage: 'All', }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/slo_groupings.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/slo_groupings.tsx similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/slo_groupings.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/slo_groupings.tsx index 028353eaa067c..b61d1edc5ed93 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/slo_groupings.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/slo_groupings.tsx @@ -65,7 +65,7 @@ export function SLOGroupings({ slo, direction = 'row', truncate = true }: Props) {rest.length && ( - {`(${i18n.translate('xpack.observability.slos.andLabel', { + {`(${i18n.translate('xpack.slo.andLabel', { defaultMessage: 'and {count, plural, one {# more instance} other {# more instances}}', values: { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/slo_tags_list.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/slo_tags_list.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/slo_tags_list.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/slo_tags_list.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/sort_by_select.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/sort_by_select.tsx similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/sort_by_select.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/sort_by_select.tsx index 2982e8e67ef9d..214dad4e9a124 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/common/sort_by_select.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/common/sort_by_select.tsx @@ -39,7 +39,7 @@ export function SLOSortBy({ state, onStateChange, loading }: Props) { const sortByOptions: Option[] = [ { - label: i18n.translate('xpack.observability.slo.list.sortBy.sliValue', { + label: i18n.translate('xpack.slo.list.sortBy.sliValue', { defaultMessage: 'SLI value', }), checked: sortBy === 'sli_value', @@ -47,14 +47,14 @@ export function SLOSortBy({ state, onStateChange, loading }: Props) { onClick: () => { handleChangeSortBy({ value: 'sli_value', - label: i18n.translate('xpack.observability.slo.list.sortBy.sliValue', { + label: i18n.translate('xpack.slo.list.sortBy.sliValue', { defaultMessage: 'SLI value', }), }); }, }, { - label: i18n.translate('xpack.observability.slo.list.sortBy.sloStatus', { + label: i18n.translate('xpack.slo.list.sortBy.sloStatus', { defaultMessage: 'SLO status', }), checked: sortBy === 'status', @@ -62,14 +62,14 @@ export function SLOSortBy({ state, onStateChange, loading }: Props) { onClick: () => { handleChangeSortBy({ value: 'status', - label: i18n.translate('xpack.observability.slo.list.sortBy.sloStatus', { + label: i18n.translate('xpack.slo.list.sortBy.sloStatus', { defaultMessage: 'SLO status', }), }); }, }, { - label: i18n.translate('xpack.observability.slo.list.sortBy.errorBudgetConsumed', { + label: i18n.translate('xpack.slo.list.sortBy.errorBudgetConsumed', { defaultMessage: 'Error budget consumed', }), checked: sortBy === 'error_budget_consumed', @@ -77,14 +77,14 @@ export function SLOSortBy({ state, onStateChange, loading }: Props) { onClick: () => { handleChangeSortBy({ value: 'error_budget_consumed', - label: i18n.translate('xpack.observability.slo.list.sortBy.errorBudgetConsumed', { + label: i18n.translate('xpack.slo.list.sortBy.errorBudgetConsumed', { defaultMessage: 'Error budget consumed', }), }); }, }, { - label: i18n.translate('xpack.observability.slo.list.sortBy.errorBudgetRemaining', { + label: i18n.translate('xpack.slo.list.sortBy.errorBudgetRemaining', { defaultMessage: 'Error budget remaining', }), checked: sortBy === 'error_budget_remaining', @@ -92,7 +92,7 @@ export function SLOSortBy({ state, onStateChange, loading }: Props) { onClick: () => { handleChangeSortBy({ value: 'error_budget_remaining', - label: i18n.translate('xpack.observability.slo.list.sortBy.errorBudgetRemaining', { + label: i18n.translate('xpack.slo.list.sortBy.errorBudgetRemaining', { defaultMessage: 'Error budget remaining', }), }); @@ -131,6 +131,6 @@ export function SLOSortBy({ state, onStateChange, loading }: Props) { ); } -const SORT_BY_LABEL = i18n.translate('xpack.observability.slo.list.sortByTypeLabel', { +const SORT_BY_LABEL = i18n.translate('xpack.slo.list.sortByTypeLabel', { defaultMessage: 'Sort by', }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/compact_view/slo_list_compact_view.tsx similarity index 84% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/compact_view/slo_list_compact_view.tsx index 5609a59c9c765..6e73cf875cf19 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/compact_view/slo_list_compact_view.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/compact_view/slo_list_compact_view.tsx @@ -18,23 +18,24 @@ import { i18n } from '@kbn/i18n'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { useQueryClient } from '@tanstack/react-query'; import React, { useState } from 'react'; +import { RulesParams } from '@kbn/observability-plugin/public'; +import { rulesLocatorID } from '@kbn/observability-plugin/common'; +import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; +import { useGetFilteredRuleTypes } from '../../../../hooks/use_get_filtered_rule_types'; +import { useKibana } from '../../../../utils/kibana_react'; import { SloTagsList } from '../common/slo_tags_list'; -import { useCloneSlo } from '../../../../hooks/slo/use_clone_slo'; -import { rulesLocatorID, sloFeatureId } from '../../../../../common'; -import { SLO_BURN_RATE_RULE_TYPE_ID } from '../../../../../common/constants'; +import { useCloneSlo } from '../../../../hooks/use_clone_slo'; import { paths } from '../../../../../common/locators/paths'; import { SloDeleteConfirmationModal } from '../../../../components/slo/delete_confirmation_modal/slo_delete_confirmation_modal'; import { SloStatusBadge } from '../../../../components/slo/slo_status_badge'; import { SloActiveAlertsBadge } from '../../../../components/slo/slo_status_badge/slo_active_alerts_badge'; -import { sloKeys } from '../../../../hooks/slo/query_key_factory'; -import { useCapabilities } from '../../../../hooks/slo/use_capabilities'; -import { useDeleteSlo } from '../../../../hooks/slo/use_delete_slo'; -import { useFetchActiveAlerts } from '../../../../hooks/slo/use_fetch_active_alerts'; -import { useFetchHistoricalSummary } from '../../../../hooks/slo/use_fetch_historical_summary'; -import { useFetchRulesForSlo } from '../../../../hooks/slo/use_fetch_rules_for_slo'; -import { useGetFilteredRuleTypes } from '../../../../hooks/use_get_filtered_rule_types'; -import { RulesParams } from '../../../../locators/rules'; -import { useKibana } from '../../../../utils/kibana_react'; +import { sloKeys } from '../../../../hooks/query_key_factory'; +import { useCapabilities } from '../../../../hooks/use_capabilities'; +import { useDeleteSlo } from '../../../../hooks/use_delete_slo'; +import { useFetchActiveAlerts } from '../../../../hooks/use_fetch_active_alerts'; +import { useFetchHistoricalSummary } from '../../../../hooks/use_fetch_historical_summary'; +import { useFetchRulesForSlo } from '../../../../hooks/use_fetch_rules_for_slo'; import { formatHistoricalData } from '../../../../utils/slo/chart_data_formatter'; import { SloRulesBadge } from '../badges/slo_rules_badge'; import { SloListEmpty } from '../slo_list_empty'; @@ -104,15 +105,15 @@ export function SloListCompactView({ sloList, loading, error }: Props) { { type: 'icon', icon: 'inspect', - name: i18n.translate('xpack.observability.slo.item.actions.details', { + name: i18n.translate('xpack.slo.item.actions.details', { defaultMessage: 'Details', }), - description: i18n.translate('xpack.observability.slo.item.actions.details', { + description: i18n.translate('xpack.slo.item.actions.details', { defaultMessage: 'Details', }), onClick: (slo: SLOWithSummaryResponse) => { const sloDetailsUrl = basePath.prepend( - paths.observability.sloDetails( + paths.sloDetails( slo.id, ![slo.groupBy].flat().includes(ALL_VALUE) && slo.instanceId ? slo.instanceId : undefined ) @@ -123,25 +124,25 @@ export function SloListCompactView({ sloList, loading, error }: Props) { { type: 'icon', icon: 'pencil', - name: i18n.translate('xpack.observability.slo.item.actions.edit', { + name: i18n.translate('xpack.slo.item.actions.edit', { defaultMessage: 'Edit', }), - description: i18n.translate('xpack.observability.slo.item.actions.edit', { + description: i18n.translate('xpack.slo.item.actions.edit', { defaultMessage: 'Edit', }), 'data-test-subj': 'sloActionsEdit', enabled: (_) => hasWriteCapabilities, onClick: (slo: SLOWithSummaryResponse) => { - navigateToUrl(basePath.prepend(paths.observability.sloEdit(slo.id))); + navigateToUrl(basePath.prepend(paths.sloEdit(slo.id))); }, }, { type: 'icon', icon: 'bell', - name: i18n.translate('xpack.observability.slo.item.actions.createRule', { + name: i18n.translate('xpack.slo.item.actions.createRule', { defaultMessage: 'Create new alert rule', }), - description: i18n.translate('xpack.observability.slo.item.actions.createRule', { + description: i18n.translate('xpack.slo.item.actions.createRule', { defaultMessage: 'Create new alert rule', }), 'data-test-subj': 'sloActionsCreateRule', @@ -153,10 +154,10 @@ export function SloListCompactView({ sloList, loading, error }: Props) { { type: 'icon', icon: 'gear', - name: i18n.translate('xpack.observability.slo.item.actions.manageRules', { + name: i18n.translate('xpack.slo.item.actions.manageRules', { defaultMessage: 'Manage rules', }), - description: i18n.translate('xpack.observability.slo.item.actions.manageRules', { + description: i18n.translate('xpack.slo.item.actions.manageRules', { defaultMessage: 'Manage rules', }), 'data-test-subj': 'sloActionsManageRules', @@ -169,10 +170,10 @@ export function SloListCompactView({ sloList, loading, error }: Props) { { type: 'icon', icon: 'copy', - name: i18n.translate('xpack.observability.slo.item.actions.clone', { + name: i18n.translate('xpack.slo.item.actions.clone', { defaultMessage: 'Clone', }), - description: i18n.translate('xpack.observability.slo.item.actions.clone', { + description: i18n.translate('xpack.slo.item.actions.clone', { defaultMessage: 'Clone', }), 'data-test-subj': 'sloActionsClone', @@ -184,10 +185,10 @@ export function SloListCompactView({ sloList, loading, error }: Props) { { type: 'icon', icon: 'trash', - name: i18n.translate('xpack.observability.slo.item.actions.delete', { + name: i18n.translate('xpack.slo.item.actions.delete', { defaultMessage: 'Delete', }), - description: i18n.translate('xpack.observability.slo.item.actions.delete', { + description: i18n.translate('xpack.slo.item.actions.delete', { defaultMessage: 'Delete', }), 'data-test-subj': 'sloActionsDelete', @@ -239,7 +240,7 @@ export function SloListCompactView({ sloList, loading, error }: Props) { 'data-test-subj': 'sloItem', render: (_, slo: SLOWithSummaryResponse) => { const sloDetailsUrl = basePath.prepend( - paths.observability.sloDetails( + paths.sloDetails( slo.id, ![slo.groupBy].flat().includes(ALL_VALUE) && slo.instanceId ? slo.instanceId : undefined ) @@ -406,10 +407,8 @@ export function SloListCompactView({ sloList, loading, error }: Props) { ); } -const LOADING_SLOS_LABEL = i18n.translate('xpack.observability.slo.loadingSlosLabel', { +const LOADING_SLOS_LABEL = i18n.translate('xpack.slo.loadingSlosLabel', { defaultMessage: 'Loading SLOs ...', }); -const NO_SLOS_FOUND = i18n.translate('xpack.observability.slo.noSlosFound', { - defaultMessage: 'No SLOs found', -}); +const NO_SLOS_FOUND = i18n.translate('xpack.slo.noSlosFound', { defaultMessage: 'No SLOs found' }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_empty.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_empty.tsx similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_empty.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_empty.tsx index f23ff645b8fbd..d3110327b74eb 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_empty.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_empty.tsx @@ -13,13 +13,13 @@ export function SloGroupListEmpty() { return ( - {i18n.translate('xpack.observability.slo.groupList.emptyMessage', { + {i18n.translate('xpack.slo.groupList.emptyMessage', { defaultMessage: 'There are no results for your criteria.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_error.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_error.tsx similarity index 67% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_error.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_error.tsx index d67ef0548a949..a7aa8d321f885 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_error.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_error.tsx @@ -4,12 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.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 React from 'react'; import { EuiEmptyPrompt } from '@elastic/eui'; @@ -23,14 +17,14 @@ export function SloGroupListError() { color="danger" title={

- {i18n.translate('xpack.observability.slo.groupList.errorTitle', { + {i18n.translate('xpack.slo.groupList.errorTitle', { defaultMessage: 'Unable to load SLO groups', })}

} body={

- {i18n.translate('xpack.observability.slo.groupList.errorMessage', { + {i18n.translate('xpack.slo.groupList.errorMessage', { defaultMessage: 'There was an error loading the SLO groups. Contact your administrator for help.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_view.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_view.tsx similarity index 80% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_view.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_view.tsx index a9f39c4687173..5b95a0e8d97e3 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/grouped_slos/group_list_view.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/group_list_view.tsx @@ -23,10 +23,10 @@ import { Filter } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; import React, { memo, useState } from 'react'; import { GroupSummary } from '@kbn/slo-schema'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { useKibana } from '../../../../utils/kibana_react'; import { paths } from '../../../../../common/locators/paths'; -import { useFetchSloList } from '../../../../hooks/slo/use_fetch_slo_list'; +import { useFetchSloList } from '../../../../hooks/use_fetch_slo_list'; import { SLI_OPTIONS } from '../../../slo_edit/constants'; import { useSloFormattedSLIValue } from '../../hooks/use_slo_summary'; import { SlosView } from '../slos_view'; @@ -120,7 +120,7 @@ export function GroupListView({ {summary.violated > 0 && ( - {i18n.translate('xpack.observability.slo.group.totalViolated', { + {i18n.translate('xpack.slo.group.totalViolated', { defaultMessage: '{total} Violated', values: { total: summary.violated, @@ -131,7 +131,7 @@ export function GroupListView({ )} - {i18n.translate('xpack.observability.slo.group.totalHealthy', { + {i18n.translate('xpack.slo.group.totalHealthy', { defaultMessage: '{total} Healthy', values: { total: summary.healthy, @@ -144,26 +144,20 @@ export function GroupListView({ content={ <> - {i18n.translate( - 'xpack.observability.slo.group.totalSloViolatedTooltip', - { - defaultMessage: 'SLO: {name}', - values: { - name: summary.worst.slo?.name, - }, - } - )} + {i18n.translate('xpack.slo.group.totalSloViolatedTooltip', { + defaultMessage: 'SLO: {name}', + values: { + name: summary.worst.slo?.name, + }, + })} - {i18n.translate( - 'xpack.observability.slo.group.totalSloViolatedTooltip.instance', - { - defaultMessage: 'Instance: {instance}', - values: { - instance: summary.worst.slo?.instanceId, - }, - } - )} + {i18n.translate('xpack.slo.group.totalSloViolatedTooltip.instance', { + defaultMessage: 'Instance: {instance}', + values: { + instance: summary.worst.slo?.instanceId, + }, + })} } @@ -171,13 +165,10 @@ export function GroupListView({ - {i18n.translate('xpack.observability.slo.group.worstPerforming', { + {i18n.translate('xpack.slo.group.worstPerforming', { defaultMessage: 'Worst performing: ', })} - {i18n.translate('xpack.observability.slosPageTitle', { + {i18n.translate('xpack.slo.slosPageTitle', { defaultMessage: 'SLOs', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_context_menu.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_context_menu.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_context_menu.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_context_menu.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_item_actions.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_item_actions.tsx similarity index 83% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_item_actions.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_item_actions.tsx index 2aa5f3f0d66c4..26f4ba28546c2 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_item_actions.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_item_actions.tsx @@ -17,12 +17,12 @@ import { i18n } from '@kbn/i18n'; import React from 'react'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import styled from 'styled-components'; -import { useCloneSlo } from '../../../hooks/slo/use_clone_slo'; -import { useCapabilities } from '../../../hooks/slo/use_capabilities'; +import { RulesParams } from '@kbn/observability-plugin/public'; +import { rulesLocatorID } from '@kbn/observability-plugin/common'; import { useKibana } from '../../../utils/kibana_react'; +import { useCloneSlo } from '../../../hooks/use_clone_slo'; +import { useCapabilities } from '../../../hooks/use_capabilities'; import { paths } from '../../../../common/locators/paths'; -import { RulesParams } from '../../../locators/rules'; -import { rulesLocatorID } from '../../../../common'; interface Props { slo: SLOWithSummaryResponse; @@ -73,7 +73,7 @@ export function SloItemActions({ const { hasWriteCapabilities } = useCapabilities(); const sloDetailsUrl = basePath.prepend( - paths.observability.sloDetails( + paths.sloDetails( slo.id, ![slo.groupBy].flat().includes(ALL_VALUE) && slo.instanceId ? slo.instanceId : undefined ) @@ -88,7 +88,7 @@ export function SloItemActions({ }; const handleEdit = () => { - navigateToUrl(basePath.prepend(paths.observability.sloEdit(slo.id))); + navigateToUrl(basePath.prepend(paths.sloEdit(slo.id))); }; const navigateToClone = useCloneSlo(); @@ -122,7 +122,7 @@ export function SloItemActions({ const btn = ( - {i18n.translate('xpack.observability.slo.item.actions.details', { + {i18n.translate('xpack.slo.item.actions.details', { defaultMessage: 'Details', })} , @@ -163,7 +163,7 @@ export function SloItemActions({ onClick={handleEdit} data-test-subj="sloActionsEdit" > - {i18n.translate('xpack.observability.slo.item.actions.edit', { + {i18n.translate('xpack.slo.item.actions.edit', { defaultMessage: 'Edit', })} , @@ -174,7 +174,7 @@ export function SloItemActions({ onClick={handleCreateRule} data-test-subj="sloActionsCreateRule" > - {i18n.translate('xpack.observability.slo.item.actions.createRule', { + {i18n.translate('xpack.slo.item.actions.createRule', { defaultMessage: 'Create new alert rule', })} , @@ -185,7 +185,7 @@ export function SloItemActions({ onClick={handleNavigateToRules} data-test-subj="sloActionsManageRules" > - {i18n.translate('xpack.observability.slo.item.actions.manageRules', { + {i18n.translate('xpack.slo.item.actions.manageRules', { defaultMessage: 'Manage rules', })} , @@ -196,9 +196,7 @@ export function SloItemActions({ onClick={handleClone} data-test-subj="sloActionsClone" > - {i18n.translate('xpack.observability.slo.item.actions.clone', { - defaultMessage: 'Clone', - })} + {i18n.translate('xpack.slo.item.actions.clone', { defaultMessage: 'Clone' })} , - {i18n.translate('xpack.observability.slo.item.actions.delete', { - defaultMessage: 'Delete', - })} + {i18n.translate('xpack.slo.item.actions.delete', { defaultMessage: 'Delete' })} , - {i18n.translate('xpack.observability.slo.item.actions.addToDashboard', { + {i18n.translate('xpack.slo.item.actions.addToDashboard', { defaultMessage: 'Add to Dashboard', })} , diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.stories.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.stories.tsx index 3e6dd1c87d798..132d96a669aa3 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloList as Component } from './slo_list'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx similarity index 98% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx index 76ed7992b66cc..c0a3d573577b2 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list.tsx @@ -10,12 +10,12 @@ import { useIsMutating } from '@tanstack/react-query'; import React, { useEffect } from 'react'; import dedent from 'dedent'; import { groupBy as _groupBy, mapValues } from 'lodash'; -import { useFetchSloList } from '../../../hooks/slo/use_fetch_slo_list'; +import { useKibana } from '../../../utils/kibana_react'; +import { useFetchSloList } from '../../../hooks/use_fetch_slo_list'; import { useUrlSearchState } from '../hooks/use_url_search_state'; import { SlosView } from './slos_view'; import { ToggleSLOView } from './toggle_slo_view'; import { GroupView } from './grouped_slos/group_view'; -import { useKibana } from '../../../utils/kibana_react'; export function SloList() { const { state, onStateChange } = useUrlSearchState(); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_empty.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_empty.stories.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_empty.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_empty.stories.tsx index b8c49050143fc..8204683836a13 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_empty.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_empty.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloListEmpty as Component } from './slo_list_empty'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_empty.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_empty.tsx similarity index 81% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_empty.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_empty.tsx index 22bbaf11bdf84..1568d86c34cb4 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_empty.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_empty.tsx @@ -12,13 +12,13 @@ import { i18n } from '@kbn/i18n'; export function SloListEmpty() { return ( - {i18n.translate('xpack.observability.slo.list.emptyMessage', { + {i18n.translate('xpack.slo.list.emptyMessage', { defaultMessage: 'There are no results for your criteria.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_error.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_error.stories.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_error.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_error.stories.tsx index a3e2503449da8..632dde7858ab0 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_error.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_error.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloListError as Component } from './slo_list_error'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_error.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_error.tsx similarity index 84% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_error.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_error.tsx index 171ceeb341b2d..9d1bce9e60382 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_error.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_error.tsx @@ -16,14 +16,14 @@ export function SloListError() { color="danger" title={

- {i18n.translate('xpack.observability.slo.list.errorTitle', { + {i18n.translate('xpack.slo.list.errorTitle', { defaultMessage: 'Unable to load SLOs', })}

} body={

- {i18n.translate('xpack.observability.slo.list.errorMessage', { + {i18n.translate('xpack.slo.list.errorMessage', { defaultMessage: 'There was an error loading the SLOs. Contact your administrator for help.', })} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_group_by.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_group_by.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_group_by.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_group_by.tsx index a10fc2a114d5c..75aaa869d5d88 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_group_by.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_group_by.tsx @@ -45,7 +45,7 @@ export function SloGroupBy({ onStateChange, state, loading }: Props) { }, }, { - label: i18n.translate('xpack.observability.slo.list.groupBy.tags', { + label: i18n.translate('xpack.slo.list.groupBy.tags', { defaultMessage: 'Tags', }), checked: groupBy === 'slo.tags', @@ -55,7 +55,7 @@ export function SloGroupBy({ onStateChange, state, loading }: Props) { }, }, { - label: i18n.translate('xpack.observability.slo.list.groupBy.status', { + label: i18n.translate('xpack.slo.list.groupBy.status', { defaultMessage: 'Status', }), checked: groupBy === 'status', @@ -65,7 +65,7 @@ export function SloGroupBy({ onStateChange, state, loading }: Props) { }, }, { - label: i18n.translate('xpack.observability.slo.list.groupBy.sliType', { + label: i18n.translate('xpack.slo.list.groupBy.sliType', { defaultMessage: 'SLI type', }), checked: groupBy === 'slo.indicator.type', @@ -105,10 +105,9 @@ export function SloGroupBy({ onStateChange, state, loading }: Props) { ); } -export const NONE_LABEL = i18n.translate('xpack.observability.slo.list.groupBy.sliIndicator', { +export const NONE_LABEL = i18n.translate('xpack.slo.list.groupBy.sliIndicator', { defaultMessage: 'None', }); - -export const GROUP_TITLE = i18n.translate('xpack.observability.slo.groupPopover.group.title', { +export const GROUP_TITLE = i18n.translate('xpack.slo.groupPopover.group.title', { defaultMessage: 'Group by', }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_item.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_item.stories.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_item.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_item.stories.tsx index 2b9b289eda626..87e9f75a0c65e 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_item.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_item.stories.tsx @@ -8,12 +8,12 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { HEALTHY_ROLLING_SLO, historicalSummaryData, } from '../../../data/slo/historical_summary_data'; import { buildSlo } from '../../../data/slo/slo'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; import { SloListItem as Component, SloListItemProps } from './slo_list_item'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_item.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_item.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_item.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_item.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_search_bar.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_search_bar.stories.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_search_bar.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_search_bar.stories.tsx index 0d36156cfeced..4d16c40c1edae 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_search_bar.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_search_bar.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SloListSearchBar as Component } from './slo_list_search_bar'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_search_bar.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_search_bar.tsx similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_search_bar.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_search_bar.tsx index fb4274642e217..1af7d24717c38 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_search_bar.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_search_bar.tsx @@ -11,11 +11,11 @@ import { i18n } from '@kbn/i18n'; import React, { useEffect } from 'react'; import styled from 'styled-components'; import { Query } from '@kbn/es-query'; -import { useSloCrudLoading } from '../hooks/use_crud_loading'; +import { observabilityAppId } from '@kbn/observability-plugin/public'; import { useKibana } from '../../../utils/kibana_react'; -import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../../../common/slo/constants'; +import { useSloCrudLoading } from '../hooks/use_crud_loading'; +import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '../../../../common/constants'; import { useCreateDataView } from '../../../hooks/use_create_data_view'; -import { observabilityAppId, ObservabilityPublicPluginsStart } from '../../..'; import { useUrlSearchState } from '../hooks/use_url_search_state'; import { QuickFilters } from './common/quick_filters'; @@ -36,7 +36,7 @@ export function SloListSearchBar() { unifiedSearch: { ui: { SearchBar }, }, - } = useKibana().services; + } = useKibana().services; const { state, onStateChange } = useUrlSearchState(); const loading = useSloCrudLoading(); @@ -98,6 +98,6 @@ const Container = styled.div` } `; -const PLACEHOLDER = i18n.translate('xpack.observability.slo.list.search', { +const PLACEHOLDER = i18n.translate('xpack.slo.list.search', { defaultMessage: 'Search your SLOs ...', }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_view/slo_list_view.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_view/slo_list_view.tsx similarity index 88% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_view/slo_list_view.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_view/slo_list_view.tsx index f353f4743775a..3b23d2234f7cf 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_list_view/slo_list_view.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_list_view/slo_list_view.tsx @@ -8,9 +8,9 @@ import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { ALL_VALUE, SLOWithSummaryResponse } from '@kbn/slo-schema'; import React from 'react'; -import { useFetchActiveAlerts } from '../../../../hooks/slo/use_fetch_active_alerts'; -import { useFetchHistoricalSummary } from '../../../../hooks/slo/use_fetch_historical_summary'; -import { useFetchRulesForSlo } from '../../../../hooks/slo/use_fetch_rules_for_slo'; +import { useFetchActiveAlerts } from '../../../../hooks/use_fetch_active_alerts'; +import { useFetchHistoricalSummary } from '../../../../hooks/use_fetch_historical_summary'; +import { useFetchRulesForSlo } from '../../../../hooks/use_fetch_rules_for_slo'; import { SloListEmpty } from '../slo_list_empty'; import { SloListError } from '../slo_list_error'; import { SloListItem } from '../slo_list_item'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_sparkline.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_sparkline.stories.tsx similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_sparkline.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_sparkline.stories.tsx index 0f2eeee498fba..3306f12b9962a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_sparkline.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_sparkline.stories.tsx @@ -8,6 +8,7 @@ import { HistoricalSummaryResponse } from '@kbn/slo-schema'; import { ComponentStory } from '@storybook/react'; import React from 'react'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { DEGRADING_FAST_ROLLING_SLO, HEALTHY_RANDOM_ROLLING_SLO, @@ -16,7 +17,6 @@ import { historicalSummaryData, NO_DATA_TO_HEALTHY_ROLLING_SLO, } from '../../../data/slo/historical_summary_data'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; import { Props, SloSparkline as Component } from './slo_sparkline'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_sparkline.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_sparkline.tsx similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_sparkline.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_sparkline.tsx diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_summary.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_summary.stories.tsx similarity index 92% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_summary.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_summary.stories.tsx index 13d6365232ac2..d13b033ede550 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_summary.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_summary.stories.tsx @@ -7,12 +7,12 @@ import { ComponentStory } from '@storybook/react'; import React from 'react'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { HEALTHY_ROLLING_SLO, historicalSummaryData, } from '../../../data/slo/historical_summary_data'; import { buildSlo } from '../../../data/slo/slo'; -import { KibanaReactStorybookDecorator } from '../../../utils/kibana_react.storybook_decorator'; import { Props, SloSummary as Component } from './slo_summary'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_summary.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_summary.tsx similarity index 94% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_summary.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_summary.tsx index 77d23d6301aed..c320811329544 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/components/slo_summary.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/slo_summary.tsx @@ -38,7 +38,7 @@ export function SloSummary({ slo, historicalSummary = [], historicalSummaryLoadi > {`${rangeStart}-${rangeEnd}`}, total, slos: ( - + ), }} @@ -94,7 +91,7 @@ export function ToggleSLOView({ { @@ -46,7 +46,7 @@ export const getSloFormattedSummary = ( : numeral(errorBudgetRemaining).format(percentFormat); const sloDetailsUrl = basePath.prepend( - paths.observability.sloDetails( + paths.sloDetails( slo.id, ![slo.groupBy].flat().includes(ALL_VALUE) && slo.instanceId ? slo.instanceId : undefined ) diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/hooks/use_url_search_state.ts b/x-pack/plugins/observability_solution/slo/public/pages/slos/hooks/use_url_search_state.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/hooks/use_url_search_state.ts rename to x-pack/plugins/observability_solution/slo/public/pages/slos/hooks/use_url_search_state.ts index 8a1b639e67f54..dfbfa1b5ddeb0 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/hooks/use_url_search_state.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/hooks/use_url_search_state.ts @@ -10,7 +10,7 @@ import deepmerge from 'deepmerge'; import { useHistory } from 'react-router-dom'; import { Filter } from '@kbn/es-query'; import { useCallback, useEffect, useRef, useState } from 'react'; -import { DEFAULT_SLO_PAGE_SIZE } from '../../../../common/slo/constants'; +import { DEFAULT_SLO_PAGE_SIZE } from '../../../../common/constants'; import type { SortField, SortDirection } from '../components/slo_list_search_bar'; import type { GroupByField } from '../components/slo_list_group_by'; import type { SLOView } from '../components/toggle_slo_view'; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/slos.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/slos.test.tsx similarity index 91% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/slos.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/slos.test.tsx index 00e59a1461558..e019949027139 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/slos.test.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/slos.test.tsx @@ -15,13 +15,13 @@ import Router from 'react-router-dom'; import { paths } from '../../../common/locators/paths'; import { historicalSummaryData } from '../../data/slo/historical_summary_data'; import { emptySloList, sloList } from '../../data/slo/slo'; -import { useCapabilities } from '../../hooks/slo/use_capabilities'; -import { useCreateSlo } from '../../hooks/slo/use_create_slo'; -import { useDeleteSlo } from '../../hooks/slo/use_delete_slo'; -import { useFetchHistoricalSummary } from '../../hooks/slo/use_fetch_historical_summary'; -import { useFetchSloList } from '../../hooks/slo/use_fetch_slo_list'; +import { useCapabilities } from '../../hooks/use_capabilities'; +import { useCreateSlo } from '../../hooks/use_create_slo'; +import { useDeleteSlo } from '../../hooks/use_delete_slo'; +import { useFetchHistoricalSummary } from '../../hooks/use_fetch_historical_summary'; +import { useFetchSloList } from '../../hooks/use_fetch_slo_list'; import { useLicense } from '../../hooks/use_license'; -import { TagsList } from '@kbn/observability-shared-plugin/public'; +import { HeaderMenuPortal, TagsList } from '@kbn/observability-shared-plugin/public'; import { useKibana } from '../../utils/kibana_react'; import { render } from '../../utils/test_helper'; import { SlosPage } from './slos'; @@ -34,11 +34,11 @@ jest.mock('react-router-dom', () => ({ jest.mock('@kbn/observability-shared-plugin/public'); jest.mock('../../utils/kibana_react'); jest.mock('../../hooks/use_license'); -jest.mock('../../hooks/slo/use_fetch_slo_list'); -jest.mock('../../hooks/slo/use_create_slo'); -jest.mock('../../hooks/slo/use_delete_slo'); -jest.mock('../../hooks/slo/use_fetch_historical_summary'); -jest.mock('../../hooks/slo/use_capabilities'); +jest.mock('../../hooks/use_fetch_slo_list'); +jest.mock('../../hooks/use_create_slo'); +jest.mock('../../hooks/use_delete_slo'); +jest.mock('../../hooks/use_fetch_historical_summary'); +jest.mock('../../hooks/use_capabilities'); const useKibanaMock = useKibana as jest.Mock; const useLicenseMock = useLicense as jest.Mock; @@ -50,6 +50,9 @@ const useCapabilitiesMock = useCapabilities as jest.Mock; const TagsListMock = TagsList as jest.Mock; TagsListMock.mockReturnValue(

Tags list
); +const HeaderMenuPortalMock = HeaderMenuPortal as jest.Mock; +HeaderMenuPortalMock.mockReturnValue(
Portal node
); + const mockCreateSlo = jest.fn(); const mockDeleteSlo = jest.fn(); @@ -153,7 +156,7 @@ describe('SLOs Page', () => { }); await waitFor(() => { - expect(mockNavigate).toBeCalledWith(paths.observability.slosWelcome); + expect(mockNavigate).toBeCalledWith(paths.slosWelcome); }); }); }); @@ -175,7 +178,7 @@ describe('SLOs Page', () => { }); await waitFor(() => { - expect(mockNavigate).toBeCalledWith(paths.observability.slosWelcome); + expect(mockNavigate).toBeCalledWith(paths.slosWelcome); }); }); @@ -240,9 +243,7 @@ describe('SLOs Page', () => { button.click(); - expect(mockNavigate).toBeCalledWith( - `${paths.observability.sloEdit(sloList.results.at(0)?.id || '')}` - ); + expect(mockNavigate).toBeCalledWith(`${paths.sloEdit(sloList.results.at(0)?.id || '')}`); }); it('allows creating a new rule for an SLO', async () => { @@ -356,7 +357,7 @@ describe('SLOs Page', () => { await waitFor(() => { const slo = sloList.results.at(0); expect(mockNavigate).toBeCalledWith( - paths.observability.sloCreateWithEncodedForm( + paths.sloCreateWithEncodedForm( encode({ ...slo, name: `[Copy] ${slo!.name}`, id: undefined }) ) ); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos/slos.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos/slos.tsx similarity index 79% rename from x-pack/plugins/observability_solution/observability/public/pages/slos/slos.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos/slos.tsx index 259c2d7d2882a..9e152611ec00a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos/slos.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/slos.tsx @@ -9,16 +9,16 @@ import React, { useEffect } from 'react'; import { useBreadcrumbs } from '@kbn/observability-shared-plugin/public'; import { i18n } from '@kbn/i18n'; +import { HeaderMenu } from '../../components/header_menu/header_menu'; +import { useKibana } from '../../utils/kibana_react'; import { FeedbackButton } from './components/common/feedback_button'; import { CreateSloBtn } from './components/common/create_slo_btn'; import { SloListSearchBar } from './components/slo_list_search_bar'; -import { useKibana } from '../../utils/kibana_react'; import { usePluginContext } from '../../hooks/use_plugin_context'; import { useLicense } from '../../hooks/use_license'; -import { useFetchSloList } from '../../hooks/slo/use_fetch_slo_list'; +import { useFetchSloList } from '../../hooks/use_fetch_slo_list'; import { SloList } from './components/slo_list'; import { paths } from '../../../common/locators/paths'; -import { HeaderMenu } from '../overview/components/header_menu/header_menu'; import { SloOutdatedCallout } from '../../components/slo/slo_outdated_callout'; export const SLO_PAGE_ID = 'slo-page-container'; @@ -42,17 +42,17 @@ export function SlosPage() { useBreadcrumbs([ { - href: basePath.prepend(paths.observability.slos), - text: i18n.translate('xpack.observability.breadcrumbs.slosLinkText', { + href: basePath.prepend(paths.slos), + text: i18n.translate('xpack.slo.breadcrumbs.slosLinkText', { defaultMessage: 'SLOs', }), - deepLinkId: 'observability-overview:slos', + deepLinkId: 'slo', }, ]); useEffect(() => { if ((!isLoading && total === 0) || hasAtLeast('platinum') === false || isError) { - navigateToUrl(basePath.prepend(paths.observability.slosWelcome)); + navigateToUrl(basePath.prepend(paths.slosWelcome)); } }, [basePath, hasAtLeast, isError, isLoading, navigateToUrl, total]); @@ -60,9 +60,7 @@ export function SlosPage() { , ], }} topSearchBar={} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/assets/illustration.svg b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/assets/illustration.svg similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/assets/illustration.svg rename to x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/assets/illustration.svg diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.stories.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.stories.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.stories.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.stories.tsx index cb3cb1710bf0e..2b050c76a3fe5 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.stories.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.stories.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { ComponentStory } from '@storybook/react'; -import { KibanaReactStorybookDecorator } from '../../utils/kibana_react.storybook_decorator'; +import { KibanaReactStorybookDecorator } from '@kbn/observability-plugin/public'; import { SlosWelcomePage as Component } from './slos_welcome'; export default { diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.test.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.test.tsx similarity index 89% rename from x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.test.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.test.tsx index f967b6cb40c69..e91730400b87b 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.test.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.test.tsx @@ -11,13 +11,14 @@ import React from 'react'; import Router from 'react-router-dom'; import { paths } from '../../../common/locators/paths'; import { emptySloList, sloList } from '../../data/slo/slo'; -import { useCapabilities } from '../../hooks/slo/use_capabilities'; -import { useFetchSloGlobalDiagnosis } from '../../hooks/slo/use_fetch_global_diagnosis'; -import { useFetchSloList } from '../../hooks/slo/use_fetch_slo_list'; +import { useCapabilities } from '../../hooks/use_capabilities'; +import { useFetchSloGlobalDiagnosis } from '../../hooks/use_fetch_global_diagnosis'; +import { useFetchSloList } from '../../hooks/use_fetch_slo_list'; import { useLicense } from '../../hooks/use_license'; import { useKibana } from '../../utils/kibana_react'; import { render } from '../../utils/test_helper'; import { SlosWelcomePage } from './slos_welcome'; +import { HeaderMenuPortal } from '@kbn/observability-shared-plugin/public'; jest.mock('react-router-dom', () => ({ ...jest.requireActual('react-router-dom'), @@ -27,9 +28,12 @@ jest.mock('react-router-dom', () => ({ jest.mock('@kbn/observability-shared-plugin/public'); jest.mock('../../utils/kibana_react'); jest.mock('../../hooks/use_license'); -jest.mock('../../hooks/slo/use_fetch_slo_list'); -jest.mock('../../hooks/slo/use_capabilities'); -jest.mock('../../hooks/slo/use_fetch_global_diagnosis'); +jest.mock('../../hooks/use_fetch_slo_list'); +jest.mock('../../hooks/use_capabilities'); +jest.mock('../../hooks/use_fetch_global_diagnosis'); + +const HeaderMenuPortalMock = HeaderMenuPortal as jest.Mock; +HeaderMenuPortalMock.mockReturnValue(
Portal node
); const useKibanaMock = useKibana as jest.Mock; const useLicenseMock = useLicense as jest.Mock; @@ -151,7 +155,7 @@ describe('SLOs Welcome Page', () => { createNewSloButton?.click(); await waitFor(() => { - expect(mockNavigate).toBeCalledWith(paths.observability.sloCreate); + expect(mockNavigate).toBeCalledWith(paths.sloCreate); }); }); }); @@ -172,7 +176,7 @@ describe('SLOs Welcome Page', () => { it('should navigate to the SLO List page', async () => { render(); await waitFor(() => { - expect(mockNavigate).toBeCalledWith(paths.observability.slos); + expect(mockNavigate).toBeCalledWith(paths.slos); }); }); }); diff --git a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.tsx b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.tsx similarity index 71% rename from x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.tsx rename to x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.tsx index a27762d8553f9..53b08809ecc6a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/slos_welcome/slos_welcome.tsx +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos_welcome/slos_welcome.tsx @@ -21,13 +21,13 @@ import { i18n } from '@kbn/i18n'; import { useKibana } from '../../utils/kibana_react'; import { useLicense } from '../../hooks/use_license'; import { usePluginContext } from '../../hooks/use_plugin_context'; -import { useCapabilities } from '../../hooks/slo/use_capabilities'; -import { useFetchSloList } from '../../hooks/slo/use_fetch_slo_list'; +import { useCapabilities } from '../../hooks/use_capabilities'; +import { useFetchSloList } from '../../hooks/use_fetch_slo_list'; import { paths } from '../../../common/locators/paths'; import illustration from './assets/illustration.svg'; -import { useFetchSloGlobalDiagnosis } from '../../hooks/slo/use_fetch_global_diagnosis'; -import { HeaderMenu } from '../overview/components/header_menu/header_menu'; +import { useFetchSloGlobalDiagnosis } from '../../hooks/use_fetch_global_diagnosis'; import { SloOutdatedCallout } from '../../components/slo/slo_outdated_callout'; +import { HeaderMenu } from '../../components/header_menu/header_menu'; export function SlosWelcomePage() { const { @@ -48,7 +48,7 @@ export function SlosWelcomePage() { const hasRequiredReadPrivileges = !!globalDiagnosis?.userPrivileges.read.has_all_requested; const handleClickCreateSlo = () => { - navigateToUrl(basePath.prepend(paths.observability.sloCreate)); + navigateToUrl(basePath.prepend(paths.sloCreate)); }; const hasSlosAndHasPermissions = @@ -56,7 +56,7 @@ export function SlosWelcomePage() { useEffect(() => { if (hasSlosAndHasPermissions) { - navigateToUrl(basePath.prepend(paths.observability.slos)); + navigateToUrl(basePath.prepend(paths.slos)); } }, [basePath, hasSlosAndHasPermissions, navigateToUrl]); @@ -68,7 +68,7 @@ export function SlosWelcomePage() { title={

- {i18n.translate('xpack.observability.slo.sloList.welcomePrompt.title', { + {i18n.translate('xpack.slo.sloList.welcomePrompt.title', { defaultMessage: 'Track and deliver on your SLOs', })}

@@ -81,14 +81,14 @@ export function SlosWelcomePage() { body={ <>

- {i18n.translate('xpack.observability.slo.sloList.welcomePrompt.messageParagraph1', { + {i18n.translate('xpack.slo.sloList.welcomePrompt.messageParagraph1', { defaultMessage: 'Measure key metrics important to the business, such as service-level indicators and service-level objectives (SLIs/SLOs) to deliver on SLAs.', })}

- {i18n.translate('xpack.observability.slo.sloList.welcomePrompt.messageParagraph2', { + {i18n.translate('xpack.slo.sloList.welcomePrompt.messageParagraph2', { defaultMessage: 'Easily report the uptime and reliability of your services to stakeholders with real-time insights.', })} @@ -103,12 +103,9 @@ export function SlosWelcomePage() { - {i18n.translate( - 'xpack.observability.slo.sloList.welcomePrompt.getStartedMessage', - { - defaultMessage: 'To get started, create your first SLO.', - } - )} + {i18n.translate('xpack.slo.sloList.welcomePrompt.getStartedMessage', { + defaultMessage: 'To get started, create your first SLO.', + })} @@ -122,7 +119,7 @@ export function SlosWelcomePage() { onClick={handleClickCreateSlo} disabled={!hasWriteCapabilities || !hasRequiredWritePrivileges} > - {i18n.translate('xpack.observability.slo.sloList.welcomePrompt.buttonLabel', { + {i18n.translate('xpack.slo.sloList.welcomePrompt.buttonLabel', { defaultMessage: 'Create SLO', })} @@ -134,13 +131,10 @@ export function SlosWelcomePage() { - {i18n.translate( - 'xpack.observability.slo.sloList.welcomePrompt.needLicenseMessage', - { - defaultMessage: - 'You need an Elastic Cloud subscription or Platinum license to use SLOs.', - } - )} + {i18n.translate('xpack.slo.sloList.welcomePrompt.needLicenseMessage', { + defaultMessage: + 'You need an Elastic Cloud subscription or Platinum license to use SLOs.', + })} @@ -154,12 +148,9 @@ export function SlosWelcomePage() { target="_blank" data-test-subj="slosPageWelcomePromptSignupForCloudButton" > - {i18n.translate( - 'xpack.observability.slo.sloList.welcomePrompt.signupForCloud', - { - defaultMessage: 'Sign up for Elastic Cloud', - } - )} + {i18n.translate('xpack.slo.sloList.welcomePrompt.signupForCloud', { + defaultMessage: 'Sign up for Elastic Cloud', + })} @@ -169,12 +160,9 @@ export function SlosWelcomePage() { target="_blank" data-test-subj="slosPageWelcomePromptSignupForLicenseButton" > - {i18n.translate( - 'xpack.observability.slo.sloList.welcomePrompt.signupForLicense', - { - defaultMessage: 'Sign up for license', - } - )} + {i18n.translate('xpack.slo.sloList.welcomePrompt.signupForLicense', { + defaultMessage: 'Sign up for license', + })} @@ -187,7 +175,7 @@ export function SlosWelcomePage() { <> - {i18n.translate('xpack.observability.slo.sloList.welcomePrompt.learnMore', { + {i18n.translate('xpack.slo.sloList.welcomePrompt.learnMore', { defaultMessage: 'Want to learn more?', })} @@ -198,7 +186,7 @@ export function SlosWelcomePage() { href="https://www.elastic.co/guide/en/observability/current/slo.html" target="_blank" > - {i18n.translate('xpack.observability.slo.sloList.welcomePrompt.learnMoreLink', { + {i18n.translate('xpack.slo.sloList.welcomePrompt.learnMoreLink', { defaultMessage: 'Read the docs', })} diff --git a/x-pack/plugins/observability_solution/slo/public/plugin.mock.tsx b/x-pack/plugins/observability_solution/slo/public/plugin.mock.tsx new file mode 100644 index 0000000000000..602f4ee21436a --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/plugin.mock.tsx @@ -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 { mockCasesContract } from '@kbn/cases-plugin/public/mocks'; +import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; +import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; +import { sharePluginMock } from '@kbn/share-plugin/public/mocks'; +import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; +import { lensPluginMock } from '@kbn/lens-plugin/public/mocks'; + +const triggersActionsUiStartMock = { + createStart() { + return { + ruleTypeRegistry: { + has: jest.fn(), + register: jest.fn(), + get: jest.fn(), + list: jest.fn(), + }, + actionTypeRegistry: { + has: jest.fn((x) => true), + register: jest.fn(), + get: jest.fn(), + list: jest.fn(), + }, + }; + }, +}; + +const dataViewEditor = { + createStart() { + return { + userPermissions: { + editDataView: jest.fn(), + }, + }; + }, +}; + +const dataViews = { + createStart() { + return { + getIds: jest.fn().mockImplementation(() => []), + get: jest.fn(), + create: jest.fn().mockImplementation(() => ({ + fields: { + getByName: jest.fn(), + }, + })), + }; + }, +}; + +export const sloPublicPluginsStartMock = { + createStart() { + return { + cases: mockCasesContract(), + charts: chartPluginMock.createStartContract(), + data: dataPluginMock.createStartContract(), + dataViewEditor: dataViewEditor.createStart(), + dataViews: dataViews.createStart(), + lens: lensPluginMock.createStartContract(), + share: sharePluginMock.createStartContract(), + triggersActionsUi: triggersActionsUiStartMock.createStart(), + unifiedSearch: unifiedSearchPluginMock.createStartContract(), + }; + }, +}; diff --git a/x-pack/plugins/observability_solution/slo/public/plugin.ts b/x-pack/plugins/observability_solution/slo/public/plugin.ts new file mode 100644 index 0000000000000..45bd9abb95ef1 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/plugin.ts @@ -0,0 +1,153 @@ +/* + * 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 { + App, + AppMountParameters, + AppUpdater, + CoreSetup, + CoreStart, + DEFAULT_APP_CATEGORIES, + Plugin, + PluginInitializerContext, +} from '@kbn/core/public'; +import { BehaviorSubject, firstValueFrom } from 'rxjs'; +import { SloPublicPluginsSetup, SloPublicPluginsStart } from './types'; +import { PLUGIN_NAME, sloAppId } from '../common'; +import type { SloPublicSetup, SloPublicStart } from './types'; +import { SloDetailsLocatorDefinition } from './locators/slo_details'; +import { SloEditLocatorDefinition } from './locators/slo_edit'; +import { SloListLocatorDefinition } from './locators/slo_list'; +import { SLOS_BASE_PATH } from '../common/locators/paths'; +import { getCreateSLOFlyoutLazy } from './pages/slo_edit/shared_flyout/get_create_slo_flyout'; +import { registerBurnRateRuleType } from './rules/register_burn_rate_rule_type'; + +export class SloPlugin + implements Plugin +{ + private readonly appUpdater$ = new BehaviorSubject(() => ({})); + + constructor(private readonly initContext: PluginInitializerContext) {} + + public setup( + coreSetup: CoreSetup, + pluginsSetup: SloPublicPluginsSetup + ) { + const kibanaVersion = this.initContext.env.packageInfo.version; + + const sloDetailsLocator = pluginsSetup.share.url.locators.create( + new SloDetailsLocatorDefinition() + ); + const sloEditLocator = pluginsSetup.share.url.locators.create(new SloEditLocatorDefinition()); + const sloListLocator = pluginsSetup.share.url.locators.create(new SloListLocatorDefinition()); + + const mount = async (params: AppMountParameters) => { + const { renderApp } = await import('./application'); + const [coreStart, pluginsStart] = await coreSetup.getStartServices(); + const { ruleTypeRegistry, actionTypeRegistry } = pluginsStart.triggersActionsUi; + const { observabilityRuleTypeRegistry } = pluginsStart.observability; + + return renderApp({ + appMountParameters: params, + core: coreStart, + isDev: this.initContext.env.mode.dev, + observabilityRuleTypeRegistry, + kibanaVersion, + usageCollection: pluginsSetup.usageCollection, + ObservabilityPageTemplate: pluginsStart.observabilityShared.navigation.PageTemplate, + plugins: { ...pluginsStart, ruleTypeRegistry, actionTypeRegistry }, + isServerless: !!pluginsStart.serverless, + }); + }; + const appUpdater$ = this.appUpdater$; + const app: App = { + id: sloAppId, + title: PLUGIN_NAME, + order: 8002, + updater$: appUpdater$, + euiIconType: 'logoObservability', + appRoute: SLOS_BASE_PATH, + category: DEFAULT_APP_CATEGORIES.observability, + mount, + keywords: ['observability', 'monitor', 'slos'], + }; + // Register an application into the side navigation menu + coreSetup.application.register(app); + + registerBurnRateRuleType(pluginsSetup.observability.observabilityRuleTypeRegistry); + + const assertPlatinumLicense = async () => { + const licensing = await pluginsSetup.licensing; + const license = await firstValueFrom(licensing.license$); + + const hasPlatinumLicense = license.hasAtLeast('platinum'); + if (hasPlatinumLicense) { + const registerSloOverviewEmbeddableFactory = async () => { + const { SloOverviewEmbeddableFactoryDefinition } = await import( + './embeddable/slo/overview/slo_embeddable_factory' + ); + const factory = new SloOverviewEmbeddableFactoryDefinition(coreSetup.getStartServices); + pluginsSetup.embeddable.registerEmbeddableFactory(factory.type, factory); + }; + registerSloOverviewEmbeddableFactory(); + const registerSloAlertsEmbeddableFactory = async () => { + const { SloAlertsEmbeddableFactoryDefinition } = await import( + './embeddable/slo/alerts/slo_alerts_embeddable_factory' + ); + const factory = new SloAlertsEmbeddableFactoryDefinition( + coreSetup.getStartServices, + kibanaVersion + ); + pluginsSetup.embeddable.registerEmbeddableFactory(factory.type, factory); + }; + registerSloAlertsEmbeddableFactory(); + + const registerSloErrorBudgetEmbeddableFactory = async () => { + const { SloErrorBudgetEmbeddableFactoryDefinition } = await import( + './embeddable/slo/error_budget/slo_error_budget_embeddable_factory' + ); + const factory = new SloErrorBudgetEmbeddableFactoryDefinition(coreSetup.getStartServices); + pluginsSetup.embeddable.registerEmbeddableFactory(factory.type, factory); + }; + registerSloErrorBudgetEmbeddableFactory(); + + const registerAsyncSloAlertsUiActions = async () => { + if (pluginsSetup.uiActions) { + const { registerSloAlertsUiActions } = await import('./ui_actions'); + registerSloAlertsUiActions(pluginsSetup.uiActions, coreSetup); + } + }; + registerAsyncSloAlertsUiActions(); + } + }; + assertPlatinumLicense(); + + return { + sloDetailsLocator, + sloEditLocator, + sloListLocator, + }; + } + + public start(coreStart: CoreStart, pluginsStart: SloPublicPluginsStart) { + const kibanaVersion = this.initContext.env.packageInfo.version; + const { ruleTypeRegistry, actionTypeRegistry } = pluginsStart.triggersActionsUi; + + return { + getCreateSLOFlyout: getCreateSLOFlyoutLazy({ + core: coreStart, + isDev: this.initContext.env.mode.dev, + kibanaVersion, + observabilityRuleTypeRegistry: pluginsStart.observability.observabilityRuleTypeRegistry, + ObservabilityPageTemplate: pluginsStart.observabilityShared.navigation.PageTemplate, + plugins: { ...pluginsStart, ruleTypeRegistry, actionTypeRegistry }, + isServerless: !!pluginsStart.serverless, + }), + }; + } + + public stop() {} +} diff --git a/x-pack/plugins/observability_solution/slo/public/routes/routes.tsx b/x-pack/plugins/observability_solution/slo/public/routes/routes.tsx new file mode 100644 index 0000000000000..7ba21c8befa0f --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/routes/routes.tsx @@ -0,0 +1,66 @@ +/* + * 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 { SlosPage } from '../pages/slos/slos'; +import { SlosWelcomePage } from '../pages/slos_welcome/slos_welcome'; +import { SloDetailsPage } from '../pages/slo_details/slo_details'; +import { SloEditPage } from '../pages/slo_edit/slo_edit'; +import { + SLOS_OUTDATED_DEFINITIONS_PATH, + SLOS_PATH, + SLOS_WELCOME_PATH, + SLO_CREATE_PATH, + SLO_DETAIL_PATH, + SLO_EDIT_PATH, +} from '../../common/locators/paths'; +import { SlosOutdatedDefinitions } from '../pages/slo_outdated_definitions'; + +export const routes = { + [SLOS_PATH]: { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + [SLO_CREATE_PATH]: { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + [SLOS_WELCOME_PATH]: { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + [SLOS_OUTDATED_DEFINITIONS_PATH]: { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + [SLO_EDIT_PATH]: { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + [SLO_DETAIL_PATH]: { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, +}; diff --git a/x-pack/plugins/observability_solution/slo/public/rules/observability_rule_type_registry_mock.ts b/x-pack/plugins/observability_solution/slo/public/rules/observability_rule_type_registry_mock.ts new file mode 100644 index 0000000000000..7400ccd3b524a --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/rules/observability_rule_type_registry_mock.ts @@ -0,0 +1,18 @@ +/* + * 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 { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public'; + +const createRuleTypeRegistryMock = () => ({ + getFormatter: () => () => 'a reason', + registerFormatter: () => {}, + list: () => ['ruleType1', 'ruleType2'], +}); + +export const createObservabilityRuleTypeRegistryMock = () => + createRuleTypeRegistryMock() as ObservabilityRuleTypeRegistry & + ReturnType; diff --git a/x-pack/plugins/observability_solution/slo/public/rules/register_burn_rate_rule_type.ts b/x-pack/plugins/observability_solution/slo/public/rules/register_burn_rate_rule_type.ts new file mode 100644 index 0000000000000..20df312441f14 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/rules/register_burn_rate_rule_type.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { lazy } from 'react'; +import { i18n } from '@kbn/i18n'; +import { ALERT_REASON } from '@kbn/rule-data-utils'; +import { ObservabilityRuleTypeRegistry } from '@kbn/observability-plugin/public/rules/create_observability_rule_type_registry'; +import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { SLO_ID_FIELD, SLO_INSTANCE_ID_FIELD } from '../../common/field_names/slo'; +import { validateBurnRateRule } from '../components/burn_rate_rule_editor/validation'; + +const sloBurnRateDefaultActionMessage = i18n.translate( + 'xpack.slo.rules.burnRate.defaultActionMessage', + { + defaultMessage: `\\{\\{context.reason\\}\\} + +\\{\\{rule.name\\}\\} is active with the following conditions: + +- SLO: \\{\\{context.sloName\\}\\}' +- The burn rate over the last \\{\\{context.longWindow.duration\\}\\} is \\{\\{context.longWindow.burnRate\\}\\} +- The burn rate over the last \\{\\{context.shortWindow.duration\\}\\} is \\{\\{context.shortWindow.burnRate\\}\\} +- Threshold: \\{\\{context.burnRateThreshold\\}\\} + +[View alert details](\\{\\{context.alertDetailsUrl\\}\\}) +`, + } +); +const sloBurnRateDefaultRecoveryMessage = i18n.translate( + 'xpack.slo.rules.burnRate.defaultRecoveryMessage', + { + defaultMessage: `\\{\\{context.reason\\}\\} + +\\{\\{rule.name\\}\\} has recovered. + +- SLO: \\{\\{context.sloName\\}\\}' +- The burn rate over the last \\{\\{context.longWindow.duration\\}\\} is \\{\\{context.longWindow.burnRate\\}\\} +- The burn rate over the last \\{\\{context.shortWindow.duration\\}\\} is \\{\\{context.shortWindow.burnRate\\}\\} +- Threshold: \\{\\{context.burnRateThreshold\\}\\} + +[View alert details](\\{\\{context.alertDetailsUrl\\}\\}) +`, + } +); + +export const registerBurnRateRuleType = async ( + observabilityRuleTypeRegistry: ObservabilityRuleTypeRegistry +) => { + observabilityRuleTypeRegistry.register({ + id: SLO_BURN_RATE_RULE_TYPE_ID, + description: i18n.translate('xpack.slo.rules.burnRate.description', { + defaultMessage: 'Alert when your SLO burn rate is too high over a defined period of time.', + }), + format: ({ fields }) => { + return { + reason: fields[ALERT_REASON] ?? '-', + link: `/app/slos/${fields[SLO_ID_FIELD]}?instanceId=${ + fields[SLO_INSTANCE_ID_FIELD] ?? '*' + }`, + }; + }, + iconClass: 'bell', + documentationUrl(docLinks) { + return `${docLinks.links.observability.sloBurnRateRule}`; + }, + ruleParamsExpression: lazy(() => import('../components/burn_rate_rule_editor')), + validate: validateBurnRateRule, + requiresAppContext: false, + defaultActionMessage: sloBurnRateDefaultActionMessage, + defaultRecoveryMessage: sloBurnRateDefaultRecoveryMessage, + alertDetailsAppSection: lazy( + () => import('../components/slo/burn_rate/alert_details/alert_details_app_section') + ), + priority: 100, + }); +}; diff --git a/x-pack/plugins/observability_solution/slo/public/types.ts b/x-pack/plugins/observability_solution/slo/public/types.ts new file mode 100644 index 0000000000000..8677862b3afd9 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/types.ts @@ -0,0 +1,106 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { ToastsStart } from '@kbn/core/public'; +import { + ObservabilityPublicSetup, + ObservabilityPublicStart, +} from '@kbn/observability-plugin/public'; +import type { + ObservabilitySharedPluginSetup, + ObservabilitySharedPluginStart, +} from '@kbn/observability-shared-plugin/public'; +import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; +import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; +import type { EmbeddableSetup } from '@kbn/embeddable-plugin/public'; +import type { + TriggersAndActionsUIPublicPluginSetup, + TriggersAndActionsUIPublicPluginStart, +} from '@kbn/triggers-actions-ui-plugin/public'; +import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; +import type { LicensingPluginSetup } from '@kbn/licensing-plugin/public'; +import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; +import { LicensingPluginStart } from '@kbn/licensing-plugin/public'; +import type { UiActionsStart, UiActionsSetup } from '@kbn/ui-actions-plugin/public'; +import type { PresentationUtilPluginStart } from '@kbn/presentation-util-plugin/public'; +import { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/public'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; +import { + ActionTypeRegistryContract, + RuleTypeRegistryContract, +} from '@kbn/triggers-actions-ui-plugin/public'; +import type { CloudStart } from '@kbn/cloud-plugin/public'; +import type { + UsageCollectionSetup, + UsageCollectionStart, +} from '@kbn/usage-collection-plugin/public'; +import { + ObservabilityAIAssistantPublicSetup, + ObservabilityAIAssistantPublicStart, +} from '@kbn/observability-ai-assistant-plugin/public'; +import { SecurityPluginStart } from '@kbn/security-plugin/public'; +import { SpacesPluginStart } from '@kbn/spaces-plugin/public'; +import type { LensPublicStart } from '@kbn/lens-plugin/public'; +import { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public'; +import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { IUiSettingsClient } from '@kbn/core/public'; +import { CasesPublicStart } from '@kbn/cases-plugin/public'; +import type { DiscoverStart } from '@kbn/discover-plugin/public'; +import { DataViewFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public'; + +import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import { SloPlugin } from './plugin'; + +export interface SloPublicPluginsSetup { + data: DataPublicPluginSetup; + observability: ObservabilityPublicSetup; + observabilityShared: ObservabilitySharedPluginSetup; + triggersActionsUi: TriggersAndActionsUIPublicPluginSetup; + licensing: LicensingPluginSetup; + share: SharePluginSetup; + embeddable: EmbeddableSetup; + uiActions: UiActionsSetup; + serverless?: ServerlessPluginSetup; + presentationUtil?: PresentationUtilPluginStart; + observabilityAIAssistant: ObservabilityAIAssistantPublicSetup; + usageCollection: UsageCollectionSetup; +} + +export interface SloPublicPluginsStart { + actionTypeRegistry: ActionTypeRegistryContract; + cases: CasesPublicStart; + cloud?: CloudStart; + dataViewEditor: DataViewEditorStart; + fieldFormats: FieldFormatsStart; + observability: ObservabilityPublicStart; + observabilityShared: ObservabilitySharedPluginStart; + triggersActionsUi: TriggersAndActionsUIPublicPluginStart; + navigation: NavigationPublicPluginStart; + security: SecurityPluginStart; + spaces?: SpacesPluginStart; + share: SharePluginStart; + licensing: LicensingPluginStart; + embeddable: EmbeddableStart; + uiActions: UiActionsStart; + presentationUtil: PresentationUtilPluginStart; + serverless?: ServerlessPluginStart; + data: DataPublicPluginStart; + dataViews: DataViewsPublicPluginStart; + ruleTypeRegistry: RuleTypeRegistryContract; + observabilityAIAssistant: ObservabilityAIAssistantPublicStart; + lens: LensPublicStart; + charts: ChartsPluginStart; + unifiedSearch: UnifiedSearchPublicPluginStart; + uiSettings: IUiSettingsClient; + usageCollection: UsageCollectionStart; + discover: DiscoverStart; + dataViewFieldEditor: DataViewFieldEditorStart; + toastNotifications: ToastsStart; +} + +export type SloPublicSetup = ReturnType; +export type SloPublicStart = ReturnType; diff --git a/x-pack/plugins/observability_solution/slo/public/typings/index.ts b/x-pack/plugins/observability_solution/slo/public/typings/index.ts new file mode 100644 index 0000000000000..78f557bdcbc7d --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/typings/index.ts @@ -0,0 +1,8 @@ +/* + * 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 * from './slo'; diff --git a/x-pack/plugins/observability_solution/observability/public/typings/slo/index.ts b/x-pack/plugins/observability_solution/slo/public/typings/slo/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/typings/slo/index.ts rename to x-pack/plugins/observability_solution/slo/public/typings/slo/index.ts diff --git a/x-pack/plugins/observability_solution/observability/public/ui_actions/edit_slo_alerts_panel.tsx b/x-pack/plugins/observability_solution/slo/public/ui_actions/edit_slo_alerts_panel.tsx similarity index 87% rename from x-pack/plugins/observability_solution/observability/public/ui_actions/edit_slo_alerts_panel.tsx rename to x-pack/plugins/observability_solution/slo/public/ui_actions/edit_slo_alerts_panel.tsx index b920c47caa352..9c9137c3b0214 100644 --- a/x-pack/plugins/observability_solution/observability/public/ui_actions/edit_slo_alerts_panel.tsx +++ b/x-pack/plugins/observability_solution/slo/public/ui_actions/edit_slo_alerts_panel.tsx @@ -11,7 +11,7 @@ import { ViewMode } from '@kbn/embeddable-plugin/common'; import type { CoreSetup } from '@kbn/core/public'; import { IEmbeddable, EmbeddableOutput } from '@kbn/embeddable-plugin/public'; import { SLO_ALERTS_EMBEDDABLE } from '../embeddable/slo/constants'; -import { ObservabilityPublicPluginsStart, ObservabilityPublicStart } from '..'; +import { SloPublicPluginsStart, SloPublicStart } from '..'; import { SloAlertsEmbeddableInput } from '../embeddable/slo/alerts/types'; export const EDIT_SLO_ALERTS_ACTION = 'editSloAlertsPanelAction'; @@ -19,10 +19,7 @@ export interface EditSloAlertsPanelContext { embeddable: IEmbeddable; } export function createEditSloAlertsPanelAction( - getStartServices: CoreSetup< - ObservabilityPublicPluginsStart, - ObservabilityPublicStart - >['getStartServices'] + getStartServices: CoreSetup['getStartServices'] ): UiActionsActionDefinition { return { id: EDIT_SLO_ALERTS_ACTION, @@ -31,7 +28,7 @@ export function createEditSloAlertsPanelAction( return 'pencil'; }, getDisplayName: () => - i18n.translate('xpack.observability.actions.editSloAlertsEmbeddableTitle', { + i18n.translate('xpack.slo.actions.editSloAlertsEmbeddableTitle', { defaultMessage: 'Edit configuration', }), async execute({ embeddable }) { diff --git a/x-pack/plugins/observability_solution/observability/public/ui_actions/index.ts b/x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts similarity index 85% rename from x-pack/plugins/observability_solution/observability/public/ui_actions/index.ts rename to x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts index 59929b54f597f..48ba2d5086cc5 100644 --- a/x-pack/plugins/observability_solution/observability/public/ui_actions/index.ts +++ b/x-pack/plugins/observability_solution/slo/public/ui_actions/index.ts @@ -9,11 +9,11 @@ import type { UiActionsSetup } from '@kbn/ui-actions-plugin/public'; import { CONTEXT_MENU_TRIGGER } from '@kbn/embeddable-plugin/public'; import type { CoreSetup } from '@kbn/core/public'; import { createEditSloAlertsPanelAction } from './edit_slo_alerts_panel'; -import { ObservabilityPublicPluginsStart, ObservabilityPublicStart } from '..'; +import { SloPublicPluginsStart, SloPublicStart } from '..'; export function registerSloAlertsUiActions( uiActions: UiActionsSetup, - core: CoreSetup + core: CoreSetup ) { // Initialize actions const editSloAlertsPanelAction = createEditSloAlertsPanelAction(core.getStartServices); diff --git a/x-pack/plugins/observability_solution/slo/public/utils/kibana_react.mock.ts b/x-pack/plugins/observability_solution/slo/public/utils/kibana_react.mock.ts new file mode 100644 index 0000000000000..9090a1e72bfaa --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/utils/kibana_react.mock.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; you may not use this file except in compliance with the Elastic License + * 2.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 { casesPluginMock } from '@kbn/cases-plugin/public/mocks'; +import { coreMock, notificationServiceMock, overlayServiceMock } from '@kbn/core/public/mocks'; +import { sloPublicPluginsStartMock } from '../plugin.mock'; + +export const kibanaStartMock = { + startContract() { + return { + notifications: notificationServiceMock.createStartContract(), + overlays: overlayServiceMock.createStartContract(), + services: { + ...coreMock.createStart(), + ...sloPublicPluginsStartMock.createStart(), + storage: coreMock.createStorage(), + cases: { ...casesPluginMock.createStartContract() }, + }, + }; + }, +}; diff --git a/x-pack/plugins/observability_solution/slo/public/utils/kibana_react.ts b/x-pack/plugins/observability_solution/slo/public/utils/kibana_react.ts new file mode 100644 index 0000000000000..20ec03497b0af --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/utils/kibana_react.ts @@ -0,0 +1,22 @@ +/* + * 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 { CoreStart } from '@kbn/core/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { Storage } from '@kbn/kibana-utils-plugin/public'; +import { SloPublicPluginsStart } from '../types'; + +export type StartServices = CoreStart & + SloPublicPluginsStart & + AdditionalServices & { + storage: Storage; + kibanaVersion: string; + }; +const useTypedKibana = () => + useKibana>(); + +export { useTypedKibana as useKibana }; diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/chart_data_formatter.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/chart_data_formatter.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/chart_data_formatter.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/chart_data_formatter.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.test.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.test.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.test.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/convert_sli_apm_params_to_apm_app_deeplink_url.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/duration.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/duration.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/duration.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/duration.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/get_delay_in_seconds_from_slo.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/get_delay_in_seconds_from_slo.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/get_delay_in_seconds_from_slo.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/get_delay_in_seconds_from_slo.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/get_discover_link.ts similarity index 93% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/get_discover_link.ts index 7023ee1ddd4df..ab09353becb92 100644 --- a/x-pack/plugins/observability_solution/observability/public/utils/slo/get_discover_link.ts +++ b/x-pack/plugins/observability_solution/slo/public/utils/slo/get_discover_link.ts @@ -8,9 +8,9 @@ import { DiscoverStart } from '@kbn/discover-plugin/public'; import { ALL_VALUE, kqlWithFiltersSchema, SLOWithSummaryResponse } from '@kbn/slo-schema'; import { Filter, FilterStateStore, TimeRange } from '@kbn/es-query'; import { i18n } from '@kbn/i18n'; +import { buildEsQuery } from '@kbn/observability-plugin/public'; import { v4 } from 'uuid'; import { isEmpty } from 'lodash'; -import { buildEsQuery } from '../build_es_query'; function createDiscoverLocator( slo: SLOWithSummaryResponse, @@ -50,7 +50,7 @@ function createDiscoverLocator( $state: { store: FilterStateStore.APP_STATE }, meta: { type: 'custom', - alias: i18n.translate('xpack.observability.slo.sloDetails.goodFilterLabel', { + alias: i18n.translate('xpack.slo.sloDetails.goodFilterLabel', { defaultMessage: 'Good events', }), disabled: !showGood, @@ -64,7 +64,7 @@ function createDiscoverLocator( $state: { store: FilterStateStore.APP_STATE }, meta: { type: 'custom', - alias: i18n.translate('xpack.observability.slo.sloDetails.badFilterLabel', { + alias: i18n.translate('xpack.slo.sloDetails.badFilterLabel', { defaultMessage: 'Bad events', }), disabled: !showBad, @@ -78,7 +78,7 @@ function createDiscoverLocator( $state: { store: FilterStateStore.APP_STATE }, meta: { type: 'custom', - alias: i18n.translate('xpack.observability.slo.sloDetails.totalFilterLabel', { + alias: i18n.translate('xpack.slo.sloDetails.totalFilterLabel', { defaultMessage: 'Total events', }), value: JSON.stringify(customTotalFilter), diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/groupings.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/groupings.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/groupings.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/groupings.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/indicator.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/indicator.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/indicator.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/indicator.ts diff --git a/x-pack/plugins/observability_solution/observability/public/utils/slo/labels.ts b/x-pack/plugins/observability_solution/slo/public/utils/slo/labels.ts similarity index 61% rename from x-pack/plugins/observability_solution/observability/public/utils/slo/labels.ts rename to x-pack/plugins/observability_solution/slo/public/utils/slo/labels.ts index f7dd0bd9fd728..5f41cec14a162 100644 --- a/x-pack/plugins/observability_solution/observability/public/utils/slo/labels.ts +++ b/x-pack/plugins/observability_solution/slo/public/utils/slo/labels.ts @@ -10,40 +10,32 @@ import { SLOWithSummaryResponse } from '@kbn/slo-schema'; import { assertNever } from '@kbn/std'; import { toDuration } from './duration'; -export const INDICATOR_CUSTOM_KQL = i18n.translate('xpack.observability.slo.indicators.customKql', { +export const INDICATOR_CUSTOM_KQL = i18n.translate('xpack.slo.indicators.customKql', { defaultMessage: 'Custom KQL', }); -export const INDICATOR_CUSTOM_METRIC = i18n.translate( - 'xpack.observability.slo.indicators.customMetric', - { - defaultMessage: 'Custom Metric', - } -); +export const INDICATOR_CUSTOM_METRIC = i18n.translate('xpack.slo.indicators.customMetric', { + defaultMessage: 'Custom Metric', +}); -export const INDICATOR_TIMESLICE_METRIC = i18n.translate( - 'xpack.observability.slo.indicators.timesliceMetric', - { - defaultMessage: 'Timeslice Metric', - } -); +export const INDICATOR_TIMESLICE_METRIC = i18n.translate('xpack.slo.indicators.timesliceMetric', { + defaultMessage: 'Timeslice Metric', +}); -export const INDICATOR_HISTOGRAM = i18n.translate('xpack.observability.slo.indicators.histogram', { +export const INDICATOR_HISTOGRAM = i18n.translate('xpack.slo.indicators.histogram', { defaultMessage: 'Histogram Metric', }); -export const INDICATOR_APM_LATENCY = i18n.translate( - 'xpack.observability.slo.indicators.apmLatency', - { defaultMessage: 'APM latency' } -); +export const INDICATOR_APM_LATENCY = i18n.translate('xpack.slo.indicators.apmLatency', { + defaultMessage: 'APM latency', +}); -export const INDICATOR_APM_AVAILABILITY = i18n.translate( - 'xpack.observability.slo.indicators.apmAvailability', - { defaultMessage: 'APM availability' } -); +export const INDICATOR_APM_AVAILABILITY = i18n.translate('xpack.slo.indicators.apmAvailability', { + defaultMessage: 'APM availability', +}); export const INDICATOR_SYNTHETICS_AVAILABILITY = i18n.translate( - 'xpack.observability.slo.indicators.syntheticsAvailability', + 'xpack.slo.indicators.syntheticsAvailability', { defaultMessage: 'Synthetics availability' } ); @@ -78,53 +70,50 @@ export function toIndicatorTypeLabel( } export const BUDGETING_METHOD_OCCURRENCES = i18n.translate( - 'xpack.observability.slo.budgetingMethod.occurrences', + 'xpack.slo.budgetingMethod.occurrences', { defaultMessage: 'Occurrences', } ); -export const BUDGETING_METHOD_TIMESLICES = i18n.translate( - 'xpack.observability.slo.budgetingMethod.timeslices', - { - defaultMessage: 'Timeslices', - } -); +export const BUDGETING_METHOD_TIMESLICES = i18n.translate('xpack.slo.budgetingMethod.timeslices', { + defaultMessage: 'Timeslices', +}); export function toDurationLabel(durationStr: string): string { const duration = toDuration(durationStr); switch (duration.unit) { case 'm': - return i18n.translate('xpack.observability.slo.duration.minute', { + return i18n.translate('xpack.slo.duration.minute', { defaultMessage: '{duration, plural, one {1 minute} other {# minutes}}', values: { duration: duration.value, }, }); case 'h': - return i18n.translate('xpack.observability.slo.duration.hour', { + return i18n.translate('xpack.slo.duration.hour', { defaultMessage: '{duration, plural, one {1 hour} other {# hours}}', values: { duration: duration.value, }, }); case 'd': - return i18n.translate('xpack.observability.slo.duration.day', { + return i18n.translate('xpack.slo.duration.day', { defaultMessage: '{duration, plural, one {1 day} other {# days}}', values: { duration: duration.value, }, }); case 'w': - return i18n.translate('xpack.observability.slo.duration.week', { + return i18n.translate('xpack.slo.duration.week', { defaultMessage: '{duration, plural, one {1 week} other {# weeks}}', values: { duration: duration.value, }, }); case 'M': - return i18n.translate('xpack.observability.slo.duration.month', { + return i18n.translate('xpack.slo.duration.month', { defaultMessage: '{duration, plural, one {1 month} other {# months}}', values: { duration: duration.value, @@ -138,23 +127,23 @@ export function toDurationAdverbLabel(durationStr: string): string { switch (duration.unit) { case 'm': - return i18n.translate('xpack.observability.slo.duration.minutely', { + return i18n.translate('xpack.slo.duration.minutely', { defaultMessage: 'Minutely', }); case 'h': - return i18n.translate('xpack.observability.slo.duration.hourly', { + return i18n.translate('xpack.slo.duration.hourly', { defaultMessage: 'Hourly', }); case 'd': - return i18n.translate('xpack.observability.slo.duration.daily', { + return i18n.translate('xpack.slo.duration.daily', { defaultMessage: 'Daily', }); case 'w': - return i18n.translate('xpack.observability.slo.duration.weekly', { + return i18n.translate('xpack.slo.duration.weekly', { defaultMessage: 'Weekly', }); case 'M': - return i18n.translate('xpack.observability.slo.duration.monthly', { + return i18n.translate('xpack.slo.duration.monthly', { defaultMessage: 'Monthly', }); } diff --git a/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx b/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx new file mode 100644 index 0000000000000..5744a802f6aff --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx @@ -0,0 +1,74 @@ +/* + * 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 { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { render as testLibRender } from '@testing-library/react'; +import { AppMountParameters } from '@kbn/core/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import translations from '@kbn/translations-plugin/translations/ja-JP.json'; +import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; + +import { createObservabilityRuleTypeRegistryMock } from '@kbn/observability-plugin/public'; +import { PluginContext } from '../context/plugin_context'; + +const appMountParameters = { setHeaderActionMenu: () => {} } as unknown as AppMountParameters; +const observabilityRuleTypeRegistry = createObservabilityRuleTypeRegistryMock(); + +export const core = coreMock.createStart(); +export const data = dataPluginMock.createStartContract(); + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: false, + }, + }, + logger: { + // eslint-disable-next-line no-console + log: console.log, + // eslint-disable-next-line no-console + warn: console.warn, + error: () => {}, + }, +}); + +export const render = (component: React.ReactNode) => { + return testLibRender( + // @ts-ignore + +

Embeddable exploratory view
, + }, + }} + > + + + {component} + + + + + ); +}; diff --git a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_mappings_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_mappings_template.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_mappings_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_mappings_template.ts index 175def562c63f..16b1ba9bd71c5 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_mappings_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_mappings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ import type { ClusterPutComponentTemplateRequest } from '@elastic/elasticsearch/lib/api/types'; -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOMappingsTemplate = (name: string): ClusterPutComponentTemplateRequest => ({ name, diff --git a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_settings_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_settings_template.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_settings_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_settings_template.ts index 37abff5bdc46d..5e8845a050688 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_settings_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_settings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOSettingsTemplate = (name: string) => ({ name, diff --git a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_summary_mappings_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_summary_mappings_template.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_summary_mappings_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_summary_mappings_template.ts index 5b3ba4b0965a3..63dddabf24940 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_summary_mappings_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_summary_mappings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ import type { ClusterPutComponentTemplateRequest } from '@elastic/elasticsearch/lib/api/types'; -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOSummaryMappingsTemplate = ( name: string diff --git a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_summary_settings_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_summary_settings_template.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_summary_settings_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_summary_settings_template.ts index 9995e2239d07f..f9b18c7f62555 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/component_templates/slo_summary_settings_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/component_templates/slo_summary_settings_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOSummarySettingsTemplate = (name: string) => ({ name, diff --git a/x-pack/plugins/observability_solution/observability/server/assets/index_templates/slo_index_templates.ts b/x-pack/plugins/observability_solution/slo/server/assets/index_templates/slo_index_templates.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/assets/index_templates/slo_index_templates.ts rename to x-pack/plugins/observability_solution/slo/server/assets/index_templates/slo_index_templates.ts index ae6f179476b22..6524d6e7d49cf 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/index_templates/slo_index_templates.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/index_templates/slo_index_templates.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOIndexTemplate = (name: string, indexPattern: string, composedOf: string[]) => ({ name, diff --git a/x-pack/plugins/observability_solution/observability/server/assets/index_templates/slo_summary_index_templates.ts b/x-pack/plugins/observability_solution/slo/server/assets/index_templates/slo_summary_index_templates.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/assets/index_templates/slo_summary_index_templates.ts rename to x-pack/plugins/observability_solution/slo/server/assets/index_templates/slo_summary_index_templates.ts index 2e613c4273bab..3986273ca99ce 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/index_templates/slo_summary_index_templates.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/index_templates/slo_summary_index_templates.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOSummaryIndexTemplate = ( name: string, diff --git a/x-pack/plugins/observability_solution/observability/server/assets/ingest_templates/slo_pipeline_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_pipeline_template.ts similarity index 92% rename from x-pack/plugins/observability_solution/observability/server/assets/ingest_templates/slo_pipeline_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_pipeline_template.ts index 6a3a6684ab191..bceb324dd21fd 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/ingest_templates/slo_pipeline_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_pipeline_template.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export const getSLOPipelineTemplate = (id: string, indexNamePrefix: string) => ({ id, diff --git a/x-pack/plugins/observability_solution/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_summary_pipeline_template.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_summary_pipeline_template.ts index 627407104a6e4..967a1f4af6e91 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/ingest_templates/slo_summary_pipeline_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/ingest_templates/slo_summary_pipeline_template.ts @@ -8,7 +8,7 @@ import { timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; import { IngestPutPipelineRequest } from '@elastic/elasticsearch/lib/api/types'; import { IBasePath } from '@kbn/core-http-server'; -import { getSLOSummaryPipelineId, SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { getSLOSummaryPipelineId, SLO_RESOURCES_VERSION } from '../../../common/constants'; import { SLO } from '../../domain/models'; export const getSLOSummaryPipelineTemplate = ( diff --git a/x-pack/plugins/observability_solution/observability/server/assets/transform_templates/slo_transform_template.ts b/x-pack/plugins/observability_solution/slo/server/assets/transform_templates/slo_transform_template.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/assets/transform_templates/slo_transform_template.ts rename to x-pack/plugins/observability_solution/slo/server/assets/transform_templates/slo_transform_template.ts index 152517d7aa775..17c48bb8414a9 100644 --- a/x-pack/plugins/observability_solution/observability/server/assets/transform_templates/slo_transform_template.ts +++ b/x-pack/plugins/observability_solution/slo/server/assets/transform_templates/slo_transform_template.ts @@ -12,7 +12,7 @@ import { TransformSource, TransformTimeSync, } from '@elastic/elasticsearch/lib/api/types'; -import { SLO_RESOURCES_VERSION } from '../../../common/slo/constants'; +import { SLO_RESOURCES_VERSION } from '../../../common/constants'; export interface TransformSettings { frequency: TransformPutTransformRequest['frequency']; diff --git a/x-pack/plugins/observability_solution/slo/server/common/constants.ts b/x-pack/plugins/observability_solution/slo/server/common/constants.ts new file mode 100644 index 0000000000000..deaf49e3a42f1 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/common/constants.ts @@ -0,0 +1,8 @@ +/* + * 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 SLO_RULE_REGISTRATION_CONTEXT = 'observability.slo'; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/models/common.ts b/x-pack/plugins/observability_solution/slo/server/domain/models/common.ts new file mode 100644 index 0000000000000..e1f747cde8d88 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/models/common.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 * as t from 'io-ts'; + +import { + dateRangeSchema, + historicalSummarySchema, + statusSchema, + summarySchema, + groupingsSchema, + groupSummarySchema, + metaSchema, +} from '@kbn/slo-schema'; + +type Status = t.TypeOf; +type DateRange = t.TypeOf; +type HistoricalSummary = t.TypeOf; +type Summary = t.TypeOf; +type Groupings = t.TypeOf; +type Meta = t.TypeOf; +type GroupSummary = t.TypeOf; + +export type { DateRange, Groupings, HistoricalSummary, Meta, Status, Summary, GroupSummary }; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/models/error_budget.ts b/x-pack/plugins/observability_solution/slo/server/domain/models/error_budget.ts new file mode 100644 index 0000000000000..50ca6e469d7dd --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/models/error_budget.ts @@ -0,0 +1,13 @@ +/* + * 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 { errorBudgetSchema } from '@kbn/slo-schema'; + +type ErrorBudget = t.TypeOf; + +export type { ErrorBudget }; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/models/index.ts b/x-pack/plugins/observability_solution/slo/server/domain/models/index.ts new file mode 100644 index 0000000000000..16336c40928f8 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/models/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * from './common'; +export { Duration, DurationUnit, toDurationUnit, toMomentUnitOfTime } from '@kbn/slo-schema'; +export * from './error_budget'; +export * from './indicators'; +export * from './slo'; +export * from './time_window'; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/models/indicators.ts b/x-pack/plugins/observability_solution/slo/server/domain/models/indicators.ts new file mode 100644 index 0000000000000..100c04dfda35b --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/models/indicators.ts @@ -0,0 +1,35 @@ +/* + * 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 { + apmTransactionDurationIndicatorSchema, + apmTransactionErrorRateIndicatorSchema, + indicatorDataSchema, + indicatorSchema, + indicatorTypesSchema, + kqlCustomIndicatorSchema, + metricCustomIndicatorSchema, +} from '@kbn/slo-schema'; + +type APMTransactionErrorRateIndicator = t.TypeOf; +type APMTransactionDurationIndicator = t.TypeOf; +type KQLCustomIndicator = t.TypeOf; +type MetricCustomIndicator = t.TypeOf; +type Indicator = t.TypeOf; +type IndicatorTypes = t.TypeOf; +type IndicatorData = t.TypeOf; + +export type { + Indicator, + IndicatorTypes, + APMTransactionErrorRateIndicator, + APMTransactionDurationIndicator, + KQLCustomIndicator, + MetricCustomIndicator, + IndicatorData, +}; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/models/slo.ts b/x-pack/plugins/observability_solution/slo/server/domain/models/slo.ts new file mode 100644 index 0000000000000..d17498c3dbfed --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/models/slo.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 * as t from 'io-ts'; +import { sloIdSchema, sloSchema, sloWithSummarySchema } from '@kbn/slo-schema'; + +type SLO = t.TypeOf; +type SLOId = t.TypeOf; +type SLOWithSummary = t.TypeOf; +type StoredSLO = t.OutputOf; + +export type { SLO, SLOWithSummary, SLOId, StoredSLO }; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/models/time_window.ts b/x-pack/plugins/observability_solution/slo/server/domain/models/time_window.ts new file mode 100644 index 0000000000000..aa12aa70a8ae8 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/models/time_window.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 { + calendarAlignedTimeWindowSchema, + rollingTimeWindowSchema, + timeWindowSchema, +} from '@kbn/slo-schema'; +import moment from 'moment'; +import * as t from 'io-ts'; + +type TimeWindow = t.TypeOf; +type RollingTimeWindow = t.TypeOf; +type CalendarAlignedTimeWindow = t.TypeOf; + +export type { RollingTimeWindow, TimeWindow, CalendarAlignedTimeWindow }; + +export function toCalendarAlignedTimeWindowMomentUnit( + timeWindow: CalendarAlignedTimeWindow +): moment.unitOfTime.StartOf { + const unit = timeWindow.duration.unit; + switch (unit) { + case 'w': + return 'isoWeeks'; + case 'M': + return 'months'; + default: + throw new Error(`Invalid calendar aligned time window duration unit: ${unit}`); + } +} + +export function toRollingTimeWindowMomentUnit( + timeWindow: RollingTimeWindow +): moment.unitOfTime.Diff { + const unit = timeWindow.duration.unit; + switch (unit) { + case 'd': + return 'days'; + default: + throw new Error(`Invalid rolling time window duration unit: ${unit}`); + } +} diff --git a/x-pack/plugins/observability_solution/observability/server/domain/services/compute_burn_rate.test.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_burn_rate.test.ts similarity index 92% rename from x-pack/plugins/observability_solution/observability/server/domain/services/compute_burn_rate.test.ts rename to x-pack/plugins/observability_solution/slo/server/domain/services/compute_burn_rate.test.ts index 84fef850e096c..5a3eae37eba8f 100644 --- a/x-pack/plugins/observability_solution/observability/server/domain/services/compute_burn_rate.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_burn_rate.test.ts @@ -7,8 +7,8 @@ import { computeBurnRate } from './compute_burn_rate'; import { toDateRange } from './date_range'; -import { createSLO } from '../../services/slo/fixtures/slo'; -import { ninetyDaysRolling } from '../../services/slo/fixtures/time_window'; +import { createSLO } from '../../services/fixtures/slo'; +import { ninetyDaysRolling } from '../../services/fixtures/time_window'; describe('computeBurnRate', () => { it('computes 0 when total is 0', () => { diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/compute_burn_rate.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_burn_rate.ts new file mode 100644 index 0000000000000..2cd758c4c3a74 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_burn_rate.ts @@ -0,0 +1,24 @@ +/* + * 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 { toHighPrecision } from '../../utils/number'; +import { IndicatorData, SLO } from '../models'; + +/** + * A Burn Rate is computed with the Indicator Data retrieved from a specific lookback period + * It tells how fast we are consumming our error budget during a specific period + */ +export function computeBurnRate(slo: SLO, sliData: IndicatorData): number { + const { good, total } = sliData; + if (total === 0 || good >= total) { + return 0; + } + + const errorBudget = 1 - slo.objective.target; + const errorRate = 1 - good / total; + return toHighPrecision(errorRate / errorBudget); +} diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/compute_sli.test.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_sli.test.ts new file mode 100644 index 0000000000000..79494de1d7cf1 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_sli.test.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 { computeSLI } from './compute_sli'; + +describe('computeSLI', () => { + it('returns -1 when no total events', () => { + expect(computeSLI(100, 0)).toEqual(-1); + }); + + it('returns the sli value', () => { + expect(computeSLI(100, 1000)).toEqual(0.1); + }); + + it('returns when good is greater than total events', () => { + expect(computeSLI(9999, 9)).toEqual(1111); + }); + + it('returns rounds the value to 6 digits', () => { + expect(computeSLI(33, 90)).toEqual(0.366667); + }); +}); diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/compute_sli.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_sli.ts new file mode 100644 index 0000000000000..bafab79104134 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_sli.ts @@ -0,0 +1,18 @@ +/* + * 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 { toHighPrecision } from '../../utils/number'; + +const NO_DATA = -1; + +export function computeSLI(good: number, total: number): number { + if (total === 0) { + return NO_DATA; + } + + return toHighPrecision(good / total); +} diff --git a/x-pack/plugins/observability_solution/observability/server/domain/services/compute_summary_status.test.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_summary_status.test.ts similarity index 91% rename from x-pack/plugins/observability_solution/observability/server/domain/services/compute_summary_status.test.ts rename to x-pack/plugins/observability_solution/slo/server/domain/services/compute_summary_status.test.ts index 12ee6de644b4a..9060f0e95272c 100644 --- a/x-pack/plugins/observability_solution/observability/server/domain/services/compute_summary_status.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_summary_status.test.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { createErrorBudget } from '../../services/slo/fixtures/error_budget'; -import { createSLO } from '../../services/slo/fixtures/slo'; +import { createErrorBudget } from '../../services/fixtures/error_budget'; +import { createSLO } from '../../services/fixtures/slo'; import { computeSummaryStatus } from './compute_summary_status'; describe('ComputeSummaryStatus', () => { diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/compute_summary_status.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_summary_status.ts new file mode 100644 index 0000000000000..3aaaffe180b6a --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/compute_summary_status.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 { ErrorBudget, SLO, Status } from '../models'; + +export function computeSummaryStatus(slo: SLO, sliValue: number, errorBudget: ErrorBudget): Status { + if (sliValue === -1) { + return 'NO_DATA'; + } + + if (sliValue >= slo.objective.target) { + return 'HEALTHY'; + } else { + return errorBudget.remaining > 0 ? 'DEGRADING' : 'VIOLATED'; + } +} diff --git a/x-pack/plugins/observability_solution/observability/server/domain/services/date_range.test.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/date_range.test.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/domain/services/date_range.test.ts rename to x-pack/plugins/observability_solution/slo/server/domain/services/date_range.test.ts index 524aecbfab10f..6fed100b8a06a 100644 --- a/x-pack/plugins/observability_solution/observability/server/domain/services/date_range.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/date_range.test.ts @@ -11,7 +11,7 @@ import { sevenDaysRolling, thirtyDaysRolling, weeklyCalendarAligned, -} from '../../services/slo/fixtures/time_window'; +} from '../../services/fixtures/time_window'; import { toDateRange } from './date_range'; const NOW = new Date('2022-08-11T08:31:00.000Z'); diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/date_range.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/date_range.ts new file mode 100644 index 0000000000000..9c54197aa39e3 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/date_range.ts @@ -0,0 +1,40 @@ +/* + * 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 { calendarAlignedTimeWindowSchema, rollingTimeWindowSchema } from '@kbn/slo-schema'; +import { assertNever } from '@kbn/std'; +import moment from 'moment'; +import { DateRange } from '../models'; +import { + TimeWindow, + toCalendarAlignedTimeWindowMomentUnit, + toRollingTimeWindowMomentUnit, +} from '../models/time_window'; + +export const toDateRange = (timeWindow: TimeWindow, currentDate: Date = new Date()): DateRange => { + if (calendarAlignedTimeWindowSchema.is(timeWindow)) { + const unit = toCalendarAlignedTimeWindowMomentUnit(timeWindow); + const from = moment.utc(currentDate).startOf(unit); + const to = moment.utc(currentDate).endOf(unit); + + return { from: from.toDate(), to: to.toDate() }; + } + + if (rollingTimeWindowSchema.is(timeWindow)) { + const unit = toRollingTimeWindowMomentUnit(timeWindow); + const now = moment.utc(currentDate).startOf('minute'); + const from = now.clone().subtract(timeWindow.duration.value, unit); + const to = now.clone(); + + return { + from: from.toDate(), + to: to.toDate(), + }; + } + + assertNever(timeWindow); +}; diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/error_budget.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/error_budget.ts new file mode 100644 index 0000000000000..74165c5eec560 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/error_budget.ts @@ -0,0 +1,22 @@ +/* + * 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 { toHighPrecision } from '../../utils/number'; +import { ErrorBudget } from '../models'; + +export function toErrorBudget( + initial: number, + consumed: number, + isEstimated: boolean = false +): ErrorBudget { + return { + initial: toHighPrecision(initial), + consumed: toHighPrecision(consumed), + remaining: toHighPrecision(1 - consumed), + isEstimated, + }; +} diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/get_delay_in_seconds_from_slo.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/get_delay_in_seconds_from_slo.ts new file mode 100644 index 0000000000000..e6cef17750394 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/get_delay_in_seconds_from_slo.ts @@ -0,0 +1,18 @@ +/* + * 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 { timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; +import { SLO } from '../models'; + +export function getDelayInSecondsFromSLO(slo: SLO) { + const fixedInterval = timeslicesBudgetingMethodSchema.is(slo.budgetingMethod) + ? slo.objective.timesliceWindow!.asSeconds() + : 60; + const syncDelay = slo.settings.syncDelay.asSeconds(); + const frequency = slo.settings.frequency.asSeconds(); + return fixedInterval + syncDelay + frequency; +} diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/get_lookback_date_range.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/get_lookback_date_range.ts new file mode 100644 index 0000000000000..63ed12a7244c0 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/get_lookback_date_range.ts @@ -0,0 +1,23 @@ +/* + * 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 { Duration, toMomentUnitOfTime } from '../models'; +export function getLookbackDateRange( + startedAt: Date, + duration: Duration, + delayInSeconds = 0 +): { from: Date; to: Date } { + const unit = toMomentUnitOfTime(duration.unit); + const now = moment(startedAt).subtract(delayInSeconds, 'seconds').startOf('minute'); + const from = now.clone().subtract(duration.value, unit).startOf('minute'); + + return { + from: from.toDate(), + to: now.toDate(), + }; +} diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/index.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/index.ts new file mode 100644 index 0000000000000..212647f27b172 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/index.ts @@ -0,0 +1,13 @@ +/* + * 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 * from './compute_burn_rate'; +export * from './error_budget'; +export * from './compute_sli'; +export * from './compute_summary_status'; +export * from './date_range'; +export * from './validate_slo'; diff --git a/x-pack/plugins/observability_solution/observability/server/domain/services/validate_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/validate_slo.test.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/domain/services/validate_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/domain/services/validate_slo.test.ts index 70cc408ceb175..f4f8142e8986a 100644 --- a/x-pack/plugins/observability_solution/observability/server/domain/services/validate_slo.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/validate_slo.test.ts @@ -6,9 +6,9 @@ */ import { validateSLO } from '.'; -import { oneMinute, sixHours } from '../../services/slo/fixtures/duration'; -import { createSLO } from '../../services/slo/fixtures/slo'; -import { sevenDaysRolling } from '../../services/slo/fixtures/time_window'; +import { oneMinute, sixHours } from '../../services/fixtures/duration'; +import { createSLO } from '../../services/fixtures/slo'; +import { sevenDaysRolling } from '../../services/fixtures/time_window'; import { Duration, DurationUnit } from '../models'; describe('validateSLO', () => { diff --git a/x-pack/plugins/observability_solution/slo/server/domain/services/validate_slo.ts b/x-pack/plugins/observability_solution/slo/server/domain/services/validate_slo.ts new file mode 100644 index 0000000000000..eb253f44cdf5a --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/domain/services/validate_slo.ts @@ -0,0 +1,122 @@ +/* + * 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 { + timeslicesBudgetingMethodSchema, + Duration, + DurationUnit, + rollingTimeWindowSchema, + calendarAlignedTimeWindowSchema, +} from '@kbn/slo-schema'; +import { IllegalArgumentError } from '../../errors'; +import { SLO } from '../models'; + +/** + * Asserts the SLO is valid from a business invariants point of view. + * e.g. a 'target' objective requires a number between ]0, 1] + * e.g. a 'timeslices' budgeting method requires an objective's timeslice_target to be defined. + * + * @param slo {SLO} + */ +export function validateSLO(slo: SLO) { + if (!isValidId(slo.id)) { + throw new IllegalArgumentError('Invalid id'); + } + + if (!isValidTargetNumber(slo.objective.target)) { + throw new IllegalArgumentError('Invalid objective.target'); + } + + if ( + rollingTimeWindowSchema.is(slo.timeWindow) && + !isValidRollingTimeWindowDuration(slo.timeWindow.duration) + ) { + throw new IllegalArgumentError('Invalid time_window.duration'); + } + + if ( + calendarAlignedTimeWindowSchema.is(slo.timeWindow) && + !isValidCalendarAlignedTimeWindowDuration(slo.timeWindow.duration) + ) { + throw new IllegalArgumentError('Invalid time_window.duration'); + } + + if (timeslicesBudgetingMethodSchema.is(slo.budgetingMethod)) { + if ( + slo.objective.timesliceTarget === undefined || + !isValidTargetNumber(slo.objective.timesliceTarget) + ) { + throw new IllegalArgumentError('Invalid objective.timeslice_target'); + } + + if ( + slo.objective.timesliceWindow === undefined || + !isValidTimesliceWindowDuration(slo.objective.timesliceWindow, slo.timeWindow.duration) + ) { + throw new IllegalArgumentError('Invalid objective.timeslice_window'); + } + } + + validateSettings(slo); +} + +function validateSettings(slo: SLO) { + if (!isValidFrequencySettings(slo.settings.frequency)) { + throw new IllegalArgumentError('Invalid settings.frequency'); + } + + if (!isValidSyncDelaySettings(slo.settings.syncDelay)) { + throw new IllegalArgumentError('Invalid settings.sync_delay'); + } +} + +function isValidId(id: string): boolean { + const MIN_ID_LENGTH = 8; + const MAX_ID_LENGTH = 36; + return MIN_ID_LENGTH <= id.length && id.length <= MAX_ID_LENGTH; +} + +function isValidTargetNumber(value: number): boolean { + return value > 0 && value < 1; +} + +function isValidRollingTimeWindowDuration(duration: Duration): boolean { + // 7, 30 or 90days accepted + return duration.unit === DurationUnit.Day && [7, 30, 90].includes(duration.value); +} + +function isValidCalendarAlignedTimeWindowDuration(duration: Duration): boolean { + // 1 week or 1 month + return [DurationUnit.Week, DurationUnit.Month].includes(duration.unit) && duration.value === 1; +} + +function isValidTimesliceWindowDuration(timesliceWindow: Duration, timeWindow: Duration): boolean { + return ( + [DurationUnit.Minute, DurationUnit.Hour].includes(timesliceWindow.unit) && + timesliceWindow.isShorterThan(timeWindow) + ); +} + +/** + * validate that 1 minute <= frequency < 1 hour + */ +function isValidFrequencySettings(frequency: Duration): boolean { + return ( + frequency.isLongerOrEqualThan(new Duration(1, DurationUnit.Minute)) && + frequency.isShorterThan(new Duration(1, DurationUnit.Hour)) + ); +} + +/** + * validate that 1 minute <= sync_delay < 6 hour + */ +function isValidSyncDelaySettings(syncDelay: Duration): boolean { + return ( + syncDelay.isLongerOrEqualThan(new Duration(1, DurationUnit.Minute)) && + syncDelay.isShorterThan(new Duration(6, DurationUnit.Hour)) + ); +} diff --git a/x-pack/plugins/observability_solution/slo/server/errors/errors.ts b/x-pack/plugins/observability_solution/slo/server/errors/errors.ts new file mode 100644 index 0000000000000..eaec36e66d08b --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/errors/errors.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. + */ + +/* eslint-disable max-classes-per-file */ + +export class ObservabilityError extends Error { + constructor(message?: string) { + super(message); + this.name = this.constructor.name; + } +} + +export class SLONotFound extends ObservabilityError {} +export class SLOIdConflict extends ObservabilityError {} + +export class InvalidQueryError extends ObservabilityError {} +export class InternalQueryError extends ObservabilityError {} +export class NotSupportedError extends ObservabilityError {} +export class IllegalArgumentError extends ObservabilityError {} +export class InvalidTransformError extends ObservabilityError {} + +export class SecurityException extends ObservabilityError {} diff --git a/x-pack/plugins/observability_solution/slo/server/errors/handler.ts b/x-pack/plugins/observability_solution/slo/server/errors/handler.ts new file mode 100644 index 0000000000000..c10f1d98c083e --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/errors/handler.ts @@ -0,0 +1,24 @@ +/* + * 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 { ObservabilityError, SecurityException, SLOIdConflict, SLONotFound } from './errors'; + +export function getHTTPResponseCode(error: ObservabilityError): number { + if (error instanceof SLONotFound) { + return 404; + } + + if (error instanceof SLOIdConflict) { + return 409; + } + + if (error instanceof SecurityException) { + return 403; + } + + return 400; +} diff --git a/x-pack/plugins/observability_solution/slo/server/errors/index.ts b/x-pack/plugins/observability_solution/slo/server/errors/index.ts new file mode 100644 index 0000000000000..e466d5b8ae4a1 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/errors/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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './errors'; +export * from './handler'; diff --git a/x-pack/plugins/observability_solution/slo/server/index.ts b/x-pack/plugins/observability_solution/slo/server/index.ts new file mode 100644 index 0000000000000..1707a7c692952 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/index.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. + */ + +import { PluginInitializerContext } from '@kbn/core/server'; +import { schema, TypeOf } from '@kbn/config-schema'; + +// This exports static code and TypeScript types, +// as well as, Kibana Platform `plugin()` initializer. + +export async function plugin(initializerContext: PluginInitializerContext) { + const { SloPlugin } = await import('./plugin'); + return new SloPlugin(initializerContext); +} + +export type { PluginSetup, PluginStart } from './plugin'; + +const configSchema = schema.object({ + sloOrphanSummaryCleanUpTaskEnabled: schema.boolean({ defaultValue: true }), + enabled: schema.boolean({ defaultValue: true }), +}); + +export const config = { + schema: configSchema, +}; +export type SloConfig = TypeOf; diff --git a/x-pack/plugins/observability_solution/observability/server/lib/collectors/fetcher.test.ts b/x-pack/plugins/observability_solution/slo/server/lib/collectors/fetcher.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/collectors/fetcher.test.ts rename to x-pack/plugins/observability_solution/slo/server/lib/collectors/fetcher.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/lib/collectors/fetcher.ts b/x-pack/plugins/observability_solution/slo/server/lib/collectors/fetcher.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/lib/collectors/fetcher.ts rename to x-pack/plugins/observability_solution/slo/server/lib/collectors/fetcher.ts index f8657b71d410c..566a5e88a5cfe 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/collectors/fetcher.ts +++ b/x-pack/plugins/observability_solution/slo/server/lib/collectors/fetcher.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { CollectorFetchContext } from '@kbn/usage-collection-plugin/server'; import { StoredSLO } from '../../domain/models'; import { SO_SLO_TYPE } from '../../saved_objects'; diff --git a/x-pack/plugins/observability_solution/observability/server/lib/collectors/register.ts b/x-pack/plugins/observability_solution/slo/server/lib/collectors/register.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/collectors/register.ts rename to x-pack/plugins/observability_solution/slo/server/lib/collectors/register.ts diff --git a/x-pack/plugins/observability_solution/observability/server/lib/collectors/type.ts b/x-pack/plugins/observability_solution/slo/server/lib/collectors/type.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/collectors/type.ts rename to x-pack/plugins/observability_solution/slo/server/lib/collectors/type.ts diff --git a/x-pack/plugins/observability_solution/slo/server/lib/rules/register_burn_rate_rule.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/register_burn_rate_rule.ts new file mode 100644 index 0000000000000..8ddaffdc05fad --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/lib/rules/register_burn_rate_rule.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { PluginSetupContract } from '@kbn/alerting-plugin/server'; +import { IBasePath, Logger } from '@kbn/core/server'; +import { + createLifecycleExecutor, + Dataset, + IRuleDataService, +} from '@kbn/rule-registry-plugin/server'; +import { mappingFromFieldMap } from '@kbn/alerting-plugin/common'; +import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; +import { CustomThresholdLocators } from '@kbn/observability-plugin/server'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; +import { SLO_RULE_REGISTRATION_CONTEXT } from '../../common/constants'; +import { sloBurnRateRuleType } from './slo_burn_rate'; +import { sloRuleFieldMap } from './slo_burn_rate/field_map'; + +export function registerBurnRateRule( + alertingPlugin: PluginSetupContract, + basePath: IBasePath, + logger: Logger, + ruleDataService: IRuleDataService, + locators: CustomThresholdLocators // TODO move this somewhere else, or use only alertsLocator +) { + // SLO RULE + const ruleDataClientSLO = ruleDataService.initializeIndex({ + feature: sloFeatureId, + registrationContext: SLO_RULE_REGISTRATION_CONTEXT, + dataset: Dataset.alerts, + componentTemplateRefs: [], + componentTemplates: [ + { + name: 'mappings', + mappings: mappingFromFieldMap( + { ...legacyExperimentalFieldMap, ...sloRuleFieldMap }, + 'strict' + ), + }, + ], + }); + + const createLifecycleRuleExecutorSLO = createLifecycleExecutor( + logger.get('rules'), + ruleDataClientSLO + ); + alertingPlugin.registerType( + sloBurnRateRuleType(createLifecycleRuleExecutorSLO, basePath, locators.alertsLocator) + ); +} diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/docs/params_property_slo_burn_rate.yaml b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/docs/params_property_slo_burn_rate.yaml similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/docs/params_property_slo_burn_rate.yaml rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/docs/params_property_slo_burn_rate.yaml diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/executor.test.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.test.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/executor.test.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.test.ts index 6be334dc62f2b..4796a6c976205 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/executor.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.test.ts @@ -26,9 +26,9 @@ import { SanitizedRuleConfig } from '@kbn/alerting-plugin/common'; import { Alert, RuleExecutorServices } from '@kbn/alerting-plugin/server'; import { DEFAULT_FLAPPING_SETTINGS } from '@kbn/alerting-plugin/common/rules_settings'; import { LocatorPublic } from '@kbn/share-plugin/common'; -import type { AlertsLocatorParams } from '../../../../common'; +import { AlertsLocatorParams } from '@kbn/observability-plugin/common'; import { getRuleExecutor } from './executor'; -import { createSLO } from '../../../services/slo/fixtures/slo'; +import { createSLO } from '../../../services/fixtures/slo'; import { SLO, StoredSLO } from '../../../domain/models'; import { SharePluginStart } from '@kbn/share-plugin/server'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/executor.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/executor.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.ts index 3454406f5619c..3a8e153c76663 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/executor.ts +++ b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/executor.ts @@ -20,14 +20,14 @@ import { LocatorPublic } from '@kbn/share-plugin/common'; import { upperCase } from 'lodash'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/server'; import { ALL_VALUE } from '@kbn/slo-schema'; -import { AlertsLocatorParams, getAlertUrl } from '../../../../common'; +import { AlertsLocatorParams, getAlertUrl } from '@kbn/observability-plugin/common'; import { SLO_ID_FIELD, SLO_INSTANCE_ID_FIELD, SLO_REVISION_FIELD, } from '../../../../common/field_names/slo'; import { Duration } from '../../../domain/models'; -import { KibanaSavedObjectsSLORepository } from '../../../services/slo'; +import { KibanaSavedObjectsSLORepository } from '../../../services'; import { AlertStates, BurnRateAlertContext, @@ -235,7 +235,7 @@ function buildReason( windowDef: WindowSchema ) { if (instanceId === ALL_VALUE) { - return i18n.translate('xpack.observability.slo.alerting.burnRate.reason', { + return i18n.translate('xpack.slo.alerting.burnRate.reason', { defaultMessage: '{actionGroupName}: The burn rate for the past {longWindowDuration} is {longWindowBurnRate} and for the past {shortWindowDuration} is {shortWindowBurnRate}. Alert when above {burnRateThreshold} for both windows', values: { @@ -248,7 +248,7 @@ function buildReason( }, }); } - return i18n.translate('xpack.observability.slo.alerting.burnRate.reasonForInstanceId', { + return i18n.translate('xpack.slo.alerting.burnRate.reasonForInstanceId', { defaultMessage: '{actionGroupName}: The burn rate for the past {longWindowDuration} is {longWindowBurnRate} and for the past {shortWindowDuration} is {shortWindowBurnRate} for {instanceId}. Alert when above {burnRateThreshold} for both windows', values: { diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/field_map.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/field_map.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/field_map.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/field_map.ts diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/fixtures/rule.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/fixtures/rule.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/fixtures/rule.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/fixtures/rule.ts diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/index.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/index.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/index.ts diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/__snapshots__/build_query.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/__snapshots__/build_query.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/__snapshots__/build_query.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/__snapshots__/build_query.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/build_query.test.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/build_query.test.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/build_query.test.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/build_query.test.ts index a77db347edacd..86f7ab4994dba 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/build_query.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/build_query.test.ts @@ -11,7 +11,7 @@ import { createKQLCustomIndicator, createSLO, createSLOWithTimeslicesBudgetingMethod, -} from '../../../../services/slo/fixtures/slo'; +} from '../../../../services/fixtures/slo'; const STARTED_AT = new Date('2023-01-01T00:00:00.000Z'); diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/build_query.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/build_query.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/build_query.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/build_query.ts diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/evaluate.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/evaluate.ts index 45ebba7bb2693..ef13974c6a771 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/lib/evaluate.ts +++ b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/lib/evaluate.ts @@ -9,7 +9,7 @@ import { ElasticsearchClient } from '@kbn/core/server'; import { get } from 'lodash'; import { Duration, SLO, toDurationUnit } from '../../../../domain/models'; import { BurnRateRuleParams } from '../types'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../../common/slo/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../../../../common/constants'; import { buildQuery, EvaluationAfterKey, diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/register.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/register.ts similarity index 85% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/register.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/register.ts index f70dc3721cb20..8c87d3ee71bbd 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/register.ts +++ b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/register.ts @@ -14,8 +14,10 @@ import { createLifecycleExecutor } from '@kbn/rule-registry-plugin/server'; import { legacyExperimentalFieldMap } from '@kbn/alerts-as-data-utils'; import { IBasePath } from '@kbn/core/server'; import { LocatorPublic } from '@kbn/share-plugin/common'; +import { AlertsLocatorParams, observabilityPaths } from '@kbn/observability-plugin/common'; +import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; import { SLO_BURN_RATE_AAD_FIELDS } from '../../../../common/field_names/slo'; -import { AlertsLocatorParams, observabilityPaths, sloFeatureId } from '../../../../common'; import { SLO_RULE_REGISTRATION_CONTEXT } from '../../../common/constants'; import { @@ -23,7 +25,6 @@ import { HIGH_PRIORITY_ACTION, LOW_PRIORITY_ACTION, MEDIUM_PRIORITY_ACTION, - SLO_BURN_RATE_RULE_TYPE_ID, } from '../../../../common/constants'; import { getRuleExecutor } from './executor'; @@ -56,7 +57,7 @@ export function sloBurnRateRuleType( }); return { id: SLO_BURN_RATE_RULE_TYPE_ID, - name: i18n.translate('xpack.observability.slo.rules.burnRate.name', { + name: i18n.translate('xpack.slo.rules.burnRate.name', { defaultMessage: 'SLO burn rate', }), fieldsForAAD: SLO_BURN_RATE_AAD_FIELDS, @@ -103,41 +104,38 @@ export function sloBurnRateRuleType( } const thresholdActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.thresholdDescription', + 'xpack.slo.alerting.thresholdDescription', { defaultMessage: 'The burn rate threshold value.', } ); -const windowActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.windowDescription', - { - defaultMessage: 'The window duration with the associated burn rate value.', - } -); +const windowActionVariableDescription = i18n.translate('xpack.slo.alerting.windowDescription', { + defaultMessage: 'The window duration with the associated burn rate value.', +}); export const reasonActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.reasonDescription', + 'xpack.slo.alerting.reasonDescription', { defaultMessage: 'A concise description of the reason for the alert', } ); export const timestampActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.timestampDescription', + 'xpack.slo.alerting.timestampDescription', { defaultMessage: 'A timestamp of when the alert was detected.', } ); export const viewInAppUrlActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.viewInAppUrlDescription', + 'xpack.slo.alerting.viewInAppUrlDescription', { defaultMessage: 'The url to the SLO details page to help with further investigation.', } ); export const alertDetailsUrlActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.alertDetailsUrlDescription', + 'xpack.slo.alerting.alertDetailsUrlDescription', { defaultMessage: 'Link to the alert troubleshooting view for further context and details. This will be an empty string if the server.publicBaseUrl is not configured.', @@ -145,21 +143,21 @@ export const alertDetailsUrlActionVariableDescription = i18n.translate( ); export const sloIdActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.sloIdDescription', + 'xpack.slo.alerting.sloIdDescription', { defaultMessage: 'The SLO unique identifier.', } ); export const sloNameActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.sloNameDescription', + 'xpack.slo.alerting.sloNameDescription', { defaultMessage: 'The SLO name.', } ); export const sloInstanceIdActionVariableDescription = i18n.translate( - 'xpack.observability.slo.alerting.sloInstanceIdDescription', + 'xpack.slo.alerting.sloInstanceIdDescription', { defaultMessage: 'The SLO instance id.', } diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/types.ts b/x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/types.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/lib/rules/slo_burn_rate/types.ts rename to x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/types.ts diff --git a/x-pack/plugins/observability_solution/slo/server/plugin.ts b/x-pack/plugins/observability_solution/slo/server/plugin.ts new file mode 100644 index 0000000000000..ca197b3eb463c --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/plugin.ts @@ -0,0 +1,176 @@ +/* + * 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 { + PluginInitializerContext, + CoreSetup, + CoreStart, + DEFAULT_APP_CATEGORIES, + Plugin, + Logger, + SavedObjectsClient, +} from '@kbn/core/server'; +import { PluginSetupContract, PluginStartContract } from '@kbn/alerting-plugin/server'; +import { PluginSetupContract as FeaturesSetup } from '@kbn/features-plugin/server'; +import { RuleRegistryPluginSetupContract } from '@kbn/rule-registry-plugin/server'; +import { + TaskManagerSetupContract, + TaskManagerStartContract, +} from '@kbn/task-manager-plugin/server'; +import { CloudSetup } from '@kbn/cloud-plugin/server'; +import { SharePluginSetup } from '@kbn/share-plugin/server'; +import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; +import { SpacesPluginSetup, SpacesPluginStart } from '@kbn/spaces-plugin/server'; +import { AlertsLocatorDefinition } from '@kbn/observability-plugin/common'; +import { SLO_BURN_RATE_RULE_TYPE_ID } from '@kbn/rule-data-utils'; +import { sloFeatureId } from '@kbn/observability-plugin/common'; +import { registerSloUsageCollector } from './lib/collectors/register'; +import { SloOrphanSummaryCleanupTask } from './services/tasks/orphan_summary_cleanup_task'; +import { slo, SO_SLO_TYPE } from './saved_objects'; +import { DefaultResourceInstaller, DefaultSLOInstaller } from './services'; +import { registerBurnRateRule } from './lib/rules/register_burn_rate_rule'; +import { SloConfig } from '.'; +import { registerRoutes } from './routes/register_routes'; +import { getSloServerRouteRepository } from './routes/get_slo_server_route_repository'; + +export type SloPluginSetup = ReturnType; + +export interface PluginSetup { + alerting: PluginSetupContract; + ruleRegistry: RuleRegistryPluginSetupContract; + share: SharePluginSetup; + features: FeaturesSetup; + taskManager: TaskManagerSetupContract; + spaces?: SpacesPluginSetup; + cloud?: CloudSetup; + usageCollection?: UsageCollectionSetup; +} + +export interface PluginStart { + alerting: PluginStartContract; + taskManager: TaskManagerStartContract; + spaces?: SpacesPluginStart; +} + +const sloRuleTypes = [SLO_BURN_RATE_RULE_TYPE_ID]; + +export class SloPlugin implements Plugin { + private readonly logger: Logger; + private sloOrphanCleanupTask?: SloOrphanSummaryCleanupTask; + + constructor(private readonly initContext: PluginInitializerContext) { + this.initContext = initContext; + this.logger = initContext.logger.get(); + } + + public setup(core: CoreSetup, plugins: PluginSetup) { + const config = this.initContext.config.get(); + const alertsLocator = plugins.share.url.locators.create(new AlertsLocatorDefinition()); + + const savedObjectTypes = [SO_SLO_TYPE]; + + plugins.features.registerKibanaFeature({ + id: sloFeatureId, + name: i18n.translate('xpack.slo.featureRegistry.linkSloTitle', { + defaultMessage: 'SLOs', + }), + order: 1200, + category: DEFAULT_APP_CATEGORIES.observability, + app: [sloFeatureId, 'kibana'], + catalogue: [sloFeatureId, 'observability'], + alerting: sloRuleTypes, + privileges: { + all: { + app: [sloFeatureId, 'kibana'], + catalogue: [sloFeatureId, 'observability'], + api: ['slo_write', 'slo_read', 'rac'], + savedObject: { + all: savedObjectTypes, + read: [], + }, + alerting: { + rule: { + all: sloRuleTypes, + }, + alert: { + all: sloRuleTypes, + }, + }, + ui: ['read', 'write'], + }, + read: { + app: [sloFeatureId, 'kibana'], + catalogue: [sloFeatureId, 'observability'], + api: ['slo_read', 'rac'], + savedObject: { + all: [], + read: savedObjectTypes, + }, + alerting: { + rule: { + read: sloRuleTypes, + }, + alert: { + read: sloRuleTypes, + }, + }, + ui: ['read'], + }, + }, + }); + + const { ruleDataService } = plugins.ruleRegistry; + + core.savedObjects.registerType(slo); + + registerBurnRateRule(plugins.alerting, core.http.basePath, this.logger, ruleDataService, { + alertsLocator, + }); + + registerSloUsageCollector(plugins.usageCollection); + + core.getStartServices().then(([coreStart, pluginStart]) => { + registerRoutes({ + core, + config, + dependencies: { + pluginsSetup: { + ...plugins, + core, + }, + spaces: pluginStart.spaces, + ruleDataService, + getRulesClientWithRequest: pluginStart.alerting.getRulesClientWithRequest, + }, + logger: this.logger, + repository: getSloServerRouteRepository(config), + }); + + const esInternalClient = coreStart.elasticsearch.client.asInternalUser; + + const sloResourceInstaller = new DefaultResourceInstaller(esInternalClient, this.logger); + const sloInstaller = new DefaultSLOInstaller(sloResourceInstaller, this.logger); + sloInstaller.install(); + }); + + this.sloOrphanCleanupTask = new SloOrphanSummaryCleanupTask( + plugins.taskManager, + this.logger, + config + ); + } + + public start(core: CoreStart, plugins: PluginStart) { + const internalSoClient = new SavedObjectsClient(core.savedObjects.createInternalRepository()); + const internalEsClient = core.elasticsearch.client.asInternalUser; + + this.sloOrphanCleanupTask?.start(plugins.taskManager, internalSoClient, internalEsClient); + } + + public stop() {} +} diff --git a/x-pack/plugins/observability_solution/slo/server/routes/create_slo_server_route.ts b/x-pack/plugins/observability_solution/slo/server/routes/create_slo_server_route.ts new file mode 100644 index 0000000000000..762b5b369f6e6 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/routes/create_slo_server_route.ts @@ -0,0 +1,13 @@ +/* + * 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 { createServerRouteFactory } from '@kbn/server-route-repository'; +import { SloRouteCreateOptions, SloRouteHandlerResources } from './types'; + +export const createSloServerRoute = createServerRouteFactory< + SloRouteHandlerResources, + SloRouteCreateOptions +>(); diff --git a/x-pack/plugins/observability_solution/slo/server/routes/get_slo_server_route_repository.ts b/x-pack/plugins/observability_solution/slo/server/routes/get_slo_server_route_repository.ts new file mode 100644 index 0000000000000..bd062771017fd --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/routes/get_slo_server_route_repository.ts @@ -0,0 +1,18 @@ +/* + * 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 { SloConfig } from '..'; +import { sloRouteRepository } from './slo/route'; + +export function getSloServerRouteRepository(config: SloConfig) { + const repository = { + ...sloRouteRepository, + }; + return repository; +} + +export type SloServerRouteRepository = ReturnType; diff --git a/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts b/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts new file mode 100644 index 0000000000000..66f255a2397b7 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts @@ -0,0 +1,129 @@ +/* + * 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 Boom from '@hapi/boom'; +import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; +import { CoreSetup, KibanaRequest, Logger, RouteRegistrar } from '@kbn/core/server'; +import { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; +import { + decodeRequestParams, + parseEndpoint, + routeValidationObject, +} from '@kbn/server-route-repository'; +import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; +import axios from 'axios'; +import * as t from 'io-ts'; +import { SloConfig } from '..'; +import { getHTTPResponseCode, ObservabilityError } from '../errors'; +import { SloRequestHandlerContext } from '../types'; +import { AbstractSloServerRouteRepository } from './types'; + +interface RegisterRoutes { + config: SloConfig; + core: CoreSetup; + repository: AbstractSloServerRouteRepository; + logger: Logger; + dependencies: RegisterRoutesDependencies; +} + +export interface RegisterRoutesDependencies { + pluginsSetup: { + core: CoreSetup; + }; + spaces?: SpacesPluginStart; + ruleDataService: RuleDataPluginService; + getRulesClientWithRequest: (request: KibanaRequest) => RulesClientApi; +} + +export function registerRoutes({ config, repository, core, logger, dependencies }: RegisterRoutes) { + const routes = Object.values(repository); + + const router = core.http.createRouter(); + + routes.forEach((route) => { + const { endpoint, options, handler, params } = route; + const { pathname, method } = parseEndpoint(endpoint); + + (router[method] as RouteRegistrar)( + { + path: pathname, + validate: routeValidationObject, + options, + }, + async (context, request, response) => { + try { + const decodedParams = decodeRequestParams( + { + params: request.params, + body: request.body, + query: request.query, + }, + params ?? t.strict({}) + ); + + const data = await handler({ + config, + context, + request, + logger, + params: decodedParams, + dependencies, + }); + + if (data === undefined) { + return response.noContent(); + } + + return response.ok({ body: data }); + } catch (error) { + if (error instanceof ObservabilityError) { + logger.error(error.message); + return response.customError({ + statusCode: getHTTPResponseCode(error), + body: { + message: error.message, + }, + }); + } + + if (axios.isAxiosError(error)) { + logger.error(error); + return response.customError({ + statusCode: error.response?.status || 500, + body: { + message: error.message, + }, + }); + } + + if (Boom.isBoom(error)) { + logger.error(error.output.payload.message); + return response.customError({ + statusCode: error.output.statusCode, + body: { message: error.output.payload.message }, + }); + } + + logger.error(error); + const opts = { + statusCode: 500, + body: { + message: error.message, + }, + }; + + if (error instanceof errors.RequestAbortedError) { + opts.statusCode = 499; + opts.body.message = 'Client closed request'; + } + + return response.customError(opts); + } + } + ); + }); +} diff --git a/x-pack/plugins/observability_solution/observability/server/routes/slo/route.ts b/x-pack/plugins/observability_solution/slo/server/routes/slo/route.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/routes/slo/route.ts rename to x-pack/plugins/observability_solution/slo/server/routes/slo/route.ts index 8e0432ab05ba1..01026b67068b1 100644 --- a/x-pack/plugins/observability_solution/observability/server/routes/slo/route.ts +++ b/x-pack/plugins/observability_solution/slo/server/routes/slo/route.ts @@ -36,18 +36,18 @@ import { KibanaSavedObjectsSLORepository, UpdateSLO, FindSLOGroups, -} from '../../services/slo'; -import { FetchHistoricalSummary } from '../../services/slo/fetch_historical_summary'; -import { FindSLODefinitions } from '../../services/slo/find_slo_definitions'; -import { getBurnRates } from '../../services/slo/get_burn_rates'; -import { getGlobalDiagnosis } from '../../services/slo/get_diagnosis'; -import { GetPreviewData } from '../../services/slo/get_preview_data'; -import { GetSLOInstances } from '../../services/slo/get_slo_instances'; -import { DefaultHistoricalSummaryClient } from '../../services/slo/historical_summary_client'; -import { ManageSLO } from '../../services/slo/manage_slo'; -import { ResetSLO } from '../../services/slo/reset_slo'; -import { DefaultSummarySearchClient } from '../../services/slo/summary_search_client'; -import { DefaultSummaryTransformGenerator } from '../../services/slo/summary_transform_generator/summary_transform_generator'; +} from '../../services'; +import { FetchHistoricalSummary } from '../../services/fetch_historical_summary'; +import { FindSLODefinitions } from '../../services/find_slo_definitions'; +import { getBurnRates } from '../../services/get_burn_rates'; +import { getGlobalDiagnosis } from '../../services/get_diagnosis'; +import { GetPreviewData } from '../../services/get_preview_data'; +import { GetSLOInstances } from '../../services/get_slo_instances'; +import { DefaultHistoricalSummaryClient } from '../../services/historical_summary_client'; +import { ManageSLO } from '../../services/manage_slo'; +import { ResetSLO } from '../../services/reset_slo'; +import { DefaultSummarySearchClient } from '../../services/summary_search_client'; +import { DefaultSummaryTransformGenerator } from '../../services/summary_transform_generator/summary_transform_generator'; import { ApmTransactionDurationTransformGenerator, ApmTransactionErrorRateTransformGenerator, @@ -57,9 +57,9 @@ import { MetricCustomTransformGenerator, TimesliceMetricTransformGenerator, TransformGenerator, -} from '../../services/slo/transform_generators'; -import type { ObservabilityRequestHandlerContext } from '../../types'; -import { createObservabilityServerRoute } from '../create_observability_server_route'; +} from '../../services/transform_generators'; +import type { SloRequestHandlerContext } from '../../types'; +import { createSloServerRoute } from '../create_slo_server_route'; const transformGenerators: Record = { 'sli.apm.transactionDuration': new ApmTransactionDurationTransformGenerator(), @@ -71,7 +71,7 @@ const transformGenerators: Record = { 'sli.metric.timeslice': new TimesliceMetricTransformGenerator(), }; -const assertPlatinumLicense = async (context: ObservabilityRequestHandlerContext) => { +const assertPlatinumLicense = async (context: SloRequestHandlerContext) => { const licensing = await context.licensing; const hasCorrectLicense = licensing.license.hasAtLeast('platinum'); @@ -80,7 +80,7 @@ const assertPlatinumLicense = async (context: ObservabilityRequestHandlerContext } }; -const createSLORoute = createObservabilityServerRoute({ +const createSLORoute = createSloServerRoute({ endpoint: 'POST /api/observability/slos 2023-10-31', options: { tags: ['access:slo_write'], @@ -125,7 +125,7 @@ const createSLORoute = createObservabilityServerRoute({ }, }); -const inspectSLORoute = createObservabilityServerRoute({ +const inspectSLORoute = createSloServerRoute({ endpoint: 'POST /internal/api/observability/slos/_inspect 2023-10-31', options: { tags: ['access:slo_write'], @@ -167,7 +167,7 @@ const inspectSLORoute = createObservabilityServerRoute({ }, }); -const updateSLORoute = createObservabilityServerRoute({ +const updateSLORoute = createSloServerRoute({ endpoint: 'PUT /api/observability/slos/{id} 2023-10-31', options: { tags: ['access:slo_write'], @@ -213,7 +213,7 @@ const updateSLORoute = createObservabilityServerRoute({ }, }); -const deleteSLORoute = createObservabilityServerRoute({ +const deleteSLORoute = createSloServerRoute({ endpoint: 'DELETE /api/observability/slos/{id} 2023-10-31', options: { tags: ['access:slo_write'], @@ -256,7 +256,7 @@ const deleteSLORoute = createObservabilityServerRoute({ }, }); -const getSLORoute = createObservabilityServerRoute({ +const getSLORoute = createSloServerRoute({ endpoint: 'GET /api/observability/slos/{id} 2023-10-31', options: { tags: ['access:slo_read'], @@ -278,7 +278,7 @@ const getSLORoute = createObservabilityServerRoute({ }, }); -const enableSLORoute = createObservabilityServerRoute({ +const enableSLORoute = createSloServerRoute({ endpoint: 'POST /api/observability/slos/{id}/enable 2023-10-31', options: { tags: ['access:slo_write'], @@ -315,7 +315,7 @@ const enableSLORoute = createObservabilityServerRoute({ }, }); -const disableSLORoute = createObservabilityServerRoute({ +const disableSLORoute = createSloServerRoute({ endpoint: 'POST /api/observability/slos/{id}/disable 2023-10-31', options: { tags: ['access:slo_write'], @@ -352,7 +352,7 @@ const disableSLORoute = createObservabilityServerRoute({ }, }); -const resetSLORoute = createObservabilityServerRoute({ +const resetSLORoute = createSloServerRoute({ endpoint: 'POST /api/observability/slos/{id}/_reset 2023-10-31', options: { tags: ['access:slo_write'], @@ -397,7 +397,7 @@ const resetSLORoute = createObservabilityServerRoute({ }, }); -const findSLORoute = createObservabilityServerRoute({ +const findSLORoute = createSloServerRoute({ endpoint: 'GET /api/observability/slos 2023-10-31', options: { tags: ['access:slo_read'], @@ -421,7 +421,7 @@ const findSLORoute = createObservabilityServerRoute({ }, }); -const findSLOGroupsRoute = createObservabilityServerRoute({ +const findSLOGroupsRoute = createSloServerRoute({ endpoint: 'GET /internal/api/observability/slos/_groups', options: { tags: ['access:slo_read'], @@ -440,7 +440,7 @@ const findSLOGroupsRoute = createObservabilityServerRoute({ }, }); -const deleteSloInstancesRoute = createObservabilityServerRoute({ +const deleteSloInstancesRoute = createSloServerRoute({ endpoint: 'POST /api/observability/slos/_delete_instances 2023-10-31', options: { tags: ['access:slo_write'], @@ -456,7 +456,7 @@ const deleteSloInstancesRoute = createObservabilityServerRoute({ }, }); -const findSloDefinitionsRoute = createObservabilityServerRoute({ +const findSloDefinitionsRoute = createSloServerRoute({ endpoint: 'GET /api/observability/slos/_definitions 2023-10-31', options: { tags: ['access:slo_read'], @@ -475,7 +475,7 @@ const findSloDefinitionsRoute = createObservabilityServerRoute({ }, }); -const fetchHistoricalSummary = createObservabilityServerRoute({ +const fetchHistoricalSummary = createSloServerRoute({ endpoint: 'POST /internal/observability/slos/_historical_summary', options: { tags: ['access:slo_read'], @@ -497,7 +497,7 @@ const fetchHistoricalSummary = createObservabilityServerRoute({ }, }); -const getSLOInstancesRoute = createObservabilityServerRoute({ +const getSLOInstancesRoute = createSloServerRoute({ endpoint: 'GET /internal/observability/slos/{id}/_instances', options: { tags: ['access:slo_read'], @@ -519,7 +519,7 @@ const getSLOInstancesRoute = createObservabilityServerRoute({ }, }); -const getDiagnosisRoute = createObservabilityServerRoute({ +const getDiagnosisRoute = createSloServerRoute({ endpoint: 'GET /internal/observability/slos/_diagnosis', options: { tags: [], @@ -542,7 +542,7 @@ const getDiagnosisRoute = createObservabilityServerRoute({ }, }); -const getSloBurnRates = createObservabilityServerRoute({ +const getSloBurnRates = createSloServerRoute({ endpoint: 'POST /internal/observability/slos/{id}/_burn_rates', options: { tags: ['access:slo_read'], @@ -568,7 +568,7 @@ const getSloBurnRates = createObservabilityServerRoute({ }, }); -const getPreviewData = createObservabilityServerRoute({ +const getPreviewData = createSloServerRoute({ endpoint: 'POST /internal/observability/slos/_preview', options: { tags: ['access:slo_read'], diff --git a/x-pack/plugins/observability_solution/slo/server/routes/types.ts b/x-pack/plugins/observability_solution/slo/server/routes/types.ts new file mode 100644 index 0000000000000..a16ffbcc10fa7 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/routes/types.ts @@ -0,0 +1,35 @@ +/* + * 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 { EndpointOf, ReturnOf, ServerRouteRepository } from '@kbn/server-route-repository'; +import { KibanaRequest, Logger } from '@kbn/core/server'; + +import { SloServerRouteRepository } from './get_slo_server_route_repository'; +import { SloRequestHandlerContext } from '../types'; +import { RegisterRoutesDependencies } from './register_routes'; +import { SloConfig } from '..'; + +export type { SloServerRouteRepository }; + +export interface SloRouteHandlerResources { + context: SloRequestHandlerContext; + dependencies: RegisterRoutesDependencies; + logger: Logger; + request: KibanaRequest; + config: SloConfig; +} + +export interface SloRouteCreateOptions { + options: { + tags: string[]; + access?: 'public' | 'internal'; + }; +} + +export type AbstractSloServerRouteRepository = ServerRouteRepository; + +export type ObservabilityAPIReturnType> = + ReturnOf; diff --git a/x-pack/plugins/observability_solution/observability/server/saved_objects/index.ts b/x-pack/plugins/observability_solution/slo/server/saved_objects/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/saved_objects/index.ts rename to x-pack/plugins/observability_solution/slo/server/saved_objects/index.ts diff --git a/x-pack/plugins/observability_solution/observability/server/saved_objects/slo.ts b/x-pack/plugins/observability_solution/slo/server/saved_objects/slo.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/saved_objects/slo.ts rename to x-pack/plugins/observability_solution/slo/server/saved_objects/slo.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/create_slo.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/create_slo.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/create_slo.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/create_slo.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/delete_slo.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/delete_slo.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/delete_slo.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/delete_slo.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/get_slo_instances.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/get_slo_instances.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/get_slo_instances.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/get_slo_instances.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/historical_summary_client.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/historical_summary_client.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/historical_summary_client.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/historical_summary_client.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/manage_slo.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/manage_slo.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/manage_slo.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/manage_slo.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/reset_slo.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/reset_slo.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/reset_slo.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/reset_slo.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/summary_client.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/summary_client.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/summary_client.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/summary_client.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/summary_search_client.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/summary_search_client.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/summary_search_client.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/summary_search_client.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/update_slo.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/__snapshots__/update_slo.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/__snapshots__/update_slo.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/__snapshots__/update_slo.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/__snapshots__/get_custom_metric_indicator_aggregation.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/aggregations/__snapshots__/get_custom_metric_indicator_aggregation.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/__snapshots__/get_custom_metric_indicator_aggregation.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/__snapshots__/get_custom_metric_indicator_aggregation.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/__snapshots__/get_histogram_indicator_aggregation.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/aggregations/__snapshots__/get_histogram_indicator_aggregation.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/__snapshots__/get_histogram_indicator_aggregation.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/__snapshots__/get_histogram_indicator_aggregation.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/__snapshots__/get_timeslice_metric_indicator_aggregation.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/aggregations/__snapshots__/get_timeslice_metric_indicator_aggregation.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/__snapshots__/get_timeslice_metric_indicator_aggregation.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/__snapshots__/get_timeslice_metric_indicator_aggregation.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_custom_metric_indicator_aggregation.test.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/get_custom_metric_indicator_aggregation.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_custom_metric_indicator_aggregation.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/get_custom_metric_indicator_aggregation.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_custom_metric_indicator_aggregation.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/get_custom_metric_indicator_aggregation.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_custom_metric_indicator_aggregation.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/get_custom_metric_indicator_aggregation.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_histogram_indicator_aggregation.test.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/get_histogram_indicator_aggregation.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_histogram_indicator_aggregation.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/get_histogram_indicator_aggregation.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_histogram_indicator_aggregation.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/get_histogram_indicator_aggregation.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_histogram_indicator_aggregation.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/get_histogram_indicator_aggregation.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_timeslice_metric_indicator_aggregation.test.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/get_timeslice_metric_indicator_aggregation.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_timeslice_metric_indicator_aggregation.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/get_timeslice_metric_indicator_aggregation.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_timeslice_metric_indicator_aggregation.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/get_timeslice_metric_indicator_aggregation.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/get_timeslice_metric_indicator_aggregation.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/get_timeslice_metric_indicator_aggregation.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/index.ts b/x-pack/plugins/observability_solution/slo/server/services/aggregations/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/aggregations/index.ts rename to x-pack/plugins/observability_solution/slo/server/services/aggregations/index.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/create_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/create_slo.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/create_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/create_slo.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/create_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/create_slo.ts similarity index 93% rename from x-pack/plugins/observability_solution/observability/server/services/slo/create_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/create_slo.ts index f46b868b46073..af081baf5cd2d 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/create_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/create_slo.ts @@ -15,11 +15,11 @@ import { getSLOTransformId, SLO_MODEL_VERSION, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '../../../common/slo/constants'; -import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; -import { Duration, DurationUnit, SLO } from '../../domain/models'; -import { validateSLO } from '../../domain/services'; -import { retryTransientEsErrors } from '../../utils/retry'; +} from '../../common/constants'; +import { getSLOSummaryPipelineTemplate } from '../assets/ingest_templates/slo_summary_pipeline_template'; +import { Duration, DurationUnit, SLO } from '../domain/models'; +import { validateSLO } from '../domain/services'; +import { retryTransientEsErrors } from '../utils/retry'; import { SLORepository } from './slo_repository'; import { createTempSummaryDocument } from './summary_transform_generator/helpers/create_temp_summary'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/delete_slo.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/delete_slo.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/delete_slo.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/delete_slo.ts index e3d6663860222..fa6652dbb30cf 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/delete_slo.ts @@ -13,8 +13,8 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../../common/slo/constants'; -import { retryTransientEsErrors } from '../../utils/retry'; +} from '../../common/constants'; +import { retryTransientEsErrors } from '../utils/retry'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo_instances.test.ts b/x-pack/plugins/observability_solution/slo/server/services/delete_slo_instances.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo_instances.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/delete_slo_instances.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo_instances.ts b/x-pack/plugins/observability_solution/slo/server/services/delete_slo_instances.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo_instances.ts rename to x-pack/plugins/observability_solution/slo/server/services/delete_slo_instances.ts index 97c622f354564..353983d76a90b 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/delete_slo_instances.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/delete_slo_instances.ts @@ -10,8 +10,8 @@ import { ALL_VALUE, DeleteSLOInstancesParams } from '@kbn/slo-schema'; import { SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../../common/slo/constants'; -import { IllegalArgumentError } from '../../errors'; +} from '../../common/constants'; +import { IllegalArgumentError } from '../errors'; interface SloInstanceTuple { sloId: string; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fetch_historical_summary.ts b/x-pack/plugins/observability_solution/slo/server/services/fetch_historical_summary.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fetch_historical_summary.ts rename to x-pack/plugins/observability_solution/slo/server/services/fetch_historical_summary.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/find_slo.test.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/server/services/slo/find_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/find_slo.test.ts index 66a9f489bdfc6..775ca6b404070 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/find_slo.test.ts @@ -6,8 +6,8 @@ */ import { ALL_VALUE, Paginated } from '@kbn/slo-schema'; -import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; -import { SLO } from '../../domain/models'; +import { SLO_MODEL_VERSION } from '../../common/constants'; +import { SLO } from '../domain/models'; import { FindSLO } from './find_slo'; import { createSLO } from './fixtures/slo'; import { createSLORepositoryMock, createSummarySearchClientMock } from './mocks'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/find_slo.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/find_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/find_slo.ts index 84d17c5ebc840..ea9e59c1e2908 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/find_slo.ts @@ -6,8 +6,8 @@ */ import { FindSLOParams, FindSLOResponse, findSLOResponseSchema, Pagination } from '@kbn/slo-schema'; -import { SLO, SLOWithSummary } from '../../domain/models'; -import { IllegalArgumentError } from '../../errors'; +import { SLO, SLOWithSummary } from '../domain/models'; +import { IllegalArgumentError } from '../errors'; import { SLORepository } from './slo_repository'; import { SLOSummary, Sort, SummarySearchClient } from './summary_search_client'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo_definitions.ts b/x-pack/plugins/observability_solution/slo/server/services/find_slo_definitions.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/find_slo_definitions.ts rename to x-pack/plugins/observability_solution/slo/server/services/find_slo_definitions.ts index 38076d67202d5..221a4d0ca65be 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo_definitions.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/find_slo_definitions.ts @@ -11,7 +11,7 @@ import { findSloDefinitionsResponseSchema, Pagination, } from '@kbn/slo-schema'; -import { IllegalArgumentError } from '../../errors'; +import { IllegalArgumentError } from '../errors'; import { SLORepository } from './slo_repository'; const MAX_PER_PAGE = 1000; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo_groups.ts b/x-pack/plugins/observability_solution/slo/server/services/find_slo_groups.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/find_slo_groups.ts rename to x-pack/plugins/observability_solution/slo/server/services/find_slo_groups.ts index 5c0cfbe178367..a603de597ae65 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/find_slo_groups.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/find_slo_groups.ts @@ -8,13 +8,13 @@ import { FindSLOGroupsParams, FindSLOGroupsResponse, Pagination } from '@kbn/slo import { ElasticsearchClient } from '@kbn/core/server'; import { findSLOGroupsResponseSchema } from '@kbn/slo-schema'; import { Logger } from '@kbn/core/server'; -import { typedSearch } from '../../utils/queries'; -import { IllegalArgumentError } from '../../errors'; +import { typedSearch } from '../utils/queries'; +import { IllegalArgumentError } from '../errors'; import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN, DEFAULT_SLO_GROUPS_PAGE_SIZE, -} from '../../../common/slo/constants'; -import { Status } from '../../domain/models'; +} from '../../common/constants'; +import { Status } from '../domain/models'; import { getElasticsearchQueryOrThrow } from './transform_generators'; const DEFAULT_PAGE = 1; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/date.ts b/x-pack/plugins/observability_solution/slo/server/services/fixtures/date.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/date.ts rename to x-pack/plugins/observability_solution/slo/server/services/fixtures/date.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/duration.ts b/x-pack/plugins/observability_solution/slo/server/services/fixtures/duration.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/duration.ts rename to x-pack/plugins/observability_solution/slo/server/services/fixtures/duration.ts index 26690b6680f18..c4bba6eae797b 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/duration.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/fixtures/duration.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { Duration, DurationUnit } from '../../../domain/models'; +import { Duration, DurationUnit } from '../../domain/models'; export function thirtyDays(): Duration { return new Duration(30, DurationUnit.Day); diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/error_budget.ts b/x-pack/plugins/observability_solution/slo/server/services/fixtures/error_budget.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/error_budget.ts rename to x-pack/plugins/observability_solution/slo/server/services/fixtures/error_budget.ts index 5b7f82af16ef9..dc5dcb0a07812 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/error_budget.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/fixtures/error_budget.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ErrorBudget } from '../../../domain/models'; +import { ErrorBudget } from '../../domain/models'; export function createErrorBudget(params: Partial = {}): ErrorBudget { return { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/slo.ts b/x-pack/plugins/observability_solution/slo/server/services/fixtures/slo.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/fixtures/slo.ts index cf4e7ae8fba34..455f016866b8c 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/fixtures/slo.ts @@ -16,7 +16,7 @@ import { } from '@kbn/slo-schema'; import { cloneDeep } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; -import { SLO_MODEL_VERSION, SYNTHETICS_INDEX_PATTERN } from '../../../../common/slo/constants'; +import { SLO_MODEL_VERSION, SYNTHETICS_INDEX_PATTERN } from '../../../common/constants'; import { APMTransactionDurationIndicator, APMTransactionErrorRateIndicator, @@ -27,8 +27,8 @@ import { MetricCustomIndicator, SLO, StoredSLO, -} from '../../../domain/models'; -import { SO_SLO_TYPE } from '../../../saved_objects'; +} from '../../domain/models'; +import { SO_SLO_TYPE } from '../../saved_objects'; import { twoMinute } from './duration'; import { sevenDaysRolling, weeklyCalendarAligned } from './time_window'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/summary_search_document.ts b/x-pack/plugins/observability_solution/slo/server/services/fixtures/summary_search_document.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/summary_search_document.ts rename to x-pack/plugins/observability_solution/slo/server/services/fixtures/summary_search_document.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/time_window.ts b/x-pack/plugins/observability_solution/slo/server/services/fixtures/time_window.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/time_window.ts rename to x-pack/plugins/observability_solution/slo/server/services/fixtures/time_window.ts index c8d1601a22e2b..83dd4117f6264 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/fixtures/time_window.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/fixtures/time_window.ts @@ -9,7 +9,7 @@ import { CalendarAlignedTimeWindow, RollingTimeWindow, TimeWindow, -} from '../../../domain/models/time_window'; +} from '../../domain/models/time_window'; import { ninetyDays, oneMonth, oneWeek, sevenDays, thirtyDays } from './duration'; export function sevenDaysRolling(): RollingTimeWindow { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_burn_rates.ts b/x-pack/plugins/observability_solution/slo/server/services/get_burn_rates.ts similarity index 92% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_burn_rates.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_burn_rates.ts index ee540bdd7cb23..9ce58767a868e 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/get_burn_rates.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/get_burn_rates.ts @@ -8,8 +8,8 @@ import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { Logger } from '@kbn/core/server'; -import { Duration } from '../../domain/models'; -import { computeBurnRate, computeSLI } from '../../domain/services'; +import { Duration } from '../domain/models'; +import { computeBurnRate, computeSLI } from '../domain/services'; import { DefaultSLIClient } from './sli_client'; import { KibanaSavedObjectsSLORepository } from './slo_repository'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_diagnosis.ts b/x-pack/plugins/observability_solution/slo/server/services/get_diagnosis.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_diagnosis.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_diagnosis.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_preview_data.ts b/x-pack/plugins/observability_solution/slo/server/services/get_preview_data.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_preview_data.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_preview_data.ts index 6686601ee66e0..6059be2cdf1c5 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/get_preview_data.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/get_preview_data.ts @@ -22,16 +22,17 @@ import moment from 'moment'; import { ElasticsearchClient } from '@kbn/core/server'; import { estypes } from '@elastic/elasticsearch'; import { getElasticsearchQueryOrThrow } from './transform_generators'; + import { buildParamValues } from './transform_generators/synthetics_availability'; -import { typedSearch } from '../../utils/queries'; -import { APMTransactionDurationIndicator } from '../../domain/models'; -import { computeSLI } from '../../domain/services'; +import { typedSearch } from '../utils/queries'; +import { APMTransactionDurationIndicator } from '../domain/models'; +import { computeSLI } from '../domain/services'; import { GetCustomMetricIndicatorAggregation, GetHistogramIndicatorAggregation, GetTimesliceMetricIndicatorAggregation, } from './aggregations'; -import { SYNTHETICS_INDEX_PATTERN } from '../../../common/slo/constants'; +import { SYNTHETICS_INDEX_PATTERN } from '../../common/constants'; interface Options { range: { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/get_slo.test.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_slo.test.ts index 2143c5f8d8e50..1dec5b4e414aa 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/get_slo.test.ts @@ -6,7 +6,7 @@ */ import { ALL_VALUE } from '@kbn/slo-schema'; -import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; +import { SLO_MODEL_VERSION } from '../../common/constants'; import { createAPMTransactionErrorRateIndicator, createSLO } from './fixtures/slo'; import { GetSLO } from './get_slo'; import { createSummaryClientMock, createSLORepositoryMock } from './mocks'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/get_slo.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_slo.ts index c9754356e2ab7..bcc6045203ff7 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/get_slo.ts @@ -5,7 +5,7 @@ * 2.0. */ import { ALL_VALUE, GetSLOParams, GetSLOResponse, getSLOResponseSchema } from '@kbn/slo-schema'; -import { Groupings, Meta, SLO, Summary } from '../../domain/models'; +import { Groupings, Meta, SLO, Summary } from '../domain/models'; import { SLORepository } from './slo_repository'; import { SummaryClient } from './summary_client'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo_instances.test.ts b/x-pack/plugins/observability_solution/slo/server/services/get_slo_instances.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_slo_instances.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_slo_instances.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo_instances.ts b/x-pack/plugins/observability_solution/slo/server/services/get_slo_instances.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/get_slo_instances.ts rename to x-pack/plugins/observability_solution/slo/server/services/get_slo_instances.ts index 1571a41a61f61..c95c2275547ae 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/get_slo_instances.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/get_slo_instances.ts @@ -7,7 +7,7 @@ import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { ALL_VALUE, GetSLOInstancesResponse } from '@kbn/slo-schema'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../common/constants'; import { SLORepository } from './slo_repository'; export class GetSLOInstances { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/historical_summary_client.test.ts b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/historical_summary_client.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/historical_summary_client.ts b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/historical_summary_client.ts rename to x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts index 32b852b2124bd..36d28b245a602 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/historical_summary_client.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/historical_summary_client.ts @@ -20,14 +20,9 @@ import { import { assertNever } from '@kbn/std'; import * as t from 'io-ts'; import moment from 'moment'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; -import { DateRange, HistoricalSummary, SLO, SLOId } from '../../domain/models'; -import { - computeSLI, - computeSummaryStatus, - toDateRange, - toErrorBudget, -} from '../../domain/services'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../common/constants'; +import { DateRange, HistoricalSummary, SLO, SLOId } from '../domain/models'; +import { computeSLI, computeSummaryStatus, toDateRange, toErrorBudget } from '../domain/services'; interface DailyAggBucket { key_as_string: string; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/index.ts b/x-pack/plugins/observability_solution/slo/server/services/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/index.ts rename to x-pack/plugins/observability_solution/slo/server/services/index.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/manage_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/manage_slo.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/manage_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/manage_slo.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/manage_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/manage_slo.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/server/services/slo/manage_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/manage_slo.ts index 9d9fd6eb1705c..84e8e3798598b 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/manage_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/manage_slo.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { getSLOSummaryTransformId, getSLOTransformId } from '../../../common/slo/constants'; +import { getSLOSummaryTransformId, getSLOTransformId } from '../../common/constants'; import { SLORepository } from './slo_repository'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/mocks/index.ts b/x-pack/plugins/observability_solution/slo/server/services/mocks/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/mocks/index.ts rename to x-pack/plugins/observability_solution/slo/server/services/mocks/index.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/reset_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/reset_slo.test.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/reset_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/reset_slo.test.ts index 775520192742a..6f9a8dda4a128 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/reset_slo.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/reset_slo.test.ts @@ -13,7 +13,7 @@ import { } from '@kbn/core/server/mocks'; import { MockedLogger } from '@kbn/logging-mocks'; -import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; +import { SLO_MODEL_VERSION } from '../../common/constants'; import { createSLO } from './fixtures/slo'; import { createSLORepositoryMock, diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/reset_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/reset_slo.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/reset_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/reset_slo.ts index 9fabd255b70da..ad866fc81c422 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/reset_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/reset_slo.ts @@ -15,9 +15,9 @@ import { SLO_MODEL_VERSION, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '../../../common/slo/constants'; -import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; -import { retryTransientEsErrors } from '../../utils/retry'; +} from '../../common/constants'; +import { getSLOSummaryPipelineTemplate } from '../assets/ingest_templates/slo_summary_pipeline_template'; +import { retryTransientEsErrors } from '../utils/retry'; import { SLORepository } from './slo_repository'; import { createTempSummaryDocument } from './summary_transform_generator/helpers/create_temp_summary'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/resource_installer.test.ts b/x-pack/plugins/observability_solution/slo/server/services/resource_installer.test.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/services/slo/resource_installer.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/resource_installer.test.ts index b84e7e95146e8..55f5db79680ba 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/resource_installer.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/resource_installer.test.ts @@ -17,7 +17,7 @@ import { SLO_SUMMARY_COMPONENT_TEMPLATE_SETTINGS_NAME, SLO_SUMMARY_INDEX_TEMPLATE_NAME, SLO_RESOURCES_VERSION, -} from '../../../common/slo/constants'; +} from '../../common/constants'; import { DefaultResourceInstaller } from './resource_installer'; describe('resourceInstaller', () => { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/resource_installer.ts b/x-pack/plugins/observability_solution/slo/server/services/resource_installer.ts similarity index 89% rename from x-pack/plugins/observability_solution/observability/server/services/slo/resource_installer.ts rename to x-pack/plugins/observability_solution/slo/server/services/resource_installer.ts index 0eeaae913b8c4..c7ae180100dce 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/resource_installer.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/resource_installer.ts @@ -13,10 +13,10 @@ import type { Metadata, } from '@elastic/elasticsearch/lib/api/types'; import type { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { getSLOMappingsTemplate } from '../../assets/component_templates/slo_mappings_template'; -import { getSLOSettingsTemplate } from '../../assets/component_templates/slo_settings_template'; -import { getSLOSummaryMappingsTemplate } from '../../assets/component_templates/slo_summary_mappings_template'; -import { getSLOSummarySettingsTemplate } from '../../assets/component_templates/slo_summary_settings_template'; +import { getSLOMappingsTemplate } from '../assets/component_templates/slo_mappings_template'; +import { getSLOSettingsTemplate } from '../assets/component_templates/slo_settings_template'; +import { getSLOSummaryMappingsTemplate } from '../assets/component_templates/slo_summary_mappings_template'; +import { getSLOSummarySettingsTemplate } from '../assets/component_templates/slo_summary_settings_template'; import { SLO_COMPONENT_TEMPLATE_MAPPINGS_NAME, SLO_COMPONENT_TEMPLATE_SETTINGS_NAME, @@ -31,11 +31,11 @@ import { SLO_SUMMARY_INDEX_TEMPLATE_NAME, SLO_SUMMARY_INDEX_TEMPLATE_PATTERN, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '../../../common/slo/constants'; -import { getSLOIndexTemplate } from '../../assets/index_templates/slo_index_templates'; -import { getSLOSummaryIndexTemplate } from '../../assets/index_templates/slo_summary_index_templates'; -import { getSLOPipelineTemplate } from '../../assets/ingest_templates/slo_pipeline_template'; -import { retryTransientEsErrors } from '../../utils/retry'; +} from '../../common/constants'; +import { getSLOIndexTemplate } from '../assets/index_templates/slo_index_templates'; +import { getSLOSummaryIndexTemplate } from '../assets/index_templates/slo_summary_index_templates'; +import { getSLOPipelineTemplate } from '../assets/ingest_templates/slo_pipeline_template'; +import { retryTransientEsErrors } from '../utils/retry'; export interface ResourceInstaller { ensureCommonResourcesInstalled(): Promise; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/sli_client.test.ts b/x-pack/plugins/observability_solution/slo/server/services/sli_client.test.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/services/slo/sli_client.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/sli_client.test.ts index 1160448854c95..45e2683a00a35 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/sli_client.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/sli_client.test.ts @@ -9,7 +9,7 @@ import { ElasticsearchClientMock, elasticsearchServiceMock } from '@kbn/core/ser import moment from 'moment'; import { ALL_VALUE } from '@kbn/slo-schema'; -import { Duration, DurationUnit } from '../../domain/models'; +import { Duration, DurationUnit } from '../domain/models'; import { createSLO } from './fixtures/slo'; import { DefaultSLIClient } from './sli_client'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/sli_client.ts b/x-pack/plugins/observability_solution/slo/server/services/sli_client.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/server/services/slo/sli_client.ts rename to x-pack/plugins/observability_solution/slo/server/services/sli_client.ts index 1eab9181e8b0f..ed645e8da7384 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/sli_client.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/sli_client.ts @@ -20,11 +20,11 @@ import { timeslicesBudgetingMethodSchema, } from '@kbn/slo-schema'; import { assertNever } from '@kbn/std'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; -import { DateRange, Duration, IndicatorData, SLO } from '../../domain/models'; -import { InternalQueryError } from '../../errors'; -import { getDelayInSecondsFromSLO } from '../../domain/services/get_delay_in_seconds_from_slo'; -import { getLookbackDateRange } from '../../domain/services/get_lookback_date_range'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../common/constants'; +import { DateRange, Duration, IndicatorData, SLO } from '../domain/models'; +import { InternalQueryError } from '../errors'; +import { getDelayInSecondsFromSLO } from '../domain/services/get_delay_in_seconds_from_slo'; +import { getLookbackDateRange } from '../domain/services/get_lookback_date_range'; export interface SLIClient { fetchSLIDataFrom( diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/slo_installer.test.ts b/x-pack/plugins/observability_solution/slo/server/services/slo_installer.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/slo_installer.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/slo_installer.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/slo_installer.ts b/x-pack/plugins/observability_solution/slo/server/services/slo_installer.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/slo_installer.ts rename to x-pack/plugins/observability_solution/slo/server/services/slo_installer.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/slo_repository.test.ts b/x-pack/plugins/observability_solution/slo/server/services/slo_repository.test.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/slo_repository.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/slo_repository.test.ts index 7259f00aec05c..08366a36ccf61 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/slo_repository.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/slo_repository.test.ts @@ -9,10 +9,10 @@ import { SavedObjectsClientContract, SavedObjectsFindResponse } from '@kbn/core/ import { loggingSystemMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; import { MockedLogger } from '@kbn/logging-mocks'; import { sloSchema } from '@kbn/slo-schema'; -import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; -import { SLO, StoredSLO } from '../../domain/models'; -import { SLOIdConflict, SLONotFound } from '../../errors'; -import { SO_SLO_TYPE } from '../../saved_objects'; +import { SLO_MODEL_VERSION } from '../../common/constants'; +import { SLO, StoredSLO } from '../domain/models'; +import { SLOIdConflict, SLONotFound } from '../errors'; +import { SO_SLO_TYPE } from '../saved_objects'; import { aStoredSLO, createAPMTransactionDurationIndicator, createSLO } from './fixtures/slo'; import { KibanaSavedObjectsSLORepository } from './slo_repository'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/slo_repository.ts b/x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/slo_repository.ts rename to x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts index bfbd7be738450..05d690242f0cf 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/slo_repository.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/slo_repository.ts @@ -9,10 +9,10 @@ import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { Logger } from '@kbn/core/server'; import { ALL_VALUE, Paginated, Pagination, sloSchema } from '@kbn/slo-schema'; import { isLeft } from 'fp-ts/lib/Either'; -import { SLO_MODEL_VERSION } from '../../../common/slo/constants'; -import { SLO, StoredSLO } from '../../domain/models'; -import { SLOIdConflict, SLONotFound } from '../../errors'; -import { SO_SLO_TYPE } from '../../saved_objects'; +import { SLO_MODEL_VERSION } from '../../common/constants'; +import { SLO, StoredSLO } from '../domain/models'; +import { SLOIdConflict, SLONotFound } from '../errors'; +import { SO_SLO_TYPE } from '../saved_objects'; export interface SLORepository { save(slo: SLO, options?: { throwOnConflict: boolean }): Promise; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_client.test.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_client.test.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_client.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_client.test.ts index f6850e73575ee..15388b221cc74 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_client.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_client.test.ts @@ -7,8 +7,8 @@ import { ElasticsearchClientMock, elasticsearchServiceMock } from '@kbn/core/server/mocks'; import moment from 'moment'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; -import { Duration, DurationUnit } from '../../domain/models'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../common/constants'; +import { Duration, DurationUnit } from '../domain/models'; import { createSLO } from './fixtures/slo'; import { sevenDaysRolling, weeklyCalendarAligned } from './fixtures/time_window'; import { DefaultSummaryClient } from './summary_client'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_client.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_client.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_client.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_client.ts index 7fdf0e63c9ee5..74f78929a45c8 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_client.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_client.ts @@ -15,10 +15,10 @@ import { toMomentUnitOfTime, } from '@kbn/slo-schema'; import moment from 'moment'; -import { SLO_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; -import { DateRange, SLO, Summary, Groupings, Meta } from '../../domain/models'; -import { computeSLI, computeSummaryStatus, toErrorBudget } from '../../domain/services'; -import { toDateRange } from '../../domain/services/date_range'; +import { SLO_DESTINATION_INDEX_PATTERN } from '../../common/constants'; +import { DateRange, SLO, Summary, Groupings, Meta } from '../domain/models'; +import { computeSLI, computeSummaryStatus, toErrorBudget } from '../domain/services'; +import { toDateRange } from '../domain/services/date_range'; import { getFlattenedGroupings } from './utils'; export interface SummaryClient { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_search_client.test.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_search_client.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_search_client.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_search_client.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_search_client.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_search_client.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_search_client.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_search_client.ts index 454d40c2f0cbc..cea18773777ae 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_search_client.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_search_client.ts @@ -10,9 +10,9 @@ import { ALL_VALUE, Paginated, Pagination } from '@kbn/slo-schema'; import { assertNever } from '@kbn/std'; import { partition } from 'lodash'; import { SearchTotalHits } from '@elastic/elasticsearch/lib/api/types'; -import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../common/slo/constants'; -import { SLOId, Status, Summary, Groupings } from '../../domain/models'; -import { toHighPrecision } from '../../utils/number'; +import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../common/constants'; +import { SLOId, Status, Summary, Groupings } from '../domain/models'; +import { toHighPrecision } from '../utils/number'; import { getFlattenedGroupings } from './utils'; import { getElasticsearchQueryOrThrow } from './transform_generators'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/common.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/common.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/common.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/common.ts index f21909dec6c07..1f2abc88b7cc2 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/common.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/common.ts @@ -6,7 +6,7 @@ */ import { ALL_VALUE } from '@kbn/slo-schema'; -import { SLO } from '../../../../domain/models/slo'; +import { SLO } from '../../../domain/models/slo'; export const getGroupBy = (slo: SLO) => { const groups = [slo.groupBy].flat().filter((group) => !!group); diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/occurrences.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/occurrences.ts index 3cae531cfeb98..0c2b29f6fa7ef 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/occurrences.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/occurrences.ts @@ -6,14 +6,14 @@ */ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { SLO } from '../../../../domain/models'; +import { SLO } from '../../../domain/models'; import { getSLOSummaryPipelineId, getSLOSummaryTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_RESOURCES_VERSION, SLO_SUMMARY_DESTINATION_INDEX_NAME, -} from '../../../../../common/slo/constants'; +} from '../../../../common/constants'; import { getGroupBy } from './common'; export function generateSummaryTransformForOccurrences(slo: SLO): TransformPutTransformRequest { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/timeslices_calendar_aligned.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/timeslices_calendar_aligned.ts index 7fc5d98a94603..4fa19ea448828 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/timeslices_calendar_aligned.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/timeslices_calendar_aligned.ts @@ -6,14 +6,14 @@ */ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { DurationUnit, SLO } from '../../../../domain/models'; +import { DurationUnit, SLO } from '../../../domain/models'; import { getSLOSummaryPipelineId, getSLOSummaryTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_RESOURCES_VERSION, SLO_SUMMARY_DESTINATION_INDEX_NAME, -} from '../../../../../common/slo/constants'; +} from '../../../../common/constants'; import { getGroupBy } from './common'; export function generateSummaryTransformForTimeslicesAndCalendarAligned( diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/timeslices_rolling.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/timeslices_rolling.ts index 113df2c4ce72f..3b3abb474476b 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/generators/timeslices_rolling.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/generators/timeslices_rolling.ts @@ -6,14 +6,14 @@ */ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { SLO } from '../../../../domain/models'; +import { SLO } from '../../../domain/models'; import { getSLOSummaryPipelineId, getSLOSummaryTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_RESOURCES_VERSION, SLO_SUMMARY_DESTINATION_INDEX_NAME, -} from '../../../../../common/slo/constants'; +} from '../../../../common/constants'; import { getGroupBy } from './common'; export function generateSummaryTransformForTimeslicesAndRolling( diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/helpers/create_temp_summary.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/helpers/create_temp_summary.ts similarity index 97% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/helpers/create_temp_summary.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/helpers/create_temp_summary.ts index 8e1939647bac8..635577166466f 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/helpers/create_temp_summary.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/helpers/create_temp_summary.ts @@ -6,7 +6,7 @@ */ import { ALL_VALUE } from '@kbn/slo-schema'; -import { SLO } from '../../../../domain/models'; +import { SLO } from '../../../domain/models'; export function createTempSummaryDocument(slo: SLO, spaceId: string) { const apmParams = 'environment' in slo.indicator.params ? slo.indicator.params : null; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/summary_transform_generator.ts b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/summary_transform_generator.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/summary_transform_generator.ts rename to x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/summary_transform_generator.ts index 7710515f6538a..7eb63e59718c5 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summary_transform_generator/summary_transform_generator.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summary_transform_generator/summary_transform_generator.ts @@ -6,7 +6,7 @@ */ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { SLO } from '../../../domain/models'; +import { SLO } from '../../domain/models'; import { generateSummaryTransformForOccurrences } from './generators/occurrences'; import { generateSummaryTransformForTimeslicesAndRolling } from './generators/timeslices_rolling'; import { generateSummaryTransformForTimeslicesAndCalendarAligned } from './generators/timeslices_calendar_aligned'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/summay_transform_manager.ts b/x-pack/plugins/observability_solution/slo/server/services/summay_transform_manager.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/summay_transform_manager.ts rename to x-pack/plugins/observability_solution/slo/server/services/summay_transform_manager.ts index 57349105e020a..c9590e5cc90ca 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/summay_transform_manager.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/summay_transform_manager.ts @@ -8,9 +8,9 @@ import { ElasticsearchClient, Logger } from '@kbn/core/server'; import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; -import { SLO } from '../../domain/models'; -import { SecurityException } from '../../errors'; -import { retryTransientEsErrors } from '../../utils/retry'; +import { SLO } from '../domain/models'; +import { SecurityException } from '../errors'; +import { retryTransientEsErrors } from '../utils/retry'; import { SummaryTransformGenerator } from './summary_transform_generator/summary_transform_generator'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/tasks/orphan_summary_cleanup_task.test.ts b/x-pack/plugins/observability_solution/slo/server/services/tasks/orphan_summary_cleanup_task.test.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/services/slo/tasks/orphan_summary_cleanup_task.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/tasks/orphan_summary_cleanup_task.test.ts index 2821560e6cabc..b947e0985c580 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/tasks/orphan_summary_cleanup_task.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/tasks/orphan_summary_cleanup_task.test.ts @@ -12,7 +12,7 @@ import { loggerMock } from '@kbn/logging-mocks'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { times } from 'lodash'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; -import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../../common/slo/constants'; +import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../common/constants'; const taskManagerSetup = taskManagerMock.createSetup(); const taskManagerStart = taskManagerMock.createStart(); diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/tasks/orphan_summary_cleanup_task.ts b/x-pack/plugins/observability_solution/slo/server/services/tasks/orphan_summary_cleanup_task.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/tasks/orphan_summary_cleanup_task.ts rename to x-pack/plugins/observability_solution/slo/server/services/tasks/orphan_summary_cleanup_task.ts index c863dadfe859c..d41ec6e142080 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/tasks/orphan_summary_cleanup_task.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/tasks/orphan_summary_cleanup_task.ts @@ -13,10 +13,10 @@ import { } from '@kbn/task-manager-plugin/server'; import { AggregationsCompositeAggregateKey } from '@elastic/elasticsearch/lib/api/types'; import { ALL_SPACES_ID } from '@kbn/spaces-plugin/common/constants'; -import { StoredSLO } from '../../../domain/models'; -import { SO_SLO_TYPE } from '../../../saved_objects'; -import { ObservabilityConfig } from '../../..'; -import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../../common/slo/constants'; +import { StoredSLO } from '../../domain/models'; +import { SO_SLO_TYPE } from '../../saved_objects'; +import { SloConfig } from '../..'; +import { SLO_SUMMARY_DESTINATION_INDEX_PATTERN } from '../../../common/constants'; export const TASK_TYPE = 'SLO:ORPHAN_SUMMARIES-CLEANUP-TASK'; @@ -49,9 +49,9 @@ export class SloOrphanSummaryCleanupTask { private taskManager?: TaskManagerStartContract; private soClient?: SavedObjectsClientContract; private esClient?: ElasticsearchClient; - private config: ObservabilityConfig; + private config: SloConfig; - constructor(taskManager: TaskManagerSetupContract, logger: Logger, config: ObservabilityConfig) { + constructor(taskManager: TaskManagerSetupContract, logger: Logger, config: SloConfig) { this.logger = logger; this.config = config; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/apm_transaction_duration.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/apm_transaction_error_rate.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/histogram.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/histogram.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/histogram.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/kql_custom.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/kql_custom.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/kql_custom.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/metric_custom.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/metric_custom.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/metric_custom.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/timeslice_metric.test.ts.snap similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/__snapshots__/timeslice_metric.test.ts.snap rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/__snapshots__/timeslice_metric.test.ts.snap diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_duration.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_duration.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_duration.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_duration.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts index 9559936dff321..2b723e43763b7 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_duration.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_duration.ts @@ -18,10 +18,10 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, -} from '../../../../common/slo/constants'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; -import { APMTransactionDurationIndicator, SLO } from '../../../domain/models'; -import { InvalidTransformError } from '../../../errors'; +} from '../../../common/constants'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; +import { APMTransactionDurationIndicator, SLO } from '../../domain/models'; +import { InvalidTransformError } from '../../errors'; import { parseIndex } from './common'; export class ApmTransactionDurationTransformGenerator extends TransformGenerator { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_error_rate.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_error_rate.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts index 8fcdd45b26570..c80a962a58146 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/apm_transaction_error_rate.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/apm_transaction_error_rate.ts @@ -17,10 +17,10 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, -} from '../../../../common/slo/constants'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; -import { APMTransactionErrorRateIndicator, SLO } from '../../../domain/models'; -import { InvalidTransformError } from '../../../errors'; +} from '../../../common/constants'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; +import { APMTransactionErrorRateIndicator, SLO } from '../../domain/models'; +import { InvalidTransformError } from '../../errors'; import { parseIndex } from './common'; export class ApmTransactionErrorRateTransformGenerator extends TransformGenerator { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/common.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/common.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/common.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/common.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/common.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/common.ts similarity index 94% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/common.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/common.ts index 8af0952a5e5b7..e173aa24ce818 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/common.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/common.ts @@ -7,7 +7,7 @@ import { buildEsQuery, fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; import { QuerySchema, kqlQuerySchema } from '@kbn/slo-schema'; -import { InvalidTransformError } from '../../../errors'; +import { InvalidTransformError } from '../../errors'; export function getElasticsearchQueryOrThrow(kuery: QuerySchema = '') { try { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/histogram.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/histogram.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/histogram.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/histogram.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/histogram.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/histogram.ts similarity index 92% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/histogram.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/histogram.ts index d493ea3c8b544..6c151bd9626ff 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/histogram.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/histogram.ts @@ -12,15 +12,15 @@ import { timeslicesBudgetingMethodSchema, } from '@kbn/slo-schema'; -import { InvalidTransformError } from '../../../errors'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; +import { InvalidTransformError } from '../../errors'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; import { getElasticsearchQueryOrThrow, parseIndex, TransformGenerator } from '.'; import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../../common/slo/constants'; -import { SLO } from '../../../domain/models'; +} from '../../../common/constants'; +import { SLO } from '../../domain/models'; import { GetHistogramIndicatorAggregation } from '../aggregations'; export class HistogramTransformGenerator extends TransformGenerator { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/index.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/index.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/index.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/kql_custom.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/kql_custom.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/kql_custom.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/kql_custom.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/kql_custom.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/kql_custom.ts similarity index 91% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/kql_custom.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/kql_custom.ts index 3fecd8b1cdd6d..5f5c0a3abcbec 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/kql_custom.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/kql_custom.ts @@ -8,15 +8,15 @@ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; import { kqlCustomIndicatorSchema, timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; -import { InvalidTransformError } from '../../../errors'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; +import { InvalidTransformError } from '../../errors'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; import { getElasticsearchQueryOrThrow, parseIndex, TransformGenerator } from '.'; import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../../common/slo/constants'; -import { KQLCustomIndicator, SLO } from '../../../domain/models'; +} from '../../../common/constants'; +import { KQLCustomIndicator, SLO } from '../../domain/models'; export class KQLCustomTransformGenerator extends TransformGenerator { public getTransformParams(slo: SLO): TransformPutTransformRequest { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/metric_custom.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/metric_custom.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/metric_custom.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/metric_custom.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/metric_custom.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/metric_custom.ts similarity index 92% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/metric_custom.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/metric_custom.ts index 6e2bd80350cb9..660673944fe60 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/metric_custom.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/metric_custom.ts @@ -8,15 +8,15 @@ import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/types'; import { metricCustomIndicatorSchema, timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; -import { InvalidTransformError } from '../../../errors'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; +import { InvalidTransformError } from '../../errors'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; import { getElasticsearchQueryOrThrow, parseIndex, TransformGenerator } from '.'; import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../../common/slo/constants'; -import { MetricCustomIndicator, SLO } from '../../../domain/models'; +} from '../../../common/constants'; +import { MetricCustomIndicator, SLO } from '../../domain/models'; import { GetCustomMetricIndicatorAggregation } from '../aggregations'; export const INVALID_EQUATION_REGEX = /[^A-Z|+|\-|\s|\d+|\.|\(|\)|\/|\*|>|<|=|\?|\:|&|\!|\|]+/g; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/synthetics_availability.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/synthetics_availability.test.ts similarity index 98% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/synthetics_availability.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/synthetics_availability.test.ts index 8db7f950865d5..8f973ca62ee11 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/synthetics_availability.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/synthetics_availability.test.ts @@ -6,10 +6,10 @@ */ import { ALL_VALUE } from '@kbn/slo-schema'; -import { SLO } from '../../../domain/models'; +import { SLO } from '../../domain/models'; import { createSLO, createSyntheticsAvailabilityIndicator } from '../fixtures/slo'; import { SyntheticsAvailabilityTransformGenerator } from './synthetics_availability'; -import { SYNTHETICS_INDEX_PATTERN } from '../../../../common/slo/constants'; +import { SYNTHETICS_INDEX_PATTERN } from '../../../common/constants'; const generator = new SyntheticsAvailabilityTransformGenerator(); diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/synthetics_availability.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/synthetics_availability.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/synthetics_availability.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/synthetics_availability.ts index 78dd7f8e1a873..97fd089a97111 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/synthetics_availability.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/synthetics_availability.ts @@ -11,6 +11,7 @@ import { ALL_VALUE, syntheticsAvailabilityIndicatorSchema, occurrencesBudgetingMethodSchema, + SyntheticsAvailabilityIndicator, } from '@kbn/slo-schema'; import { getElasticsearchQueryOrThrow, TransformGenerator } from '.'; import { @@ -18,10 +19,10 @@ import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, SYNTHETICS_INDEX_PATTERN, -} from '../../../../common/slo/constants'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; -import { SyntheticsAvailabilityIndicator, SLO } from '../../../domain/models'; -import { InvalidTransformError } from '../../../errors'; +} from '../../../common/constants'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; +import { InvalidTransformError } from '../../errors'; +import { SLO } from '../../domain/models'; export class SyntheticsAvailabilityTransformGenerator extends TransformGenerator { public getTransformParams(slo: SLO, spaceId: string): TransformPutTransformRequest { if (!syntheticsAvailabilityIndicatorSchema.is(slo.indicator)) { diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/timeslice_metric.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/timeslice_metric.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/timeslice_metric.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/timeslice_metric.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/timeslice_metric.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/timeslice_metric.ts similarity index 93% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/timeslice_metric.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/timeslice_metric.ts index 8e59a03d04d9f..649ffe609559d 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/timeslice_metric.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/timeslice_metric.ts @@ -13,15 +13,15 @@ import { timeslicesBudgetingMethodSchema, } from '@kbn/slo-schema'; -import { InvalidTransformError } from '../../../errors'; -import { getSLOTransformTemplate } from '../../../assets/transform_templates/slo_transform_template'; +import { InvalidTransformError } from '../../errors'; +import { getSLOTransformTemplate } from '../../assets/transform_templates/slo_transform_template'; import { getElasticsearchQueryOrThrow, parseIndex, TransformGenerator } from '.'; import { SLO_DESTINATION_INDEX_NAME, SLO_INGEST_PIPELINE_NAME, getSLOTransformId, -} from '../../../../common/slo/constants'; -import { SLO } from '../../../domain/models'; +} from '../../../common/constants'; +import { SLO } from '../../domain/models'; import { GetTimesliceMetricIndicatorAggregation } from '../aggregations'; const INVALID_EQUATION_REGEX = /[^A-Z|+|\-|\s|\d+|\.|\(|\)|\/|\*|>|<|=|\?|\:|&|\!|\|]+/g; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/transform_generator.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/transform_generator.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/transform_generator.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts similarity index 96% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/transform_generator.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts index c630136a3b42e..afc88433bca11 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/transform_generator.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/transform_generator.ts @@ -10,8 +10,8 @@ import { TransformPutTransformRequest, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALL_VALUE, timeslicesBudgetingMethodSchema } from '@kbn/slo-schema'; -import { TransformSettings } from '../../../assets/transform_templates/slo_transform_template'; -import { SLO } from '../../../domain/models'; +import { TransformSettings } from '../../assets/transform_templates/slo_transform_template'; +import { SLO } from '../../domain/models'; export abstract class TransformGenerator { public abstract getTransformParams(slo: SLO, spaceId: string): TransformPutTransformRequest; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/types.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_generators/types.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_generators/types.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_generators/types.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_manager.test.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_manager.test.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_manager.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_manager.test.ts index 230292ad6e083..75ce8fcffc8e1 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_manager.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_manager.test.ts @@ -20,7 +20,7 @@ import { ApmTransactionErrorRateTransformGenerator, TransformGenerator, } from './transform_generators'; -import { SLO, IndicatorTypes } from '../../domain/models'; +import { SLO, IndicatorTypes } from '../domain/models'; import { createAPMTransactionDurationIndicator, createAPMTransactionErrorRateIndicator, diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_manager.ts b/x-pack/plugins/observability_solution/slo/server/services/transform_manager.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/transform_manager.ts rename to x-pack/plugins/observability_solution/slo/server/services/transform_manager.ts index e920a84735d51..b53b87837b533 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/transform_manager.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/transform_manager.ts @@ -8,9 +8,9 @@ import { ElasticsearchClient, Logger } from '@kbn/core/server'; import { TransformPutTransformRequest } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { SLO, IndicatorTypes } from '../../domain/models'; -import { SecurityException } from '../../errors'; -import { retryTransientEsErrors } from '../../utils/retry'; +import { SLO, IndicatorTypes } from '../domain/models'; +import { SecurityException } from '../errors'; +import { retryTransientEsErrors } from '../utils/retry'; import { TransformGenerator } from './transform_generators'; type TransformId = string; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/update_slo.test.ts b/x-pack/plugins/observability_solution/slo/server/services/update_slo.test.ts similarity index 99% rename from x-pack/plugins/observability_solution/observability/server/services/slo/update_slo.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/update_slo.test.ts index d93e4549ca3dc..8e7e1d4f0bcfe 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/update_slo.test.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/update_slo.test.ts @@ -20,8 +20,8 @@ import { getSLOTransformId, SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '../../../common/slo/constants'; -import { SLO } from '../../domain/models'; +} from '../../common/constants'; +import { SLO } from '../domain/models'; import { fiveMinute, oneMinute } from './fixtures/duration'; import { createAPMTransactionErrorRateIndicator, diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/update_slo.ts b/x-pack/plugins/observability_solution/slo/server/services/update_slo.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/update_slo.ts rename to x-pack/plugins/observability_solution/slo/server/services/update_slo.ts index ac00fa9daa21b..1aed6d99028d3 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/update_slo.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/update_slo.ts @@ -15,11 +15,11 @@ import { SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '../../../common/slo/constants'; -import { getSLOSummaryPipelineTemplate } from '../../assets/ingest_templates/slo_summary_pipeline_template'; -import { SLO } from '../../domain/models'; -import { validateSLO } from '../../domain/services'; -import { retryTransientEsErrors } from '../../utils/retry'; +} from '../../common/constants'; +import { getSLOSummaryPipelineTemplate } from '../assets/ingest_templates/slo_summary_pipeline_template'; +import { SLO } from '../domain/models'; +import { validateSLO } from '../domain/services'; +import { retryTransientEsErrors } from '../utils/retry'; import { SLORepository } from './slo_repository'; import { createTempSummaryDocument } from './summary_transform_generator/helpers/create_temp_summary'; import { TransformManager } from './transform_manager'; diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/utils/index.test.ts b/x-pack/plugins/observability_solution/slo/server/services/utils/index.test.ts similarity index 100% rename from x-pack/plugins/observability_solution/observability/server/services/slo/utils/index.test.ts rename to x-pack/plugins/observability_solution/slo/server/services/utils/index.test.ts diff --git a/x-pack/plugins/observability_solution/observability/server/services/slo/utils/index.ts b/x-pack/plugins/observability_solution/slo/server/services/utils/index.ts similarity index 95% rename from x-pack/plugins/observability_solution/observability/server/services/slo/utils/index.ts rename to x-pack/plugins/observability_solution/slo/server/services/utils/index.ts index 33ac4ed81964c..a50d2640b3195 100644 --- a/x-pack/plugins/observability_solution/observability/server/services/slo/utils/index.ts +++ b/x-pack/plugins/observability_solution/slo/server/services/utils/index.ts @@ -5,7 +5,7 @@ * 2.0. */ import { get } from 'lodash'; -import { Groupings } from '../../../domain/models'; +import { Groupings } from '../../domain/models'; /** * Takes a list of groupBy fields and the nested groupings object provided from diff --git a/x-pack/plugins/observability_solution/slo/server/types.ts b/x-pack/plugins/observability_solution/slo/server/types.ts new file mode 100644 index 0000000000000..86bf0ac0b94ab --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/types.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { LicensingApiRequestHandlerContext } from '@kbn/licensing-plugin/server'; +import type { AlertingApiRequestHandlerContext } from '@kbn/alerting-plugin/server'; +import type { CustomRequestHandlerContext, CoreRequestHandlerContext } from '@kbn/core/server'; + +/** + * @internal + */ +export type SloRequestHandlerContext = CustomRequestHandlerContext<{ + licensing: LicensingApiRequestHandlerContext; + alerting: AlertingApiRequestHandlerContext; + core: Promise; +}>; diff --git a/x-pack/plugins/observability_solution/slo/server/utils/number.ts b/x-pack/plugins/observability_solution/slo/server/utils/number.ts new file mode 100644 index 0000000000000..bfec2d6200f19 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/utils/number.ts @@ -0,0 +1,12 @@ +/* + * 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 SIX_DIGITS = 1000000; + +export function toHighPrecision(value: number): number { + return Math.round(value * SIX_DIGITS) / SIX_DIGITS; +} diff --git a/x-pack/plugins/observability_solution/slo/server/utils/queries.test.ts b/x-pack/plugins/observability_solution/slo/server/utils/queries.test.ts new file mode 100644 index 0000000000000..0e34f84050386 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/utils/queries.test.ts @@ -0,0 +1,42 @@ +/* + * 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 { wildcardQuery } from './queries'; // Replace 'your-module' with the actual module path + +describe('wildcardQuery', () => { + it('generates wildcard query with leading wildcard by default', () => { + const result = wildcardQuery('fieldName', 'value'); + expect(result).toEqual([ + { + wildcard: { + fieldName: { + value: '*value*', + case_insensitive: true, + }, + }, + }, + ]); + }); + + it('generates wildcard query without leading wildcard if specified in options', () => { + const result = wildcardQuery('fieldName', 'value', { leadingWildcard: false }); + expect(result).toEqual([ + { + wildcard: { + fieldName: { + value: 'value*', + case_insensitive: true, + }, + }, + }, + ]); + }); + + it('returns an empty array if value is undefined', () => { + const result = wildcardQuery('fieldName', undefined); + expect(result).toEqual([]); + }); +}); diff --git a/x-pack/plugins/observability_solution/slo/server/utils/queries.ts b/x-pack/plugins/observability_solution/slo/server/utils/queries.ts new file mode 100644 index 0000000000000..bdacad577838c --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/utils/queries.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 { reject } from 'lodash'; +import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; +import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { fromKueryExpression, toElasticsearchQuery } from '@kbn/es-query'; +import { ESSearchResponse } from '@kbn/es-types'; +import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; + +export function isUndefinedOrNull(value: any): value is undefined | null { + return value === undefined || value === null; +} + +interface TermQueryOpts { + queryEmptyString: boolean; +} + +export function termQuery( + field: T, + value: string | boolean | number | undefined | null, + opts: TermQueryOpts = { queryEmptyString: true } +): QueryDslQueryContainer[] { + if (isUndefinedOrNull(value) || (!opts.queryEmptyString && value === '')) { + return []; + } + + return [{ term: { [field]: value } }]; +} + +export function wildcardQuery( + field: T, + value: string | undefined, + opts = { leadingWildcard: true } +): QueryDslQueryContainer[] { + if (isUndefinedOrNull(value)) { + return []; + } + + return [ + { + wildcard: { + [field]: { + value: opts.leadingWildcard ? `*${value}*` : `${value}*`, + case_insensitive: true, + }, + }, + }, + ]; +} + +export function termsQuery( + field: string, + ...values: Array +): QueryDslQueryContainer[] { + const filtered = reject(values, isUndefinedOrNull); + + if (!filtered.length) { + return []; + } + + return [{ terms: { [field]: filtered } }]; +} + +export function rangeQuery( + start?: number, + end?: number, + field = '@timestamp' +): estypes.QueryDslQueryContainer[] { + return [ + { + range: { + [field]: { + gte: start, + lte: end, + format: 'epoch_millis', + }, + }, + }, + ]; +} + +export function kqlQuery(kql?: string): estypes.QueryDslQueryContainer[] { + if (!kql) { + return []; + } + + const ast = fromKueryExpression(kql); + return [toElasticsearchQuery(ast)]; +} + +export async function typedSearch< + DocumentSource extends unknown, + TParams extends estypes.SearchRequest +>( + esClient: ElasticsearchClient, + params: TParams +): Promise> { + return (await esClient.search(params)) as unknown as ESSearchResponse; +} diff --git a/x-pack/plugins/observability_solution/slo/server/utils/retry.test.ts b/x-pack/plugins/observability_solution/slo/server/utils/retry.test.ts new file mode 100644 index 0000000000000..25870fd24aa73 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/utils/retry.test.ts @@ -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. + */ + +jest.mock('timers/promises'); +import { setTimeout } from 'timers/promises'; +import { loggerMock } from '@kbn/logging-mocks'; +import { errors as EsErrors } from '@elastic/elasticsearch'; + +import { retryTransientEsErrors } from './retry'; + +const setTimeoutMock = setTimeout as jest.Mock< + ReturnType, + Parameters +>; + +describe('retryTransientErrors', () => { + beforeEach(() => { + setTimeoutMock.mockClear(); + }); + + it("doesn't retry if operation is successful", async () => { + const esCallMock = jest.fn().mockResolvedValue('success'); + expect(await retryTransientEsErrors(esCallMock)).toEqual('success'); + expect(esCallMock).toHaveBeenCalledTimes(1); + }); + + it('logs an warning message on retry', async () => { + const logger = loggerMock.create(); + const esCallMock = jest + .fn() + .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) + .mockResolvedValue('success'); + + await retryTransientEsErrors(esCallMock, { logger }); + expect(logger.warn).toHaveBeenCalledTimes(1); + expect(logger.warn.mock.calls[0][0]).toMatch( + `Retrying Elasticsearch operation after [2s] due to error: ConnectionError: foo ConnectionError: foo` + ); + }); + + it('retries with an exponential backoff', async () => { + let attempt = 0; + const esCallMock = jest.fn(async () => { + attempt++; + if (attempt < 5) { + throw new EsErrors.ConnectionError('foo'); + } else { + return 'success'; + } + }); + + expect(await retryTransientEsErrors(esCallMock)).toEqual('success'); + expect(setTimeoutMock.mock.calls).toEqual([[2000], [4000], [8000], [16000]]); + expect(esCallMock).toHaveBeenCalledTimes(5); + }); + + it('retries each supported error type', async () => { + const errors = [ + new EsErrors.NoLivingConnectionsError('no living connection', { + warnings: [], + meta: {} as any, + }), + new EsErrors.ConnectionError('no connection'), + new EsErrors.TimeoutError('timeout'), + new EsErrors.ResponseError({ statusCode: 503, meta: {} as any, warnings: [] }), + new EsErrors.ResponseError({ statusCode: 408, meta: {} as any, warnings: [] }), + new EsErrors.ResponseError({ statusCode: 410, meta: {} as any, warnings: [] }), + ]; + + for (const error of errors) { + const esCallMock = jest.fn().mockRejectedValueOnce(error).mockResolvedValue('success'); + expect(await retryTransientEsErrors(esCallMock)).toEqual('success'); + expect(esCallMock).toHaveBeenCalledTimes(2); + } + }); + + it('does not retry unsupported errors', async () => { + const error = new Error('foo!'); + const esCallMock = jest.fn().mockRejectedValueOnce(error).mockResolvedValue('success'); + await expect(retryTransientEsErrors(esCallMock)).rejects.toThrow(error); + expect(esCallMock).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/plugins/observability_solution/slo/server/utils/retry.ts b/x-pack/plugins/observability_solution/slo/server/utils/retry.ts new file mode 100644 index 0000000000000..421289d1c0479 --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/server/utils/retry.ts @@ -0,0 +1,53 @@ +/* + * 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 { setTimeout } from 'timers/promises'; +import { errors as EsErrors } from '@elastic/elasticsearch'; +import type { Logger } from '@kbn/logging'; + +const MAX_ATTEMPTS = 5; + +const retryResponseStatuses = [ + 503, // ServiceUnavailable + 408, // RequestTimeout + 410, // Gone +]; + +const isRetryableError = (e: any) => + e instanceof EsErrors.NoLivingConnectionsError || + e instanceof EsErrors.ConnectionError || + e instanceof EsErrors.TimeoutError || + (e instanceof EsErrors.ResponseError && retryResponseStatuses.includes(e?.statusCode!)); + +/** + * Retries any transient network or configuration issues encountered from Elasticsearch with an exponential backoff. + * Should only be used to wrap operations that are idempotent and can be safely executed more than once. + */ +export const retryTransientEsErrors = async ( + esCall: () => Promise, + { logger, attempt = 0 }: { logger?: Logger; attempt?: number } = {} +): Promise => { + try { + return await esCall(); + } catch (e) { + if (attempt < MAX_ATTEMPTS && isRetryableError(e)) { + const retryCount = attempt + 1; + const retryDelaySec = Math.min(Math.pow(2, retryCount), 64); // 2s, 4s, 8s, 16s, 32s, 64s, 64s, 64s ... + + logger?.warn( + `Retrying Elasticsearch operation after [${retryDelaySec}s] due to error: ${e.toString()} ${ + e.stack + }` + ); + + await setTimeout(retryDelaySec * 1000); + return retryTransientEsErrors(esCall, { logger, attempt: retryCount }); + } + + throw e; + } +}; diff --git a/x-pack/plugins/observability_solution/slo/tsconfig.json b/x-pack/plugins/observability_solution/slo/tsconfig.json new file mode 100644 index 0000000000000..baaca962fea5e --- /dev/null +++ b/x-pack/plugins/observability_solution/slo/tsconfig.json @@ -0,0 +1,89 @@ +{ + "extends": "../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types" + }, + "include": [ + "common/**/*", + "public/**/*", + "server/**/*", + "../../../typings/**/*" + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/i18n", + "@kbn/i18n-react", + "@kbn/shared-ux-router", + "@kbn/core", + "@kbn/navigation-plugin", + "@kbn/translations-plugin", + "@kbn/rule-data-utils", + "@kbn/triggers-actions-ui-plugin", + "@kbn/observability-plugin", + "@kbn/observability-shared-plugin", + "@kbn/kibana-react-plugin", + "@kbn/react-kibana-context-theme", + "@kbn/shared-ux-link-redirect-app", + "@kbn/kibana-utils-plugin", + "@kbn/slo-schema", + "@kbn/alerting-plugin", + "@kbn/observability-alert-details", + "@kbn/rison", + "@kbn/embeddable-plugin", + "@kbn/lens-plugin", + "@kbn/ui-theme", + "@kbn/es-query", + "@kbn/react-kibana-mount", + "@kbn/cases-plugin", + "@kbn/data-plugin", + "@kbn/core-ui-settings-browser", + "@kbn/security-plugin", + "@kbn/charts-plugin", + "@kbn/ui-actions-plugin", + "@kbn/serverless", + "@kbn/dashboard-plugin", + "@kbn/data-views-plugin", + "@kbn/rule-registry-plugin", + "@kbn/licensing-plugin", + "@kbn/utility-types", + "@kbn/share-plugin", + "@kbn/presentation-util-plugin", + "@kbn/observability-ai-assistant-plugin", + "@kbn/core-http-browser", + "@kbn/core-chrome-browser", + "@kbn/ingest-pipelines-plugin", + "@kbn/unified-search-plugin", + "@kbn/std", + "@kbn/core-lifecycle-browser", + "@kbn/controls-plugin", + "@kbn/cloud-plugin", + "@kbn/spaces-plugin", + "@kbn/data-view-editor-plugin", + "@kbn/shared-ux-page-kibana-template", + "@kbn/config-schema", + "@kbn/usage-collection-plugin", + "@kbn/alerts-as-data-utils", + "@kbn/logging-mocks", + "@kbn/server-route-repository", + "@kbn/features-plugin", + "@kbn/task-manager-plugin", + "@kbn/core-saved-objects-server", + "@kbn/core-elasticsearch-server", + "@kbn/core-saved-objects-api-server", + "@kbn/calculate-auto", + "@kbn/core-elasticsearch-client-server-mocks", + "@kbn/core-saved-objects-api-server-mocks", + "@kbn/es-types", + "@kbn/logging", + "@kbn/unified-data-table", + "@kbn/cell-actions", + "@kbn/discover-utils", + "@kbn/unified-field-list", + "@kbn/data-view-field-editor-plugin", + "@kbn/discover-plugin", + "@kbn/field-formats-plugin", + "@kbn/core-http-server" + ] +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx index a7371801eb017..2e286ef69c3cb 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/settings/data_retention/dsl_retention_tab.tsx @@ -16,12 +16,13 @@ import { useManagementLocator } from './use_management_locator'; export const DslRetentionTab = () => { const { dataStreamStatuses = [], loading, error } = useGetDataStreamStatuses(); - if (loading === false && dataStreamStatuses.length === 0) - return ; if (error && (error as unknown as IHttpFetchError).body?.statusCode === 403) return ; + if (loading === false && dataStreamStatuses.length === 0) + return ; + return ( - describe('Saved queries Complex Test', () => { + // FLAKY: https://github.com/elastic/kibana/issues/169786 + describe.skip('Saved queries Complex Test', () => { const timeout = '601'; const suffix = generateRandomStringName(1)[0]; const savedQueryId = `Saved-Query-Id-${suffix}`; diff --git a/x-pack/plugins/painless_lab/kibana.jsonc b/x-pack/plugins/painless_lab/kibana.jsonc index c60f8bd2c8153..e65ff13f6a8d0 100644 --- a/x-pack/plugins/painless_lab/kibana.jsonc +++ b/x-pack/plugins/painless_lab/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/painless-lab-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "painlessLab", "server": true, diff --git a/x-pack/plugins/remote_clusters/kibana.jsonc b/x-pack/plugins/remote_clusters/kibana.jsonc index 7b2a8b4914ddd..305ee26caebae 100644 --- a/x-pack/plugins/remote_clusters/kibana.jsonc +++ b/x-pack/plugins/remote_clusters/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/remote-clusters-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "remoteClusters", "server": true, diff --git a/x-pack/plugins/reporting/common/constants.ts b/x-pack/plugins/reporting/common/constants.ts index 19d4ac4578aeb..6efda500cec74 100644 --- a/x-pack/plugins/reporting/common/constants.ts +++ b/x-pack/plugins/reporting/common/constants.ts @@ -52,7 +52,3 @@ export const USES_HEADLESS_JOB_TYPES = [ ]; export const DEPRECATED_JOB_TYPES = [CSV_JOB_TYPE_DEPRECATED]; - -// Test Subjects -export const REPORT_TABLE_ID = 'reportJobListing'; -export const REPORT_TABLE_ROW_ID = 'reportJobRow'; diff --git a/x-pack/plugins/reporting/public/management/report_listing_table.tsx b/x-pack/plugins/reporting/public/management/report_listing_table.tsx index ac306fe4d80cf..0b07ae38697e9 100644 --- a/x-pack/plugins/reporting/public/management/report_listing_table.tsx +++ b/x-pack/plugins/reporting/public/management/report_listing_table.tsx @@ -19,15 +19,14 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { ILicense } from '@kbn/licensing-plugin/public'; -import { durationToNumber } from '@kbn/reporting-common'; +import { durationToNumber, REPORT_TABLE_ID, REPORT_TABLE_ROW_ID } from '@kbn/reporting-common'; import { checkLicense, Job } from '@kbn/reporting-public'; -import { REPORT_TABLE_ID, REPORT_TABLE_ROW_ID } from '../../common/constants'; +import { ListingPropsInternal } from '.'; import { prettyPrintJobType } from '../../common/job_utils'; import { Poller } from '../../common/poller'; import { ReportDeleteButton, ReportInfoFlyout, ReportStatusIndicator } from './components'; import { guessAppIconTypeFromObjectType } from './utils'; -import { ListingPropsInternal } from '.'; type TableColumn = EuiBasicTableColumn; diff --git a/x-pack/plugins/reporting/server/config/ui_settings.ts b/x-pack/plugins/reporting/server/config/ui_settings.ts index cb4a5ca4ec09b..3a7898e861a12 100644 --- a/x-pack/plugins/reporting/server/config/ui_settings.ts +++ b/x-pack/plugins/reporting/server/config/ui_settings.ts @@ -8,7 +8,8 @@ import { schema } from '@kbn/config-schema'; import { CoreSetup, UiSettingsParams } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; -import { PLUGIN_ID, UI_SETTINGS_CUSTOM_PDF_LOGO } from '@kbn/reporting-common'; +import { UI_SETTINGS_CUSTOM_PDF_LOGO } from '@kbn/reporting-common'; +import { PLUGIN_ID } from '@kbn/reporting-server'; const kbToBase64Length = (kb: number) => Math.floor((kb * 1024 * 8) / 6); const maxLogoSizeInBase64 = kbToBase64Length(200); diff --git a/x-pack/plugins/reporting/server/lib/check_params_version.ts b/x-pack/plugins/reporting/server/lib/check_params_version.ts index 9ab249ced9d6a..e9091f15518da 100644 --- a/x-pack/plugins/reporting/server/lib/check_params_version.ts +++ b/x-pack/plugins/reporting/server/lib/check_params_version.ts @@ -6,8 +6,8 @@ */ import type { Logger } from '@kbn/core/server'; -import { UNVERSIONED_VERSION } from '@kbn/reporting-common'; import type { BaseParams } from '@kbn/reporting-common/types'; +import { UNVERSIONED_VERSION } from '@kbn/reporting-server'; export function checkParamsVersion(jobParams: BaseParams, logger: Logger) { if (jobParams.version) { diff --git a/x-pack/plugins/reporting/server/lib/event_logger/logger.ts b/x-pack/plugins/reporting/server/lib/event_logger/logger.ts index 981e5edc44ded..295a5176df7fa 100644 --- a/x-pack/plugins/reporting/server/lib/event_logger/logger.ts +++ b/x-pack/plugins/reporting/server/lib/event_logger/logger.ts @@ -6,11 +6,12 @@ */ import deepMerge from 'deepmerge'; + import type { Logger, LogMeta } from '@kbn/core/server'; import type { TaskRunMetrics } from '@kbn/reporting-common/types'; -import { PLUGIN_ID } from '@kbn/reporting-common'; -import { IReport } from '../store'; +import { PLUGIN_ID } from '@kbn/reporting-server'; import { ActionType } from '.'; +import { IReport } from '../store'; import { EcsLogAdapter } from './adapter'; import { ClaimedTask, diff --git a/x-pack/plugins/reporting/server/lib/store/store.ts b/x-pack/plugins/reporting/server/lib/store/store.ts index c2246441c29f6..543045393a1b2 100644 --- a/x-pack/plugins/reporting/server/lib/store/store.ts +++ b/x-pack/plugins/reporting/server/lib/store/store.ts @@ -7,13 +7,14 @@ import { estypes } from '@elastic/elasticsearch'; import type { ElasticsearchClient, Logger } from '@kbn/core/server'; -import { ILM_POLICY_NAME, JOB_STATUS, REPORTING_SYSTEM_INDEX } from '@kbn/reporting-common'; +import { ILM_POLICY_NAME, JOB_STATUS } from '@kbn/reporting-common'; import type { ExecutionError, ReportDocument, ReportOutput, ReportSource, } from '@kbn/reporting-common/types'; +import { REPORTING_SYSTEM_INDEX } from '@kbn/reporting-server'; import moment from 'moment'; import type { Report } from '.'; import { SavedReport } from '.'; @@ -73,7 +74,7 @@ const sourceDoc = (doc: Partial): Partial => { }; }; -const esDoc = ( +const esDocForUpdate = ( report: SavedReport, doc: Partial ): Parameters[0] => { @@ -82,7 +83,7 @@ const esDoc = ( index: report._index, if_seq_no: report._seq_no, if_primary_term: report._primary_term, - refresh: false, + refresh: 'wait_for' as estypes.Refresh, body: { doc }, }; }; @@ -178,7 +179,7 @@ export class ReportingStore { const doc = { index: report._index!, id: report._id, - refresh: false, + refresh: 'wait_for' as estypes.Refresh, body: { ...report.toReportSource(), ...sourceDoc({ @@ -309,7 +310,7 @@ export class ReportingStore { let body: UpdateResponse; try { const client = await this.getClient(); - body = await client.update(esDoc(report, doc)); + body = await client.update(esDocForUpdate(report, doc)); } catch (err) { this.logError(`Error in updating status to processing! Report: ${jobDebugMessage(report)}`, err, report); // prettier-ignore throw err; @@ -341,7 +342,7 @@ export class ReportingStore { let body: UpdateResponse; try { const client = await this.getClient(); - body = await client.update(esDoc(report, doc)); + body = await client.update(esDocForUpdate(report, doc)); } catch (err) { this.logError(`Error in updating status to failed! Report: ${jobDebugMessage(report)}`, err, report); // prettier-ignore throw err; @@ -363,7 +364,7 @@ export class ReportingStore { let body: UpdateResponse; try { const client = await this.getClient(); - body = await client.update(esDoc(report, doc)); + body = await client.update(esDocForUpdate(report, doc)); } catch (err) { this.logError(`Error in updating status to failed! Report: ${jobDebugMessage(report)}`, err, report); // prettier-ignore throw err; @@ -391,7 +392,7 @@ export class ReportingStore { let body: UpdateResponse; try { const client = await this.getClient(); - body = await client.update(esDoc(report, doc)); + body = await client.update(esDocForUpdate(report, doc)); } catch (err) { this.logError(`Error in updating status to complete! Report: ${jobDebugMessage(report)}`, err, report); // prettier-ignore throw err; diff --git a/x-pack/plugins/reporting/server/plugin.ts b/x-pack/plugins/reporting/server/plugin.ts index 600fb298fec44..ea4722ef5c30e 100644 --- a/x-pack/plugins/reporting/server/plugin.ts +++ b/x-pack/plugins/reporting/server/plugin.ts @@ -12,9 +12,7 @@ import type { Plugin, PluginInitializerContext, } from '@kbn/core/server'; -import { PLUGIN_ID } from '@kbn/reporting-common'; -import type { ReportingConfigType } from '@kbn/reporting-server'; -import { setFieldFormats } from '@kbn/reporting-server'; +import { PLUGIN_ID, setFieldFormats, type ReportingConfigType } from '@kbn/reporting-server'; import { ReportingCore } from '.'; import { registerUiSettings } from './config'; import { registerDeprecations } from './deprecations'; diff --git a/x-pack/plugins/reporting/server/routes/common/get_counter.ts b/x-pack/plugins/reporting/server/routes/common/get_counter.ts index 83603d07e5ce8..ab72904537aa4 100644 --- a/x-pack/plugins/reporting/server/routes/common/get_counter.ts +++ b/x-pack/plugins/reporting/server/routes/common/get_counter.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { API_USAGE_COUNTER_TYPE, API_USAGE_ERROR_TYPE } from '@kbn/reporting-common'; +import { API_USAGE_COUNTER_TYPE, API_USAGE_ERROR_TYPE } from '@kbn/reporting-server'; import { UsageCounter } from '@kbn/usage-collection-plugin/server'; export type Counters = ReturnType; diff --git a/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts b/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts index b87c6040e46b4..d371d49970a72 100644 --- a/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts +++ b/x-pack/plugins/reporting/server/routes/common/jobs/jobs_query.ts @@ -8,8 +8,9 @@ import { TransportResult, errors, estypes } from '@elastic/elasticsearch'; import type { ElasticsearchClient } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; -import { JOB_STATUS, REPORTING_SYSTEM_INDEX } from '@kbn/reporting-common'; -import { ReportApiJSON, ReportSource } from '@kbn/reporting-common/types'; +import { JOB_STATUS } from '@kbn/reporting-common'; +import type { ReportApiJSON, ReportSource } from '@kbn/reporting-common/types'; +import { REPORTING_SYSTEM_INDEX } from '@kbn/reporting-server'; import type { ReportingCore } from '../../..'; import { Report } from '../../../lib/store'; import { runtimeFieldKeys, runtimeFields } from '../../../lib/store/runtime_fields'; diff --git a/x-pack/plugins/reporting/server/usage/event_tracker.ts b/x-pack/plugins/reporting/server/usage/event_tracker.ts index 441868bae1fa9..69ead49775cdf 100644 --- a/x-pack/plugins/reporting/server/usage/event_tracker.ts +++ b/x-pack/plugins/reporting/server/usage/event_tracker.ts @@ -6,7 +6,7 @@ */ import { AnalyticsServiceStart } from '@kbn/core/server'; -import { EventType, FieldType } from './types'; +import { EventType, FieldType } from '@kbn/reporting-server'; interface CompletionOpts { byteSize: number; diff --git a/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts b/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts index d39ac15be037a..a334252c99b2b 100644 --- a/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts +++ b/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts @@ -4,10 +4,13 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + +import { get, pick } from 'lodash'; + import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; + import type { ElasticsearchClient } from '@kbn/core/server'; -import { REPORTING_SYSTEM_INDEX } from '@kbn/reporting-common'; -import { get, pick } from 'lodash'; +import { REPORTING_SYSTEM_INDEX } from '@kbn/reporting-server'; import type { ExportTypesRegistry } from '@kbn/reporting-server/export_types_registry'; import type { GetLicense } from '.'; import { diff --git a/x-pack/plugins/reporting/server/usage/register_event_types.ts b/x-pack/plugins/reporting/server/usage/register_event_types.ts index caa058f0995e7..bf34d33cf37c7 100644 --- a/x-pack/plugins/reporting/server/usage/register_event_types.ts +++ b/x-pack/plugins/reporting/server/usage/register_event_types.ts @@ -5,10 +5,10 @@ * 2.0. */ -import type { CoreSetup } from '@kbn/core/server'; import { RootSchema } from '@kbn/analytics-client'; import { EventTypeOpts } from '@kbn/core/public'; -import { EventType, FieldType } from './types'; +import type { CoreSetup } from '@kbn/core/server'; +import { EventType, FieldType } from '@kbn/reporting-server'; const fields: Record>> = { [FieldType.REPORT_ID]: { diff --git a/x-pack/plugins/reporting/server/usage/types.ts b/x-pack/plugins/reporting/server/usage/types.ts index adb214c2c735d..5751537590f23 100644 --- a/x-pack/plugins/reporting/server/usage/types.ts +++ b/x-pack/plugins/reporting/server/usage/types.ts @@ -251,30 +251,3 @@ export type ReportingUsageType = RangeStats & { }; export type FeatureAvailabilityMap = Record; - -export enum EventType { - REPORT_CREATION = 'report_creation', - REPORT_CLAIM = 'report_claim', - REPORT_COMPLETION_CSV = 'report_completion_csv', - REPORT_COMPLETION_SCREENSHOT = 'report_completion_screenshot', - REPORT_ERROR = 'report_error', - REPORT_DOWNLOAD = 'report_download', - REPORT_DELETION = 'report_deletion', -} - -export enum FieldType { - REPORT_ID = 'report_id', - EXPORT_TYPE = 'export_type', - OBJECT_TYPE = 'object_type', - IS_DEPRECATED = 'is_deprecated', - IS_PUBLIC_API = 'is_public_api', - DURATION_MS = 'duration_ms', - ERROR_CODE = 'error_code', - ERROR_MESSAGE = 'error_message', - BYTE_SIZE = 'byte_size', - NUM_PAGES = 'num_pages', - SCREENSHOT_PIXELS = 'screenshot_pixels', - SCREENSHOT_LAYOUT = 'screenshot_layout', - CSV_ROWS = 'csv_rows', - CSV_COLUMNS = 'csv_columns', -} diff --git a/x-pack/plugins/rollup/kibana.jsonc b/x-pack/plugins/rollup/kibana.jsonc index 73f0e76b16d73..62f2daa8a1704 100644 --- a/x-pack/plugins/rollup/kibana.jsonc +++ b/x-pack/plugins/rollup/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/rollup-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "rollup", "server": true, diff --git a/x-pack/plugins/runtime_fields/kibana.jsonc b/x-pack/plugins/runtime_fields/kibana.jsonc index a691ec63564c7..54f222d0fdf23 100644 --- a/x-pack/plugins/runtime_fields/kibana.jsonc +++ b/x-pack/plugins/runtime_fields/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/runtime-fields-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "runtimeFields", "server": false, diff --git a/x-pack/plugins/searchprofiler/kibana.jsonc b/x-pack/plugins/searchprofiler/kibana.jsonc index c279339443195..cce2712681b31 100644 --- a/x-pack/plugins/searchprofiler/kibana.jsonc +++ b/x-pack/plugins/searchprofiler/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/searchprofiler-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "searchprofiler", "server": true, diff --git a/x-pack/plugins/security/server/audit/audit_events.test.ts b/x-pack/plugins/security/server/audit/audit_events.test.ts index b1e3b1826f8ce..271d7cd7a4557 100644 --- a/x-pack/plugins/security/server/audit/audit_events.test.ts +++ b/x-pack/plugins/security/server/audit/audit_events.test.ts @@ -30,7 +30,7 @@ describe('#savedObjectEvent', () => { savedObjectEvent({ action: AuditAction.CREATE, outcome: 'unknown', - savedObject: { type: 'dashboard', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'dashboard', id: 'SAVED_OBJECT_ID', name: 'test_dashboard' }, }) ).toMatchInlineSnapshot(` Object { @@ -50,6 +50,7 @@ describe('#savedObjectEvent', () => { "delete_from_spaces": undefined, "saved_object": Object { "id": "SAVED_OBJECT_ID", + "name": "test_dashboard", "type": "dashboard", }, "unauthorized_spaces": undefined, @@ -64,7 +65,7 @@ describe('#savedObjectEvent', () => { expect( savedObjectEvent({ action: AuditAction.CREATE, - savedObject: { type: 'dashboard', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'dashboard', id: 'SAVED_OBJECT_ID', name: 'test_dashboard' }, }) ).toMatchInlineSnapshot(` Object { @@ -84,6 +85,7 @@ describe('#savedObjectEvent', () => { "delete_from_spaces": undefined, "saved_object": Object { "id": "SAVED_OBJECT_ID", + "name": "test_dashboard", "type": "dashboard", }, "unauthorized_spaces": undefined, @@ -98,7 +100,7 @@ describe('#savedObjectEvent', () => { expect( savedObjectEvent({ action: AuditAction.CREATE, - savedObject: { type: 'dashboard', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'dashboard', id: 'SAVED_OBJECT_ID', name: 'test_dashboard' }, error: new Error('ERROR_MESSAGE'), }) ).toMatchInlineSnapshot(` @@ -122,6 +124,7 @@ describe('#savedObjectEvent', () => { "delete_from_spaces": undefined, "saved_object": Object { "id": "SAVED_OBJECT_ID", + "name": "test_dashboard", "type": "dashboard", }, "unauthorized_spaces": undefined, @@ -163,13 +166,13 @@ describe('#savedObjectEvent', () => { expect( savedObjectEvent({ action: AuditAction.GET, - savedObject: { type: 'telemetry', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'telemetry', id: 'SAVED_OBJECT_ID', name: 'telemetry_name' }, }) ).toBeUndefined(); expect( savedObjectEvent({ action: AuditAction.RESOLVE, - savedObject: { type: 'config', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'config', id: 'SAVED_OBJECT_ID', name: 'config_name' }, }) ).toBeUndefined(); expect( @@ -196,13 +199,13 @@ describe('#savedObjectEvent', () => { expect( savedObjectEvent({ action: AuditAction.UPDATE, - savedObject: { type: 'config', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'config', id: 'SAVED_OBJECT_ID', name: 'config_name' }, }) ).not.toBeUndefined(); expect( savedObjectEvent({ action: AuditAction.UPDATE, - savedObject: { type: 'telemetry', id: 'SAVED_OBJECT_ID' }, + savedObject: { type: 'telemetry', id: 'SAVED_OBJECT_ID', name: 'telemetry_name' }, }) ).not.toBeUndefined(); }); diff --git a/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts b/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts index 5cf2ecba8b1b2..e258a4c20aa2b 100644 --- a/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts +++ b/x-pack/plugins/security/server/saved_objects/saved_objects_security_extension.ts @@ -120,7 +120,7 @@ export interface AddAuditEventParams { * Relevant saved object information * object containing type & id strings */ - savedObject?: { type: string; id: string }; + savedObject?: { type: string; id: string; name?: string }; /** * Array of spaces being added. For * UPDATE_OBJECTS_SPACES action only diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index 031aecfee2bb1..4173f38ca4c05 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -169,11 +169,6 @@ export const allowedExperimentalValues = Object.freeze({ */ riskEnginePrivilegesRouteEnabled: true, - /** - * Enables alerts suppression for indicator match rules - */ - alertSuppressionForIndicatorMatchRuleEnabled: false, - /** * Enables experimental Experimental S1 integration data to be available in Analyzer */ diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx index 9cc1b5654ad3d..093d560196438 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.test.tsx @@ -28,6 +28,7 @@ import { buildNoteDescription, buildRuleTypeDescription, buildHighlightedFieldsOverrideDescription, + getQueryLabel, } from './helpers'; import type { ListItems } from './types'; @@ -533,4 +534,35 @@ describe('helpers', () => { expect(result).toHaveLength(0); }); }); + + describe('getQueryLabel', () => { + test('returns query label for unknown rule type', () => { + const label = getQueryLabel(undefined); + expect(label).toEqual(i18n.QUERY_LABEL); + }); + test('returns query label for query rule type', () => { + const label = getQueryLabel('query'); + expect(label).toEqual(i18n.QUERY_LABEL); + }); + test('returns query label for eql rule type', () => { + const label = getQueryLabel('eql'); + expect(label).toEqual(i18n.EQL_QUERY_LABEL); + }); + test('returns query label for saved_query rule type', () => { + const label = getQueryLabel('saved_query'); + expect(label).toEqual(i18n.SAVED_QUERY_LABEL); + }); + test('returns query label for threshold rule type', () => { + const label = getQueryLabel('threshold'); + expect(label).toEqual(i18n.QUERY_LABEL); + }); + test('returns query label for new_terms rule type', () => { + const label = getQueryLabel('new_terms'); + expect(label).toEqual(i18n.QUERY_LABEL); + }); + test('returns query label for esql rule type', () => { + const label = getQueryLabel('esql'); + expect(label).toEqual(i18n.ESQL_QUERY_LABEL); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx index 5a9dd4f7eb6d3..be6c61f5472a2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/helpers.tsx @@ -69,6 +69,19 @@ const Query = styled.div` white-space: pre-wrap; `; +export const getQueryLabel = (ruleType: Type | undefined): string => { + switch (ruleType) { + case 'eql': + return i18n.EQL_QUERY_LABEL; + case 'saved_query': + return i18n.SAVED_QUERY_LABEL; + case 'esql': + return i18n.ESQL_QUERY_LABEL; + default: + return i18n.QUERY_LABEL; + } +}; + export const buildQueryBarDescription = ({ field, filters, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx index ccc9767d742f7..c4770a1640704 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx @@ -331,6 +331,29 @@ describe('description_step', () => { mockQueryBar.queryBar.query.query ); }); + + test('returns correct field name when queryBar exist', () => { + const mockQueryBar = { + ruleType: 'eql', + queryBar: { + query: { + query: 'user.name: root or user.name: admin', + language: 'kuery', + }, + filters: null, + saved_id: null, + }, + }; + const result: ListItems[] = getDescriptionItem( + 'queryBar', + 'Query bar label', + mockQueryBar, + mockFilterManager, + mockLicenseService + ); + + expect(result[0].title).toEqual(<>{i18n.EQL_QUERY_LABEL}); + }); }); describe('threat', () => { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx index f6f5957b54e42..9f377755c769e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.tsx @@ -47,6 +47,7 @@ import { buildAlertSuppressionWindowDescription, buildAlertSuppressionMissingFieldsDescription, buildHighlightedFieldsOverrideDescription, + getQueryLabel, } from './helpers'; import * as i18n from './translations'; import { buildMlJobsDescription } from './build_ml_jobs_description'; @@ -200,11 +201,14 @@ export const getDescriptionItem = ( const query = get('queryBar.query.query', data); const savedId = get('queryBar.saved_id', data); const savedQueryName = get('queryBar.title', data); + const ruleType: Type = get('ruleType', data); + const queryLabel = getQueryLabel(ruleType); return buildQueryBarDescription({ field, filters, filterManager, query, + queryLabel, savedId, savedQueryName, indexPatterns, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts index 93b2c74ed8e31..c035fef5af6e4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts @@ -7,8 +7,6 @@ import { useCallback } from 'react'; import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; -import { isThreatMatchRule } from '../../../../../common/detection_engine/utils'; /** * transforms DefineStepRule fields according to experimental feature flags @@ -16,30 +14,9 @@ import { isThreatMatchRule } from '../../../../../common/detection_engine/utils' export const useExperimentalFeatureFieldsTransform = >(): (( fields: T ) => T) => { - const isAlertSuppressionForIndicatorMatchRuleEnabled = useIsExperimentalFeatureEnabled( - 'alertSuppressionForIndicatorMatchRuleEnabled' - ); - - const transformer = useCallback( - (fields: T) => { - const isIndicatorMatchSuppressionDisabled = isThreatMatchRule(fields.ruleType) - ? !isAlertSuppressionForIndicatorMatchRuleEnabled - : false; - // reset any alert suppression values hidden behind feature flag - if (isIndicatorMatchSuppressionDisabled) { - return { - ...fields, - groupByFields: [], - groupByRadioSelection: undefined, - groupByDuration: undefined, - suppressionMissingFields: undefined, - }; - } - - return fields; - }, - [isAlertSuppressionForIndicatorMatchRuleEnabled] - ); + const transformer = useCallback((fields: T) => { + return fields; + }, []); return transformer; }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx index 1f817aa4dd6a5..cab113ecd1393 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx @@ -6,30 +6,14 @@ */ import { renderHook } from '@testing-library/react-hooks'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; -import * as useIsExperimentalFeatureEnabledMock from '../../../common/hooks/use_experimental_features'; import { useAlertSuppression } from './use_alert_suppression'; describe('useAlertSuppression', () => { - it('should return the correct isSuppressionEnabled value if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is enabled', () => { - jest - .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') - .mockImplementation((featureFlagName: string) => { - return featureFlagName === 'alertSuppressionForIndicatorMatchRuleEnabled'; - }); + it('should return the correct isSuppressionEnabled value fot threat_match rule type', () => { const { result } = renderHook(() => useAlertSuppression('threat_match')); expect(result.current.isSuppressionEnabled).toBe(true); }); - it('should return the correct isSuppressionEnabled value if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is disabled', () => { - jest - .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') - .mockImplementation((featureFlagName: string) => { - return featureFlagName !== 'alertSuppressionForIndicatorMatchRuleEnabled'; - }); - const { result } = renderHook(() => useAlertSuppression('threat_match')); - - expect(result.current.isSuppressionEnabled).toBe(false); - }); it('should return the correct isSuppressionEnabled value if rule Type exists in SUPPRESSIBLE_ALERT_RULES', () => { const { result } = renderHook(() => useAlertSuppression('query')); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx index fb8fbaa8756cc..ba1bb94a49ae3 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx @@ -7,25 +7,17 @@ import { useCallback } from 'react'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { isSuppressibleAlertRule } from '../../../../common/detection_engine/utils'; -import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; + export interface UseAlertSuppressionReturn { isSuppressionEnabled: boolean; } export const useAlertSuppression = (ruleType: Type | undefined): UseAlertSuppressionReturn => { - const isThreatMatchRuleFFEnabled = useIsExperimentalFeatureEnabled( - 'alertSuppressionForIndicatorMatchRuleEnabled' - ); - const isSuppressionEnabledForRuleType = useCallback(() => { if (!ruleType) return false; - // Remove this condition when the Feature Flag for enabling Suppression in the Indicator Match rule is removed. - if (ruleType === 'threat_match') - return isSuppressibleAlertRule(ruleType) && isThreatMatchRuleFFEnabled; - return isSuppressibleAlertRule(ruleType); - }, [ruleType, isThreatMatchRuleFFEnabled]); + }, [ruleType]); return { isSuppressionEnabled: isSuppressionEnabledForRuleType(), diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx index 25f605772e941..70c40349fc80c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/add_prebuilt_rules_table/use_add_prebuilt_rules_table_columns.tsx @@ -8,6 +8,7 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiButtonEmpty, EuiBadge, EuiText, EuiLoadingSpinner, EuiLink } from '@elastic/eui'; import React, { useMemo } from 'react'; +import { RulesTableEmptyColumnName } from '../rules_table_empty_column_name'; import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/constants'; import { PopoverItems } from '../../../../../common/components/popover_items'; import { useUiSetting$ } from '../../../../../common/lib/kibana'; @@ -63,7 +64,7 @@ export const RULE_NAME_COLUMN: TableColumn = { const TAGS_COLUMN: TableColumn = { field: 'tags', - name: null, + name: , align: 'center', render: (tags: RuleResponse['tags']) => { if (tags == null || tags.length === 0) { @@ -92,7 +93,7 @@ const TAGS_COLUMN: TableColumn = { const INTEGRATIONS_COLUMN: TableColumn = { field: 'related_integrations', - name: null, + name: , align: 'center', render: (integrations: RuleResponse['related_integrations']) => { if (integrations == null || integrations.length === 0) { @@ -111,7 +112,7 @@ const createInstallButtonColumn = ( isDisabled: boolean ): TableColumn => ({ field: 'rule_id', - name: '', + name: , render: (ruleId: RuleSignatureId, record: Rule) => { const isRuleInstalling = loadingRules.includes(ruleId); const isInstallButtonDisabled = isRuleInstalling || isDisabled; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.tsx new file mode 100644 index 0000000000000..0efd15ff8374e --- /dev/null +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table_empty_column_name.tsx @@ -0,0 +1,24 @@ +/* + * 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, { type FC } from 'react'; +import { EuiScreenReaderOnly } from '@elastic/eui'; + +interface RulesTableEmptyColumnNameProps { + name: string; +} + +export const RulesTableEmptyColumnName: FC = React.memo( + ({ name }) => { + return ( + +

{name}

+
+ ); + } +); + +RulesTableEmptyColumnName.displayName = 'RulesTableEmptyColumnName'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx index cd56a0cd49074..b188b1afea7f2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/upgrade_prebuilt_rules_table/use_upgrade_prebuilt_rules_table_columns.tsx @@ -8,6 +8,7 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import { EuiBadge, EuiButtonEmpty, EuiLink, EuiLoadingSpinner, EuiText } from '@elastic/eui'; import React, { useMemo } from 'react'; +import { RulesTableEmptyColumnName } from '../rules_table_empty_column_name'; import { SHOW_RELATED_INTEGRATIONS_SETTING } from '../../../../../../common/constants'; import type { RuleUpgradeInfoForReview } from '../../../../../../common/api/detection_engine/prebuilt_rules'; import type { RuleSignatureId } from '../../../../../../common/api/detection_engine/model/rule_schema'; @@ -62,7 +63,7 @@ const RULE_NAME_COLUMN: TableColumn = { const TAGS_COLUMN: TableColumn = { field: 'current_rule.tags', - name: null, + name: , align: 'center', render: (tags: Rule['tags']) => { if (tags == null || tags.length === 0) { @@ -91,7 +92,7 @@ const TAGS_COLUMN: TableColumn = { const INTEGRATIONS_COLUMN: TableColumn = { field: 'current_rule.related_integrations', - name: null, + name: , align: 'center', render: (integrations: Rule['related_integrations']) => { if (integrations == null || integrations.length === 0) { @@ -110,7 +111,7 @@ const createUpgradeButtonColumn = ( isDisabled: boolean ): TableColumn => ({ field: 'rule_id', - name: '', + name: , render: (ruleId: RuleUpgradeInfoForReview['rule_id']) => { const isRuleUpgrading = loadingRules.includes(ruleId); const isUpgradeButtonDisabled = isRuleUpgrading || isDisabled; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index ca8808682b208..82f1f42481579 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -10,6 +10,7 @@ import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiLink, EuiText, EuiToolTip } fro import { FormattedMessage } from '@kbn/i18n-react'; import moment from 'moment'; import React, { useMemo } from 'react'; +import { RulesTableEmptyColumnName } from './rules_table_empty_column_name'; import type { SecurityJob } from '../../../../common/components/ml_popover/types'; import { DEFAULT_RELATIVE_DATE_THRESHOLD, @@ -188,7 +189,7 @@ const useRuleExecutionStatusColumn = ({ const TAGS_COLUMN: TableColumn = { field: 'tags', - name: null, + name: , align: 'center', render: (tags: Rule['tags']) => { if (tags == null || tags.length === 0) { @@ -217,7 +218,7 @@ const TAGS_COLUMN: TableColumn = { const INTEGRATIONS_COLUMN: TableColumn = { field: 'related_integrations', - name: null, + name: , align: 'center', render: (integrations: Rule['related_integrations']) => { if (integrations == null || integrations.length === 0) { diff --git a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx index bf96225f5ca9d..ceed0612565ab 100644 --- a/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/host_isolation/use_host_isolation_action.tsx @@ -15,7 +15,7 @@ import type { TimelineEventsDetailsItem } from '../../../../common/search_strate import { isIsolationSupported } from '../../../../common/endpoint/service/host_isolation/utils'; import { HostStatus } from '../../../../common/endpoint/types'; import { isAlertFromEndpointEvent } from '../../../common/utils/endpoint_alert_check'; -import { useHostIsolationStatus } from '../../containers/detection_engine/alerts/use_host_isolation_status'; +import { useEndpointHostIsolationStatus } from '../../containers/detection_engine/alerts/use_host_isolation_status'; import { ISOLATE_HOST, UNISOLATE_HOST } from './translations'; import { getFieldValue } from './helpers'; import { useUserPrivileges } from '../../../common/components/user_privileges'; @@ -74,8 +74,9 @@ export const useHostIsolationAction = ({ isIsolated, agentStatus, capabilities, - } = useHostIsolationStatus({ + } = useEndpointHostIsolationStatus({ agentId, + agentType: sentinelOneAgentId ? 'sentinel_one' : 'endpoint', }); const { data: sentinelOneAgentData } = useGetSentinelOneAgentStatus([sentinelOneAgentId || '']); diff --git a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx index b5cd65abb28a2..ff1ef27195e69 100644 --- a/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/take_action_dropdown/index.test.tsx @@ -88,7 +88,7 @@ jest.mock('../../../../common/endpoint/service/host_isolation/utils', () => { jest.mock('../../containers/detection_engine/alerts/use_host_isolation_status', () => { return { - useHostIsolationStatus: jest.fn().mockReturnValue({ + useEndpointHostIsolationStatus: jest.fn().mockReturnValue({ loading: false, isIsolated: false, agentStatus: 'healthy', diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_host_isolation_status.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_host_isolation_status.tsx index e10bc1d666945..0646a9904e939 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_host_isolation_status.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_host_isolation_status.tsx @@ -7,6 +7,7 @@ import { isEmpty } from 'lodash'; import { useEffect, useState } from 'react'; +import type { ResponseActionAgentType } from '../../../../../common/endpoint/service/response_actions/constants'; import { getHostMetadata } from './api'; import { fetchPendingActionsByAgentId } from '../../../../common/lib/endpoint_pending_actions'; import { isEndpointHostIsolated } from '../../../../common/utils/validators'; @@ -23,10 +24,12 @@ interface HostIsolationStatusResponse { /* * Retrieves the current isolation status of a host and the agent/host status */ -export const useHostIsolationStatus = ({ +export const useEndpointHostIsolationStatus = ({ agentId, + agentType, }: { agentId: string; + agentType: ResponseActionAgentType; }): HostIsolationStatusResponse => { const [isIsolated, setIsIsolated] = useState(false); const [capabilities, setCapabilities] = useState([]); @@ -64,6 +67,10 @@ export const useHostIsolationStatus = ({ } } + if (!(fleetAgentId && fleetAgentId.length)) { + return; + } + try { const { data } = await fetchPendingActionsByAgentId(fleetAgentId); if (isMounted) { @@ -80,7 +87,7 @@ export const useHostIsolationStatus = ({ } }; - if (!isEmpty(agentId)) { + if (!isEmpty(agentId) && agentType === 'endpoint') { fetchData(); } return () => { @@ -88,6 +95,6 @@ export const useHostIsolationStatus = ({ isMounted = false; abortCtrl.abort(); }; - }, [agentId]); + }, [agentId, agentType]); return { loading, capabilities, isIsolated, agentStatus, pendingIsolation, pendingUnisolation }; }; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts index 13e52e855f2b1..a7823f39abb70 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/translations.ts @@ -547,6 +547,13 @@ export const COLUMN_TAGS = i18n.translate( } ); +export const COLUMN_INTEGRATIONS = i18n.translate( + 'xpack.securitySolution.detectionEngine.rules.allRules.columns.integrationsTitle', + { + defaultMessage: 'Integrations', + } +); + export const COLUMN_ENABLE = i18n.translate( 'xpack.securitySolution.detectionEngine.rules.allRules.columns.enabledTitle', { diff --git a/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/shared_lists.test.tsx b/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/shared_lists.test.tsx index f8b4fbaca4b8f..c1167f0575fad 100644 --- a/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/shared_lists.test.tsx +++ b/x-pack/plugins/security_solution/public/exceptions/pages/shared_lists/shared_lists.test.tsx @@ -43,7 +43,10 @@ jest.mock('../../../detections/containers/detection_engine/lists/use_lists_confi useListsConfig: jest.fn().mockReturnValue({ loading: false }), })); -describe('SharedLists', () => { +// FLAKY: https://github.com/elastic/kibana/issues/177670 +// FLAKY: https://github.com/elastic/kibana/issues/177671 +// FLAKY: https://github.com/elastic/kibana/issues/177672 +describe.skip('SharedLists', () => { const mockHistory = generateHistoryMock(); const exceptionList1 = getExceptionListSchemaMock(); const exceptionList2 = { ...getExceptionListSchemaMock(), list_id: 'not_endpoint_list', id: '2' }; diff --git a/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts index 7719e599f9a1f..6f5c1dda52fc2 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts +++ b/x-pack/plugins/security_solution/public/resolver/view/use_resolver_query_params_cleaner.ts @@ -8,7 +8,6 @@ import { useRef, useEffect } from 'react'; import { useLocation, useHistory } from 'react-router-dom'; import { useDispatch } from 'react-redux'; -import { clearResolver } from '../store/actions'; import { parameterName } from '../store/parameter_name'; /** * Cleanup any query string keys that were added by this Resolver instance. @@ -49,7 +48,6 @@ export function useResolverQueryParamCleaner(id: string) { urlSearchParams.delete(oldResolverKey); const relativeURL = { search: urlSearchParams.toString() }; history.replace(relativeURL); - dispatch(clearResolver({ id })); }; }, [resolverKey, history, dispatch, id]); } diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx index 5362af38c2413..2286a9af31e09 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/flyout/footer.test.tsx @@ -48,7 +48,7 @@ jest.mock( '../../../../../detections/containers/detection_engine/alerts/use_host_isolation_status', () => { return { - useHostIsolationStatus: jest.fn().mockReturnValue({ + useEndpointHostIsolationStatus: jest.fn().mockReturnValue({ loading: false, isIsolated: false, agentStatus: 'healthy', diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx index f50142177ba8b..96b4b45f9bd16 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/event_details/index.test.tsx @@ -61,7 +61,7 @@ jest.mock( '../../../../detections/containers/detection_engine/alerts/use_host_isolation_status', () => { return { - useHostIsolationStatus: jest.fn().mockReturnValue({ + useEndpointHostIsolationStatus: jest.fn().mockReturnValue({ loading: false, isIsolated: false, agentStatus: 'healthy', diff --git a/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts b/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts index e2357d6d614ed..aa481f6081e03 100644 --- a/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts +++ b/x-pack/plugins/security_solution/server/integration_tests/telemetry.test.ts @@ -112,7 +112,8 @@ describe('telemetry tasks', () => { await cleanupMockedEndpointAlerts(kibanaServer.coreStart.elasticsearch.client.asInternalUser); }); - describe('detection-rules', () => { + // FLAKY: https://github.com/elastic/kibana/issues/178591 + describe.skip('detection-rules', () => { it('should execute when scheduled', async () => { await mockAndScheduleDetectionRulesTask(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts index aa108e5ea9bea..bb01cbe9a5b48 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts @@ -224,10 +224,7 @@ export const createThreatSignals = async ({ completeRule.ruleParams.alertSuppression?.groupBy?.length ); - const isAlertSuppressionActive = - isAlertSuppressionConfigured && - Boolean(runOpts.experimentalFeatures?.alertSuppressionForIndicatorMatchRuleEnabled) && - hasPlatinumLicense; + const isAlertSuppressionActive = isAlertSuppressionConfigured && hasPlatinumLicense; // alert suppression needs to be performed on results searched in ascending order, so alert's suppression boundaries would be set correctly // at the same time, there are concerns on performance of IM rule when sorting is set to asc, as it may lead to longer rule runs, since it will diff --git a/x-pack/plugins/serverless/public/plugin.tsx b/x-pack/plugins/serverless/public/plugin.tsx index cfb3cd1104580..06cc9f91a5c47 100644 --- a/x-pack/plugins/serverless/public/plugin.tsx +++ b/x-pack/plugins/serverless/public/plugin.tsx @@ -65,15 +65,11 @@ export class ServerlessPlugin // Casting the "chrome.projects" service to an "internal" type: this is intentional to obscure the property from Typescript. const { project } = core.chrome as InternalChromeStart; const { cloud } = dependencies; - if (cloud.projectsUrl) { - project.setProjectsUrl(cloud.projectsUrl); - } + if (cloud.serverless.projectName) { project.setProjectName(cloud.serverless.projectName); } - if (cloud.deploymentUrl) { - project.setProjectUrl(cloud.deploymentUrl); - } + project.setCloudUrls(cloud); const activeNavigationNodes$ = project.getActiveNavigationNodes$(); const navigationTreeUi$ = project.getNavigationTreeUi$(); @@ -82,8 +78,7 @@ export class ServerlessPlugin setSideNavComponentDeprecated: (sideNavigationComponent) => project.setSideNavComponent(sideNavigationComponent), initNavigation: (navigationTree$, { panelContentProvider, dataTestSubj } = {}) => { - project.initNavigation(navigationTree$, { cloudUrls: cloud }); - + project.initNavigation(navigationTree$); project.setSideNavComponent(() => ( { const [selectedLanguage, setSelectedLanguage] = useState(javaDefinition); const [clientApiKey, setClientApiKey] = useState(API_KEY_PLACEHOLDER); - const { application, cloud, http, user, share, console: consolePlugin } = useKibanaServices(); + const { application, cloud, user, share, console: consolePlugin } = useKibanaServices(); const { elasticsearchURL, cloudId } = useMemo(() => { return { elasticsearchURL: cloud?.elasticsearchUrl ?? ELASTICSEARCH_URL_PLACEHOLDER, @@ -98,7 +98,13 @@ export const ElasticsearchOverview = () => { bottomBorder="extended" data-test-subj="select-client-section" > - }> + } + application={application} + consolePlugin={consolePlugin} + sharePlugin={share} + > 2 émise par kilowattheure (kWh) d'énergie consommée dans une région donnée.\n Utilisez l'empreinte carbone {datasheetLink} du cloud pour mettre à jour cette valeur selon votre région. La valeur par défaut correspond à l'est des États-Unis (Virginie septentrionale).", "xpack.observability.rules.deleteConfirmationModal.deleteButtonLabel": "Supprimer {title}", "xpack.observability.rules.deleteConfirmationModal.descriptionText": "Vous ne pouvez pas récupérer {title} après l'avoir supprimé.", - "xpack.observability.slo.alerting.burnRate.reason": "{actionGroupName} : Le taux d'avancement pour le (les) dernier(s) {longWindowDuration} est de {longWindowBurnRate} et pour le (les) dernier(s) {shortWindowDuration} est de {shortWindowBurnRate}. Alerter si supérieur à {burnRateThreshold} pour les deux fenêtres", - "xpack.observability.slo.alerting.burnRate.reasonForInstanceId": "{actionGroupName} : Le taux d'avancement pour le (les) dernier(s) {longWindowDuration} est de {longWindowBurnRate} et pour le (les) dernier(s) {shortWindowDuration} est de {shortWindowBurnRate} pour {instanceId}. Alerter si supérieur à {burnRateThreshold} pour les deux fenêtres", - "xpack.observability.slo.burnRate.breachedStatustSubtitle": "Au rythme actuel, le budget d'erreur sera épuisé en {hour} heures.", - "xpack.observability.slo.burnRate.threshold": "Le seuil est {threshold}x", - "xpack.observability.slo.create.errorNotification": "Un problème est survenu lors de la création de {name}", - "xpack.observability.slo.deleteConfirmationModal.title": "Supprimer {name} ?", - "xpack.observability.slo.duration.day": "{duration, plural, one {1 jour} many {# jours} other {# jours}}", - "xpack.observability.slo.duration.hour": "{duration, plural, one {1 heure} many {# heures} other {# heures}}", - "xpack.observability.slo.duration.minute": "{duration, plural, one {1 minute} many {# minutes} other {# minutes}}", - "xpack.observability.slo.duration.month": "{duration, plural, one {1 mois} many {# mois} other {# mois}}", - "xpack.observability.slo.duration.week": "{duration, plural, one {1 semaine} many {# semaines} other {# prochaines semaines}}", - "xpack.observability.slo.indicatorTypeBadge.exploreInApm": "Afficher les détails de {service}", - "xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue": "Le seuil du taux d'avancement doit être compris entre 1 et {maxBurnRate}.", - "xpack.observability.slo.rules.groupByMessage": "Le SLO que vous avez sélectionné a été créé avec une partition sur \"{groupByField}\". Cette règle surveille et génère une alerte pour chaque instance trouvée dans le champ de partition.", - "xpack.observability.slo.rules.longWindowDuration.tooltip": "Période historique sur laquelle le taux d'avancement est calculé. Une période historique plus courte de {shortWindowDuration} minutes (1/12 de la période historique) sera utilisée pour une récupération plus rapide", - "xpack.observability.slo.slo.activeAlertsBadge.label": "{count, plural, one {# alerte} many {# alertes} other {Alertes #}}", - "xpack.observability.slo.slo.delete.errorNotification": "Impossible de supprimer {name}", - "xpack.observability.slo.slo.delete.successNotification": "{name} supprimé", - "xpack.observability.slo.slo.stats.objective": "Objectif {objective}", - "xpack.observability.slo.slo.timeWindow.calendar": "{elapsed}/{total} jours", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.duration": "{duration}", - "xpack.observability.slo.sloDetails.overview.apmSource.environmentLabel": "environnement : {value}", - "xpack.observability.slo.sloDetails.overview.apmSource.serviceLabel": "service : {value}", - "xpack.observability.slo.sloDetails.overview.apmSource.transactionNameLabel": "nom de transaction : {value}", - "xpack.observability.slo.sloDetails.overview.apmSource.transactionTypeLabel": "type de transaction : {value}", - "xpack.observability.slo.sloDetails.overview.calendarAlignedTimeWindow": "calendrier {duration} aligné", - "xpack.observability.slo.sloDetails.overview.observedValueSubtitle": "{value} (l'objectif est {objective})", - "xpack.observability.slo.sloDetails.overview.rollingTimeWindow": "{duration} en cours", - "xpack.observability.slo.sloDetails.overview.timeslicesBudgetingMethodDetails": "{duration} sections, {target} cible", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.duration": "{duration}", - "xpack.observability.slo.sloEdit.rollingTimeWindow.days": "{number} jours", - "xpack.observability.slo.update.errorNotification": "Un problème est survenu lors de la mise à jour de {name}", - "xpack.observability.slo.update.successNotification": "Mise à jour réussie de {name}", "xpack.observability.syntheticsThrottlingEnabledExperimentDescription": "Activez les paramètres de régulation dans les configurations du moniteur Synthetics. Notez qu’il est possible que la régulation ne soit pas toujours disponible pour vos moniteurs, même si le paramètre est actif. Destiné à un usage interne uniquement. {link}", "xpack.observability.transactionRateLabel": "{value} tpm", "xpack.observability.ux.coreVitals.averageMessage": " et inférieur à {bad}", @@ -28317,11 +28283,6 @@ "xpack.observability.breadcrumbs.alertsLinkText": "Alertes", "xpack.observability.breadcrumbs.overviewLinkText": "Aperçu", "xpack.observability.breadcrumbs.rulesLinkText": "Règles", - "xpack.observability.breadcrumbs.sloCreateLabel": "Créer", - "xpack.observability.breadcrumbs.sloDetailsLinkText": "Détails", - "xpack.observability.breadcrumbs.sloEditLabel": "Modifier", - "xpack.observability.breadcrumbs.sloLabel": "SLO", - "xpack.observability.breadcrumbs.slosLinkText": "SLO", "xpack.observability.cases.caseFeatureNoPermissionsMessage": "Pour afficher les cas, vous devez disposer de privilèges pour la fonctionnalité Cas dans l'espace Kibana. Pour en savoir plus, contactez votre administrateur Kibana.", "xpack.observability.cases.caseFeatureNoPermissionsTitle": "Privilèges de fonctionnalité Kibana requis", "xpack.observability.cases.caseView.goToDocumentationButton": "Afficher la documentation", @@ -28398,7 +28359,6 @@ "xpack.observability.customThreshold.rule.viewInAppUrlActionVariableDescription": "Lien vers la source de l’alerte", "xpack.observability.defaultApmServiceEnvironment": "Environnement de service par défaut", "xpack.observability.defaultApmServiceEnvironmentDescription": "Définissez l’environnement par défaut pour l’application APM. Sinon, les données de tous les environnements sont affichées par défaut.", - "xpack.observability.embeddableSlo.config.confirmButtonLabel": "Confirmer les configurations", "xpack.observability.emptySection.apps.alert.description": "Détectez des conditions complexes dans Observability et déclenchez des actions lorsque ces conditions sont satisfaites.", "xpack.observability.emptySection.apps.alert.link": "Créer une règle", "xpack.observability.emptySection.apps.alert.title": "Aucune alerte n'a été trouvée.", @@ -28437,7 +28397,6 @@ "xpack.observability.featureRegistry.deleteSubFeatureDetails": "Supprimer les cas et les commentaires", "xpack.observability.featureRegistry.deleteSubFeatureName": "Supprimer", "xpack.observability.featureRegistry.linkObservabilityTitle": "Cas", - "xpack.observability.featureRegistry.linkSloTitle": "SLO", "xpack.observability.feedbackMenu.appName": "Observabilité", "xpack.observability.formatters.hoursTimeUnitLabel": "h", "xpack.observability.formatters.hoursTimeUnitLabelExtended": "heures", @@ -28569,246 +28528,6 @@ "xpack.observability.section.errorPanel": "Une erreur est survenue lors de la tentative de récupération des données. Réessayez plus tard", "xpack.observability.serviceGroupMaxServicesUiSettingDescription": "Limiter le nombre de services dans un groupe de services donné", "xpack.observability.serviceGroupMaxServicesUiSettingName": "Nombre maximum de services dans un groupe de services", - "xpack.observability.slo.alerting.alertDetailsUrlDescription": "Lien vers l’affichage de résolution des problèmes d’alerte pour voir plus de contextes et de détails. La chaîne sera vide si server.publicBaseUrl n'est pas configuré.", - "xpack.observability.slo.alerting.burnRate.alertAction": "Critique", - "xpack.observability.slo.alerting.burnRate.highPriorityAction": "Élevé", - "xpack.observability.slo.alerting.burnRate.lowPriorityAction": "Bas", - "xpack.observability.slo.alerting.burnRate.mediumPriorityAction": "Moyenne", - "xpack.observability.slo.alerting.reasonDescription": "Une description concise de la raison du signalement", - "xpack.observability.slo.alerting.sloIdDescription": "Identificateur unique du SLO.", - "xpack.observability.slo.alerting.sloInstanceIdDescription": "ID d'instance du SLO.", - "xpack.observability.slo.alerting.sloNameDescription": "Nom SLO.", - "xpack.observability.slo.alerting.thresholdDescription": "Valeur de seuil du taux d'avancement.", - "xpack.observability.slo.alerting.timestampDescription": "Horodatage du moment où l'alerte a été détectée.", - "xpack.observability.slo.alerting.viewInAppUrlDescription": "L'URL de la page de détails du SLO pour effectuer une enquête plus approfondie.", - "xpack.observability.slo.alerting.windowDescription": "Durée de fenêtre avec la valeur du taux d'avancement associée.", - "xpack.observability.slo.budgetingMethod.occurrences": "Occurrences", - "xpack.observability.slo.budgetingMethod.timeslices": "Intervalles de temps", - "xpack.observability.slo.burnRate.breachedStatustTitle": "Valeur critique dépassée", - "xpack.observability.slo.burnRate.noDataStatusSubtitle": "En attente de plus de données.", - "xpack.observability.slo.burnRate.noDataStatusTitle": "Aucune valeur", - "xpack.observability.slo.burnRate.okStatusSubtitle": "Aucun risque d'épuisement du budget d'erreurs.", - "xpack.observability.slo.burnRate.okStatusTitle": "Valeur acceptable", - "xpack.observability.slo.burnRate.technicalPreviewBadgeDescription": "Cette fonctionnalité est en préversion technique et est susceptible d’être changée, ou elle peut-être supprimée dans les versions futures. La conception et le code sont moins matures que les fonctionnalités officielles en disponibilité générale et sont fournis tels quels sans aucune garantie. Les fonctionnalités de la version d’évaluation technique ne sont pas soumises à l'accord de niveau de service des fonctionnalités officielles en disponibilité générale.", - "xpack.observability.slo.burnRate.technicalPreviewBadgeTitle": "Version d'évaluation technique", - "xpack.observability.slo.burnRate.timeRangeBtnLegend": "Sélectionner la plage temporelle", - "xpack.observability.slo.burnRate.title": "Taux d'avancement", - "xpack.observability.slo.deleteConfirmationModal.cancelButtonLabel": "Annuler", - "xpack.observability.slo.deleteConfirmationModal.deleteButtonLabel": "Supprimer", - "xpack.observability.slo.deleteConfirmationModal.descriptionText": "Vous ne pouvez pas récupérer ce SLO après l'avoir supprimé.", - "xpack.observability.slo.duration.daily": "Quotidien", - "xpack.observability.slo.duration.hourly": "Par heure", - "xpack.observability.slo.duration.minutely": "Par minute", - "xpack.observability.slo.duration.monthly": "Mensuel", - "xpack.observability.slo.duration.weekly": "Hebdomadaire", - "xpack.observability.slo.globalDiagnosis.errorNotification": "Vous ne disposez pas des autorisations nécessaires pour utiliser cette fonctionnalité.", - "xpack.observability.slo.indicators.apmAvailability": "Disponibilité APM", - "xpack.observability.slo.indicators.apmLatency": "Latence APM", - "xpack.observability.slo.indicators.customKql": "KQL personnalisé", - "xpack.observability.slo.indicators.customMetric": "Indicateur personnalisé", - "xpack.observability.slo.indicators.histogram": "Indicateur d'histogramme", - "xpack.observability.slo.item.actions.button": "Actions", - "xpack.observability.slo.item.actions.clone": "Cloner", - "xpack.observability.slo.item.actions.createRule": "Créer une règle d'alerte", - "xpack.observability.slo.item.actions.delete": "Supprimer", - "xpack.observability.slo.item.actions.details": "Détails", - "xpack.observability.slo.item.actions.edit": "Modifier", - "xpack.observability.slo.item.actions.manageRules": "Gérer les règles", - "xpack.observability.slo.list.emptyMessage": "Il n'existe aucun résultat pour vos critères.", - "xpack.observability.slo.list.emptyTitle": "Aucun résultat", - "xpack.observability.slo.list.errorMessage": "Une erreur s'est produite lors du chargement des SLO. Contactez votre administrateur pour obtenir de l'aide.", - "xpack.observability.slo.list.errorNotification": "Un problème est survenu lors de la récupération des SLO", - "xpack.observability.slo.list.errorTitle": "Impossible de charger les SLO", - "xpack.observability.slo.list.search": "Interroger vos SLO...", - "xpack.observability.slo.list.sortBy.errorBudgetConsumed": "Budget d'erreur consommé", - "xpack.observability.slo.list.sortBy.errorBudgetRemaining": "Budget d'erreur restant", - "xpack.observability.slo.list.sortBy.sliValue": "Valeur SLI", - "xpack.observability.slo.list.sortBy.sloStatus": "Statut SLO", - "xpack.observability.slo.rules.actionGroupSelectorLabel": "Groupe d’action", - "xpack.observability.slo.rules.addWindowAriaLabel": "Ajouter une fenêtre", - "xpack.observability.slo.rules.addWIndowLabel": "Ajouter une fenêtre", - "xpack.observability.slo.rules.burnRate.defaultActionMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} est actif selon les conditions suivantes :\n\n- SLO : \\{\\{context.sloName\\}\\}'\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.longWindow.duration\\}\\} est de \\{\\{context.longWindow.burnRate\\}\\}\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.shortWindow.duration\\}\\} est de \\{\\{context.shortWindow.burnRate\\}\\}\n- Seuil : \\{\\{context.burnRateThreshold\\}\\}\n\n[Voir les détails de l’alerte](\\{\\{context.alertDetailsUrl\\}\\})\n", - "xpack.observability.slo.rules.burnRate.defaultRecoveryMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} a récupéré.\n\n- SLO : \\{\\{context.sloName\\}\\}'\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.longWindow.duration\\}\\} est de \\{\\{context.longWindow.burnRate\\}\\}\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.shortWindow.duration\\}\\} est de \\{\\{context.shortWindow.burnRate\\}\\}\n- Seuil : \\{\\{context.burnRateThreshold\\}\\}\n\n[Voir les détails de l’alerte](\\{\\{context.alertDetailsUrl\\}\\})\n", - "xpack.observability.slo.rules.burnRate.description": "Alerte lorsque votre taux d'avancement SLO est trop élevé sur une période définie.", - "xpack.observability.slo.rules.burnRate.errors.burnRateThresholdRequired": "Le seuil de taux d'avancement est requis.", - "xpack.observability.slo.rules.burnRate.errors.sloRequired": "Le SLO est requis.", - "xpack.observability.slo.rules.burnRate.errors.windowDurationRequired": "La période historique est requise.", - "xpack.observability.slo.rules.burnRate.name": "Taux d'avancement SLO", - "xpack.observability.slo.rules.burnRate.rowLabel": "Seuil du taux d'avancement", - "xpack.observability.slo.rules.burnRate.tooltip": "Le taux d'avancement correspond à la vitesse à laquelle le service consomme le budget d'erreur au cours de la période historique.", - "xpack.observability.slo.rules.deleteWindowLabel": "Effacer la fenêtre", - "xpack.observability.slo.rules.longWindow.errorText": "La période historique doit être comprise entre 1 et 72 heures.", - "xpack.observability.slo.rules.longWindow.rowLabel": "Historique (heures)", - "xpack.observability.slo.rules.longWindow.valueLabel": "Période historique en heures", - "xpack.observability.slo.rules.sloSelector.ariaLabel": "SLO", - "xpack.observability.slo.rules.sloSelector.placeholder": "Sélectionner un SLO", - "xpack.observability.slo.rules.sloSelector.rowLabel": "SLO", - "xpack.observability.slo.slo.activeAlertsBadge.ariaLabel": "badge alertes actives", - "xpack.observability.slo.slo.item.actions.clone": "Cloner", - "xpack.observability.slo.slo.item.actions.delete": "Supprimer", - "xpack.observability.slo.slo.rulesBadge.popover": "Il n'y a pas encore de règles configurées pour ce SLO. Vous ne recevrez pas d'alertes lorsque le SLO est dépassé.", - "xpack.observability.slo.slo.stats.budgetRemaining": "Budget restant", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.chartTitle": "Budget d'erreur restant", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.remaining": "Restant", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.title": "Utilisation du budget d'erreur", - "xpack.observability.slo.sloDetails.headerControl.actions": "Actions", - "xpack.observability.slo.sloDetails.headerControl.createBurnRateRule": "Créer une règle d'alerte", - "xpack.observability.slo.sloDetails.headerControl.edit": "Modifier", - "xpack.observability.slo.sloDetails.headerControl.manageRules": "Gérer les règles", - "xpack.observability.slo.sloDetails.headerTitle.createdMessage": "Créé le", - "xpack.observability.slo.sloDetails.headerTitle.lastUpdatedMessage": "Dernière mise à jour le", - "xpack.observability.slo.sloDetails.overview.apmSource": "Source APM", - "xpack.observability.slo.sloDetails.overview.budgetingMethodTitle": "Méthode de budgétisation", - "xpack.observability.slo.sloDetails.overview.descriptionTitle": "Description", - "xpack.observability.slo.sloDetails.overview.indicatorTypeTitle": "Type d’indicateur", - "xpack.observability.slo.sloDetails.overview.observedValueTitle": "Valeur observée", - "xpack.observability.slo.sloDetails.overview.tagsTitle": "Balises", - "xpack.observability.slo.sloDetails.overview.timeWindowTitle": "Fenêtre temporelle", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.chartTitle": "Valeur SLI", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.current": "Valeur observée", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.objective": "Objectif", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.title": "SLI historique", - "xpack.observability.slo.sloDetails.tab.alertsLabel": "Alertes", - "xpack.observability.slo.sloDetails.tab.overviewLabel": "Aperçu", - "xpack.observability.slo.sloEdit.apm.filter.tooltip": "Cette requête KQL est utilisée pour filtrer les indicateurs APM sur certains critères pertinents pour ce SLO.", - "xpack.observability.slo.sloEdit.apm.serviceName.tooltip": "Il s'agit du service APM monitoré par ce SLO.", - "xpack.observability.slo.sloEdit.apmAvailability.serviceEnvironment": "Environnement de service", - "xpack.observability.slo.sloEdit.apmAvailability.serviceEnvironment.placeholder": "Sélectionner l'environnement", - "xpack.observability.slo.sloEdit.apmAvailability.serviceName": "Nom de service", - "xpack.observability.slo.sloEdit.apmAvailability.serviceName.placeholder": "Sélectionner le service APM", - "xpack.observability.slo.sloEdit.apmAvailability.transactionName": "Nom de la transaction", - "xpack.observability.slo.sloEdit.apmAvailability.transactionName.placeholder": "Sélectionner le nom de la transaction", - "xpack.observability.slo.sloEdit.apmAvailability.transactionType": "Type de transaction", - "xpack.observability.slo.sloEdit.apmAvailability.transactionType.placeholder": "Sélectionner le type de la transaction", - "xpack.observability.slo.sloEdit.apmLatency.filter": "Filtre de requête", - "xpack.observability.slo.sloEdit.apmLatency.filter.placeholder": "Filtre personnalisé à appliquer à l'index", - "xpack.observability.slo.sloEdit.apmLatency.serviceEnvironment": "Environnement de service", - "xpack.observability.slo.sloEdit.apmLatency.serviceEnvironment.placeholder": "Sélectionner l'environnement", - "xpack.observability.slo.sloEdit.apmLatency.serviceName": "Nom de service", - "xpack.observability.slo.sloEdit.apmLatency.serviceName.placeholder": "Sélectionner le service APM", - "xpack.observability.slo.sloEdit.apmLatency.threshold.placeholder": "Seuil (ms)", - "xpack.observability.slo.sloEdit.apmLatency.threshold.tooltip": "Configurez le seuil en millisecondes définissant les \"bonnes\" requêtes ou les requêtes \"réussies\" pour le SLO.", - "xpack.observability.slo.sloEdit.apmLatency.transactionName": "Nom de la transaction", - "xpack.observability.slo.sloEdit.apmLatency.transactionName.placeholder": "Sélectionner le nom de la transaction", - "xpack.observability.slo.sloEdit.apmLatency.transactionType": "Type de transaction", - "xpack.observability.slo.sloEdit.apmLatency.transactionType.placeholder": "Sélectionner le type de la transaction", - "xpack.observability.slo.sloEdit.budgetingMethod.label": "Méthode de budgétisation", - "xpack.observability.slo.sloEdit.budgetingMethod.tooltip": "Le SLO basé sur les occurrences utilise le rapport entre les bons événements et le nombre total d'événements au cours de la fenêtre temporelle. Le SLO basé sur les intervalles de temps utilise le rapport entre les bons intervalles de temps et le nombre total d'intervalles de temps au cours de la fenêtre temporelle.", - "xpack.observability.slo.sloEdit.calendarTimeWindow.monthly": "Mensuel", - "xpack.observability.slo.sloEdit.calendarTimeWindow.weekly": "Hebdomadaire", - "xpack.observability.slo.sloEdit.cancelButton": "Annuler", - "xpack.observability.slo.sloEdit.createSloButton": "Créer un SLO", - "xpack.observability.slo.sloEdit.customKql.indexSelection.label": "Index", - "xpack.observability.slo.sloEdit.dataPreviewChart.errorMessage": "Les paramètres d'indicateur actuels ne sont pas valides", - "xpack.observability.slo.sloEdit.dataPreviewChart.explanationMessage": "Remplir les champs d'indicateur pour visualiser les indicateurs actuels", - "xpack.observability.slo.sloEdit.dataPreviewChart.panelLabel": "Aperçu du SLI", - "xpack.observability.slo.sloEdit.dataPreviewChart.xTitle": "Dernière heure", - "xpack.observability.slo.sloEdit.dataPreviewChart.yTitle": "SLI", - "xpack.observability.slo.sloEdit.definition.sliType": "Choisir le type de SLI", - "xpack.observability.slo.sloEdit.definition.title": "Définir un SLI", - "xpack.observability.slo.sloEdit.description.sloDescription": "Description", - "xpack.observability.slo.sloEdit.description.sloDescriptionPlaceholder": "Brève description du SLO", - "xpack.observability.slo.sloEdit.description.sloName": "Nom SLO", - "xpack.observability.slo.sloEdit.description.sloNamePlaceholder": "Nom du SLO", - "xpack.observability.slo.sloEdit.description.title": "Décrire le SLO", - "xpack.observability.slo.sloEdit.editSloButton": "Mettre à jour le SLO", - "xpack.observability.slo.sloEdit.fieldSelector.all": "Tous", - "xpack.observability.slo.sloEdit.groupBy.label": "Partition conditionnée", - "xpack.observability.slo.sloEdit.groupBy.placeholder": "Sélectionner un champ facultatif selon lequel effectuer la partition", - "xpack.observability.slo.sloEdit.groupBy.tooltip": "Créer des SLO individuels pour chaque valeur du champ sélectionné.", - "xpack.observability.slo.sloEdit.objectives.title": "Définir des objectifs", - "xpack.observability.slo.sloEdit.sliType.customKql.customFilter": "Filtre personnalisé à appliquer à l'index", - "xpack.observability.slo.sloEdit.sliType.customKql.customFilter.tooltip": "Cette requête KQL peut être utilisée pour filtrer les documents avec certains critères pertinents.", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQuery": "Bonne question", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQuery.tooltip": "Cette requête KQL doit renvoyer un sous-ensemble d'événements considérés comme \"bons\" ou \"réussis\" aux fins du calcul du SLO. La requête doit filtrer les événements en fonction de certains critères pertinents, tels que les codes de statut, les messages d'erreur ou d'autres champs pertinents.", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQueryPlaceholder": "Définir les bons événements", - "xpack.observability.slo.sloEdit.sliType.customKql.queryFilter": "Filtre de requête", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQuery": "Total de la requête", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQuery.tooltip": "Cette requête KQL doit renvoyer tous les événements pertinents pour le calcul du SLO, y compris les bons et les mauvais événements.", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQueryPlaceholder": "Définir le total d'événements", - "xpack.observability.slo.sloEdit.sliType.customMetric.addMetricAriaLabel": "Ajouter un indicateur", - "xpack.observability.slo.sloEdit.sliType.customMetric.addMetricLabel": "Ajouter un indicateur", - "xpack.observability.slo.sloEdit.sliType.customMetric.customFilter": "Filtre personnalisé à appliquer à l'index", - "xpack.observability.slo.sloEdit.sliType.customMetric.customFilter.tooltip": "Cette requête KQL peut être utilisée pour filtrer les documents avec certains critères pertinents.", - "xpack.observability.slo.sloEdit.sliType.customMetric.deleteLabel": "Supprimer un indicateur", - "xpack.observability.slo.sloEdit.sliType.customMetric.equation.invalidCharacters": "Le champ d'équation prend en charge uniquement les caractères suivants : A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =", - "xpack.observability.slo.sloEdit.sliType.customMetric.equationHelpText": "Accepte les équations mathématiques de base, les caractères valides sont : A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =", - "xpack.observability.slo.sloEdit.sliType.customMetric.equationLabel": "Équation", - "xpack.observability.slo.sloEdit.sliType.customMetric.filterLabel": "Filtre", - "xpack.observability.slo.sloEdit.sliType.customMetric.goodTitle": "Bons événements", - "xpack.observability.slo.sloEdit.sliType.customMetric.metricField.placeholder": "Sélectionner un champ d’indicateur", - "xpack.observability.slo.sloEdit.sliType.customMetric.metricLabel": "Indicateur", - "xpack.observability.slo.sloEdit.sliType.customMetric.queryFilter": "Filtre de requête", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalEquation.tooltip": "Ceci est compatible avec des calculs de base (A + B / C) et la logique booléenne (A < B ? A : B).", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalMetric.tooltip": "Les données de ce champ seront agrégées avec l’agréation de \"somme\".", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalTitle": "Total des événements", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregation.placeholder": "Choisir une agrégation", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregationLabel": "Agrégation", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregationTooltip": "L'agrégation \"value count\" (nombre de valeurs) renvoie le nombre total pour le champ d'histogramme. \"Range\" (plage) renvoie le nombre tiré du champ d'histogramme compris dans la plage définie ci-dessous.", - "xpack.observability.slo.sloEdit.sliType.histogram.customFilter": "Filtre personnalisé à appliquer à l'index", - "xpack.observability.slo.sloEdit.sliType.histogram.customFilter.tooltip": "Cette requête KQL peut être utilisée pour filtrer les documents avec certains critères pertinents.", - "xpack.observability.slo.sloEdit.sliType.histogram.fromLabel": "De", - "xpack.observability.slo.sloEdit.sliType.histogram.fromTooltip": "La valeur \"from\" (de) est inclusive.", - "xpack.observability.slo.sloEdit.sliType.histogram.goodTitle": "Bons événements", - "xpack.observability.slo.sloEdit.sliType.histogram.kqlFilterLabel": "Filtre KQL", - "xpack.observability.slo.sloEdit.sliType.histogram.metricField.placeholder": "Sélectionner un champ d'histogramme", - "xpack.observability.slo.sloEdit.sliType.histogram.metricLabel": "Champ", - "xpack.observability.slo.sloEdit.sliType.histogram.query.tooltip": "Cette requête KQL doit renvoyer un sous-ensemble d'événements pour cet indicateur.", - "xpack.observability.slo.sloEdit.sliType.histogram.queryFilter": "Filtre de requête", - "xpack.observability.slo.sloEdit.sliType.histogram.rangeLabel": "Plage", - "xpack.observability.slo.sloEdit.sliType.histogram.sourceTitle": "Source", - "xpack.observability.slo.sloEdit.sliType.histogram.toLabel": "À", - "xpack.observability.slo.sloEdit.sliType.histogram.totalTitle": "Total des événements", - "xpack.observability.slo.sloEdit.sliType.histogram.toTooltip": "La valeur \"to\" (à) n'est PAS inclusive.", - "xpack.observability.slo.sloEdit.sliType.histogram.valueCountLabel": "Compte de valeurs", - "xpack.observability.slo.sloEdit.tags.label": "Balises", - "xpack.observability.slo.sloEdit.tags.placeholder": "Ajouter des balises", - "xpack.observability.slo.sloEdit.targetSlo.label": "Cible/SLO (%)", - "xpack.observability.slo.sloEdit.targetSlo.tooltip": "L'objectif cible en pourcentage pour le SLO.", - "xpack.observability.slo.sloEdit.timeSliceTarget.label": "Cible d'intervalle de temps (%)", - "xpack.observability.slo.sloEdit.timeSliceTarget.tooltip": "La cible d'intervalle de temps individuel utilisée pour déterminer si l'intervalle est bon ou mauvais.", - "xpack.observability.slo.sloEdit.timesliceWindow.label": "Fenêtre d'intervalle de temps (en minutes)", - "xpack.observability.slo.sloEdit.timesliceWindow.tooltip": "La taille de la fenêtre d'intervalle de temps utilisée pour évaluer les données.", - "xpack.observability.slo.sloEdit.timestampField.label": "Champ d'horodatage", - "xpack.observability.slo.sloEdit.timestampField.placeholder": "Sélectionner un champ d'horodatage", - "xpack.observability.slo.sloEdit.timeWindow.calendarAligned": "Alignée sur le calendrier", - "xpack.observability.slo.sloEdit.timeWindow.rolling": "Glissante", - "xpack.observability.slo.sloEdit.timeWindowDuration.label": "Durée", - "xpack.observability.slo.sloEdit.timeWindowDuration.tooltip": "La durée de la fenêtre temporelle utilisée pour calculer le SLO.", - "xpack.observability.slo.sloEdit.timeWindowType.label": "Fenêtre temporelle", - "xpack.observability.slo.sloEdit.timeWindowType.tooltip": "Choisissez entre une fenêtre glissante ou alignée sur le calendrier.", - "xpack.observability.slo.sloList.welcomePrompt.buttonLabel": "Créer un SLO", - "xpack.observability.slo.sloList.welcomePrompt.getStartedMessage": "Pour commencer, créez votre premier SLO.", - "xpack.observability.slo.sloList.welcomePrompt.learnMore": "Envie d'en savoir plus ?", - "xpack.observability.slo.sloList.welcomePrompt.learnMoreLink": "Lisez les documents", - "xpack.observability.slo.sloList.welcomePrompt.messageParagraph1": "Mesurez les indicateurs clés importants pour l'entreprise, tels que les indicateurs et les objectifs de niveau de service (SLI/SLO), afin de respecter les SLA établis.", - "xpack.observability.slo.sloList.welcomePrompt.messageParagraph2": "Communiquez facilement sur la disponibilité et la fiabilité de vos services grâce à des informations en temps réel, et ce, pour la plus grande satisfaction des différents intervenants.", - "xpack.observability.slo.sloList.welcomePrompt.needLicenseMessage": "Vous avez besoin d'un abonnement Elastic Cloud ou d'une licence Platinum pour utiliser les SLO.", - "xpack.observability.slo.sloList.welcomePrompt.signupForCloud": "S'inscrire à Elastic Cloud", - "xpack.observability.slo.sloList.welcomePrompt.signupForLicense": "S'inscrire pour une licence", - "xpack.observability.slo.sloList.welcomePrompt.title": "Surveiller et respecter vos SLO", - "xpack.observability.slo.sloStatusBadge.degrading": "Dégradation", - "xpack.observability.slo.sloStatusBadge.forecasted": "Prévu", - "xpack.observability.slo.sloStatusBadge.healthy": "Intègre", - "xpack.observability.slo.sloStatusBadge.noData": "Aucune donnée", - "xpack.observability.slo.sloStatusBadge.noDataTooltip": "L'agrégation et la mise à disposition des données peut prendre un peu de temps.", - "xpack.observability.slo.sloStatusBadge.violated": "Violation", - "xpack.observability.sloCreatePageTitle": "Créer un nouveau SLO", - "xpack.observability.sloEditPageTitle": "Modifier le SLO", - "xpack.observability.sloEmbeddable.config.cancelButtonLabel": "Annuler", - "xpack.observability.sloEmbeddable.config.errors.sloRequired": "Le SLO est requis.", - "xpack.observability.sloEmbeddable.config.sloSelector.ariaLabel": "SLO", - "xpack.observability.sloEmbeddable.config.sloSelector.headerTitle": "Configuration du SLO", - "xpack.observability.sloEmbeddable.config.sloSelector.placeholder": "Sélectionner un SLO", - "xpack.observability.sloEmbeddable.description": "Obtenir un aperçu de l'intégrité de votre SLO", - "xpack.observability.sloEmbeddable.displayName": "Aperçu du SLO", - "xpack.observability.sloEmbeddable.displayTitle": "Aperçu du SLO", - "xpack.observability.sloEmbeddable.overview.sloNotFoundText": "Le SLO a été supprimé. Vous pouvez supprimer sans risque le widget du tableau de bord.", - "xpack.observability.slos.sloDetails.headerControl.exploreInApm": "Détails du service", - "xpack.observability.slosLinkTitle": "SLO", - "xpack.observability.slosPage.autoRefreshButtonLabel": "Actualisation automatique", - "xpack.observability.slosPage.stopRefreshingButtonLabel": "Arrêter l'actualisation", - "xpack.observability.slosPageTitle": "SLO", "xpack.observability.status.dataAvailable": "Des données sont disponibles.", "xpack.observability.status.dataAvailableTitle": "Données disponibles pour", "xpack.observability.status.learnMoreButton": "En savoir plus", @@ -28872,6 +28591,260 @@ "xpack.observability.ux.dashboard.webCoreVitals.help": "Découvrez", "xpack.observability.ux.dashboard.webCoreVitals.helpAriaLabel": "aide", "xpack.observability.ux.service.help": "Le service RUM comportant le plus de trafic est sélectionné", + "xpack.slo.alerting.burnRate.reason": "{actionGroupName} : Le taux d'avancement pour le (les) dernier(s) {longWindowDuration} est de {longWindowBurnRate} et pour le (les) dernier(s) {shortWindowDuration} est de {shortWindowBurnRate}. Alerter si supérieur à {burnRateThreshold} pour les deux fenêtres", + "xpack.slo.alerting.burnRate.reasonForInstanceId": "{actionGroupName} : Le taux d'avancement pour le (les) dernier(s) {longWindowDuration} est de {longWindowBurnRate} et pour le (les) dernier(s) {shortWindowDuration} est de {shortWindowBurnRate} pour {instanceId}. Alerter si supérieur à {burnRateThreshold} pour les deux fenêtres", + "xpack.slo.burnRate.breachedStatustSubtitle": "Au rythme actuel, le budget d'erreur sera épuisé en {hour} heures.", + "xpack.slo.burnRate.threshold": "Le seuil est {threshold}x", + "xpack.slo.create.errorNotification": "Un problème est survenu lors de la création de {name}", + "xpack.slo.deleteConfirmationModal.title": "Supprimer {name} ?", + "xpack.slo.duration.day": "{duration, plural, one {1 jour} many {# jours} other {# jours}}", + "xpack.slo.duration.hour": "{duration, plural, one {1 heure} many {# heures} other {# heures}}", + "xpack.slo.duration.minute": "{duration, plural, one {1 minute} many {# minutes} other {# minutes}}", + "xpack.slo.duration.month": "{duration, plural, one {1 mois} many {# mois} other {# mois}}", + "xpack.slo.duration.week": "{duration, plural, one {1 semaine} many {# semaines} other {# prochaines semaines}}", + "xpack.slo.indicatorTypeBadge.exploreInApm": "Afficher les détails de {service}", + "xpack.slo.rules.burnRate.errors.invalidThresholdValue": "Le seuil du taux d'avancement doit être compris entre 1 et {maxBurnRate}.", + "xpack.slo.rules.groupByMessage": "Le SLO que vous avez sélectionné a été créé avec une partition sur \"{groupByField}\". Cette règle surveille et génère une alerte pour chaque instance trouvée dans le champ de partition.", + "xpack.slo.rules.longWindowDuration.tooltip": "Période historique sur laquelle le taux d'avancement est calculé. Une période historique plus courte de {shortWindowDuration} minutes (1/12 de la période historique) sera utilisée pour une récupération plus rapide", + "xpack.slo.slo.activeAlertsBadge.label": "{count, plural, one {# alerte} many {# alertes} other {Alertes #}}", + "xpack.slo.slo.delete.errorNotification": "Impossible de supprimer {name}", + "xpack.slo.slo.delete.successNotification": "{name} supprimé", + "xpack.slo.slo.timeWindow.calendar": "{elapsed}/{total} jours", + "xpack.slo.sloDetails.errorBudgetChartPanel.duration": "{duration}", + "xpack.slo.sloDetails.overview.apmSource.environmentLabel": "environnement : {value}", + "xpack.slo.sloDetails.overview.apmSource.serviceLabel": "service : {value}", + "xpack.slo.sloDetails.overview.apmSource.transactionNameLabel": "nom de transaction : {value}", + "xpack.slo.sloDetails.overview.apmSource.transactionTypeLabel": "type de transaction : {value}", + "xpack.slo.sloDetails.overview.calendarAlignedTimeWindow": "calendrier {duration} aligné", + "xpack.slo.sloDetails.overview.observedValueSubtitle": "{value} (l'objectif est {objective})", + "xpack.slo.sloDetails.overview.rollingTimeWindow": "{duration} en cours", + "xpack.slo.sloDetails.overview.timeslicesBudgetingMethodDetails": "{duration} sections, {target} cible", + "xpack.slo.sloDetails.sliHistoryChartPanel.duration": "{duration}", + "xpack.slo.sloEdit.rollingTimeWindow.days": "{number} jours", + "xpack.slo.update.errorNotification": "Un problème est survenu lors de la mise à jour de {name}", + "xpack.slo.update.successNotification": "Mise à jour réussie de {name}", + "xpack.slo.alerting.alertDetailsUrlDescription": "Lien vers l’affichage de résolution des problèmes d’alerte pour voir plus de contextes et de détails. La chaîne sera vide si server.publicBaseUrl n'est pas configuré.", + "xpack.slo.alerting.burnRate.alertAction": "Critique", + "xpack.slo.alerting.burnRate.highPriorityAction": "Élevé", + "xpack.slo.alerting.burnRate.lowPriorityAction": "Bas", + "xpack.slo.alerting.burnRate.mediumPriorityAction": "Moyenne", + "xpack.slo.alerting.reasonDescription": "Une description concise de la raison du signalement", + "xpack.slo.alerting.sloIdDescription": "Identificateur unique du SLO.", + "xpack.slo.alerting.sloInstanceIdDescription": "ID d'instance du SLO.", + "xpack.slo.alerting.sloNameDescription": "Nom SLO.", + "xpack.slo.alerting.thresholdDescription": "Valeur de seuil du taux d'avancement.", + "xpack.slo.alerting.timestampDescription": "Horodatage du moment où l'alerte a été détectée.", + "xpack.slo.alerting.viewInAppUrlDescription": "L'URL de la page de détails du SLO pour effectuer une enquête plus approfondie.", + "xpack.slo.alerting.windowDescription": "Durée de fenêtre avec la valeur du taux d'avancement associée.", + "xpack.slo.budgetingMethod.occurrences": "Occurrences", + "xpack.slo.budgetingMethod.timeslices": "Intervalles de temps", + "xpack.slo.burnRate.breachedStatustTitle": "Valeur critique dépassée", + "xpack.slo.burnRate.noDataStatusSubtitle": "En attente de plus de données.", + "xpack.slo.burnRate.noDataStatusTitle": "Aucune valeur", + "xpack.slo.burnRate.okStatusSubtitle": "Aucun risque d'épuisement du budget d'erreurs.", + "xpack.slo.burnRate.okStatusTitle": "Valeur acceptable", + "xpack.slo.burnRate.technicalPreviewBadgeDescription": "Cette fonctionnalité est en préversion technique et est susceptible d’être changée, ou elle peut-être supprimée dans les versions futures. La conception et le code sont moins matures que les fonctionnalités officielles en disponibilité générale et sont fournis tels quels sans aucune garantie. Les fonctionnalités de la version d’évaluation technique ne sont pas soumises à l'accord de niveau de service des fonctionnalités officielles en disponibilité générale.", + "xpack.slo.burnRate.technicalPreviewBadgeTitle": "Version d'évaluation technique", + "xpack.slo.burnRate.timeRangeBtnLegend": "Sélectionner la plage temporelle", + "xpack.slo.burnRate.title": "Taux d'avancement", + "xpack.slo.deleteConfirmationModal.cancelButtonLabel": "Annuler", + "xpack.slo.deleteConfirmationModal.deleteButtonLabel": "Supprimer", + "xpack.slo.deleteConfirmationModal.descriptionText": "Vous ne pouvez pas récupérer ce SLO après l'avoir supprimé.", + "xpack.slo.duration.daily": "Quotidien", + "xpack.slo.duration.hourly": "Par heure", + "xpack.slo.duration.minutely": "Par minute", + "xpack.slo.duration.monthly": "Mensuel", + "xpack.slo.duration.weekly": "Hebdomadaire", + "xpack.slo.globalDiagnosis.errorNotification": "Vous ne disposez pas des autorisations nécessaires pour utiliser cette fonctionnalité.", + "xpack.slo.indicators.apmAvailability": "Disponibilité APM", + "xpack.slo.indicators.apmLatency": "Latence APM", + "xpack.slo.indicators.customKql": "KQL personnalisé", + "xpack.slo.indicators.customMetric": "Indicateur personnalisé", + "xpack.slo.indicators.histogram": "Indicateur d'histogramme", + "xpack.slo.item.actions.button": "Actions", + "xpack.slo.item.actions.clone": "Cloner", + "xpack.slo.item.actions.createRule": "Créer une règle d'alerte", + "xpack.slo.item.actions.delete": "Supprimer", + "xpack.slo.item.actions.details": "Détails", + "xpack.slo.item.actions.edit": "Modifier", + "xpack.slo.item.actions.manageRules": "Gérer les règles", + "xpack.slo.list.emptyMessage": "Il n'existe aucun résultat pour vos critères.", + "xpack.slo.list.emptyTitle": "Aucun résultat", + "xpack.slo.list.errorMessage": "Une erreur s'est produite lors du chargement des SLO. Contactez votre administrateur pour obtenir de l'aide.", + "xpack.slo.list.errorNotification": "Un problème est survenu lors de la récupération des SLO", + "xpack.slo.list.errorTitle": "Impossible de charger les SLO", + "xpack.slo.list.search": "Interroger vos SLO...", + "xpack.slo.list.sortBy.errorBudgetConsumed": "Budget d'erreur consommé", + "xpack.slo.list.sortBy.errorBudgetRemaining": "Budget d'erreur restant", + "xpack.slo.list.sortBy.sliValue": "Valeur SLI", + "xpack.slo.list.sortBy.sloStatus": "Statut SLO", + "xpack.slo.rules.actionGroupSelectorLabel": "Groupe d’action", + "xpack.slo.rules.addWindowAriaLabel": "Ajouter une fenêtre", + "xpack.slo.rules.burnRate.defaultActionMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} est actif selon les conditions suivantes :\n\n- SLO : \\{\\{context.sloName\\}\\}'\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.longWindow.duration\\}\\} est de \\{\\{context.longWindow.burnRate\\}\\}\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.shortWindow.duration\\}\\} est de \\{\\{context.shortWindow.burnRate\\}\\}\n- Seuil : \\{\\{context.burnRateThreshold\\}\\}\n\n[Voir les détails de l’alerte](\\{\\{context.alertDetailsUrl\\}\\})\n", + "xpack.slo.rules.burnRate.defaultRecoveryMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} a récupéré.\n\n- SLO : \\{\\{context.sloName\\}\\}'\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.longWindow.duration\\}\\} est de \\{\\{context.longWindow.burnRate\\}\\}\n- Le taux d'avancement lors des derniers/dernières \\{\\{context.shortWindow.duration\\}\\} est de \\{\\{context.shortWindow.burnRate\\}\\}\n- Seuil : \\{\\{context.burnRateThreshold\\}\\}\n\n[Voir les détails de l’alerte](\\{\\{context.alertDetailsUrl\\}\\})\n", + "xpack.slo.rules.burnRate.description": "Alerte lorsque votre taux d'avancement SLO est trop élevé sur une période définie.", + "xpack.slo.rules.burnRate.errors.burnRateThresholdRequired": "Le seuil de taux d'avancement est requis.", + "xpack.slo.rules.burnRate.errors.sloRequired": "Le SLO est requis.", + "xpack.slo.rules.burnRate.errors.windowDurationRequired": "La période historique est requise.", + "xpack.slo.rules.burnRate.name": "Taux d'avancement SLO", + "xpack.slo.rules.burnRate.rowLabel": "Seuil du taux d'avancement", + "xpack.slo.rules.burnRate.tooltip": "Le taux d'avancement correspond à la vitesse à laquelle le service consomme le budget d'erreur au cours de la période historique.", + "xpack.slo.rules.deleteWindowLabel": "Effacer la fenêtre", + "xpack.slo.rules.longWindow.errorText": "La période historique doit être comprise entre 1 et 72 heures.", + "xpack.slo.rules.longWindow.rowLabel": "Historique (heures)", + "xpack.slo.rules.longWindow.valueLabel": "Période historique en heures", + "xpack.slo.rules.sloSelector.ariaLabel": "SLO", + "xpack.slo.rules.sloSelector.placeholder": "Sélectionner un SLO", + "xpack.slo.rules.sloSelector.rowLabel": "SLO", + "xpack.slo.slo.activeAlertsBadge.ariaLabel": "badge alertes actives", + "xpack.slo.slo.item.actions.clone": "Cloner", + "xpack.slo.slo.item.actions.delete": "Supprimer", + "xpack.slo.slo.rulesBadge.popover": "Il n'y a pas encore de règles configurées pour ce SLO. Vous ne recevrez pas d'alertes lorsque le SLO est dépassé.", + "xpack.slo.sloDetails.errorBudgetChartPanel.chartTitle": "Budget d'erreur restant", + "xpack.slo.sloDetails.errorBudgetChartPanel.remaining": "Restant", + "xpack.slo.sloDetails.errorBudgetChartPanel.title": "Utilisation du budget d'erreur", + "xpack.slo.sloDetails.headerControl.actions": "Actions", + "xpack.slo.sloDetails.headerControl.createBurnRateRule": "Créer une règle d'alerte", + "xpack.slo.sloDetails.headerControl.edit": "Modifier", + "xpack.slo.sloDetails.headerControl.manageRules": "Gérer les règles", + "xpack.slo.sloDetails.headerTitle.createdMessage": "Créé le", + "xpack.slo.sloDetails.headerTitle.lastUpdatedMessage": "Dernière mise à jour le", + "xpack.slo.sloDetails.overview.apmSource": "Source APM", + "xpack.slo.sloDetails.overview.budgetingMethodTitle": "Méthode de budgétisation", + "xpack.slo.sloDetails.overview.descriptionTitle": "Description", + "xpack.slo.sloDetails.overview.indicatorTypeTitle": "Type d’indicateur", + "xpack.slo.sloDetails.overview.observedValueTitle": "Valeur observée", + "xpack.slo.sloDetails.overview.tagsTitle": "Balises", + "xpack.slo.sloDetails.overview.timeWindowTitle": "Fenêtre temporelle", + "xpack.slo.sloDetails.sliHistoryChartPanel.chartTitle": "Valeur SLI", + "xpack.slo.sloDetails.sliHistoryChartPanel.current": "Valeur observée", + "xpack.slo.sloDetails.sliHistoryChartPanel.objective": "Objectif", + "xpack.slo.sloDetails.sliHistoryChartPanel.title": "SLI historique", + "xpack.slo.sloDetails.tab.alertsLabel": "Alertes", + "xpack.slo.sloDetails.tab.overviewLabel": "Aperçu", + "xpack.slo.sloEdit.apm.filter.tooltip": "Cette requête KQL est utilisée pour filtrer les indicateurs APM sur certains critères pertinents pour ce SLO.", + "xpack.slo.sloEdit.apm.serviceName.tooltip": "Il s'agit du service APM monitoré par ce SLO.", + "xpack.slo.sloEdit.apmAvailability.serviceEnvironment": "Environnement de service", + "xpack.slo.sloEdit.apmAvailability.serviceEnvironment.placeholder": "Sélectionner l'environnement", + "xpack.slo.sloEdit.apmAvailability.serviceName": "Nom de service", + "xpack.slo.sloEdit.apmAvailability.serviceName.placeholder": "Sélectionner le service APM", + "xpack.slo.sloEdit.apmAvailability.transactionName": "Nom de la transaction", + "xpack.slo.sloEdit.apmAvailability.transactionName.placeholder": "Sélectionner le nom de la transaction", + "xpack.slo.sloEdit.apmAvailability.transactionType": "Type de transaction", + "xpack.slo.sloEdit.apmAvailability.transactionType.placeholder": "Sélectionner le type de la transaction", + "xpack.slo.sloEdit.apmLatency.filter": "Filtre de requête", + "xpack.slo.sloEdit.apmLatency.filter.placeholder": "Filtre personnalisé à appliquer à l'index", + "xpack.slo.sloEdit.apmLatency.serviceEnvironment": "Environnement de service", + "xpack.slo.sloEdit.apmLatency.serviceEnvironment.placeholder": "Sélectionner l'environnement", + "xpack.slo.sloEdit.apmLatency.serviceName": "Nom de service", + "xpack.slo.sloEdit.apmLatency.serviceName.placeholder": "Sélectionner le service APM", + "xpack.slo.sloEdit.apmLatency.threshold.placeholder": "Seuil (ms)", + "xpack.slo.sloEdit.apmLatency.threshold.tooltip": "Configurez le seuil en millisecondes définissant les \"bonnes\" requêtes ou les requêtes \"réussies\" pour le SLO.", + "xpack.slo.sloEdit.apmLatency.transactionName": "Nom de la transaction", + "xpack.slo.sloEdit.apmLatency.transactionName.placeholder": "Sélectionner le nom de la transaction", + "xpack.slo.sloEdit.apmLatency.transactionType": "Type de transaction", + "xpack.slo.sloEdit.apmLatency.transactionType.placeholder": "Sélectionner le type de la transaction", + "xpack.slo.sloEdit.budgetingMethod.label": "Méthode de budgétisation", + "xpack.slo.sloEdit.budgetingMethod.tooltip": "Le SLO basé sur les occurrences utilise le rapport entre les bons événements et le nombre total d'événements au cours de la fenêtre temporelle. Le SLO basé sur les intervalles de temps utilise le rapport entre les bons intervalles de temps et le nombre total d'intervalles de temps au cours de la fenêtre temporelle.", + "xpack.slo.sloEdit.calendarTimeWindow.monthly": "Mensuel", + "xpack.slo.sloEdit.calendarTimeWindow.weekly": "Hebdomadaire", + "xpack.slo.sloEdit.cancelButton": "Annuler", + "xpack.slo.sloEdit.createSloButton": "Créer un SLO", + "xpack.slo.sloEdit.customKql.indexSelection.label": "Index", + "xpack.slo.sloEdit.dataPreviewChart.errorMessage": "Les paramètres d'indicateur actuels ne sont pas valides", + "xpack.slo.sloEdit.dataPreviewChart.explanationMessage": "Remplir les champs d'indicateur pour visualiser les indicateurs actuels", + "xpack.slo.sloEdit.dataPreviewChart.panelLabel": "Aperçu du SLI", + "xpack.slo.sloEdit.dataPreviewChart.xTitle": "Dernière heure", + "xpack.slo.sloEdit.dataPreviewChart.yTitle": "SLI", + "xpack.slo.sloEdit.definition.sliType": "Choisir le type de SLI", + "xpack.slo.sloEdit.definition.title": "Définir un SLI", + "xpack.slo.sloEdit.description.sloDescription": "Description", + "xpack.slo.sloEdit.description.sloDescriptionPlaceholder": "Brève description du SLO", + "xpack.slo.sloEdit.description.sloName": "Nom SLO", + "xpack.slo.sloEdit.description.sloNamePlaceholder": "Nom du SLO", + "xpack.slo.sloEdit.description.title": "Décrire le SLO", + "xpack.slo.sloEdit.editSloButton": "Mettre à jour le SLO", + "xpack.slo.sloEdit.fieldSelector.all": "Tous", + "xpack.slo.sloEdit.groupBy.label": "Partition conditionnée", + "xpack.slo.sloEdit.groupBy.placeholder": "Sélectionner un champ facultatif selon lequel effectuer la partition", + "xpack.slo.sloEdit.groupBy.tooltip": "Créer des SLO individuels pour chaque valeur du champ sélectionné.", + "xpack.slo.sloEdit.objectives.title": "Définir des objectifs", + "xpack.slo.sloEdit.sliType.customKql.customFilter": "Filtre personnalisé à appliquer à l'index", + "xpack.slo.sloEdit.sliType.customKql.customFilter.tooltip": "Cette requête KQL peut être utilisée pour filtrer les documents avec certains critères pertinents.", + "xpack.slo.sloEdit.sliType.customKql.goodQuery": "Bonne question", + "xpack.slo.sloEdit.sliType.customKql.goodQuery.tooltip": "Cette requête KQL doit renvoyer un sous-ensemble d'événements considérés comme \"bons\" ou \"réussis\" aux fins du calcul du SLO. La requête doit filtrer les événements en fonction de certains critères pertinents, tels que les codes de statut, les messages d'erreur ou d'autres champs pertinents.", + "xpack.slo.sloEdit.sliType.customKql.goodQueryPlaceholder": "Définir les bons événements", + "xpack.slo.sloEdit.sliType.customKql.queryFilter": "Filtre de requête", + "xpack.slo.sloEdit.sliType.customKql.totalQuery": "Total de la requête", + "xpack.slo.sloEdit.sliType.customKql.totalQuery.tooltip": "Cette requête KQL doit renvoyer tous les événements pertinents pour le calcul du SLO, y compris les bons et les mauvais événements.", + "xpack.slo.sloEdit.sliType.customKql.totalQueryPlaceholder": "Définir le total d'événements", + "xpack.slo.sloEdit.sliType.customMetric.addMetricAriaLabel": "Ajouter un indicateur", + "xpack.slo.sloEdit.sliType.customMetric.addMetricLabel": "Ajouter un indicateur", + "xpack.slo.sloEdit.sliType.customMetric.customFilter": "Filtre personnalisé à appliquer à l'index", + "xpack.slo.sloEdit.sliType.customMetric.customFilter.tooltip": "Cette requête KQL peut être utilisée pour filtrer les documents avec certains critères pertinents.", + "xpack.slo.sloEdit.sliType.customMetric.deleteLabel": "Supprimer un indicateur", + "xpack.slo.sloEdit.sliType.customMetric.equation.invalidCharacters": "Le champ d'équation prend en charge uniquement les caractères suivants : A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =", + "xpack.slo.sloEdit.sliType.customMetric.equationHelpText": "Accepte les équations mathématiques de base, les caractères valides sont : A-Z, +, -, /, *, (, ), ?, !, &, :, |, >, <, =", + "xpack.slo.sloEdit.sliType.customMetric.equationLabel": "Équation", + "xpack.slo.sloEdit.sliType.customMetric.filterLabel": "Filtre", + "xpack.slo.sloEdit.sliType.customMetric.goodTitle": "Bons événements", + "xpack.slo.sloEdit.sliType.customMetric.metricField.placeholder": "Sélectionner un champ d’indicateur", + "xpack.slo.sloEdit.sliType.customMetric.metricLabel": "Indicateur", + "xpack.slo.sloEdit.sliType.customMetric.queryFilter": "Filtre de requête", + "xpack.slo.sloEdit.sliType.customMetric.totalEquation.tooltip": "Ceci est compatible avec des calculs de base (A + B / C) et la logique booléenne (A < B ? A : B).", + "xpack.slo.sloEdit.sliType.customMetric.totalMetric.tooltip": "Les données de ce champ seront agrégées avec l’agréation de \"somme\".", + "xpack.slo.sloEdit.sliType.customMetric.totalTitle": "Total des événements", + "xpack.slo.sloEdit.sliType.histogram.aggregation.placeholder": "Choisir une agrégation", + "xpack.slo.sloEdit.sliType.histogram.aggregationLabel": "Agrégation", + "xpack.slo.sloEdit.sliType.histogram.aggregationTooltip": "L'agrégation \"value count\" (nombre de valeurs) renvoie le nombre total pour le champ d'histogramme. \"Range\" (plage) renvoie le nombre tiré du champ d'histogramme compris dans la plage définie ci-dessous.", + "xpack.slo.sloEdit.sliType.histogram.customFilter": "Filtre personnalisé à appliquer à l'index", + "xpack.slo.sloEdit.sliType.histogram.customFilter.tooltip": "Cette requête KQL peut être utilisée pour filtrer les documents avec certains critères pertinents.", + "xpack.slo.sloEdit.sliType.histogram.fromLabel": "De", + "xpack.slo.sloEdit.sliType.histogram.fromTooltip": "La valeur \"from\" (de) est inclusive.", + "xpack.slo.sloEdit.sliType.histogram.goodTitle": "Bons événements", + "xpack.slo.sloEdit.sliType.histogram.kqlFilterLabel": "Filtre KQL", + "xpack.slo.sloEdit.sliType.histogram.metricField.placeholder": "Sélectionner un champ d'histogramme", + "xpack.slo.sloEdit.sliType.histogram.metricLabel": "Champ", + "xpack.slo.sloEdit.sliType.histogram.query.tooltip": "Cette requête KQL doit renvoyer un sous-ensemble d'événements pour cet indicateur.", + "xpack.slo.sloEdit.sliType.histogram.queryFilter": "Filtre de requête", + "xpack.slo.sloEdit.sliType.histogram.rangeLabel": "Plage", + "xpack.slo.sloEdit.sliType.histogram.sourceTitle": "Source", + "xpack.slo.sloEdit.sliType.histogram.toLabel": "À", + "xpack.slo.sloEdit.sliType.histogram.totalTitle": "Total des événements", + "xpack.slo.sloEdit.sliType.histogram.toTooltip": "La valeur \"to\" (à) n'est PAS inclusive.", + "xpack.slo.sloEdit.sliType.histogram.valueCountLabel": "Compte de valeurs", + "xpack.slo.sloEdit.tags.label": "Balises", + "xpack.slo.sloEdit.tags.placeholder": "Ajouter des balises", + "xpack.slo.sloEdit.targetSlo.label": "Cible/SLO (%)", + "xpack.slo.sloEdit.targetSlo.tooltip": "L'objectif cible en pourcentage pour le SLO.", + "xpack.slo.sloEdit.timeSliceTarget.label": "Cible d'intervalle de temps (%)", + "xpack.slo.sloEdit.timeSliceTarget.tooltip": "La cible d'intervalle de temps individuel utilisée pour déterminer si l'intervalle est bon ou mauvais.", + "xpack.slo.sloEdit.timesliceWindow.label": "Fenêtre d'intervalle de temps (en minutes)", + "xpack.slo.sloEdit.timesliceWindow.tooltip": "La taille de la fenêtre d'intervalle de temps utilisée pour évaluer les données.", + "xpack.slo.sloEdit.timestampField.label": "Champ d'horodatage", + "xpack.slo.sloEdit.timestampField.placeholder": "Sélectionner un champ d'horodatage", + "xpack.slo.sloEdit.timeWindow.calendarAligned": "Alignée sur le calendrier", + "xpack.slo.sloEdit.timeWindow.rolling": "Glissante", + "xpack.slo.sloEdit.timeWindowDuration.label": "Durée", + "xpack.slo.sloEdit.timeWindowDuration.tooltip": "La durée de la fenêtre temporelle utilisée pour calculer le SLO.", + "xpack.slo.sloEdit.timeWindowType.label": "Fenêtre temporelle", + "xpack.slo.sloEdit.timeWindowType.tooltip": "Choisissez entre une fenêtre glissante ou alignée sur le calendrier.", + "xpack.slo.sloList.welcomePrompt.buttonLabel": "Créer un SLO", + "xpack.slo.sloList.welcomePrompt.getStartedMessage": "Pour commencer, créez votre premier SLO.", + "xpack.slo.sloList.welcomePrompt.learnMore": "Envie d'en savoir plus ?", + "xpack.slo.sloList.welcomePrompt.learnMoreLink": "Lisez les documents", + "xpack.slo.sloList.welcomePrompt.messageParagraph1": "Mesurez les indicateurs clés importants pour l'entreprise, tels que les indicateurs et les objectifs de niveau de service (SLI/SLO), afin de respecter les SLA établis.", + "xpack.slo.sloList.welcomePrompt.messageParagraph2": "Communiquez facilement sur la disponibilité et la fiabilité de vos services grâce à des informations en temps réel, et ce, pour la plus grande satisfaction des différents intervenants.", + "xpack.slo.sloList.welcomePrompt.needLicenseMessage": "Vous avez besoin d'un abonnement Elastic Cloud ou d'une licence Platinum pour utiliser les SLO.", + "xpack.slo.sloList.welcomePrompt.signupForCloud": "S'inscrire à Elastic Cloud", + "xpack.slo.sloList.welcomePrompt.signupForLicense": "S'inscrire pour une licence", + "xpack.slo.sloList.welcomePrompt.title": "Surveiller et respecter vos SLO", + "xpack.slo.sloStatusBadge.degrading": "Dégradation", + "xpack.slo.sloStatusBadge.forecasted": "Prévu", + "xpack.slo.sloStatusBadge.healthy": "Intègre", + "xpack.slo.sloStatusBadge.noData": "Aucune donnée", + "xpack.slo.sloStatusBadge.noDataTooltip": "L'agrégation et la mise à disposition des données peut prendre un peu de temps.", + "xpack.slo.sloStatusBadge.violated": "Violation", "xpack.observabilityAiAssistant.couldNotFindConversationContent": "Impossible de trouver une conversation avec l'ID {conversationId}. Assurez-vous que la conversation existe et que vous y avez accès.", "xpack.observabilityAiAssistant.executedFunctionFailureEvent": "n'a pas réussi à exécuter la fonction {functionName}", "xpack.observabilityAiAssistant.poweredByModel": "Alimenté par {model}", @@ -42577,4 +42550,4 @@ "xpack.serverlessObservability.nav.projectSettings": "Paramètres de projet", "xpack.serverlessObservability.nav.visualizations": "Visualisations" } -} +} \ No newline at end of file diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index d97f16d80c147..f9751d0bb54b8 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -21488,7 +21488,6 @@ "xpack.lens.chart.labelVisibility.auto": "自動", "xpack.lens.chart.labelVisibility.custom": "カスタム", "xpack.lens.chart.labelVisibility.none": "なし", - "xpack.lens.chartSwitch.dataLossDescription": "ビジュアライゼーションタイプを選択すると、互換性のない構成オプションと複数のレイヤーが削除されます(存在する場合)。", "xpack.lens.chartSwitch.dataLossLabel": "警告", "xpack.lens.chartSwitch.experimentalLabel": "テクニカルプレビュー", "xpack.lens.chartTitle.unsaved": "保存されていないビジュアライゼーション", @@ -28217,39 +28216,6 @@ "xpack.observability.profilingCo2PerKWHUiSettingDescription": "炭素強度は、データセンターの電気がどれだけクリーンであるかを測定します。 \n 具体的には、特定の地域で消費される電力1キロワット時(kWh)あたりに排出されるCO2の平均量を測定します。\n クラウドカーボンフットプリント{datasheetLink}を使用して、地域に応じてこの値を更新します。デフォルトは米国東部(バージニア州北部)です。", "xpack.observability.rules.deleteConfirmationModal.deleteButtonLabel": "{title}削除", "xpack.observability.rules.deleteConfirmationModal.descriptionText": "削除された{title}は復元できません。", - "xpack.observability.slo.alerting.burnRate.reason": "{actionGroupName}:過去{longWindowDuration}のバーンレートは{longWindowBurnRate}で、過去{shortWindowDuration}のバーンレートは{shortWindowBurnRate}です。両期間とも{burnRateThreshold}を超えたらアラート", - "xpack.observability.slo.alerting.burnRate.reasonForInstanceId": "{actionGroupName}:過去{longWindowDuration}のバーンレートは{longWindowBurnRate}、{instanceId}の過去{shortWindowDuration}のバーンレートは{shortWindowBurnRate}です。両期間とも{burnRateThreshold}を超えたらアラート", - "xpack.observability.slo.burnRate.breachedStatustSubtitle": "現在のレートでは、エラー予算は{hour}時間後に使い果たされます。", - "xpack.observability.slo.burnRate.threshold": "しきい値は{threshold}xです", - "xpack.observability.slo.create.errorNotification": "{name}の作成中に問題が発生しました", - "xpack.observability.slo.deleteConfirmationModal.title": "{name}を削除しますか?", - "xpack.observability.slo.duration.day": "{duration, plural, other {#日}}", - "xpack.observability.slo.duration.hour": "{duration, plural, other {#時間}}", - "xpack.observability.slo.duration.minute": "{duration, plural, other {#分}}", - "xpack.observability.slo.duration.month": "{duration, plural, other {#月}}", - "xpack.observability.slo.duration.week": "{duration, plural, other {#週}}", - "xpack.observability.slo.indicatorTypeBadge.exploreInApm": "{service}詳細を表示", - "xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue": "バーンレートしきい値は1以上{maxBurnRate}以下でなければなりません。", - "xpack.observability.slo.rules.groupByMessage": "選択したSLOは\"{groupByField}\"にパーティションが作成されました。このルールは、パーティションフィールドで見つかったすべてのインスタンスを監視し、アラートを生成します。", - "xpack.observability.slo.rules.longWindowDuration.tooltip": "バーンレートが計算されるルックバック期間。ルックバック期間を{shortWindowDuration}分(ルックバック期間の1/12)と短くすることで、より高速な復帰が可能になります", - "xpack.observability.slo.slo.activeAlertsBadge.label": "{count, plural, other {#件のアラート}}", - "xpack.observability.slo.slo.delete.errorNotification": "{name}の削除に失敗しました", - "xpack.observability.slo.slo.delete.successNotification": "{name}が削除されました", - "xpack.observability.slo.slo.stats.objective": "{objective}目標", - "xpack.observability.slo.slo.timeWindow.calendar": "{elapsed}/{total}日", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.duration": "過去{duration}", - "xpack.observability.slo.sloDetails.overview.apmSource.environmentLabel": "環境:{value}", - "xpack.observability.slo.sloDetails.overview.apmSource.serviceLabel": "サービス:{value}", - "xpack.observability.slo.sloDetails.overview.apmSource.transactionNameLabel": "transactionName: {value}", - "xpack.observability.slo.sloDetails.overview.apmSource.transactionTypeLabel": "transactionType: {value}", - "xpack.observability.slo.sloDetails.overview.calendarAlignedTimeWindow": "{duration}カレンダーが調整されました", - "xpack.observability.slo.sloDetails.overview.observedValueSubtitle": "{objective}(目的は{value})", - "xpack.observability.slo.sloDetails.overview.rollingTimeWindow": "{duration}ローリング", - "xpack.observability.slo.sloDetails.overview.timeslicesBudgetingMethodDetails": "{duration}スライス、{target}ターゲット", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.duration": "過去{duration}", - "xpack.observability.slo.sloEdit.rollingTimeWindow.days": "{number}日", - "xpack.observability.slo.update.errorNotification": "{name}の更新中にエラーが発生しました", - "xpack.observability.slo.update.successNotification": "正常に{name}を更新しました", "xpack.observability.syntheticsThrottlingEnabledExperimentDescription": "シンセティック監視構成で調整設定を有効にします。設定が有効でも、モニターで調整を使用できない場合があります。内部使用専用です。{link}", "xpack.observability.transactionRateLabel": "{value} tpm", "xpack.observability.ux.coreVitals.averageMessage": " {bad}未満", @@ -28318,11 +28284,6 @@ "xpack.observability.breadcrumbs.alertsLinkText": "アラート", "xpack.observability.breadcrumbs.overviewLinkText": "概要", "xpack.observability.breadcrumbs.rulesLinkText": "ルール", - "xpack.observability.breadcrumbs.sloCreateLabel": "作成", - "xpack.observability.breadcrumbs.sloDetailsLinkText": "詳細", - "xpack.observability.breadcrumbs.sloEditLabel": "編集", - "xpack.observability.breadcrumbs.sloLabel": "SLO", - "xpack.observability.breadcrumbs.slosLinkText": "SLO", "xpack.observability.cases.caseFeatureNoPermissionsMessage": "ケースを表示するには、Kibana スペースでケース機能の権限が必要です。詳細については、Kibana管理者に連絡してください。", "xpack.observability.cases.caseFeatureNoPermissionsTitle": "Kibana機能権限が必要です", "xpack.observability.cases.caseView.goToDocumentationButton": "ドキュメンテーションを表示", @@ -28399,7 +28360,6 @@ "xpack.observability.customThreshold.rule.viewInAppUrlActionVariableDescription": "アラートソースにリンク", "xpack.observability.defaultApmServiceEnvironment": "デフォルトのサービス環境", "xpack.observability.defaultApmServiceEnvironmentDescription": "APMアプリのデフォルト環境を設定します。空にすると、すべての環境からのデータがデフォルトで表示されます。", - "xpack.observability.embeddableSlo.config.confirmButtonLabel": "構成を確認", "xpack.observability.emptySection.apps.alert.description": "オブザーバビリティで複雑な条件を検出し、それらの条件が満たされたときにアクションをトリガーします。", "xpack.observability.emptySection.apps.alert.link": "ルールを作成", "xpack.observability.emptySection.apps.alert.title": "アラートが見つかりません。", @@ -28438,7 +28398,6 @@ "xpack.observability.featureRegistry.deleteSubFeatureDetails": "ケースとコメントを削除", "xpack.observability.featureRegistry.deleteSubFeatureName": "削除", "xpack.observability.featureRegistry.linkObservabilityTitle": "ケース", - "xpack.observability.featureRegistry.linkSloTitle": "SLO", "xpack.observability.feedbackMenu.appName": "Observability", "xpack.observability.formatters.hoursTimeUnitLabel": "h", "xpack.observability.formatters.hoursTimeUnitLabelExtended": "時間", @@ -28570,246 +28529,6 @@ "xpack.observability.section.errorPanel": "データの取得時にエラーが発生しました。再試行してください", "xpack.observability.serviceGroupMaxServicesUiSettingDescription": "特定のサービスグループのサービス数を制限", "xpack.observability.serviceGroupMaxServicesUiSettingName": "サービスグループの最大サービス", - "xpack.observability.slo.alerting.alertDetailsUrlDescription": "アラートトラブルシューティングビューにリンクして、さらに詳しい状況や詳細を確認できます。server.publicBaseUrlが構成されていない場合は、空の文字列になります。", - "xpack.observability.slo.alerting.burnRate.alertAction": "重大", - "xpack.observability.slo.alerting.burnRate.highPriorityAction": "高", - "xpack.observability.slo.alerting.burnRate.lowPriorityAction": "低", - "xpack.observability.slo.alerting.burnRate.mediumPriorityAction": "中", - "xpack.observability.slo.alerting.reasonDescription": "アラートの理由の簡潔な説明", - "xpack.observability.slo.alerting.sloIdDescription": "SLO一意のID。", - "xpack.observability.slo.alerting.sloInstanceIdDescription": "SLOインスタンスID。", - "xpack.observability.slo.alerting.sloNameDescription": "SLO名。", - "xpack.observability.slo.alerting.thresholdDescription": "バーンレートしきい値。", - "xpack.observability.slo.alerting.timestampDescription": "アラートが検出された時点のタイムスタンプ。", - "xpack.observability.slo.alerting.viewInAppUrlDescription": "詳細な調査を支援するSLO詳細ページへのURL。", - "xpack.observability.slo.alerting.windowDescription": "関連付けられたバーンレート値の期間。", - "xpack.observability.slo.budgetingMethod.occurrences": "オカレンス", - "xpack.observability.slo.budgetingMethod.timeslices": "タイムスライス", - "xpack.observability.slo.burnRate.breachedStatustTitle": "重大値違反", - "xpack.observability.slo.burnRate.noDataStatusSubtitle": "その他のデータを待機中です。", - "xpack.observability.slo.burnRate.noDataStatusTitle": "値なし", - "xpack.observability.slo.burnRate.okStatusSubtitle": "エラー予算が枯渇するリスクはありません。", - "xpack.observability.slo.burnRate.okStatusTitle": "許容値", - "xpack.observability.slo.burnRate.technicalPreviewBadgeDescription": "この機能はテクニカルプレビュー中であり、将来のバージョンで変更または削除される可能性があります。デザインとコードは正式に一般公開された機能より完成度が低く、現状のまま保証なしで提供されています。テクニカルプレビュー機能は、正式に一般公開された機能に適用されるサポートサービスレベル契約の対象外です。", - "xpack.observability.slo.burnRate.technicalPreviewBadgeTitle": "テクニカルプレビュー", - "xpack.observability.slo.burnRate.timeRangeBtnLegend": "時間範囲を選択", - "xpack.observability.slo.burnRate.title": "バーンレート", - "xpack.observability.slo.deleteConfirmationModal.cancelButtonLabel": "キャンセル", - "xpack.observability.slo.deleteConfirmationModal.deleteButtonLabel": "削除", - "xpack.observability.slo.deleteConfirmationModal.descriptionText": "このSLOを削除した後、復元することはできません。", - "xpack.observability.slo.duration.daily": "日ごと", - "xpack.observability.slo.duration.hourly": "1 時間ごと", - "xpack.observability.slo.duration.minutely": "毎分", - "xpack.observability.slo.duration.monthly": "月ごと", - "xpack.observability.slo.duration.weekly": "週ごと", - "xpack.observability.slo.globalDiagnosis.errorNotification": "この機能を使用する権限がありません。", - "xpack.observability.slo.indicators.apmAvailability": "APM可用性", - "xpack.observability.slo.indicators.apmLatency": "APMレイテンシ", - "xpack.observability.slo.indicators.customKql": "カスタムKQL", - "xpack.observability.slo.indicators.customMetric": "カスタムメトリック", - "xpack.observability.slo.indicators.histogram": "ヒストグラムメトリック", - "xpack.observability.slo.item.actions.button": "アクション", - "xpack.observability.slo.item.actions.clone": "クローンを作成", - "xpack.observability.slo.item.actions.createRule": "新しいアラートルールを作成", - "xpack.observability.slo.item.actions.delete": "削除", - "xpack.observability.slo.item.actions.details": "詳細", - "xpack.observability.slo.item.actions.edit": "編集", - "xpack.observability.slo.item.actions.manageRules": "ルールの管理", - "xpack.observability.slo.list.emptyMessage": "条件に合った結果はありません。", - "xpack.observability.slo.list.emptyTitle": "成果がありません", - "xpack.observability.slo.list.errorMessage": "SLOオブジェクトの読み込みエラーが発生しました。ヘルプについては、管理者にお問い合わせください。", - "xpack.observability.slo.list.errorNotification": "SLOの取得中に問題が発生しました", - "xpack.observability.slo.list.errorTitle": "SLOを読み込めません", - "xpack.observability.slo.list.search": "SLOを検索...", - "xpack.observability.slo.list.sortBy.errorBudgetConsumed": "エラー予算が消費されました", - "xpack.observability.slo.list.sortBy.errorBudgetRemaining": "残り予算エラー", - "xpack.observability.slo.list.sortBy.sliValue": "SLI値", - "xpack.observability.slo.list.sortBy.sloStatus": "SLOステータス", - "xpack.observability.slo.rules.actionGroupSelectorLabel": "アクショングループ", - "xpack.observability.slo.rules.addWindowAriaLabel": "時間枠を追加", - "xpack.observability.slo.rules.addWIndowLabel": "時間枠を追加", - "xpack.observability.slo.rules.burnRate.defaultActionMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\}は次の条件でアクティブです。\n\n- SLO: \\{\\{context.sloName\\}\\}'\n- 過去\\{\\{context.longWindow.duration\\}\\}のバーンレートが\\{\\{context.longWindow.burnRate\\}\\}である\n- 過去\\{\\{context.shortWindow.duration\\}\\}のバーンレートが\\{\\{context.shortWindow.burnRate\\}\\}である\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[アラート詳細を表示](\\{\\{context.alertDetailsUrl\\}\\})\n", - "xpack.observability.slo.rules.burnRate.defaultRecoveryMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\}が回復しました。\n\n- SLO: \\{\\{context.sloName\\}\\}'\n- 過去\\{\\{context.longWindow.duration\\}\\}のバーンレートが\\{\\{context.longWindow.burnRate\\}\\}である\n- 過去\\{\\{context.shortWindow.duration\\}\\}のバーンレートが\\{\\{context.shortWindow.burnRate\\}\\}である\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[アラート詳細を表示](\\{\\{context.alertDetailsUrl\\}\\})\n", - "xpack.observability.slo.rules.burnRate.description": "SLOバーンレートが定義された期間で高すぎるときにアラートを通知します。", - "xpack.observability.slo.rules.burnRate.errors.burnRateThresholdRequired": "バーンレートしきい値は必須です。", - "xpack.observability.slo.rules.burnRate.errors.sloRequired": "SLOが必要です。", - "xpack.observability.slo.rules.burnRate.errors.windowDurationRequired": "ループバック期間は必須です。", - "xpack.observability.slo.rules.burnRate.name": "SLOバーンレート", - "xpack.observability.slo.rules.burnRate.rowLabel": "バーンレートしきい値", - "xpack.observability.slo.rules.burnRate.tooltip": "バーンレートは、サービスがルックバック期間でエラー予算をどの程度速く消費するのかを示します。", - "xpack.observability.slo.rules.deleteWindowLabel": "時間枠を削除", - "xpack.observability.slo.rules.longWindow.errorText": "ループバック期間は1~72時間でなければなりません。", - "xpack.observability.slo.rules.longWindow.rowLabel": "ルックバック(時間)", - "xpack.observability.slo.rules.longWindow.valueLabel": "ルックバック期間(時間)", - "xpack.observability.slo.rules.sloSelector.ariaLabel": "SLO", - "xpack.observability.slo.rules.sloSelector.placeholder": "SLOを選択", - "xpack.observability.slo.rules.sloSelector.rowLabel": "SLO", - "xpack.observability.slo.slo.activeAlertsBadge.ariaLabel": "アクティブアラートバッジ", - "xpack.observability.slo.slo.item.actions.clone": "クローンを作成", - "xpack.observability.slo.slo.item.actions.delete": "削除", - "xpack.observability.slo.slo.rulesBadge.popover": "このSLOではまだルールが構成されていません。SLOに違反したときにアラートを受信しません。", - "xpack.observability.slo.slo.stats.budgetRemaining": "残り予算", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.chartTitle": "残り予算エラー", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.remaining": "残り", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.title": "エラー予算バーンダウン", - "xpack.observability.slo.sloDetails.headerControl.actions": "アクション", - "xpack.observability.slo.sloDetails.headerControl.createBurnRateRule": "新しいアラートルールを作成", - "xpack.observability.slo.sloDetails.headerControl.edit": "編集", - "xpack.observability.slo.sloDetails.headerControl.manageRules": "ルールの管理", - "xpack.observability.slo.sloDetails.headerTitle.createdMessage": "作成日時", - "xpack.observability.slo.sloDetails.headerTitle.lastUpdatedMessage": "最終更新日", - "xpack.observability.slo.sloDetails.overview.apmSource": "APMソース", - "xpack.observability.slo.sloDetails.overview.budgetingMethodTitle": "予算設定方法", - "xpack.observability.slo.sloDetails.overview.descriptionTitle": "説明", - "xpack.observability.slo.sloDetails.overview.indicatorTypeTitle": "インジケータータイプ", - "xpack.observability.slo.sloDetails.overview.observedValueTitle": "観測された値", - "xpack.observability.slo.sloDetails.overview.tagsTitle": "タグ", - "xpack.observability.slo.sloDetails.overview.timeWindowTitle": "時間枠", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.chartTitle": "SLI値", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.current": "観測された値", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.objective": "目的", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.title": "履歴SLI", - "xpack.observability.slo.sloDetails.tab.alertsLabel": "アラート", - "xpack.observability.slo.sloDetails.tab.overviewLabel": "概要", - "xpack.observability.slo.sloEdit.apm.filter.tooltip": "このKQLクエリは、このSLOの一部の関連する情報でAPMメトリックをフィルタリングするために使用されます。", - "xpack.observability.slo.sloEdit.apm.serviceName.tooltip": "これはこのSLOによって監視されるAPMサービスです。", - "xpack.observability.slo.sloEdit.apmAvailability.serviceEnvironment": "サービス環境", - "xpack.observability.slo.sloEdit.apmAvailability.serviceEnvironment.placeholder": "環境を選択", - "xpack.observability.slo.sloEdit.apmAvailability.serviceName": "サービス名", - "xpack.observability.slo.sloEdit.apmAvailability.serviceName.placeholder": "APMサービスを選択", - "xpack.observability.slo.sloEdit.apmAvailability.transactionName": "トランザクション名", - "xpack.observability.slo.sloEdit.apmAvailability.transactionName.placeholder": "トランザクション名を選択", - "xpack.observability.slo.sloEdit.apmAvailability.transactionType": "トランザクションタイプ", - "xpack.observability.slo.sloEdit.apmAvailability.transactionType.placeholder": "トランザクションタイプを選択", - "xpack.observability.slo.sloEdit.apmLatency.filter": "クエリのフィルター", - "xpack.observability.slo.sloEdit.apmLatency.filter.placeholder": "インデックスで適用するカスタムフィルター", - "xpack.observability.slo.sloEdit.apmLatency.serviceEnvironment": "サービス環境", - "xpack.observability.slo.sloEdit.apmLatency.serviceEnvironment.placeholder": "環境を選択", - "xpack.observability.slo.sloEdit.apmLatency.serviceName": "サービス名", - "xpack.observability.slo.sloEdit.apmLatency.serviceName.placeholder": "APMサービスを選択", - "xpack.observability.slo.sloEdit.apmLatency.threshold.placeholder": "しきい値(ミリ秒)", - "xpack.observability.slo.sloEdit.apmLatency.threshold.tooltip": "SLOで「良好」または「成功」リクエストを定義するしきい値(ミリ秒)を構成します。", - "xpack.observability.slo.sloEdit.apmLatency.transactionName": "トランザクション名", - "xpack.observability.slo.sloEdit.apmLatency.transactionName.placeholder": "トランザクション名を選択", - "xpack.observability.slo.sloEdit.apmLatency.transactionType": "トランザクションタイプ", - "xpack.observability.slo.sloEdit.apmLatency.transactionType.placeholder": "トランザクションタイプを選択", - "xpack.observability.slo.sloEdit.budgetingMethod.label": "予算設定方法", - "xpack.observability.slo.sloEdit.budgetingMethod.tooltip": "出現に基づくSLOは、該当期間における、合計イベント数に対する良好なイベント数の比率を使用します。タイムスライスに基づくSLOは、該当期間における、合計タイムスライス数に対する良好なタイムスライス数の比率を使用します。", - "xpack.observability.slo.sloEdit.calendarTimeWindow.monthly": "月ごと", - "xpack.observability.slo.sloEdit.calendarTimeWindow.weekly": "週ごと", - "xpack.observability.slo.sloEdit.cancelButton": "キャンセル", - "xpack.observability.slo.sloEdit.createSloButton": "SLOの作成", - "xpack.observability.slo.sloEdit.customKql.indexSelection.label": "インデックス", - "xpack.observability.slo.sloEdit.dataPreviewChart.errorMessage": "現在のインジケーター設定は無効です", - "xpack.observability.slo.sloEdit.dataPreviewChart.explanationMessage": "インジケーターフィールドに入力すると、現在のメトリックが可視化されます。", - "xpack.observability.slo.sloEdit.dataPreviewChart.panelLabel": "SLIプレビュー", - "xpack.observability.slo.sloEdit.dataPreviewChart.xTitle": "過去 1 時間", - "xpack.observability.slo.sloEdit.dataPreviewChart.yTitle": "SLI", - "xpack.observability.slo.sloEdit.definition.sliType": "SLIタイプを選択", - "xpack.observability.slo.sloEdit.definition.title": "SLIを定義", - "xpack.observability.slo.sloEdit.description.sloDescription": "説明", - "xpack.observability.slo.sloEdit.description.sloDescriptionPlaceholder": "SLOの簡潔な説明", - "xpack.observability.slo.sloEdit.description.sloName": "SLO名", - "xpack.observability.slo.sloEdit.description.sloNamePlaceholder": "SLOの名前", - "xpack.observability.slo.sloEdit.description.title": "SLOの説明", - "xpack.observability.slo.sloEdit.editSloButton": "SLOの更新", - "xpack.observability.slo.sloEdit.fieldSelector.all": "すべて", - "xpack.observability.slo.sloEdit.groupBy.label": "パーティション", - "xpack.observability.slo.sloEdit.groupBy.placeholder": "パーティション分割する任意のフィールドを選択", - "xpack.observability.slo.sloEdit.groupBy.tooltip": "選択したフィールドの値ごとに個別のSLOを作成します。", - "xpack.observability.slo.sloEdit.objectives.title": "目標を設定", - "xpack.observability.slo.sloEdit.sliType.customKql.customFilter": "インデックスで適用するカスタムフィルター", - "xpack.observability.slo.sloEdit.sliType.customKql.customFilter.tooltip": "このKQLクエリを使用して、一部の関連する条件でドキュメントをフィルタリングできます。", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQuery": "良いクエリ", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQuery.tooltip": "このKQLクエリは、SLOを計算する目的で、「良好」または「成功」と見なされるイベントのサブセットを返します。このクエリは、ステータスコード、エラー、メッセージ、または他の関連するフィールドなどの一部の関連する条件に基づいて、イベントをフィルタリングします。", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQueryPlaceholder": "良いイベントを定義", - "xpack.observability.slo.sloEdit.sliType.customKql.queryFilter": "クエリのフィルター", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQuery": "合計クエリ", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQuery.tooltip": "このKQLクエリは、良好なイベントと問題があるイベントの両方を含む、SLO計算に関連するすべてのイベントを返します。", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQueryPlaceholder": "合計イベントを定義", - "xpack.observability.slo.sloEdit.sliType.customMetric.addMetricAriaLabel": "メトリックを追加", - "xpack.observability.slo.sloEdit.sliType.customMetric.addMetricLabel": "メトリックを追加", - "xpack.observability.slo.sloEdit.sliType.customMetric.customFilter": "インデックスで適用するカスタムフィルター", - "xpack.observability.slo.sloEdit.sliType.customMetric.customFilter.tooltip": "このKQLクエリを使用して、一部の関連する条件でドキュメントをフィルタリングできます。", - "xpack.observability.slo.sloEdit.sliType.customMetric.deleteLabel": "メトリックを削除", - "xpack.observability.slo.sloEdit.sliType.customMetric.equation.invalidCharacters": "等式フィールドでは次の文字のみを使用できます:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", - "xpack.observability.slo.sloEdit.sliType.customMetric.equationHelpText": "基本的な数式をサポートします。有効な文字:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", - "xpack.observability.slo.sloEdit.sliType.customMetric.equationLabel": "式", - "xpack.observability.slo.sloEdit.sliType.customMetric.filterLabel": "フィルター", - "xpack.observability.slo.sloEdit.sliType.customMetric.goodTitle": "良好なイベント数", - "xpack.observability.slo.sloEdit.sliType.customMetric.metricField.placeholder": "メトリックフィールドを選択", - "xpack.observability.slo.sloEdit.sliType.customMetric.metricLabel": "メトリック", - "xpack.observability.slo.sloEdit.sliType.customMetric.queryFilter": "クエリのフィルター", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalEquation.tooltip": "これは基本的な数学ロジック(A + B / C)とブールロジック(A < B ?A :B)をサポートします。", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalMetric.tooltip": "このフィールドのデータは「sum」集計で集約されます。", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalTitle": "合計イベント数", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregation.placeholder": "集約を選択してください", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregationLabel": "アグリゲーション", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregationTooltip": "\"value count\"集約は、ヒストグラムフィールドの合計カウントを返します。Rangeは、ヒストグラムフィールドから、以下で定義された範囲内のカウントを返します。", - "xpack.observability.slo.sloEdit.sliType.histogram.customFilter": "インデックスで適用するカスタムフィルター", - "xpack.observability.slo.sloEdit.sliType.histogram.customFilter.tooltip": "このKQLクエリを使用して、一部の関連する条件でドキュメントをフィルタリングできます。", - "xpack.observability.slo.sloEdit.sliType.histogram.fromLabel": "開始:", - "xpack.observability.slo.sloEdit.sliType.histogram.fromTooltip": "\"from\"値は含まれます。", - "xpack.observability.slo.sloEdit.sliType.histogram.goodTitle": "良好なイベント数", - "xpack.observability.slo.sloEdit.sliType.histogram.kqlFilterLabel": "KQLフィルター", - "xpack.observability.slo.sloEdit.sliType.histogram.metricField.placeholder": "ヒストグラムフィールドを選択", - "xpack.observability.slo.sloEdit.sliType.histogram.metricLabel": "フィールド", - "xpack.observability.slo.sloEdit.sliType.histogram.query.tooltip": "このKQLクエリは、このインジケーターのイベントのサブセットを返します。", - "xpack.observability.slo.sloEdit.sliType.histogram.queryFilter": "クエリのフィルター", - "xpack.observability.slo.sloEdit.sliType.histogram.rangeLabel": "範囲", - "xpack.observability.slo.sloEdit.sliType.histogram.sourceTitle": "送信元", - "xpack.observability.slo.sloEdit.sliType.histogram.toLabel": "終了:", - "xpack.observability.slo.sloEdit.sliType.histogram.totalTitle": "合計イベント数", - "xpack.observability.slo.sloEdit.sliType.histogram.toTooltip": "\"to\"値は含まれません。", - "xpack.observability.slo.sloEdit.sliType.histogram.valueCountLabel": "値カウント", - "xpack.observability.slo.sloEdit.tags.label": "タグ", - "xpack.observability.slo.sloEdit.tags.placeholder": "タグを追加", - "xpack.observability.slo.sloEdit.targetSlo.label": "目標 / SLO(%)", - "xpack.observability.slo.sloEdit.targetSlo.tooltip": "SLOの目標(%)。", - "xpack.observability.slo.sloEdit.timeSliceTarget.label": "タイムスライス目標(%)", - "xpack.observability.slo.sloEdit.timeSliceTarget.tooltip": "スライスが良好か問題があるかどうかを判断するために使用される、個別のタイムスライス目標。", - "xpack.observability.slo.sloEdit.timesliceWindow.label": "タイムスライス期間(分)", - "xpack.observability.slo.sloEdit.timesliceWindow.tooltip": "データを評価するために使用されるタイムスライス期間サイズ。", - "xpack.observability.slo.sloEdit.timestampField.label": "タイムスタンプフィールド", - "xpack.observability.slo.sloEdit.timestampField.placeholder": "タイムスタンプフィールドを選択", - "xpack.observability.slo.sloEdit.timeWindow.calendarAligned": "カレンダーが調整されました", - "xpack.observability.slo.sloEdit.timeWindow.rolling": "ローリング", - "xpack.observability.slo.sloEdit.timeWindowDuration.label": "期間", - "xpack.observability.slo.sloEdit.timeWindowDuration.tooltip": "SLOを計算するために使用される時間枠期間。", - "xpack.observability.slo.sloEdit.timeWindowType.label": "時間枠", - "xpack.observability.slo.sloEdit.timeWindowType.tooltip": "ローリング時間枠とカレンダー時間枠のどちらかを選択します。", - "xpack.observability.slo.sloList.welcomePrompt.buttonLabel": "SLOの作成", - "xpack.observability.slo.sloList.welcomePrompt.getStartedMessage": "開始するには、まずSLOを作成します。", - "xpack.observability.slo.sloList.welcomePrompt.learnMore": "詳細について", - "xpack.observability.slo.sloList.welcomePrompt.learnMoreLink": "ドキュメントを読む", - "xpack.observability.slo.sloList.welcomePrompt.messageParagraph1": "SLAを遂行するには、SLI(サービスレベル指標)やSLO(サービスレベル目標)など、ビジネス上重要なメトリックを計測する必要があります。", - "xpack.observability.slo.sloList.welcomePrompt.messageParagraph2": "リアルタイムなインサイトを入手して、サービスのアップタイムや信頼性を手軽に利害関係者向けのレポートにまとめましょう。", - "xpack.observability.slo.sloList.welcomePrompt.needLicenseMessage": "SLOを使用するには、Elastic Cloudサブスクリプションまたはプレミアムライセンスが必要です。", - "xpack.observability.slo.sloList.welcomePrompt.signupForCloud": "Elastic Cloudに登録", - "xpack.observability.slo.sloList.welcomePrompt.signupForLicense": "ライセンスを登録", - "xpack.observability.slo.sloList.welcomePrompt.title": "SLOを追跡して遵守", - "xpack.observability.slo.sloStatusBadge.degrading": "劣化", - "xpack.observability.slo.sloStatusBadge.forecasted": "予測", - "xpack.observability.slo.sloStatusBadge.healthy": "正常", - "xpack.observability.slo.sloStatusBadge.noData": "データなし", - "xpack.observability.slo.sloStatusBadge.noDataTooltip": "データが集約され、利用可能になるまでには時間がかかる場合があります。", - "xpack.observability.slo.sloStatusBadge.violated": "違反", - "xpack.observability.sloCreatePageTitle": "新規SLOを作成", - "xpack.observability.sloEditPageTitle": "SLOの編集", - "xpack.observability.sloEmbeddable.config.cancelButtonLabel": "キャンセル", - "xpack.observability.sloEmbeddable.config.errors.sloRequired": "SLOが必要です。", - "xpack.observability.sloEmbeddable.config.sloSelector.ariaLabel": "SLO", - "xpack.observability.sloEmbeddable.config.sloSelector.headerTitle": "SLO構成", - "xpack.observability.sloEmbeddable.config.sloSelector.placeholder": "SLOを選択", - "xpack.observability.sloEmbeddable.description": "SLO正常性の概要を取得", - "xpack.observability.sloEmbeddable.displayName": "SLO概要", - "xpack.observability.sloEmbeddable.displayTitle": "SLO概要", - "xpack.observability.sloEmbeddable.overview.sloNotFoundText": "SLOが削除されました。ウィジェットをダッシュボードから安全に削除できます。", - "xpack.observability.slos.sloDetails.headerControl.exploreInApm": "サービス詳細", - "xpack.observability.slosLinkTitle": "SLO", - "xpack.observability.slosPage.autoRefreshButtonLabel": "自動更新", - "xpack.observability.slosPage.stopRefreshingButtonLabel": "更新中止", - "xpack.observability.slosPageTitle": "SLO", "xpack.observability.status.dataAvailable": "利用可能なデータがありません。", "xpack.observability.status.dataAvailableTitle": "利用可能なデータがありません", "xpack.observability.status.learnMoreButton": "詳細", @@ -28873,6 +28592,260 @@ "xpack.observability.ux.dashboard.webCoreVitals.help": "詳細", "xpack.observability.ux.dashboard.webCoreVitals.helpAriaLabel": "ヘルプ", "xpack.observability.ux.service.help": "最大トラフィックのRUMサービスが選択されています", + "xpack.slo.alerting.burnRate.reason": "{actionGroupName}:過去{longWindowDuration}のバーンレートは{longWindowBurnRate}で、過去{shortWindowDuration}のバーンレートは{shortWindowBurnRate}です。両期間とも{burnRateThreshold}を超えたらアラート", + "xpack.slo.alerting.burnRate.reasonForInstanceId": "{actionGroupName}:過去{longWindowDuration}のバーンレートは{longWindowBurnRate}、{instanceId}の過去{shortWindowDuration}のバーンレートは{shortWindowBurnRate}です。両期間とも{burnRateThreshold}を超えたらアラート", + "xpack.slo.burnRate.breachedStatustSubtitle": "現在のレートでは、エラー予算は{hour}時間後に使い果たされます。", + "xpack.slo.burnRate.threshold": "しきい値は{threshold}xです", + "xpack.slo.create.errorNotification": "{name}の作成中に問題が発生しました", + "xpack.slo.deleteConfirmationModal.title": "{name}を削除しますか?", + "xpack.slo.duration.day": "{duration, plural, other {#日}}", + "xpack.slo.duration.hour": "{duration, plural, other {#時間}}", + "xpack.slo.duration.minute": "{duration, plural, other {#分}}", + "xpack.slo.duration.month": "{duration, plural, other {#月}}", + "xpack.slo.duration.week": "{duration, plural, other {#週}}", + "xpack.slo.indicatorTypeBadge.exploreInApm": "{service}詳細を表示", + "xpack.slo.rules.burnRate.errors.invalidThresholdValue": "バーンレートしきい値は1以上{maxBurnRate}以下でなければなりません。", + "xpack.slo.rules.groupByMessage": "選択したSLOは\"{groupByField}\"にパーティションが作成されました。このルールは、パーティションフィールドで見つかったすべてのインスタンスを監視し、アラートを生成します。", + "xpack.slo.rules.longWindowDuration.tooltip": "バーンレートが計算されるルックバック期間。ルックバック期間を{shortWindowDuration}分(ルックバック期間の1/12)と短くすることで、より高速な復帰が可能になります", + "xpack.slo.slo.activeAlertsBadge.label": "{count, plural, other {#件のアラート}}", + "xpack.slo.slo.delete.errorNotification": "{name}の削除に失敗しました", + "xpack.slo.slo.delete.successNotification": "{name}が削除されました", + "xpack.slo.slo.timeWindow.calendar": "{elapsed}/{total}日", + "xpack.slo.sloDetails.errorBudgetChartPanel.duration": "過去{duration}", + "xpack.slo.sloDetails.overview.apmSource.environmentLabel": "環境:{value}", + "xpack.slo.sloDetails.overview.apmSource.serviceLabel": "サービス:{value}", + "xpack.slo.sloDetails.overview.apmSource.transactionNameLabel": "transactionName: {value}", + "xpack.slo.sloDetails.overview.apmSource.transactionTypeLabel": "transactionType: {value}", + "xpack.slo.sloDetails.overview.calendarAlignedTimeWindow": "{duration}カレンダーが調整されました", + "xpack.slo.sloDetails.overview.observedValueSubtitle": "{objective}(目的は{value})", + "xpack.slo.sloDetails.overview.rollingTimeWindow": "{duration}ローリング", + "xpack.slo.sloDetails.overview.timeslicesBudgetingMethodDetails": "{duration}スライス、{target}ターゲット", + "xpack.slo.sloDetails.sliHistoryChartPanel.duration": "過去{duration}", + "xpack.slo.sloEdit.rollingTimeWindow.days": "{number}日", + "xpack.slo.update.errorNotification": "{name}の更新中にエラーが発生しました", + "xpack.slo.update.successNotification": "正常に{name}を更新しました", + "xpack.slo.alerting.alertDetailsUrlDescription": "アラートトラブルシューティングビューにリンクして、さらに詳しい状況や詳細を確認できます。server.publicBaseUrlが構成されていない場合は、空の文字列になります。", + "xpack.slo.alerting.burnRate.alertAction": "重大", + "xpack.slo.alerting.burnRate.highPriorityAction": "高", + "xpack.slo.alerting.burnRate.lowPriorityAction": "低", + "xpack.slo.alerting.burnRate.mediumPriorityAction": "中", + "xpack.slo.alerting.reasonDescription": "アラートの理由の簡潔な説明", + "xpack.slo.alerting.sloIdDescription": "SLO一意のID。", + "xpack.slo.alerting.sloInstanceIdDescription": "SLOインスタンスID。", + "xpack.slo.alerting.sloNameDescription": "SLO名。", + "xpack.slo.alerting.thresholdDescription": "バーンレートしきい値。", + "xpack.slo.alerting.timestampDescription": "アラートが検出された時点のタイムスタンプ。", + "xpack.slo.alerting.viewInAppUrlDescription": "詳細な調査を支援するSLO詳細ページへのURL。", + "xpack.slo.alerting.windowDescription": "関連付けられたバーンレート値の期間。", + "xpack.slo.budgetingMethod.occurrences": "オカレンス", + "xpack.slo.budgetingMethod.timeslices": "タイムスライス", + "xpack.slo.burnRate.breachedStatustTitle": "重大値違反", + "xpack.slo.burnRate.noDataStatusSubtitle": "その他のデータを待機中です。", + "xpack.slo.burnRate.noDataStatusTitle": "値なし", + "xpack.slo.burnRate.okStatusSubtitle": "エラー予算が枯渇するリスクはありません。", + "xpack.slo.burnRate.okStatusTitle": "許容値", + "xpack.slo.burnRate.technicalPreviewBadgeDescription": "この機能はテクニカルプレビュー中であり、将来のバージョンで変更または削除される可能性があります。デザインとコードは正式に一般公開された機能より完成度が低く、現状のまま保証なしで提供されています。テクニカルプレビュー機能は、正式に一般公開された機能に適用されるサポートサービスレベル契約の対象外です。", + "xpack.slo.burnRate.technicalPreviewBadgeTitle": "テクニカルプレビュー", + "xpack.slo.burnRate.timeRangeBtnLegend": "時間範囲を選択", + "xpack.slo.burnRate.title": "バーンレート", + "xpack.slo.deleteConfirmationModal.cancelButtonLabel": "キャンセル", + "xpack.slo.deleteConfirmationModal.deleteButtonLabel": "削除", + "xpack.slo.deleteConfirmationModal.descriptionText": "このSLOを削除した後、復元することはできません。", + "xpack.slo.duration.daily": "日ごと", + "xpack.slo.duration.hourly": "1 時間ごと", + "xpack.slo.duration.minutely": "毎分", + "xpack.slo.duration.monthly": "月ごと", + "xpack.slo.duration.weekly": "週ごと", + "xpack.slo.globalDiagnosis.errorNotification": "この機能を使用する権限がありません。", + "xpack.slo.indicators.apmAvailability": "APM可用性", + "xpack.slo.indicators.apmLatency": "APMレイテンシ", + "xpack.slo.indicators.customKql": "カスタムKQL", + "xpack.slo.indicators.customMetric": "カスタムメトリック", + "xpack.slo.indicators.histogram": "ヒストグラムメトリック", + "xpack.slo.item.actions.button": "アクション", + "xpack.slo.item.actions.clone": "クローンを作成", + "xpack.slo.item.actions.createRule": "新しいアラートルールを作成", + "xpack.slo.item.actions.delete": "削除", + "xpack.slo.item.actions.details": "詳細", + "xpack.slo.item.actions.edit": "編集", + "xpack.slo.item.actions.manageRules": "ルールの管理", + "xpack.slo.list.emptyMessage": "条件に合った結果はありません。", + "xpack.slo.list.emptyTitle": "成果がありません", + "xpack.slo.list.errorMessage": "SLOオブジェクトの読み込みエラーが発生しました。ヘルプについては、管理者にお問い合わせください。", + "xpack.slo.list.errorNotification": "SLOの取得中に問題が発生しました", + "xpack.slo.list.errorTitle": "SLOを読み込めません", + "xpack.slo.list.search": "SLOを検索...", + "xpack.slo.list.sortBy.errorBudgetConsumed": "エラー予算が消費されました", + "xpack.slo.list.sortBy.errorBudgetRemaining": "残り予算エラー", + "xpack.slo.list.sortBy.sliValue": "SLI値", + "xpack.slo.list.sortBy.sloStatus": "SLOステータス", + "xpack.slo.rules.actionGroupSelectorLabel": "アクショングループ", + "xpack.slo.rules.addWindowAriaLabel": "時間枠を追加", + "xpack.slo.rules.burnRate.defaultActionMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\}は次の条件でアクティブです。\n\n- SLO: \\{\\{context.sloName\\}\\}'\n- 過去\\{\\{context.longWindow.duration\\}\\}のバーンレートが\\{\\{context.longWindow.burnRate\\}\\}である\n- 過去\\{\\{context.shortWindow.duration\\}\\}のバーンレートが\\{\\{context.shortWindow.burnRate\\}\\}である\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[アラート詳細を表示](\\{\\{context.alertDetailsUrl\\}\\})\n", + "xpack.slo.rules.burnRate.defaultRecoveryMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\}が回復しました。\n\n- SLO: \\{\\{context.sloName\\}\\}'\n- 過去\\{\\{context.longWindow.duration\\}\\}のバーンレートが\\{\\{context.longWindow.burnRate\\}\\}である\n- 過去\\{\\{context.shortWindow.duration\\}\\}のバーンレートが\\{\\{context.shortWindow.burnRate\\}\\}である\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[アラート詳細を表示](\\{\\{context.alertDetailsUrl\\}\\})\n", + "xpack.slo.rules.burnRate.description": "SLOバーンレートが定義された期間で高すぎるときにアラートを通知します。", + "xpack.slo.rules.burnRate.errors.burnRateThresholdRequired": "バーンレートしきい値は必須です。", + "xpack.slo.rules.burnRate.errors.sloRequired": "SLOが必要です。", + "xpack.slo.rules.burnRate.errors.windowDurationRequired": "ループバック期間は必須です。", + "xpack.slo.rules.burnRate.name": "SLOバーンレート", + "xpack.slo.rules.burnRate.rowLabel": "バーンレートしきい値", + "xpack.slo.rules.burnRate.tooltip": "バーンレートは、サービスがルックバック期間でエラー予算をどの程度速く消費するのかを示します。", + "xpack.slo.rules.deleteWindowLabel": "時間枠を削除", + "xpack.slo.rules.longWindow.errorText": "ループバック期間は1~72時間でなければなりません。", + "xpack.slo.rules.longWindow.rowLabel": "ルックバック(時間)", + "xpack.slo.rules.longWindow.valueLabel": "ルックバック期間(時間)", + "xpack.slo.rules.sloSelector.ariaLabel": "SLO", + "xpack.slo.rules.sloSelector.placeholder": "SLOを選択", + "xpack.slo.rules.sloSelector.rowLabel": "SLO", + "xpack.slo.slo.activeAlertsBadge.ariaLabel": "アクティブアラートバッジ", + "xpack.slo.slo.item.actions.clone": "クローンを作成", + "xpack.slo.slo.item.actions.delete": "削除", + "xpack.slo.slo.rulesBadge.popover": "このSLOではまだルールが構成されていません。SLOに違反したときにアラートを受信しません。", + "xpack.slo.sloDetails.errorBudgetChartPanel.chartTitle": "残り予算エラー", + "xpack.slo.sloDetails.errorBudgetChartPanel.remaining": "残り", + "xpack.slo.sloDetails.errorBudgetChartPanel.title": "エラー予算バーンダウン", + "xpack.slo.sloDetails.headerControl.actions": "アクション", + "xpack.slo.sloDetails.headerControl.createBurnRateRule": "新しいアラートルールを作成", + "xpack.slo.sloDetails.headerControl.edit": "編集", + "xpack.slo.sloDetails.headerControl.manageRules": "ルールの管理", + "xpack.slo.sloDetails.headerTitle.createdMessage": "作成日時", + "xpack.slo.sloDetails.headerTitle.lastUpdatedMessage": "最終更新日", + "xpack.slo.sloDetails.overview.apmSource": "APMソース", + "xpack.slo.sloDetails.overview.budgetingMethodTitle": "予算設定方法", + "xpack.slo.sloDetails.overview.descriptionTitle": "説明", + "xpack.slo.sloDetails.overview.indicatorTypeTitle": "インジケータータイプ", + "xpack.slo.sloDetails.overview.observedValueTitle": "観測された値", + "xpack.slo.sloDetails.overview.tagsTitle": "タグ", + "xpack.slo.sloDetails.overview.timeWindowTitle": "時間枠", + "xpack.slo.sloDetails.sliHistoryChartPanel.chartTitle": "SLI値", + "xpack.slo.sloDetails.sliHistoryChartPanel.current": "観測された値", + "xpack.slo.sloDetails.sliHistoryChartPanel.objective": "目的", + "xpack.slo.sloDetails.sliHistoryChartPanel.title": "履歴SLI", + "xpack.slo.sloDetails.tab.alertsLabel": "アラート", + "xpack.slo.sloDetails.tab.overviewLabel": "概要", + "xpack.slo.sloEdit.apm.filter.tooltip": "このKQLクエリは、このSLOの一部の関連する情報でAPMメトリックをフィルタリングするために使用されます。", + "xpack.slo.sloEdit.apm.serviceName.tooltip": "これはこのSLOによって監視されるAPMサービスです。", + "xpack.slo.sloEdit.apmAvailability.serviceEnvironment": "サービス環境", + "xpack.slo.sloEdit.apmAvailability.serviceEnvironment.placeholder": "環境を選択", + "xpack.slo.sloEdit.apmAvailability.serviceName": "サービス名", + "xpack.slo.sloEdit.apmAvailability.serviceName.placeholder": "APMサービスを選択", + "xpack.slo.sloEdit.apmAvailability.transactionName": "トランザクション名", + "xpack.slo.sloEdit.apmAvailability.transactionName.placeholder": "トランザクション名を選択", + "xpack.slo.sloEdit.apmAvailability.transactionType": "トランザクションタイプ", + "xpack.slo.sloEdit.apmAvailability.transactionType.placeholder": "トランザクションタイプを選択", + "xpack.slo.sloEdit.apmLatency.filter": "クエリのフィルター", + "xpack.slo.sloEdit.apmLatency.filter.placeholder": "インデックスで適用するカスタムフィルター", + "xpack.slo.sloEdit.apmLatency.serviceEnvironment": "サービス環境", + "xpack.slo.sloEdit.apmLatency.serviceEnvironment.placeholder": "環境を選択", + "xpack.slo.sloEdit.apmLatency.serviceName": "サービス名", + "xpack.slo.sloEdit.apmLatency.serviceName.placeholder": "APMサービスを選択", + "xpack.slo.sloEdit.apmLatency.threshold.placeholder": "しきい値(ミリ秒)", + "xpack.slo.sloEdit.apmLatency.threshold.tooltip": "SLOで「良好」または「成功」リクエストを定義するしきい値(ミリ秒)を構成します。", + "xpack.slo.sloEdit.apmLatency.transactionName": "トランザクション名", + "xpack.slo.sloEdit.apmLatency.transactionName.placeholder": "トランザクション名を選択", + "xpack.slo.sloEdit.apmLatency.transactionType": "トランザクションタイプ", + "xpack.slo.sloEdit.apmLatency.transactionType.placeholder": "トランザクションタイプを選択", + "xpack.slo.sloEdit.budgetingMethod.label": "予算設定方法", + "xpack.slo.sloEdit.budgetingMethod.tooltip": "出現に基づくSLOは、該当期間における、合計イベント数に対する良好なイベント数の比率を使用します。タイムスライスに基づくSLOは、該当期間における、合計タイムスライス数に対する良好なタイムスライス数の比率を使用します。", + "xpack.slo.sloEdit.calendarTimeWindow.monthly": "月ごと", + "xpack.slo.sloEdit.calendarTimeWindow.weekly": "週ごと", + "xpack.slo.sloEdit.cancelButton": "キャンセル", + "xpack.slo.sloEdit.createSloButton": "SLOの作成", + "xpack.slo.sloEdit.customKql.indexSelection.label": "インデックス", + "xpack.slo.sloEdit.dataPreviewChart.errorMessage": "現在のインジケーター設定は無効です", + "xpack.slo.sloEdit.dataPreviewChart.explanationMessage": "インジケーターフィールドに入力すると、現在のメトリックが可視化されます。", + "xpack.slo.sloEdit.dataPreviewChart.panelLabel": "SLIプレビュー", + "xpack.slo.sloEdit.dataPreviewChart.xTitle": "過去 1 時間", + "xpack.slo.sloEdit.dataPreviewChart.yTitle": "SLI", + "xpack.slo.sloEdit.definition.sliType": "SLIタイプを選択", + "xpack.slo.sloEdit.definition.title": "SLIを定義", + "xpack.slo.sloEdit.description.sloDescription": "説明", + "xpack.slo.sloEdit.description.sloDescriptionPlaceholder": "SLOの簡潔な説明", + "xpack.slo.sloEdit.description.sloName": "SLO名", + "xpack.slo.sloEdit.description.sloNamePlaceholder": "SLOの名前", + "xpack.slo.sloEdit.description.title": "SLOの説明", + "xpack.slo.sloEdit.editSloButton": "SLOの更新", + "xpack.slo.sloEdit.fieldSelector.all": "すべて", + "xpack.slo.sloEdit.groupBy.label": "パーティション", + "xpack.slo.sloEdit.groupBy.placeholder": "パーティション分割する任意のフィールドを選択", + "xpack.slo.sloEdit.groupBy.tooltip": "選択したフィールドの値ごとに個別のSLOを作成します。", + "xpack.slo.sloEdit.objectives.title": "目標を設定", + "xpack.slo.sloEdit.sliType.customKql.customFilter": "インデックスで適用するカスタムフィルター", + "xpack.slo.sloEdit.sliType.customKql.customFilter.tooltip": "このKQLクエリを使用して、一部の関連する条件でドキュメントをフィルタリングできます。", + "xpack.slo.sloEdit.sliType.customKql.goodQuery": "良いクエリ", + "xpack.slo.sloEdit.sliType.customKql.goodQuery.tooltip": "このKQLクエリは、SLOを計算する目的で、「良好」または「成功」と見なされるイベントのサブセットを返します。このクエリは、ステータスコード、エラー、メッセージ、または他の関連するフィールドなどの一部の関連する条件に基づいて、イベントをフィルタリングします。", + "xpack.slo.sloEdit.sliType.customKql.goodQueryPlaceholder": "良いイベントを定義", + "xpack.slo.sloEdit.sliType.customKql.queryFilter": "クエリのフィルター", + "xpack.slo.sloEdit.sliType.customKql.totalQuery": "合計クエリ", + "xpack.slo.sloEdit.sliType.customKql.totalQuery.tooltip": "このKQLクエリは、良好なイベントと問題があるイベントの両方を含む、SLO計算に関連するすべてのイベントを返します。", + "xpack.slo.sloEdit.sliType.customKql.totalQueryPlaceholder": "合計イベントを定義", + "xpack.slo.sloEdit.sliType.customMetric.addMetricAriaLabel": "メトリックを追加", + "xpack.slo.sloEdit.sliType.customMetric.addMetricLabel": "メトリックを追加", + "xpack.slo.sloEdit.sliType.customMetric.customFilter": "インデックスで適用するカスタムフィルター", + "xpack.slo.sloEdit.sliType.customMetric.customFilter.tooltip": "このKQLクエリを使用して、一部の関連する条件でドキュメントをフィルタリングできます。", + "xpack.slo.sloEdit.sliType.customMetric.deleteLabel": "メトリックを削除", + "xpack.slo.sloEdit.sliType.customMetric.equation.invalidCharacters": "等式フィールドでは次の文字のみを使用できます:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", + "xpack.slo.sloEdit.sliType.customMetric.equationHelpText": "基本的な数式をサポートします。有効な文字:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", + "xpack.slo.sloEdit.sliType.customMetric.equationLabel": "式", + "xpack.slo.sloEdit.sliType.customMetric.filterLabel": "フィルター", + "xpack.slo.sloEdit.sliType.customMetric.goodTitle": "良好なイベント数", + "xpack.slo.sloEdit.sliType.customMetric.metricField.placeholder": "メトリックフィールドを選択", + "xpack.slo.sloEdit.sliType.customMetric.metricLabel": "メトリック", + "xpack.slo.sloEdit.sliType.customMetric.queryFilter": "クエリのフィルター", + "xpack.slo.sloEdit.sliType.customMetric.totalEquation.tooltip": "これは基本的な数学ロジック(A + B / C)とブールロジック(A < B ?A :B)をサポートします。", + "xpack.slo.sloEdit.sliType.customMetric.totalMetric.tooltip": "このフィールドのデータは「sum」集計で集約されます。", + "xpack.slo.sloEdit.sliType.customMetric.totalTitle": "合計イベント数", + "xpack.slo.sloEdit.sliType.histogram.aggregation.placeholder": "集約を選択してください", + "xpack.slo.sloEdit.sliType.histogram.aggregationLabel": "アグリゲーション", + "xpack.slo.sloEdit.sliType.histogram.aggregationTooltip": "\"value count\"集約は、ヒストグラムフィールドの合計カウントを返します。Rangeは、ヒストグラムフィールドから、以下で定義された範囲内のカウントを返します。", + "xpack.slo.sloEdit.sliType.histogram.customFilter": "インデックスで適用するカスタムフィルター", + "xpack.slo.sloEdit.sliType.histogram.customFilter.tooltip": "このKQLクエリを使用して、一部の関連する条件でドキュメントをフィルタリングできます。", + "xpack.slo.sloEdit.sliType.histogram.fromLabel": "開始:", + "xpack.slo.sloEdit.sliType.histogram.fromTooltip": "\"from\"値は含まれます。", + "xpack.slo.sloEdit.sliType.histogram.goodTitle": "良好なイベント数", + "xpack.slo.sloEdit.sliType.histogram.kqlFilterLabel": "KQLフィルター", + "xpack.slo.sloEdit.sliType.histogram.metricField.placeholder": "ヒストグラムフィールドを選択", + "xpack.slo.sloEdit.sliType.histogram.metricLabel": "フィールド", + "xpack.slo.sloEdit.sliType.histogram.query.tooltip": "このKQLクエリは、このインジケーターのイベントのサブセットを返します。", + "xpack.slo.sloEdit.sliType.histogram.queryFilter": "クエリのフィルター", + "xpack.slo.sloEdit.sliType.histogram.rangeLabel": "範囲", + "xpack.slo.sloEdit.sliType.histogram.sourceTitle": "送信元", + "xpack.slo.sloEdit.sliType.histogram.toLabel": "終了:", + "xpack.slo.sloEdit.sliType.histogram.totalTitle": "合計イベント数", + "xpack.slo.sloEdit.sliType.histogram.toTooltip": "\"to\"値は含まれません。", + "xpack.slo.sloEdit.sliType.histogram.valueCountLabel": "値カウント", + "xpack.slo.sloEdit.tags.label": "タグ", + "xpack.slo.sloEdit.tags.placeholder": "タグを追加", + "xpack.slo.sloEdit.targetSlo.label": "目標 / SLO(%)", + "xpack.slo.sloEdit.targetSlo.tooltip": "SLOの目標(%)。", + "xpack.slo.sloEdit.timeSliceTarget.label": "タイムスライス目標(%)", + "xpack.slo.sloEdit.timeSliceTarget.tooltip": "スライスが良好か問題があるかどうかを判断するために使用される、個別のタイムスライス目標。", + "xpack.slo.sloEdit.timesliceWindow.label": "タイムスライス期間(分)", + "xpack.slo.sloEdit.timesliceWindow.tooltip": "データを評価するために使用されるタイムスライス期間サイズ。", + "xpack.slo.sloEdit.timestampField.label": "タイムスタンプフィールド", + "xpack.slo.sloEdit.timestampField.placeholder": "タイムスタンプフィールドを選択", + "xpack.slo.sloEdit.timeWindow.calendarAligned": "カレンダーが調整されました", + "xpack.slo.sloEdit.timeWindow.rolling": "ローリング", + "xpack.slo.sloEdit.timeWindowDuration.label": "期間", + "xpack.slo.sloEdit.timeWindowDuration.tooltip": "SLOを計算するために使用される時間枠期間。", + "xpack.slo.sloEdit.timeWindowType.label": "時間枠", + "xpack.slo.sloEdit.timeWindowType.tooltip": "ローリング時間枠とカレンダー時間枠のどちらかを選択します。", + "xpack.slo.sloList.welcomePrompt.buttonLabel": "SLOの作成", + "xpack.slo.sloList.welcomePrompt.getStartedMessage": "開始するには、まずSLOを作成します。", + "xpack.slo.sloList.welcomePrompt.learnMore": "詳細について", + "xpack.slo.sloList.welcomePrompt.learnMoreLink": "ドキュメントを読む", + "xpack.slo.sloList.welcomePrompt.messageParagraph1": "SLAを遂行するには、SLI(サービスレベル指標)やSLO(サービスレベル目標)など、ビジネス上重要なメトリックを計測する必要があります。", + "xpack.slo.sloList.welcomePrompt.messageParagraph2": "リアルタイムなインサイトを入手して、サービスのアップタイムや信頼性を手軽に利害関係者向けのレポートにまとめましょう。", + "xpack.slo.sloList.welcomePrompt.needLicenseMessage": "SLOを使用するには、Elastic Cloudサブスクリプションまたはプレミアムライセンスが必要です。", + "xpack.slo.sloList.welcomePrompt.signupForCloud": "Elastic Cloudに登録", + "xpack.slo.sloList.welcomePrompt.signupForLicense": "ライセンスを登録", + "xpack.slo.sloList.welcomePrompt.title": "SLOを追跡して遵守", + "xpack.slo.sloStatusBadge.degrading": "劣化", + "xpack.slo.sloStatusBadge.forecasted": "予測", + "xpack.slo.sloStatusBadge.healthy": "正常", + "xpack.slo.sloStatusBadge.noData": "データなし", + "xpack.slo.sloStatusBadge.noDataTooltip": "データが集約され、利用可能になるまでには時間がかかる場合があります。", + "xpack.slo.sloStatusBadge.violated": "違反", "xpack.observabilityAiAssistant.couldNotFindConversationContent": "id {conversationId}の会話が見つかりませんでした。会話が存在し、それにアクセスできることを確認してください。", "xpack.observabilityAiAssistant.executedFunctionFailureEvent": "関数{functionName}の実行に失敗しました", "xpack.observabilityAiAssistant.poweredByModel": "{model}で駆動", @@ -42569,4 +42542,4 @@ "xpack.serverlessObservability.nav.projectSettings": "プロジェクト設定", "xpack.serverlessObservability.nav.visualizations": "ビジュアライゼーション" } -} +} \ No newline at end of file diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 3ac57ca2847a3..5c6cad9a35bb6 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -21581,7 +21581,6 @@ "xpack.lens.chart.labelVisibility.auto": "自动", "xpack.lens.chart.labelVisibility.custom": "定制", "xpack.lens.chart.labelVisibility.none": "无", - "xpack.lens.chartSwitch.dataLossDescription": "选择此可视化类型将移除不兼容的配置选项和多个图层(如果存在)", "xpack.lens.chartSwitch.dataLossLabel": "警告", "xpack.lens.chartSwitch.experimentalLabel": "技术预览", "xpack.lens.chartTitle.unsaved": "未保存的可视化", @@ -28201,39 +28200,6 @@ "xpack.observability.profilingCo2PerKWHUiSettingDescription": "碳强度衡量您的数据中心电力的清洁程度。 \n 具体来说,它衡量在特定地区每消耗一千瓦时 (kWh) 电力导致的平均 CO2 排放量。\n 请使用云碳足迹 {datasheetLink} 根据您所在的地区更新此值。默认为美国东部(北弗吉尼亚州)。", "xpack.observability.rules.deleteConfirmationModal.deleteButtonLabel": "删除{title}", "xpack.observability.rules.deleteConfirmationModal.descriptionText": "您无法恢复删除的{title}。", - "xpack.observability.slo.alerting.burnRate.reason": "{actionGroupName}:过去 {longWindowDuration} 的消耗速度为 {longWindowBurnRate} 且过去 {shortWindowDuration} 为 {shortWindowBurnRate}。两个窗口超出 {burnRateThreshold} 时告警", - "xpack.observability.slo.alerting.burnRate.reasonForInstanceId": "{actionGroupName}:过去 {longWindowDuration} 的消耗速度为 {longWindowBurnRate},且对于 {instanceId},过去 {shortWindowDuration} 为 {shortWindowBurnRate}。两个窗口超出 {burnRateThreshold} 时告警", - "xpack.observability.slo.burnRate.breachedStatustSubtitle": "按照当前的速率,错误预算将在 {hour} 小时后耗尽。", - "xpack.observability.slo.burnRate.threshold": "阈值为 {threshold}x", - "xpack.observability.slo.create.errorNotification": "创建 {name} 时出现问题", - "xpack.observability.slo.deleteConfirmationModal.title": "删除 {name}?", - "xpack.observability.slo.duration.day": "{duration, plural, other {# 天}}", - "xpack.observability.slo.duration.hour": "{duration, plural, other {# 小时}}", - "xpack.observability.slo.duration.minute": "{duration, plural, other {# 分钟}}", - "xpack.observability.slo.duration.month": "{duration, plural, other {# 个月}}", - "xpack.observability.slo.duration.week": "{duration, plural, other {# 周}}", - "xpack.observability.slo.indicatorTypeBadge.exploreInApm": "查看 {service} 详情", - "xpack.observability.slo.rules.burnRate.errors.invalidThresholdValue": "消耗速度阈值必须介于 1 和 {maxBurnRate} 之间。", - "xpack.observability.slo.rules.groupByMessage": "已使用分区在“{groupByField}”上创建您选定的 SLO。此规则将监测在分区字段中发现的每个实例并为其生成告警。", - "xpack.observability.slo.rules.longWindowDuration.tooltip": "在其间计算消耗速度的回顾期。将使用 {shortWindowDuration} 分钟的较短回顾期(1/12 的回顾期)以便更快恢复", - "xpack.observability.slo.slo.activeAlertsBadge.label": "{count, plural, other {# 个告警}}", - "xpack.observability.slo.slo.delete.errorNotification": "无法删除{name}", - "xpack.observability.slo.slo.delete.successNotification": "已删除 {name}", - "xpack.observability.slo.slo.stats.objective": "{objective} 目标", - "xpack.observability.slo.slo.timeWindow.calendar": "{elapsed}/{total} 天", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.duration": "过去 {duration}", - "xpack.observability.slo.sloDetails.overview.apmSource.environmentLabel": "环境:{value}", - "xpack.observability.slo.sloDetails.overview.apmSource.serviceLabel": "服务:{value}", - "xpack.observability.slo.sloDetails.overview.apmSource.transactionNameLabel": "事务名称:{value}", - "xpack.observability.slo.sloDetails.overview.apmSource.transactionTypeLabel": "事务类型:{value}", - "xpack.observability.slo.sloDetails.overview.calendarAlignedTimeWindow": "{duration} 日历已对齐", - "xpack.observability.slo.sloDetails.overview.observedValueSubtitle": "{value}(目标为 {objective})", - "xpack.observability.slo.sloDetails.overview.rollingTimeWindow": "{duration} 滚动", - "xpack.observability.slo.sloDetails.overview.timeslicesBudgetingMethodDetails": "{duration} 切片,{target} 目标", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.duration": "过去 {duration}", - "xpack.observability.slo.sloEdit.rollingTimeWindow.days": "{number} 天", - "xpack.observability.slo.update.errorNotification": "更新 {name} 时出现问题", - "xpack.observability.slo.update.successNotification": "成功更新 {name}", "xpack.observability.syntheticsThrottlingEnabledExperimentDescription": "在 Synthetics 监测配置中启用限制设置。请注意,即使该设置处于活动状态,可能仍然无法对您的监测应用限制。仅限内部使用。{link}", "xpack.observability.transactionRateLabel": "{value} tpm", "xpack.observability.ux.coreVitals.averageMessage": " 且小于 {bad}", @@ -28302,11 +28268,6 @@ "xpack.observability.breadcrumbs.alertsLinkText": "告警", "xpack.observability.breadcrumbs.overviewLinkText": "概览", "xpack.observability.breadcrumbs.rulesLinkText": "规则", - "xpack.observability.breadcrumbs.sloCreateLabel": "创建", - "xpack.observability.breadcrumbs.sloDetailsLinkText": "详情", - "xpack.observability.breadcrumbs.sloEditLabel": "编辑", - "xpack.observability.breadcrumbs.sloLabel": "SLO", - "xpack.observability.breadcrumbs.slosLinkText": "SLO", "xpack.observability.cases.caseFeatureNoPermissionsMessage": "要查看案例,必须对 Kibana 工作区中的案例功能有权限。有关详细信息,请联系您的 Kibana 管理员。", "xpack.observability.cases.caseFeatureNoPermissionsTitle": "需要 Kibana 功能权限", "xpack.observability.cases.caseView.goToDocumentationButton": "查看文档", @@ -28383,7 +28344,6 @@ "xpack.observability.customThreshold.rule.viewInAppUrlActionVariableDescription": "链接到告警源", "xpack.observability.defaultApmServiceEnvironment": "默认服务环境", "xpack.observability.defaultApmServiceEnvironmentDescription": "为 APM 应用设置默认环境。如果留空,默认情况下将显示所有环境中的数据。", - "xpack.observability.embeddableSlo.config.confirmButtonLabel": "确认配置", "xpack.observability.emptySection.apps.alert.description": "检测 Observability 内的复杂条件,并在满足那些条件时触发操作。", "xpack.observability.emptySection.apps.alert.link": "创建规则", "xpack.observability.emptySection.apps.alert.title": "未找到告警。", @@ -28422,7 +28382,6 @@ "xpack.observability.featureRegistry.deleteSubFeatureDetails": "删除案例和注释", "xpack.observability.featureRegistry.deleteSubFeatureName": "删除", "xpack.observability.featureRegistry.linkObservabilityTitle": "案例", - "xpack.observability.featureRegistry.linkSloTitle": "SLO", "xpack.observability.feedbackMenu.appName": "Observability", "xpack.observability.formatters.hoursTimeUnitLabel": "h", "xpack.observability.formatters.hoursTimeUnitLabelExtended": "小时", @@ -28554,246 +28513,6 @@ "xpack.observability.section.errorPanel": "尝试提取数据时发生错误。请重试", "xpack.observability.serviceGroupMaxServicesUiSettingDescription": "限制给定服务组中服务的数量", "xpack.observability.serviceGroupMaxServicesUiSettingName": "服务组中的最大服务数", - "xpack.observability.slo.alerting.alertDetailsUrlDescription": "链接到告警故障排除视图获取进一步的上下文和详情。如果未配置 server.publicBaseUrl,这将为空字符串。", - "xpack.observability.slo.alerting.burnRate.alertAction": "紧急", - "xpack.observability.slo.alerting.burnRate.highPriorityAction": "高", - "xpack.observability.slo.alerting.burnRate.lowPriorityAction": "低", - "xpack.observability.slo.alerting.burnRate.mediumPriorityAction": "中", - "xpack.observability.slo.alerting.reasonDescription": "告警原因的简洁描述", - "xpack.observability.slo.alerting.sloIdDescription": "SLO 唯一标识符。", - "xpack.observability.slo.alerting.sloInstanceIdDescription": "SLO 实例 ID。", - "xpack.observability.slo.alerting.sloNameDescription": "SLO 名称。", - "xpack.observability.slo.alerting.thresholdDescription": "消耗速度阈值。", - "xpack.observability.slo.alerting.timestampDescription": "检测到告警时的时间戳。", - "xpack.observability.slo.alerting.viewInAppUrlDescription": "SLO 详情页面的 URL,以帮助进行进一步调查。", - "xpack.observability.slo.alerting.windowDescription": "带有关联的消耗速度值的窗口持续时间。", - "xpack.observability.slo.budgetingMethod.occurrences": "发生次数", - "xpack.observability.slo.budgetingMethod.timeslices": "时间片", - "xpack.observability.slo.burnRate.breachedStatustTitle": "已超出临界值", - "xpack.observability.slo.burnRate.noDataStatusSubtitle": "等待更多数据。", - "xpack.observability.slo.burnRate.noDataStatusTitle": "无值", - "xpack.observability.slo.burnRate.okStatusSubtitle": "没有错误预算耗尽风险。", - "xpack.observability.slo.burnRate.okStatusTitle": "可接受的值", - "xpack.observability.slo.burnRate.technicalPreviewBadgeDescription": "此功能处于技术预览状态,可能会有所更改,或在未来版本中移除。设计和代码相对于正式发行版功能还不够成熟,将按原样提供,且不提供任何保证。技术预览功能不受正式发行版功能的支持服务水平协议约束。", - "xpack.observability.slo.burnRate.technicalPreviewBadgeTitle": "技术预览", - "xpack.observability.slo.burnRate.timeRangeBtnLegend": "选择时间范围", - "xpack.observability.slo.burnRate.title": "消耗速度", - "xpack.observability.slo.deleteConfirmationModal.cancelButtonLabel": "取消", - "xpack.observability.slo.deleteConfirmationModal.deleteButtonLabel": "删除", - "xpack.observability.slo.deleteConfirmationModal.descriptionText": "此 SLO 删除后无法恢复。", - "xpack.observability.slo.duration.daily": "每日", - "xpack.observability.slo.duration.hourly": "每小时", - "xpack.observability.slo.duration.minutely": "每分钟", - "xpack.observability.slo.duration.monthly": "每月", - "xpack.observability.slo.duration.weekly": "每周", - "xpack.observability.slo.globalDiagnosis.errorNotification": "您没有适当权限,无法使用此功能。", - "xpack.observability.slo.indicators.apmAvailability": "APM 可用性", - "xpack.observability.slo.indicators.apmLatency": "APM 延迟", - "xpack.observability.slo.indicators.customKql": "定制 KQL", - "xpack.observability.slo.indicators.customMetric": "定制指标", - "xpack.observability.slo.indicators.histogram": "直方图指标", - "xpack.observability.slo.item.actions.button": "操作", - "xpack.observability.slo.item.actions.clone": "克隆", - "xpack.observability.slo.item.actions.createRule": "创建新告警规则", - "xpack.observability.slo.item.actions.delete": "删除", - "xpack.observability.slo.item.actions.details": "详情", - "xpack.observability.slo.item.actions.edit": "编辑", - "xpack.observability.slo.item.actions.manageRules": "管理规则", - "xpack.observability.slo.list.emptyMessage": "没有匹配您的条件的结果。", - "xpack.observability.slo.list.emptyTitle": "无结果", - "xpack.observability.slo.list.errorMessage": "加载 SLO 时出错。请联系您的管理员寻求帮助。", - "xpack.observability.slo.list.errorNotification": "提取 SLO 时出现问题", - "xpack.observability.slo.list.errorTitle": "无法加载 SLO", - "xpack.observability.slo.list.search": "搜索您的 SLO......", - "xpack.observability.slo.list.sortBy.errorBudgetConsumed": "已消耗错误预算", - "xpack.observability.slo.list.sortBy.errorBudgetRemaining": "剩余错误预算", - "xpack.observability.slo.list.sortBy.sliValue": "SLI 值", - "xpack.observability.slo.list.sortBy.sloStatus": "SLO 状态", - "xpack.observability.slo.rules.actionGroupSelectorLabel": "操作组", - "xpack.observability.slo.rules.addWindowAriaLabel": "添加窗口", - "xpack.observability.slo.rules.addWIndowLabel": "添加窗口", - "xpack.observability.slo.rules.burnRate.defaultActionMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} 为活动状态,条件如下:\n\n- SLO:\\{\\{context.sloName\\}\\}'\n- 过去 \\{\\{context.longWindow.duration\\}\\} 的消耗速度为 \\{\\{context.longWindow.burnRate\\}\\}\n- 过去 \\{\\{context.shortWindow.duration\\}\\} 的消耗速度为 \\{\\{context.shortWindow.burnRate\\}\\}\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[查看告警详情](\\{\\{context.alertDetailsUrl\\}\\})\n", - "xpack.observability.slo.rules.burnRate.defaultRecoveryMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} 已恢复。\n\n- SLO:\\{\\{context.sloName\\}\\}'\n- 过去 \\{\\{context.longWindow.duration\\}\\} 的消耗速度为 \\{\\{context.longWindow.burnRate\\}\\}\n- 过去 \\{\\{context.shortWindow.duration\\}\\} 的消耗速度为 \\{\\{context.shortWindow.burnRate\\}\\}\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[查看告警详情](\\{\\{context.alertDetailsUrl\\}\\})\n", - "xpack.observability.slo.rules.burnRate.description": "在定义的期间内 SLO 消耗速度过高时告警。", - "xpack.observability.slo.rules.burnRate.errors.burnRateThresholdRequired": "“消耗速度阈值”必填。", - "xpack.observability.slo.rules.burnRate.errors.sloRequired": "“SLO”必填。", - "xpack.observability.slo.rules.burnRate.errors.windowDurationRequired": "“回顾期”必填。", - "xpack.observability.slo.rules.burnRate.name": "SLO 消耗速度", - "xpack.observability.slo.rules.burnRate.rowLabel": "消耗速度阈值", - "xpack.observability.slo.rules.burnRate.tooltip": "消耗速度是指服务在回顾期内耗用错误预算的速度。", - "xpack.observability.slo.rules.deleteWindowLabel": "删除窗口", - "xpack.observability.slo.rules.longWindow.errorText": "回顾期必须介于 1 到 72 小时之间。", - "xpack.observability.slo.rules.longWindow.rowLabel": "回顾(小时)", - "xpack.observability.slo.rules.longWindow.valueLabel": "回顾期(小时)", - "xpack.observability.slo.rules.sloSelector.ariaLabel": "SLO", - "xpack.observability.slo.rules.sloSelector.placeholder": "选择 SLO", - "xpack.observability.slo.rules.sloSelector.rowLabel": "SLO", - "xpack.observability.slo.slo.activeAlertsBadge.ariaLabel": "活动告警徽章", - "xpack.observability.slo.slo.item.actions.clone": "克隆", - "xpack.observability.slo.slo.item.actions.delete": "删除", - "xpack.observability.slo.slo.rulesBadge.popover": "尚未为此 SLO 配置任何规则。超出 SLO 时,您不会收到告警。", - "xpack.observability.slo.slo.stats.budgetRemaining": "剩余预算", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.chartTitle": "剩余错误预算", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.remaining": "剩余", - "xpack.observability.slo.sloDetails.errorBudgetChartPanel.title": "错误预算逐渐减少", - "xpack.observability.slo.sloDetails.headerControl.actions": "操作", - "xpack.observability.slo.sloDetails.headerControl.createBurnRateRule": "创建新告警规则", - "xpack.observability.slo.sloDetails.headerControl.edit": "编辑", - "xpack.observability.slo.sloDetails.headerControl.manageRules": "管理规则", - "xpack.observability.slo.sloDetails.headerTitle.createdMessage": "创建日期", - "xpack.observability.slo.sloDetails.headerTitle.lastUpdatedMessage": "上次更新时间", - "xpack.observability.slo.sloDetails.overview.apmSource": "APM 源", - "xpack.observability.slo.sloDetails.overview.budgetingMethodTitle": "预算编制方法", - "xpack.observability.slo.sloDetails.overview.descriptionTitle": "描述", - "xpack.observability.slo.sloDetails.overview.indicatorTypeTitle": "指标类型", - "xpack.observability.slo.sloDetails.overview.observedValueTitle": "观察值", - "xpack.observability.slo.sloDetails.overview.tagsTitle": "标签", - "xpack.observability.slo.sloDetails.overview.timeWindowTitle": "时间窗口", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.chartTitle": "SLI 值", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.current": "观察值", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.objective": "目标", - "xpack.observability.slo.sloDetails.sliHistoryChartPanel.title": "历史 SLI", - "xpack.observability.slo.sloDetails.tab.alertsLabel": "告警", - "xpack.observability.slo.sloDetails.tab.overviewLabel": "概览", - "xpack.observability.slo.sloEdit.apm.filter.tooltip": "此 KQL 查询用于根据该 SLO 的某些相关条件筛选 APM 指标。", - "xpack.observability.slo.sloEdit.apm.serviceName.tooltip": "这是受该 SLO 监测的 APM 服务。", - "xpack.observability.slo.sloEdit.apmAvailability.serviceEnvironment": "服务环境", - "xpack.observability.slo.sloEdit.apmAvailability.serviceEnvironment.placeholder": "选择环境", - "xpack.observability.slo.sloEdit.apmAvailability.serviceName": "服务名称", - "xpack.observability.slo.sloEdit.apmAvailability.serviceName.placeholder": "选择 APM 服务", - "xpack.observability.slo.sloEdit.apmAvailability.transactionName": "事务名称", - "xpack.observability.slo.sloEdit.apmAvailability.transactionName.placeholder": "选择事务名称", - "xpack.observability.slo.sloEdit.apmAvailability.transactionType": "事务类型", - "xpack.observability.slo.sloEdit.apmAvailability.transactionType.placeholder": "选择事务类型", - "xpack.observability.slo.sloEdit.apmLatency.filter": "查询筛选", - "xpack.observability.slo.sloEdit.apmLatency.filter.placeholder": "要对索引应用的定制筛选", - "xpack.observability.slo.sloEdit.apmLatency.serviceEnvironment": "服务环境", - "xpack.observability.slo.sloEdit.apmLatency.serviceEnvironment.placeholder": "选择环境", - "xpack.observability.slo.sloEdit.apmLatency.serviceName": "服务名称", - "xpack.observability.slo.sloEdit.apmLatency.serviceName.placeholder": "选择 APM 服务", - "xpack.observability.slo.sloEdit.apmLatency.threshold.placeholder": "阈值 (ms)", - "xpack.observability.slo.sloEdit.apmLatency.threshold.tooltip": "配置为 SLO 定义“良好”或“成功”请求的阈值(毫秒)。", - "xpack.observability.slo.sloEdit.apmLatency.transactionName": "事务名称", - "xpack.observability.slo.sloEdit.apmLatency.transactionName.placeholder": "选择事务名称", - "xpack.observability.slo.sloEdit.apmLatency.transactionType": "事务类型", - "xpack.observability.slo.sloEdit.apmLatency.transactionType.placeholder": "选择事务类型", - "xpack.observability.slo.sloEdit.budgetingMethod.label": "预算编制方法", - "xpack.observability.slo.sloEdit.budgetingMethod.tooltip": "基于发生次数的 SLO 使用时间窗口内良好事件数与事件总数的比率。基于时间片的 SLO 使用时间窗口内良好时间片与时间片总数的比率。", - "xpack.observability.slo.sloEdit.calendarTimeWindow.monthly": "每月", - "xpack.observability.slo.sloEdit.calendarTimeWindow.weekly": "每周", - "xpack.observability.slo.sloEdit.cancelButton": "取消", - "xpack.observability.slo.sloEdit.createSloButton": "创建 SLO", - "xpack.observability.slo.sloEdit.customKql.indexSelection.label": "索引", - "xpack.observability.slo.sloEdit.dataPreviewChart.errorMessage": "当前指标设置无效", - "xpack.observability.slo.sloEdit.dataPreviewChart.explanationMessage": "填写指标字段以查看当前指标的可视化", - "xpack.observability.slo.sloEdit.dataPreviewChart.panelLabel": "SLI 预览", - "xpack.observability.slo.sloEdit.dataPreviewChart.xTitle": "过去一小时", - "xpack.observability.slo.sloEdit.dataPreviewChart.yTitle": "SLI", - "xpack.observability.slo.sloEdit.definition.sliType": "选择 SLI 类型", - "xpack.observability.slo.sloEdit.definition.title": "定义 SLI", - "xpack.observability.slo.sloEdit.description.sloDescription": "描述", - "xpack.observability.slo.sloEdit.description.sloDescriptionPlaceholder": "SLO 的简短描述", - "xpack.observability.slo.sloEdit.description.sloName": "SLO 名称", - "xpack.observability.slo.sloEdit.description.sloNamePlaceholder": "SLO 的名称", - "xpack.observability.slo.sloEdit.description.title": "描述 SLO", - "xpack.observability.slo.sloEdit.editSloButton": "更新 SLO", - "xpack.observability.slo.sloEdit.fieldSelector.all": "全部", - "xpack.observability.slo.sloEdit.groupBy.label": "分区依据", - "xpack.observability.slo.sloEdit.groupBy.placeholder": "选择要依据其分区的可选字段", - "xpack.observability.slo.sloEdit.groupBy.tooltip": "为选定字段中的每个值创建单个 SLO。", - "xpack.observability.slo.sloEdit.objectives.title": "设定目标", - "xpack.observability.slo.sloEdit.sliType.customKql.customFilter": "要对索引应用的定制筛选", - "xpack.observability.slo.sloEdit.sliType.customKql.customFilter.tooltip": "此 KQL 查询可用于基于某些相关条件来筛选文档。", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQuery": "良好查询", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQuery.tooltip": "此 KQL 查询应返回用于计算 SLO 时被视为“良好”或“成功”的事件的子集。此查询应基于某些相关条件(如状态代码、错误消息或其他相关字段)筛选事件。", - "xpack.observability.slo.sloEdit.sliType.customKql.goodQueryPlaceholder": "定义良好事件", - "xpack.observability.slo.sloEdit.sliType.customKql.queryFilter": "查询筛选", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQuery": "查询总数", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQuery.tooltip": "此 KQL 查询应返回与 SLO 计算相关的所有事件,包括良好和不良事件。", - "xpack.observability.slo.sloEdit.sliType.customKql.totalQueryPlaceholder": "定义事件总数", - "xpack.observability.slo.sloEdit.sliType.customMetric.addMetricAriaLabel": "添加指标", - "xpack.observability.slo.sloEdit.sliType.customMetric.addMetricLabel": "添加指标", - "xpack.observability.slo.sloEdit.sliType.customMetric.customFilter": "要对索引应用的定制筛选", - "xpack.observability.slo.sloEdit.sliType.customMetric.customFilter.tooltip": "此 KQL 查询可用于基于某些相关条件来筛选文档。", - "xpack.observability.slo.sloEdit.sliType.customMetric.deleteLabel": "删除指标", - "xpack.observability.slo.sloEdit.sliType.customMetric.equation.invalidCharacters": "方程字段仅支持以下字符:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", - "xpack.observability.slo.sloEdit.sliType.customMetric.equationHelpText": "支持基本数学方程,有效字符包括:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", - "xpack.observability.slo.sloEdit.sliType.customMetric.equationLabel": "方程", - "xpack.observability.slo.sloEdit.sliType.customMetric.filterLabel": "筛选", - "xpack.observability.slo.sloEdit.sliType.customMetric.goodTitle": "良好事件", - "xpack.observability.slo.sloEdit.sliType.customMetric.metricField.placeholder": "选择指标字段", - "xpack.observability.slo.sloEdit.sliType.customMetric.metricLabel": "指标", - "xpack.observability.slo.sloEdit.sliType.customMetric.queryFilter": "查询筛选", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalEquation.tooltip": "这支持基本数学 (A + B / C) 和布尔逻辑 (A < B ?A :B)。", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalMetric.tooltip": "来自该字段的此类数据将使用“求和”聚合进行汇总。", - "xpack.observability.slo.sloEdit.sliType.customMetric.totalTitle": "事件合计", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregation.placeholder": "选择聚合", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregationLabel": "聚合", - "xpack.observability.slo.sloEdit.sliType.histogram.aggregationTooltip": "“值计数”聚合将返回直方图字段的总计数。范围将返回在下面定义的范围内的直方图字段中的计数。", - "xpack.observability.slo.sloEdit.sliType.histogram.customFilter": "要对索引应用的定制筛选", - "xpack.observability.slo.sloEdit.sliType.histogram.customFilter.tooltip": "此 KQL 查询可用于基于某些相关条件来筛选文档。", - "xpack.observability.slo.sloEdit.sliType.histogram.fromLabel": "自", - "xpack.observability.slo.sloEdit.sliType.histogram.fromTooltip": "“from”值具有包容性。", - "xpack.observability.slo.sloEdit.sliType.histogram.goodTitle": "良好事件", - "xpack.observability.slo.sloEdit.sliType.histogram.kqlFilterLabel": "KQL 筛选", - "xpack.observability.slo.sloEdit.sliType.histogram.metricField.placeholder": "选择直方图字段", - "xpack.observability.slo.sloEdit.sliType.histogram.metricLabel": "字段", - "xpack.observability.slo.sloEdit.sliType.histogram.query.tooltip": "此 KQL 查询应返回该指标的事件的子集。", - "xpack.observability.slo.sloEdit.sliType.histogram.queryFilter": "查询筛选", - "xpack.observability.slo.sloEdit.sliType.histogram.rangeLabel": "范围", - "xpack.observability.slo.sloEdit.sliType.histogram.sourceTitle": "源", - "xpack.observability.slo.sloEdit.sliType.histogram.toLabel": "至", - "xpack.observability.slo.sloEdit.sliType.histogram.totalTitle": "事件合计", - "xpack.observability.slo.sloEdit.sliType.histogram.toTooltip": "“to”值不具有包容性。", - "xpack.observability.slo.sloEdit.sliType.histogram.valueCountLabel": "值计数", - "xpack.observability.slo.sloEdit.tags.label": "标签", - "xpack.observability.slo.sloEdit.tags.placeholder": "添加标签", - "xpack.observability.slo.sloEdit.targetSlo.label": "目标/SLO (%)", - "xpack.observability.slo.sloEdit.targetSlo.tooltip": "SLO 的目标值 (%)。", - "xpack.observability.slo.sloEdit.timeSliceTarget.label": "时间片目标 (%)", - "xpack.observability.slo.sloEdit.timeSliceTarget.tooltip": "用于确定切片是良好还是不良的单个时间片目标。", - "xpack.observability.slo.sloEdit.timesliceWindow.label": "时间片窗口(分钟)", - "xpack.observability.slo.sloEdit.timesliceWindow.tooltip": "用于评估接收的数据的时间片窗口大小。", - "xpack.observability.slo.sloEdit.timestampField.label": "时间戳字段", - "xpack.observability.slo.sloEdit.timestampField.placeholder": "选择时间戳字段", - "xpack.observability.slo.sloEdit.timeWindow.calendarAligned": "日历已对齐", - "xpack.observability.slo.sloEdit.timeWindow.rolling": "滚动", - "xpack.observability.slo.sloEdit.timeWindowDuration.label": "持续时间", - "xpack.observability.slo.sloEdit.timeWindowDuration.tooltip": "用于在其间计算 SLO 的时间窗口持续时间。", - "xpack.observability.slo.sloEdit.timeWindowType.label": "时间窗口", - "xpack.observability.slo.sloEdit.timeWindowType.tooltip": "选择滚动或日历对齐窗口。", - "xpack.observability.slo.sloList.welcomePrompt.buttonLabel": "创建 SLO", - "xpack.observability.slo.sloList.welcomePrompt.getStartedMessage": "要开始使用,请创建您的首个 SLO。", - "xpack.observability.slo.sloList.welcomePrompt.learnMore": "希望了解详情?", - "xpack.observability.slo.sloList.welcomePrompt.learnMoreLink": "阅读文档", - "xpack.observability.slo.sloList.welcomePrompt.messageParagraph1": "衡量对业务十分重要的关键指标,如服务级别指标和服务级别目标 (SLI/SLO),努力实现 SLA。", - "xpack.observability.slo.sloList.welcomePrompt.messageParagraph2": "通过实时洞察,轻松向利益相关者报告服务的运行时间和可靠性。", - "xpack.observability.slo.sloList.welcomePrompt.needLicenseMessage": "您需要 Elastic Cloud 订阅或白金级许可证才能使用 SLO。", - "xpack.observability.slo.sloList.welcomePrompt.signupForCloud": "注册 Elastic Cloud", - "xpack.observability.slo.sloList.welcomePrompt.signupForLicense": "注册许可证", - "xpack.observability.slo.sloList.welcomePrompt.title": "跟踪和实现 SLO", - "xpack.observability.slo.sloStatusBadge.degrading": "正在降级", - "xpack.observability.slo.sloStatusBadge.forecasted": "已预测", - "xpack.observability.slo.sloStatusBadge.healthy": "运行正常", - "xpack.observability.slo.sloStatusBadge.noData": "无数据", - "xpack.observability.slo.sloStatusBadge.noDataTooltip": "在聚合数据并且数据可用之前,可能需要花费一些时间。", - "xpack.observability.slo.sloStatusBadge.violated": "已违规", - "xpack.observability.sloCreatePageTitle": "创建新 SLO", - "xpack.observability.sloEditPageTitle": "编辑 SLO", - "xpack.observability.sloEmbeddable.config.cancelButtonLabel": "取消", - "xpack.observability.sloEmbeddable.config.errors.sloRequired": "“SLO”必填。", - "xpack.observability.sloEmbeddable.config.sloSelector.ariaLabel": "SLO", - "xpack.observability.sloEmbeddable.config.sloSelector.headerTitle": "SLO 配置", - "xpack.observability.sloEmbeddable.config.sloSelector.placeholder": "选择 SLO", - "xpack.observability.sloEmbeddable.description": "获取 SLO 运行状况概览", - "xpack.observability.sloEmbeddable.displayName": "SLO 概览", - "xpack.observability.sloEmbeddable.displayTitle": "SLO 概览", - "xpack.observability.sloEmbeddable.overview.sloNotFoundText": "SLO 已删除。您可以放心从仪表板中删除小组件。", - "xpack.observability.slos.sloDetails.headerControl.exploreInApm": "服务详情", - "xpack.observability.slosLinkTitle": "SLO", - "xpack.observability.slosPage.autoRefreshButtonLabel": "自动刷新", - "xpack.observability.slosPage.stopRefreshingButtonLabel": "停止刷新", - "xpack.observability.slosPageTitle": "SLO", "xpack.observability.status.dataAvailable": "数据可用。", "xpack.observability.status.dataAvailableTitle": "数据可用于", "xpack.observability.status.learnMoreButton": "了解详情", @@ -28857,6 +28576,260 @@ "xpack.observability.ux.dashboard.webCoreVitals.help": "详细了解", "xpack.observability.ux.dashboard.webCoreVitals.helpAriaLabel": "帮助", "xpack.observability.ux.service.help": "选择流量最高的 RUM 服务", + "xpack.slo.alerting.burnRate.reason": "{actionGroupName}:过去 {longWindowDuration} 的消耗速度为 {longWindowBurnRate} 且过去 {shortWindowDuration} 为 {shortWindowBurnRate}。两个窗口超出 {burnRateThreshold} 时告警", + "xpack.slo.alerting.burnRate.reasonForInstanceId": "{actionGroupName}:过去 {longWindowDuration} 的消耗速度为 {longWindowBurnRate},且对于 {instanceId},过去 {shortWindowDuration} 为 {shortWindowBurnRate}。两个窗口超出 {burnRateThreshold} 时告警", + "xpack.slo.burnRate.breachedStatustSubtitle": "按照当前的速率,错误预算将在 {hour} 小时后耗尽。", + "xpack.slo.burnRate.threshold": "阈值为 {threshold}x", + "xpack.slo.create.errorNotification": "创建 {name} 时出现问题", + "xpack.slo.deleteConfirmationModal.title": "删除 {name}?", + "xpack.slo.duration.day": "{duration, plural, other {# 天}}", + "xpack.slo.duration.hour": "{duration, plural, other {# 小时}}", + "xpack.slo.duration.minute": "{duration, plural, other {# 分钟}}", + "xpack.slo.duration.month": "{duration, plural, other {# 个月}}", + "xpack.slo.duration.week": "{duration, plural, other {# 周}}", + "xpack.slo.indicatorTypeBadge.exploreInApm": "查看 {service} 详情", + "xpack.slo.rules.burnRate.errors.invalidThresholdValue": "消耗速度阈值必须介于 1 和 {maxBurnRate} 之间。", + "xpack.slo.rules.groupByMessage": "已使用分区在“{groupByField}”上创建您选定的 SLO。此规则将监测在分区字段中发现的每个实例并为其生成告警。", + "xpack.slo.rules.longWindowDuration.tooltip": "在其间计算消耗速度的回顾期。将使用 {shortWindowDuration} 分钟的较短回顾期(1/12 的回顾期)以便更快恢复", + "xpack.slo.slo.activeAlertsBadge.label": "{count, plural, other {# 个告警}}", + "xpack.slo.slo.delete.errorNotification": "无法删除{name}", + "xpack.slo.slo.delete.successNotification": "已删除 {name}", + "xpack.slo.slo.timeWindow.calendar": "{elapsed}/{total} 天", + "xpack.slo.sloDetails.errorBudgetChartPanel.duration": "过去 {duration}", + "xpack.slo.sloDetails.overview.apmSource.environmentLabel": "环境:{value}", + "xpack.slo.sloDetails.overview.apmSource.serviceLabel": "服务:{value}", + "xpack.slo.sloDetails.overview.apmSource.transactionNameLabel": "事务名称:{value}", + "xpack.slo.sloDetails.overview.apmSource.transactionTypeLabel": "事务类型:{value}", + "xpack.slo.sloDetails.overview.calendarAlignedTimeWindow": "{duration} 日历已对齐", + "xpack.slo.sloDetails.overview.observedValueSubtitle": "{value}(目标为 {objective})", + "xpack.slo.sloDetails.overview.rollingTimeWindow": "{duration} 滚动", + "xpack.slo.sloDetails.overview.timeslicesBudgetingMethodDetails": "{duration} 切片,{target} 目标", + "xpack.slo.sloDetails.sliHistoryChartPanel.duration": "过去 {duration}", + "xpack.slo.sloEdit.rollingTimeWindow.days": "{number} 天", + "xpack.slo.update.errorNotification": "更新 {name} 时出现问题", + "xpack.slo.update.successNotification": "成功更新 {name}", + "xpack.slo.alerting.alertDetailsUrlDescription": "链接到告警故障排除视图获取进一步的上下文和详情。如果未配置 server.publicBaseUrl,这将为空字符串。", + "xpack.slo.alerting.burnRate.alertAction": "紧急", + "xpack.slo.alerting.burnRate.highPriorityAction": "高", + "xpack.slo.alerting.burnRate.lowPriorityAction": "低", + "xpack.slo.alerting.burnRate.mediumPriorityAction": "中", + "xpack.slo.alerting.reasonDescription": "告警原因的简洁描述", + "xpack.slo.alerting.sloIdDescription": "SLO 唯一标识符。", + "xpack.slo.alerting.sloInstanceIdDescription": "SLO 实例 ID。", + "xpack.slo.alerting.sloNameDescription": "SLO 名称。", + "xpack.slo.alerting.thresholdDescription": "消耗速度阈值。", + "xpack.slo.alerting.timestampDescription": "检测到告警时的时间戳。", + "xpack.slo.alerting.viewInAppUrlDescription": "SLO 详情页面的 URL,以帮助进行进一步调查。", + "xpack.slo.alerting.windowDescription": "带有关联的消耗速度值的窗口持续时间。", + "xpack.slo.budgetingMethod.occurrences": "发生次数", + "xpack.slo.budgetingMethod.timeslices": "时间片", + "xpack.slo.burnRate.breachedStatustTitle": "已超出临界值", + "xpack.slo.burnRate.noDataStatusSubtitle": "等待更多数据。", + "xpack.slo.burnRate.noDataStatusTitle": "无值", + "xpack.slo.burnRate.okStatusSubtitle": "没有错误预算耗尽风险。", + "xpack.slo.burnRate.okStatusTitle": "可接受的值", + "xpack.slo.burnRate.technicalPreviewBadgeDescription": "此功能处于技术预览状态,可能会有所更改,或在未来版本中移除。设计和代码相对于正式发行版功能还不够成熟,将按原样提供,且不提供任何保证。技术预览功能不受正式发行版功能的支持服务水平协议约束。", + "xpack.slo.burnRate.technicalPreviewBadgeTitle": "技术预览", + "xpack.slo.burnRate.timeRangeBtnLegend": "选择时间范围", + "xpack.slo.burnRate.title": "消耗速度", + "xpack.slo.deleteConfirmationModal.cancelButtonLabel": "取消", + "xpack.slo.deleteConfirmationModal.deleteButtonLabel": "删除", + "xpack.slo.deleteConfirmationModal.descriptionText": "此 SLO 删除后无法恢复。", + "xpack.slo.duration.daily": "每日", + "xpack.slo.duration.hourly": "每小时", + "xpack.slo.duration.minutely": "每分钟", + "xpack.slo.duration.monthly": "每月", + "xpack.slo.duration.weekly": "每周", + "xpack.slo.globalDiagnosis.errorNotification": "您没有适当权限,无法使用此功能。", + "xpack.slo.indicators.apmAvailability": "APM 可用性", + "xpack.slo.indicators.apmLatency": "APM 延迟", + "xpack.slo.indicators.customKql": "定制 KQL", + "xpack.slo.indicators.customMetric": "定制指标", + "xpack.slo.indicators.histogram": "直方图指标", + "xpack.slo.item.actions.button": "操作", + "xpack.slo.item.actions.clone": "克隆", + "xpack.slo.item.actions.createRule": "创建新告警规则", + "xpack.slo.item.actions.delete": "删除", + "xpack.slo.item.actions.details": "详情", + "xpack.slo.item.actions.edit": "编辑", + "xpack.slo.item.actions.manageRules": "管理规则", + "xpack.slo.list.emptyMessage": "没有匹配您的条件的结果。", + "xpack.slo.list.emptyTitle": "无结果", + "xpack.slo.list.errorMessage": "加载 SLO 时出错。请联系您的管理员寻求帮助。", + "xpack.slo.list.errorNotification": "提取 SLO 时出现问题", + "xpack.slo.list.errorTitle": "无法加载 SLO", + "xpack.slo.list.search": "搜索您的 SLO......", + "xpack.slo.list.sortBy.errorBudgetConsumed": "已消耗错误预算", + "xpack.slo.list.sortBy.errorBudgetRemaining": "剩余错误预算", + "xpack.slo.list.sortBy.sliValue": "SLI 值", + "xpack.slo.list.sortBy.sloStatus": "SLO 状态", + "xpack.slo.rules.actionGroupSelectorLabel": "操作组", + "xpack.slo.rules.addWindowAriaLabel": "添加窗口", + "xpack.slo.rules.burnRate.defaultActionMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} 为活动状态,条件如下:\n\n- SLO:\\{\\{context.sloName\\}\\}'\n- 过去 \\{\\{context.longWindow.duration\\}\\} 的消耗速度为 \\{\\{context.longWindow.burnRate\\}\\}\n- 过去 \\{\\{context.shortWindow.duration\\}\\} 的消耗速度为 \\{\\{context.shortWindow.burnRate\\}\\}\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[查看告警详情](\\{\\{context.alertDetailsUrl\\}\\})\n", + "xpack.slo.rules.burnRate.defaultRecoveryMessage": "\\{\\{context.reason\\}\\}\n\n\\{\\{rule.name\\}\\} 已恢复。\n\n- SLO:\\{\\{context.sloName\\}\\}'\n- 过去 \\{\\{context.longWindow.duration\\}\\} 的消耗速度为 \\{\\{context.longWindow.burnRate\\}\\}\n- 过去 \\{\\{context.shortWindow.duration\\}\\} 的消耗速度为 \\{\\{context.shortWindow.burnRate\\}\\}\n- Threshold: \\{\\{context.burnRateThreshold\\}\\}\n\n[查看告警详情](\\{\\{context.alertDetailsUrl\\}\\})\n", + "xpack.slo.rules.burnRate.description": "在定义的期间内 SLO 消耗速度过高时告警。", + "xpack.slo.rules.burnRate.errors.burnRateThresholdRequired": "“消耗速度阈值”必填。", + "xpack.slo.rules.burnRate.errors.sloRequired": "“SLO”必填。", + "xpack.slo.rules.burnRate.errors.windowDurationRequired": "“回顾期”必填。", + "xpack.slo.rules.burnRate.name": "SLO 消耗速度", + "xpack.slo.rules.burnRate.rowLabel": "消耗速度阈值", + "xpack.slo.rules.burnRate.tooltip": "消耗速度是指服务在回顾期内耗用错误预算的速度。", + "xpack.slo.rules.deleteWindowLabel": "删除窗口", + "xpack.slo.rules.longWindow.errorText": "回顾期必须介于 1 到 72 小时之间。", + "xpack.slo.rules.longWindow.rowLabel": "回顾(小时)", + "xpack.slo.rules.longWindow.valueLabel": "回顾期(小时)", + "xpack.slo.rules.sloSelector.ariaLabel": "SLO", + "xpack.slo.rules.sloSelector.placeholder": "选择 SLO", + "xpack.slo.rules.sloSelector.rowLabel": "SLO", + "xpack.slo.slo.activeAlertsBadge.ariaLabel": "活动告警徽章", + "xpack.slo.slo.item.actions.clone": "克隆", + "xpack.slo.slo.item.actions.delete": "删除", + "xpack.slo.slo.rulesBadge.popover": "尚未为此 SLO 配置任何规则。超出 SLO 时,您不会收到告警。", + "xpack.slo.sloDetails.errorBudgetChartPanel.chartTitle": "剩余错误预算", + "xpack.slo.sloDetails.errorBudgetChartPanel.remaining": "剩余", + "xpack.slo.sloDetails.errorBudgetChartPanel.title": "错误预算逐渐减少", + "xpack.slo.sloDetails.headerControl.actions": "操作", + "xpack.slo.sloDetails.headerControl.createBurnRateRule": "创建新告警规则", + "xpack.slo.sloDetails.headerControl.edit": "编辑", + "xpack.slo.sloDetails.headerControl.manageRules": "管理规则", + "xpack.slo.sloDetails.headerTitle.createdMessage": "创建日期", + "xpack.slo.sloDetails.headerTitle.lastUpdatedMessage": "上次更新时间", + "xpack.slo.sloDetails.overview.apmSource": "APM 源", + "xpack.slo.sloDetails.overview.budgetingMethodTitle": "预算编制方法", + "xpack.slo.sloDetails.overview.descriptionTitle": "描述", + "xpack.slo.sloDetails.overview.indicatorTypeTitle": "指标类型", + "xpack.slo.sloDetails.overview.observedValueTitle": "观察值", + "xpack.slo.sloDetails.overview.tagsTitle": "标签", + "xpack.slo.sloDetails.overview.timeWindowTitle": "时间窗口", + "xpack.slo.sloDetails.sliHistoryChartPanel.chartTitle": "SLI 值", + "xpack.slo.sloDetails.sliHistoryChartPanel.current": "观察值", + "xpack.slo.sloDetails.sliHistoryChartPanel.objective": "目标", + "xpack.slo.sloDetails.sliHistoryChartPanel.title": "历史 SLI", + "xpack.slo.sloDetails.tab.alertsLabel": "告警", + "xpack.slo.sloDetails.tab.overviewLabel": "概览", + "xpack.slo.sloEdit.apm.filter.tooltip": "此 KQL 查询用于根据该 SLO 的某些相关条件筛选 APM 指标。", + "xpack.slo.sloEdit.apm.serviceName.tooltip": "这是受该 SLO 监测的 APM 服务。", + "xpack.slo.sloEdit.apmAvailability.serviceEnvironment": "服务环境", + "xpack.slo.sloEdit.apmAvailability.serviceEnvironment.placeholder": "选择环境", + "xpack.slo.sloEdit.apmAvailability.serviceName": "服务名称", + "xpack.slo.sloEdit.apmAvailability.serviceName.placeholder": "选择 APM 服务", + "xpack.slo.sloEdit.apmAvailability.transactionName": "事务名称", + "xpack.slo.sloEdit.apmAvailability.transactionName.placeholder": "选择事务名称", + "xpack.slo.sloEdit.apmAvailability.transactionType": "事务类型", + "xpack.slo.sloEdit.apmAvailability.transactionType.placeholder": "选择事务类型", + "xpack.slo.sloEdit.apmLatency.filter": "查询筛选", + "xpack.slo.sloEdit.apmLatency.filter.placeholder": "要对索引应用的定制筛选", + "xpack.slo.sloEdit.apmLatency.serviceEnvironment": "服务环境", + "xpack.slo.sloEdit.apmLatency.serviceEnvironment.placeholder": "选择环境", + "xpack.slo.sloEdit.apmLatency.serviceName": "服务名称", + "xpack.slo.sloEdit.apmLatency.serviceName.placeholder": "选择 APM 服务", + "xpack.slo.sloEdit.apmLatency.threshold.placeholder": "阈值 (ms)", + "xpack.slo.sloEdit.apmLatency.threshold.tooltip": "配置为 SLO 定义“良好”或“成功”请求的阈值(毫秒)。", + "xpack.slo.sloEdit.apmLatency.transactionName": "事务名称", + "xpack.slo.sloEdit.apmLatency.transactionName.placeholder": "选择事务名称", + "xpack.slo.sloEdit.apmLatency.transactionType": "事务类型", + "xpack.slo.sloEdit.apmLatency.transactionType.placeholder": "选择事务类型", + "xpack.slo.sloEdit.budgetingMethod.label": "预算编制方法", + "xpack.slo.sloEdit.budgetingMethod.tooltip": "基于发生次数的 SLO 使用时间窗口内良好事件数与事件总数的比率。基于时间片的 SLO 使用时间窗口内良好时间片与时间片总数的比率。", + "xpack.slo.sloEdit.calendarTimeWindow.monthly": "每月", + "xpack.slo.sloEdit.calendarTimeWindow.weekly": "每周", + "xpack.slo.sloEdit.cancelButton": "取消", + "xpack.slo.sloEdit.createSloButton": "创建 SLO", + "xpack.slo.sloEdit.customKql.indexSelection.label": "索引", + "xpack.slo.sloEdit.dataPreviewChart.errorMessage": "当前指标设置无效", + "xpack.slo.sloEdit.dataPreviewChart.explanationMessage": "填写指标字段以查看当前指标的可视化", + "xpack.slo.sloEdit.dataPreviewChart.panelLabel": "SLI 预览", + "xpack.slo.sloEdit.dataPreviewChart.xTitle": "过去一小时", + "xpack.slo.sloEdit.dataPreviewChart.yTitle": "SLI", + "xpack.slo.sloEdit.definition.sliType": "选择 SLI 类型", + "xpack.slo.sloEdit.definition.title": "定义 SLI", + "xpack.slo.sloEdit.description.sloDescription": "描述", + "xpack.slo.sloEdit.description.sloDescriptionPlaceholder": "SLO 的简短描述", + "xpack.slo.sloEdit.description.sloName": "SLO 名称", + "xpack.slo.sloEdit.description.sloNamePlaceholder": "SLO 的名称", + "xpack.slo.sloEdit.description.title": "描述 SLO", + "xpack.slo.sloEdit.editSloButton": "更新 SLO", + "xpack.slo.sloEdit.fieldSelector.all": "全部", + "xpack.slo.sloEdit.groupBy.label": "分区依据", + "xpack.slo.sloEdit.groupBy.placeholder": "选择要依据其分区的可选字段", + "xpack.slo.sloEdit.groupBy.tooltip": "为选定字段中的每个值创建单个 SLO。", + "xpack.slo.sloEdit.objectives.title": "设定目标", + "xpack.slo.sloEdit.sliType.customKql.customFilter": "要对索引应用的定制筛选", + "xpack.slo.sloEdit.sliType.customKql.customFilter.tooltip": "此 KQL 查询可用于基于某些相关条件来筛选文档。", + "xpack.slo.sloEdit.sliType.customKql.goodQuery": "良好查询", + "xpack.slo.sloEdit.sliType.customKql.goodQuery.tooltip": "此 KQL 查询应返回用于计算 SLO 时被视为“良好”或“成功”的事件的子集。此查询应基于某些相关条件(如状态代码、错误消息或其他相关字段)筛选事件。", + "xpack.slo.sloEdit.sliType.customKql.goodQueryPlaceholder": "定义良好事件", + "xpack.slo.sloEdit.sliType.customKql.queryFilter": "查询筛选", + "xpack.slo.sloEdit.sliType.customKql.totalQuery": "查询总数", + "xpack.slo.sloEdit.sliType.customKql.totalQuery.tooltip": "此 KQL 查询应返回与 SLO 计算相关的所有事件,包括良好和不良事件。", + "xpack.slo.sloEdit.sliType.customKql.totalQueryPlaceholder": "定义事件总数", + "xpack.slo.sloEdit.sliType.customMetric.addMetricAriaLabel": "添加指标", + "xpack.slo.sloEdit.sliType.customMetric.addMetricLabel": "添加指标", + "xpack.slo.sloEdit.sliType.customMetric.customFilter": "要对索引应用的定制筛选", + "xpack.slo.sloEdit.sliType.customMetric.customFilter.tooltip": "此 KQL 查询可用于基于某些相关条件来筛选文档。", + "xpack.slo.sloEdit.sliType.customMetric.deleteLabel": "删除指标", + "xpack.slo.sloEdit.sliType.customMetric.equation.invalidCharacters": "方程字段仅支持以下字符:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", + "xpack.slo.sloEdit.sliType.customMetric.equationHelpText": "支持基本数学方程,有效字符包括:A-Z、+、-、/、*、(、)、?、!、&、:、|、>、<、=", + "xpack.slo.sloEdit.sliType.customMetric.equationLabel": "方程", + "xpack.slo.sloEdit.sliType.customMetric.filterLabel": "筛选", + "xpack.slo.sloEdit.sliType.customMetric.goodTitle": "良好事件", + "xpack.slo.sloEdit.sliType.customMetric.metricField.placeholder": "选择指标字段", + "xpack.slo.sloEdit.sliType.customMetric.metricLabel": "指标", + "xpack.slo.sloEdit.sliType.customMetric.queryFilter": "查询筛选", + "xpack.slo.sloEdit.sliType.customMetric.totalEquation.tooltip": "这支持基本数学 (A + B / C) 和布尔逻辑 (A < B ?A :B)。", + "xpack.slo.sloEdit.sliType.customMetric.totalMetric.tooltip": "来自该字段的此类数据将使用“求和”聚合进行汇总。", + "xpack.slo.sloEdit.sliType.customMetric.totalTitle": "事件合计", + "xpack.slo.sloEdit.sliType.histogram.aggregation.placeholder": "选择聚合", + "xpack.slo.sloEdit.sliType.histogram.aggregationLabel": "聚合", + "xpack.slo.sloEdit.sliType.histogram.aggregationTooltip": "“值计数”聚合将返回直方图字段的总计数。范围将返回在下面定义的范围内的直方图字段中的计数。", + "xpack.slo.sloEdit.sliType.histogram.customFilter": "要对索引应用的定制筛选", + "xpack.slo.sloEdit.sliType.histogram.customFilter.tooltip": "此 KQL 查询可用于基于某些相关条件来筛选文档。", + "xpack.slo.sloEdit.sliType.histogram.fromLabel": "自", + "xpack.slo.sloEdit.sliType.histogram.fromTooltip": "“from”值具有包容性。", + "xpack.slo.sloEdit.sliType.histogram.goodTitle": "良好事件", + "xpack.slo.sloEdit.sliType.histogram.kqlFilterLabel": "KQL 筛选", + "xpack.slo.sloEdit.sliType.histogram.metricField.placeholder": "选择直方图字段", + "xpack.slo.sloEdit.sliType.histogram.metricLabel": "字段", + "xpack.slo.sloEdit.sliType.histogram.query.tooltip": "此 KQL 查询应返回该指标的事件的子集。", + "xpack.slo.sloEdit.sliType.histogram.queryFilter": "查询筛选", + "xpack.slo.sloEdit.sliType.histogram.rangeLabel": "范围", + "xpack.slo.sloEdit.sliType.histogram.sourceTitle": "源", + "xpack.slo.sloEdit.sliType.histogram.toLabel": "至", + "xpack.slo.sloEdit.sliType.histogram.totalTitle": "事件合计", + "xpack.slo.sloEdit.sliType.histogram.toTooltip": "“to”值不具有包容性。", + "xpack.slo.sloEdit.sliType.histogram.valueCountLabel": "值计数", + "xpack.slo.sloEdit.tags.label": "标签", + "xpack.slo.sloEdit.tags.placeholder": "添加标签", + "xpack.slo.sloEdit.targetSlo.label": "目标/SLO (%)", + "xpack.slo.sloEdit.targetSlo.tooltip": "SLO 的目标值 (%)。", + "xpack.slo.sloEdit.timeSliceTarget.label": "时间片目标 (%)", + "xpack.slo.sloEdit.timeSliceTarget.tooltip": "用于确定切片是良好还是不良的单个时间片目标。", + "xpack.slo.sloEdit.timesliceWindow.label": "时间片窗口(分钟)", + "xpack.slo.sloEdit.timesliceWindow.tooltip": "用于评估接收的数据的时间片窗口大小。", + "xpack.slo.sloEdit.timestampField.label": "时间戳字段", + "xpack.slo.sloEdit.timestampField.placeholder": "选择时间戳字段", + "xpack.slo.sloEdit.timeWindow.calendarAligned": "日历已对齐", + "xpack.slo.sloEdit.timeWindow.rolling": "滚动", + "xpack.slo.sloEdit.timeWindowDuration.label": "持续时间", + "xpack.slo.sloEdit.timeWindowDuration.tooltip": "用于在其间计算 SLO 的时间窗口持续时间。", + "xpack.slo.sloEdit.timeWindowType.label": "时间窗口", + "xpack.slo.sloEdit.timeWindowType.tooltip": "选择滚动或日历对齐窗口。", + "xpack.slo.sloList.welcomePrompt.buttonLabel": "创建 SLO", + "xpack.slo.sloList.welcomePrompt.getStartedMessage": "要开始使用,请创建您的首个 SLO。", + "xpack.slo.sloList.welcomePrompt.learnMore": "希望了解详情?", + "xpack.slo.sloList.welcomePrompt.learnMoreLink": "阅读文档", + "xpack.slo.sloList.welcomePrompt.messageParagraph1": "衡量对业务十分重要的关键指标,如服务级别指标和服务级别目标 (SLI/SLO),努力实现 SLA。", + "xpack.slo.sloList.welcomePrompt.messageParagraph2": "通过实时洞察,轻松向利益相关者报告服务的运行时间和可靠性。", + "xpack.slo.sloList.welcomePrompt.needLicenseMessage": "您需要 Elastic Cloud 订阅或白金级许可证才能使用 SLO。", + "xpack.slo.sloList.welcomePrompt.signupForCloud": "注册 Elastic Cloud", + "xpack.slo.sloList.welcomePrompt.signupForLicense": "注册许可证", + "xpack.slo.sloList.welcomePrompt.title": "跟踪和实现 SLO", + "xpack.slo.sloStatusBadge.degrading": "正在降级", + "xpack.slo.sloStatusBadge.forecasted": "已预测", + "xpack.slo.sloStatusBadge.healthy": "运行正常", + "xpack.slo.sloStatusBadge.noData": "无数据", + "xpack.slo.sloStatusBadge.noDataTooltip": "在聚合数据并且数据可用之前,可能需要花费一些时间。", + "xpack.slo.sloStatusBadge.violated": "已违规", "xpack.observabilityAiAssistant.couldNotFindConversationContent": "找不到 ID 为 {conversationId} 的对话。请确保该对话存在并且您具有访问权限。", "xpack.observabilityAiAssistant.executedFunctionFailureEvent": "无法执行函数 {functionName}", "xpack.observabilityAiAssistant.poweredByModel": "由 {model} 提供支持", @@ -42549,4 +42522,4 @@ "xpack.serverlessObservability.nav.projectSettings": "项目设置", "xpack.serverlessObservability.nav.visualizations": "可视化" } -} +} \ No newline at end of file diff --git a/x-pack/plugins/upgrade_assistant/kibana.jsonc b/x-pack/plugins/upgrade_assistant/kibana.jsonc index ff3584ef714bf..a339a06c9e60d 100644 --- a/x-pack/plugins/upgrade_assistant/kibana.jsonc +++ b/x-pack/plugins/upgrade_assistant/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/upgrade-assistant-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "upgradeAssistant", "server": true, diff --git a/x-pack/plugins/watcher/kibana.jsonc b/x-pack/plugins/watcher/kibana.jsonc index c5010ee62ad9d..97fad87071f4d 100644 --- a/x-pack/plugins/watcher/kibana.jsonc +++ b/x-pack/plugins/watcher/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/watcher-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "watcher", "server": true, diff --git a/x-pack/test/alerting_api_integration/common/retry.ts b/x-pack/test/alerting_api_integration/common/retry.ts new file mode 100644 index 0000000000000..6a32db757bb82 --- /dev/null +++ b/x-pack/test/alerting_api_integration/common/retry.ts @@ -0,0 +1,92 @@ +/* + * 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 { RetryService } from '@kbn/ftr-common-functional-services'; +import type { ToolingLog } from '@kbn/tooling-log'; + +/** + * Copied from x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/retry.ts + * + * Retry wrapper for async supertests, with a maximum number of retries. + * You can pass in a function that executes a supertest test, and make assertions + * on the response. If the test fails, it will retry the test the number of retries + * that are passed in. + * + * Example usage: + * ```ts + const fleetResponse = await retry({ + test: async () => { + const testResponse = await supertest + .post(`/api/fleet/epm/packages/security_detection_engine`) + .set('kbn-xsrf', 'xxxx') + .set('elastic-api-version', '2023-10-31') + .type('application/json') + .send({ force: true }) + .expect(200); + expect((testResponse.body as InstallPackageResponse).items).toBeDefined(); + expect((testResponse.body as InstallPackageResponse).items.length).toBeGreaterThan(0); + + return testResponse.body; + }, + retryService, + retries: MAX_RETRIES, + timeout: ATTEMPT_TIMEOUT, + }); + * ``` + * @param test The function containing a test to run + * @param retryService The retry service to use + * @param retries The maximum number of retries + * @param timeout The timeout for each retry + * @param retryDelay The delay between each retry + * @returns The response from the test + */ +export const retry = async ({ + test, + retryService, + utilityName, + retries = 3, + timeout = 30000, + retryDelay = 200, + logger, +}: { + test: () => Promise; + utilityName: string; + retryService: RetryService; + retries?: number; + timeout?: number; + retryDelay?: number; + logger: ToolingLog; +}): Promise => { + let retryAttempt = 0; + const response = await retryService.tryForTime( + timeout, + async () => { + if (retryAttempt > retries) { + // Log error message if we reached the maximum number of retries + // but don't throw an error, return it to break the retry loop. + const errorMessage = `Reached maximum number of retries for test ${utilityName}: ${ + retryAttempt - 1 + }/${retries}`; + logger.error(errorMessage); + return new Error(errorMessage); + } + + retryAttempt = retryAttempt + 1; + + return await test(); + }, + undefined, + retryDelay + ); + + // Now throw the error in order to fail the test. + if (response instanceof Error) { + throw response; + } + + return response; +}; diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_fired.ts index c566c077bc1ca..65a14577f06ea 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_fired.ts @@ -31,6 +31,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - AVG - PCT - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -60,8 +61,8 @@ export default function ({ getService }: FtrProviderContext) { schedule: [ { template: 'good', - start: 'now-15m', - end: 'now', + start: 'now-10m', + end: 'now+5m', metrics: [ { name: 'system.cpu.user.pct', method: 'linear', start: 2.5, end: 2.5 }, { name: 'system.cpu.total.pct', method: 'linear', start: 0.5, end: 0.5 }, @@ -81,6 +82,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: DATA_VIEW_TITLE, docCountTarget: 270, + retryService, + logger, }); }); @@ -105,10 +108,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -168,6 +174,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -177,6 +185,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -232,6 +242,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_no_data.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_no_data.ts index c495b38919913..8892fee26a28e 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_no_data.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_pct_no_data.ts @@ -31,6 +31,8 @@ export default function ({ getService }: FtrProviderContext) { const esClient = getService('es'); const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); + const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - AVG - PCT - NoData', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -47,6 +49,7 @@ export default function ({ getService }: FtrProviderContext) { name: DATA_VIEW, id: DATA_VIEW_ID, title: DATA_VIEW, + logger, }); }); @@ -64,6 +67,7 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); await esDeleteAllIndices([ALERT_ACTION_INDEX]); }); @@ -74,10 +78,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -136,6 +143,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -145,6 +154,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -200,6 +211,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_us_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_us_fired.ts index 6f2f43721bb82..fac69cd18a9bb 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_us_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/avg_us_fired.ts @@ -36,6 +36,8 @@ export default function ({ getService }: FtrProviderContext) { const kibanaServerConfig = config.get('servers.kibana'); const kibanaUrl = format(kibanaServerConfig); const supertest = getService('supertest'); + const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - AVG - US - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -57,6 +59,7 @@ export default function ({ getService }: FtrProviderContext) { name: DATA_VIEW_NAME, id: DATA_VIEW_ID, title: DATA_VIEW, + logger, }); }); @@ -76,6 +79,7 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); }); @@ -85,10 +89,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -147,6 +154,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -156,6 +165,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -211,6 +222,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/custom_eq_avg_bytes_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/custom_eq_avg_bytes_fired.ts index 963b0a86acf73..b4c39683fade9 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/custom_eq_avg_bytes_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/custom_eq_avg_bytes_fired.ts @@ -29,6 +29,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - CUSTOM_EQ - AVG - BYTES - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -67,12 +68,15 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: DATA_VIEW, docCountTarget: 75, + retryService, + logger, }); await createDataView({ supertest, name: DATA_VIEW, id: DATA_VIEW_ID, title: DATA_VIEW, + logger, }); }); @@ -90,22 +94,25 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); await esDeleteAllIndices([ALERT_ACTION_INDEX, ...dataForgeIndices]); await cleanup({ client: esClient, config: dataForgeConfig, logger }); }); - // FLAKY: https://github.com/elastic/kibana/issues/175360 - describe.skip('Rule creation', () => { + describe('Rule creation', () => { it('creates rule successfully', async () => { actionId = await createIndexConnector({ supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -165,6 +172,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -174,6 +183,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -230,6 +241,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); @@ -237,9 +250,9 @@ export default function ({ getService }: FtrProviderContext) { `https://localhost:5601/app/observability/alerts/${alertId}` ); expect(resp.hits.hits[0]._source?.reason).eql( - `Custom equation is 1, above the threshold of 0.9. (duration: 1 min, data view: ${DATA_VIEW})` + `Custom equation is 1 B, above the threshold of 0.9 B. (duration: 1 min, data view: ${DATA_VIEW})` ); - expect(resp.hits.hits[0]._source?.value).eql('1'); + expect(resp.hits.hits[0]._source?.value).eql('1 B'); }); }); }); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/documents_count_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/documents_count_fired.ts index 6438af0af51a6..34238d5149388 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/documents_count_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/documents_count_fired.ts @@ -32,6 +32,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - DOCUMENTS_COUNT - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -50,8 +51,8 @@ export default function ({ getService }: FtrProviderContext) { schedule: [ { template: 'good', - start: 'now-15m', - end: 'now', + start: 'now-10m', + end: 'now+5m', metrics: [ { name: 'system.cpu.user.pct', method: 'linear', start: 2.5, end: 2.5 }, { name: 'system.cpu.total.pct', method: 'linear', start: 0.5, end: 0.5 }, @@ -71,12 +72,15 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: dataForgeIndices.join(','), docCountTarget: 45, + retryService, + logger, }); await createDataView({ supertest, name: DATA_VIEW_NAME, id: DATA_VIEW_ID, title: DATA_VIEW, + logger, }); }); @@ -94,6 +98,7 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); await esDeleteAllIndices([ALERT_ACTION_INDEX, ...dataForgeIndices]); await cleanup({ client: esClient, config: dataForgeConfig, logger }); @@ -105,10 +110,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -165,6 +173,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -174,6 +184,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -231,6 +243,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/group_by_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/group_by_fired.ts index e41b77caf0727..dc7db5117c662 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/group_by_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/group_by_fired.ts @@ -29,6 +29,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - GROUP_BY - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -46,8 +47,8 @@ export default function ({ getService }: FtrProviderContext) { schedule: [ { template: 'good', - start: 'now-15m', - end: 'now', + start: 'now-10m', + end: 'now+5m', metrics: [ { name: 'system.cpu.user.pct', method: 'linear', start: 2.5, end: 2.5 }, { name: 'system.cpu.total.pct', method: 'linear', start: 0.5, end: 0.5 }, @@ -67,12 +68,15 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: dataForgeIndices.join(','), docCountTarget: 270, + retryService, + logger, }); await createDataView({ supertest, name: DATA_VIEW, id: DATA_VIEW_ID, title: DATA_VIEW, + logger, }); }); @@ -90,6 +94,7 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); await esDeleteAllIndices([ALERT_ACTION_INDEX, ...dataForgeIndices]); await cleanup({ client: esClient, config: dataForgeConfig, logger }); @@ -101,10 +106,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -165,6 +173,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -174,6 +184,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -251,6 +263,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/p99_pct_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/p99_pct_fired.ts index f826a72fae4ea..e04242f4ae1b9 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/p99_pct_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/p99_pct_fired.ts @@ -31,6 +31,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule - P99 - PCT - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -60,8 +61,8 @@ export default function ({ getService }: FtrProviderContext) { schedule: [ { template: 'good', - start: 'now-15m', - end: 'now', + start: 'now-10m', + end: 'now+5m', metrics: [{ name: 'system.cpu.user.pct', method: 'linear', start: 2.5, end: 2.5 }], }, ], @@ -78,6 +79,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: DATE_VIEW_TITLE, docCountTarget: 270, + retryService, + logger, }); }); @@ -102,10 +105,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -163,6 +169,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -172,6 +180,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -227,6 +237,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/rate_bytes_fired.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/rate_bytes_fired.ts index 4ab583c47df62..da613a8a4fb7c 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/rate_bytes_fired.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule/rate_bytes_fired.ts @@ -29,6 +29,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const logger = getService('log'); + const retryService = getService('retry'); describe('Custom Threshold rule RATE - GROUP_BY - BYTES - FIRED', () => { const CUSTOM_THRESHOLD_RULE_ALERT_INDEX = '.alerts-observability.threshold.alerts-default'; @@ -46,9 +47,11 @@ export default function ({ getService }: FtrProviderContext) { schedule: [ { template: 'good', - start: 'now-15m', - end: 'now', - metrics: [{ name: 'system.network.in.bytes', method: 'exp', start: 10, end: 100 }], + start: 'now-10m', + end: 'now+5m', + metrics: [ + { name: 'system.network.in.bytes', method: 'linear', start: 0, end: 54000000 }, + ], }, ], indexing: { @@ -63,12 +66,15 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: dataForgeIndices.join(','), docCountTarget: 270, + retryService, + logger, }); await createDataView({ supertest, name: DATE_VIEW, id: DATA_VIEW_ID, title: DATE_VIEW, + logger, }); }); @@ -86,6 +92,7 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); await esDeleteAllIndices([ALERT_ACTION_INDEX, ...dataForgeIndices]); await cleanup({ client: esClient, config: dataForgeConfig, logger }); @@ -97,10 +104,13 @@ export default function ({ getService }: FtrProviderContext) { supertest, name: 'Index Connector: Threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', @@ -109,7 +119,7 @@ export default function ({ getService }: FtrProviderContext) { criteria: [ { comparator: Comparator.GT_OR_EQ, - threshold: [0.2], + threshold: [50_000], timeSize: 1, timeUnit: 'm', metrics: [ @@ -161,6 +171,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -170,6 +182,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: CUSTOM_THRESHOLD_RULE_ALERT_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; @@ -230,7 +244,7 @@ export default function ({ getService }: FtrProviderContext) { criteria: [ { comparator: '>=', - threshold: [0.2], + threshold: [50_000], timeSize: 1, timeUnit: 'm', metrics: [{ name: 'A', field: 'system.network.in.bytes', aggType: 'rate' }], @@ -247,6 +261,8 @@ export default function ({ getService }: FtrProviderContext) { const resp = await waitForDocumentInIndex({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('observability.rules.custom_threshold'); @@ -254,9 +270,9 @@ export default function ({ getService }: FtrProviderContext) { `https://localhost:5601/app/observability/alerts/${alertId}` ); expect(resp.hits.hits[0]._source?.reason).eql( - `Rate of system.network.in.bytes is 0.3 B/s, above or equal the threshold of 0.2 B/s. (duration: 1 min, data view: kbn-data-forge-fake_hosts.fake_hosts-*, group: host-0,container-0)` + `Rate of system.network.in.bytes is 60 kB/s, above or equal the threshold of 50 kB/s. (duration: 1 min, data view: kbn-data-forge-fake_hosts.fake_hosts-*, group: host-0,container-0)` ); - expect(resp.hits.hits[0]._source?.value).eql('0.3 B/s'); + expect(resp.hits.hits[0]._source?.value).eql('60 kB/s'); expect(resp.hits.hits[0]._source?.host).eql( '{"name":"host-0","mac":["00-00-5E-00-53-23","00-00-5E-00-53-24"]}' ); diff --git a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts index 6071a67023433..9ecccffbd596e 100644 --- a/x-pack/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts +++ b/x-pack/test/alerting_api_integration/observability/custom_threshold_rule_data_view.ts @@ -21,7 +21,8 @@ import { createDataView, deleteDataView } from './helpers/data_view'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const objectRemover = new ObjectRemover(supertest); - const es = getService('es'); + const esClient = getService('es'); + const logger = getService('log'); describe('Custom Threshold rule data view >', () => { const DATA_VIEW_ID = 'data-view-id'; @@ -29,7 +30,7 @@ export default function ({ getService }: FtrProviderContext) { let ruleId: string; const searchRule = () => - es.search<{ references: unknown; alert: { params: any } }>({ + esClient.search<{ references: unknown; alert: { params: any } }>({ index: '.kibana*', query: { bool: { @@ -51,6 +52,7 @@ export default function ({ getService }: FtrProviderContext) { name: 'test-data-view', id: DATA_VIEW_ID, title: 'random-index*', + logger, }); }); @@ -59,6 +61,7 @@ export default function ({ getService }: FtrProviderContext) { await deleteDataView({ supertest, id: DATA_VIEW_ID, + logger, }); }); @@ -66,6 +69,8 @@ export default function ({ getService }: FtrProviderContext) { it('create a threshold rule', async () => { const createdRule = await createRule({ supertest, + logger, + esClient, tags: ['observability'], consumer: 'logs', name: 'Threshold rule', diff --git a/x-pack/test/alerting_api_integration/observability/helpers/alerting_api_helper.ts b/x-pack/test/alerting_api_integration/observability/helpers/alerting_api_helper.ts index 57b5721701a40..bd6c7761a5fcd 100644 --- a/x-pack/test/alerting_api_integration/observability/helpers/alerting_api_helper.ts +++ b/x-pack/test/alerting_api_integration/observability/helpers/alerting_api_helper.ts @@ -5,18 +5,22 @@ * 2.0. */ +import type { Client } from '@elastic/elasticsearch'; import type { SuperTest, Test } from 'supertest'; -import expect from '@kbn/expect'; +import { ToolingLog } from '@kbn/tooling-log'; import { ThresholdParams } from '@kbn/observability-plugin/common/custom_threshold_rule/types'; +import { refreshSavedObjectIndices } from './refresh_index'; export async function createIndexConnector({ supertest, name, indexName, + logger, }: { supertest: SuperTest; name: string; indexName: string; + logger: ToolingLog; }) { const { body } = await supertest .post(`/api/actions/connector`) @@ -28,7 +32,10 @@ export async function createIndexConnector({ refresh: true, }, connector_type_id: '.index', - }); + }) + .expect(200); + + logger.debug(`Created index connector id: ${body.id}`); return body.id as string; } @@ -41,6 +48,8 @@ export async function createRule({ tags = [], schedule, consumer, + logger, + esClient, }: { supertest: SuperTest; ruleTypeId: string; @@ -50,6 +59,8 @@ export async function createRule({ tags?: any[]; schedule?: { interval: string }; consumer: string; + logger: ToolingLog; + esClient: Client; }) { const { body } = await supertest .post(`/api/alerting/rule`) @@ -64,9 +75,10 @@ export async function createRule({ name, rule_type_id: ruleTypeId, actions, - }); - if (body.statusCode) { - expect(body.statusCode).eql(200, body.message); - } + }) + .expect(200); + + await refreshSavedObjectIndices(esClient); + logger.debug(`Created rule id: ${body.id}`); return body; } diff --git a/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts b/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts index 77806c70ece1a..63960b222cede 100644 --- a/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts +++ b/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import pRetry from 'p-retry'; +import { ToolingLog } from '@kbn/tooling-log'; import type SuperTest from 'supertest'; import type { Client } from '@elastic/elasticsearch'; @@ -13,18 +13,28 @@ import type { AggregationsAggregate, SearchResponse, } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { RetryService } from '@kbn/ftr-common-functional-services'; +import { retry } from '../../common/retry'; + +const TIMEOUT = 70_000; +const RETRIES = 120; +const RETRY_DELAY = 500; export async function waitForRuleStatus({ id, expectedStatus, supertest, + retryService, + logger, }: { id: string; expectedStatus: string; supertest: SuperTest.SuperTest; + retryService: RetryService; + logger: ToolingLog; }): Promise> { - return pRetry( - async () => { + const ruleResponse = await retry>({ + test: async () => { const response = await supertest.get(`/api/alerting/rule/${id}`); const { execution_status: executionStatus } = response.body || {}; const { status } = executionStatus || {}; @@ -33,42 +43,65 @@ export async function waitForRuleStatus({ } return executionStatus; }, - { retries: 10 } - ); + utilityName: 'fetching rule', + logger, + retryService, + timeout: TIMEOUT, + retries: RETRIES, + retryDelay: RETRY_DELAY, + }); + + return ruleResponse; } export async function waitForDocumentInIndex({ esClient, indexName, docCountTarget = 1, + retryService, + logger, }: { esClient: Client; indexName: string; docCountTarget?: number; + retryService: RetryService; + logger: ToolingLog; }): Promise>> { - return pRetry( - async () => { + return await retry>>({ + test: async () => { const response = await esClient.search({ index: indexName, rest_total_hits_as_int: true }); if (!response.hits.total || response.hits.total < docCountTarget) { - throw new Error('No hits found'); + throw new Error( + `Number of hits does not match expectation (total: ${response.hits.total}, target: ${docCountTarget})` + ); } + logger.debug(`Returned document: ${JSON.stringify(response.hits.hits[0])}`); return response; }, - { retries: 10 } - ); + utilityName: `waiting for documents in ${indexName} index`, + logger, + retryService, + timeout: TIMEOUT, + retries: RETRIES, + retryDelay: RETRY_DELAY, + }); } export async function waitForAlertInIndex({ esClient, indexName, ruleId, + retryService, + logger, }: { esClient: Client; indexName: string; ruleId: string; + retryService: RetryService; + logger: ToolingLog; }): Promise>> { - return pRetry( - async () => { + return await retry>>({ + test: async () => { const response = await esClient.search({ index: indexName, body: { @@ -84,6 +117,11 @@ export async function waitForAlertInIndex({ } return response; }, - { retries: 10 } - ); + utilityName: `waiting for alerting document in the alerting index (${indexName})`, + logger, + retryService, + timeout: TIMEOUT, + retries: RETRIES, + retryDelay: RETRY_DELAY, + }); } diff --git a/x-pack/test/alerting_api_integration/observability/helpers/data_view.ts b/x-pack/test/alerting_api_integration/observability/helpers/data_view.ts index 0b0e85b104962..1f84b2556ab70 100644 --- a/x-pack/test/alerting_api_integration/observability/helpers/data_view.ts +++ b/x-pack/test/alerting_api_integration/observability/helpers/data_view.ts @@ -6,17 +6,20 @@ */ import { SuperTest, Test } from 'supertest'; +import { ToolingLog } from '@kbn/tooling-log'; export const createDataView = async ({ supertest, id, name, title, + logger, }: { supertest: SuperTest; id: string; name: string; title: string; + logger: ToolingLog; }) => { const { body } = await supertest .post(`/api/content_management/rpc/create`) @@ -36,15 +39,20 @@ export const createDataView = async ({ }, options: { id }, version: 1, - }); + }) + .expect(200); + + logger.debug(`Created data view: ${JSON.stringify(body)}`); return body; }; export const deleteDataView = async ({ supertest, id, + logger, }: { supertest: SuperTest; id: string; + logger: ToolingLog; }) => { const { body } = await supertest .post(`/api/content_management/rpc/delete`) @@ -54,6 +62,9 @@ export const deleteDataView = async ({ id, options: { force: true }, version: 1, - }); + }) + .expect(200); + + logger.debug(`Deleted data view id: ${id}`); return body; }; diff --git a/x-pack/test/alerting_api_integration/observability/helpers/refresh_index.ts b/x-pack/test/alerting_api_integration/observability/helpers/refresh_index.ts new file mode 100644 index 0000000000000..4808a07ba4b1d --- /dev/null +++ b/x-pack/test/alerting_api_integration/observability/helpers/refresh_index.ts @@ -0,0 +1,36 @@ +/* + * 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 { Client } from '@elastic/elasticsearch'; +import { ALL_SAVED_OBJECT_INDICES } from '@kbn/core-saved-objects-server'; + +/** + * Copied from x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/refresh_index.ts + * + * Refresh an index, making changes available to search. + * Reusable utility which refreshes all saved object indices, to make them available for search, especially + * useful when needing to perform a search on an index that has just been written to. + * + * An example of this when installing the prebuilt detection rules SO of type 'security-rule': + * the savedObjectsClient does this with a call with explicit `refresh: false`. + * So, despite of the fact that the endpoint waits until the prebuilt rule will be + * successfully indexed, it doesn't wait until they become "visible" for subsequent read + * operations. + * + * Additionally, this method clears the cache for all saved object indices. This helps in cases in which + * saved object is read, then written to, and then read again, and the second read returns stale data. + * @param es The Elasticsearch client + */ +export const refreshSavedObjectIndices = async (es: Client) => { + // Refresh indices to prevent a race condition between a write and subsequent read operation. To + // fix it deterministically we have to refresh saved object indices and wait until it's done. + await es.indices.refresh({ index: ALL_SAVED_OBJECT_INDICES }); + + // Additionally, we need to clear the cache to ensure that the next read operation will + // not return stale data. + await es.indices.clearCache({ index: ALL_SAVED_OBJECT_INDICES }); +}; diff --git a/x-pack/test/alerting_api_integration/observability/metric_threshold_rule.ts b/x-pack/test/alerting_api_integration/observability/metric_threshold_rule.ts index 4c4c5306d708a..808df288b094e 100644 --- a/x-pack/test/alerting_api_integration/observability/metric_threshold_rule.ts +++ b/x-pack/test/alerting_api_integration/observability/metric_threshold_rule.ts @@ -28,6 +28,7 @@ export default function ({ getService }: FtrProviderContext) { const esDeleteAllIndices = getService('esDeleteAllIndices'); const supertest = getService('supertest'); const logger = getService('log'); + const retryService = getService('retry'); describe('Metric threshold rule >', () => { let ruleId: string; @@ -49,17 +50,34 @@ export default function ({ getService }: FtrProviderContext) { name: 'Default', }); dataForgeConfig = { - schedule: [{ template: 'good', start: 'now-15m', end: 'now' }], + schedule: [ + { + template: 'good', + start: 'now-10m', + end: 'now+5m', + metrics: [{ name: 'system.cpu.user.pct', method: 'linear', start: 0.9, end: 0.9 }], + }, + ], indexing: { dataset: 'fake_hosts' as Dataset }, }; dataForgeIndices = await generate({ client: esClient, config: dataForgeConfig, logger }); + await waitForDocumentInIndex({ + esClient, + indexName: dataForgeIndices.join(','), + docCountTarget: 45, + retryService, + logger, + }); actionId = await createIndexConnector({ supertest, name: 'Index Connector: Metric threshold API test', indexName: ALERT_ACTION_INDEX, + logger, }); const createdRule = await createRule({ supertest, + logger, + esClient, ruleTypeId: InfraRuleType.MetricThreshold, consumer: 'infrastructure', tags: ['infrastructure'], @@ -88,6 +106,7 @@ export default function ({ getService }: FtrProviderContext) { { ruleType: '{{rule.type}}', alertDetailsUrl: '{{context.alertDetailsUrl}}', + reason: '{{context.reason}}', }, ], }, @@ -125,6 +144,8 @@ export default function ({ getService }: FtrProviderContext) { id: ruleId, expectedStatus: 'active', supertest, + retryService, + logger, }); expect(executionStatus.status).to.be('active'); }); @@ -134,6 +155,8 @@ export default function ({ getService }: FtrProviderContext) { esClient, indexName: METRICS_ALERTS_INDEX, ruleId, + retryService, + logger, }); alertId = (resp.hits.hits[0]._source as any)['kibana.alert.uuid']; startedAt = (resp.hits.hits[0]._source as any)['kibana.alert.start']; @@ -188,15 +211,24 @@ export default function ({ getService }: FtrProviderContext) { it('should set correct action parameter: ruleType', async () => { const rangeFrom = moment(startedAt).subtract('5', 'minute').toISOString(); - const resp = await waitForDocumentInIndex<{ ruleType: string; alertDetailsUrl: string }>({ + const resp = await waitForDocumentInIndex<{ + ruleType: string; + alertDetailsUrl: string; + reason: string; + }>({ esClient, indexName: ALERT_ACTION_INDEX, + retryService, + logger, }); expect(resp.hits.hits[0]._source?.ruleType).eql('metrics.alert.threshold'); expect(resp.hits.hits[0]._source?.alertDetailsUrl).eql( `https://localhost:5601/app/observability/alerts?_a=(kuery:%27kibana.alert.uuid:%20%22${alertId}%22%27%2CrangeFrom:%27${rangeFrom}%27%2CrangeTo:now%2Cstatus:all)` ); + expect(resp.hits.hits[0]._source?.reason).eql( + `system.cpu.user.pct is 90% in the last 5 mins. Alert when > 50%.` + ); }); }); }); diff --git a/x-pack/test/api_integration/apis/aiops/test_data.ts b/x-pack/test/api_integration/apis/aiops/test_data.ts index 455574e4c7e76..e8ca212709a66 100644 --- a/x-pack/test/api_integration/apis/aiops/test_data.ts +++ b/x-pack/test/api_integration/apis/aiops/test_data.ts @@ -8,12 +8,12 @@ // We're using the mocks for jest unit tests as expected data in the integration tests here. // This makes sure should the assertions for the integration tests need to be updated, // that also the jest unit tests use mocks that are not outdated. -import { significantTerms as artificialLogSignificantTerms } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/significant_terms'; -import { significantLogPatterns as artificialLogSignificantLogPatterns } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/significant_log_patterns'; -import { finalSignificantItemGroups as artificialLogsSignificantItemGroups } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/final_significant_item_groups'; -import { finalSignificantItemGroupsTextfield as artificialLogsSignificantItemGroupsTextfield } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/final_significant_item_groups_textfield'; -import { topTerms } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/top_terms'; -import { topTermsGroups } from '@kbn/aiops-plugin/common/__mocks__/artificial_logs/top_terms_groups'; +import { significantTerms as artificialLogSignificantTerms } from '@kbn/aiops-test-utils/artificial_logs/significant_terms'; +import { significantLogPatterns as artificialLogSignificantLogPatterns } from '@kbn/aiops-test-utils/artificial_logs/significant_log_patterns'; +import { finalSignificantItemGroups as artificialLogsSignificantItemGroups } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups'; +import { finalSignificantItemGroupsTextfield as artificialLogsSignificantItemGroupsTextfield } from '@kbn/aiops-test-utils/artificial_logs/final_significant_item_groups_textfield'; +import { topTerms } from '@kbn/aiops-test-utils/artificial_logs/top_terms'; +import { topTermsGroups } from '@kbn/aiops-test-utils/artificial_logs/top_terms_groups'; import type { AiopsLogRateAnalysisSchema, AiopsLogRateAnalysisApiVersion as ApiVersion, @@ -21,7 +21,7 @@ import type { import { frequentItemSetsLargeArraysGroups, frequentItemSetsLargeArraysSignificantItems, -} from '../../../functional/apps/aiops/log_rate_analysis/test_data/__mocks__/frequent_item_sets_large_arrays'; +} from '@kbn/aiops-test-utils/frequent_item_sets_large_arrays'; import type { TestData } from './types'; diff --git a/x-pack/test/api_integration/apis/slos/create_slo.ts b/x-pack/test/api_integration/apis/slos/create_slo.ts index 18e35eceb835f..4b26c2b0eb4b5 100644 --- a/x-pack/test/api_integration/apis/slos/create_slo.ts +++ b/x-pack/test/api_integration/apis/slos/create_slo.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; import type { CreateSLOInput } from '@kbn/slo-schema'; -import { SO_SLO_TYPE } from '@kbn/observability-plugin/server/saved_objects'; +import { SO_SLO_TYPE } from '@kbn/slo-plugin/server/saved_objects'; import { FtrProviderContext } from '../../ftr_provider_context'; import { sloData } from './fixtures/create_slo'; diff --git a/x-pack/test/api_integration/apis/slos/delete_slo.ts b/x-pack/test/api_integration/apis/slos/delete_slo.ts index 279f0e80464b2..9d4c3b9a4d051 100644 --- a/x-pack/test/api_integration/apis/slos/delete_slo.ts +++ b/x-pack/test/api_integration/apis/slos/delete_slo.ts @@ -7,7 +7,7 @@ import { cleanup } from '@kbn/infra-forge'; import expect from '@kbn/expect'; import type { CreateSLOInput } from '@kbn/slo-schema'; -import { SO_SLO_TYPE } from '@kbn/observability-plugin/server/saved_objects'; +import { SO_SLO_TYPE } from '@kbn/slo-plugin/server/saved_objects'; import { FtrProviderContext } from '../../ftr_provider_context'; import { sloData } from './fixtures/create_slo'; diff --git a/x-pack/test/api_integration/apis/slos/helper/es.ts b/x-pack/test/api_integration/apis/slos/helper/es.ts index d1b50e625365a..f5ac7a6e23c88 100644 --- a/x-pack/test/api_integration/apis/slos/helper/es.ts +++ b/x-pack/test/api_integration/apis/slos/helper/es.ts @@ -8,7 +8,7 @@ import { Client } from '@elastic/elasticsearch'; import { SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '@kbn/observability-plugin/common/slo/constants'; +} from '@kbn/slo-plugin/common/constants'; export class SloEsClient { constructor(private esClient: Client) {} diff --git a/x-pack/test/api_integration/apis/slos/reset_slo.ts b/x-pack/test/api_integration/apis/slos/reset_slo.ts index 37dfbda0a882f..014e546b2b639 100644 --- a/x-pack/test/api_integration/apis/slos/reset_slo.ts +++ b/x-pack/test/api_integration/apis/slos/reset_slo.ts @@ -6,7 +6,7 @@ */ import { cleanup } from '@kbn/infra-forge'; import expect from '@kbn/expect'; -import { SO_SLO_TYPE } from '@kbn/observability-plugin/server/saved_objects'; +import { SO_SLO_TYPE } from '@kbn/slo-plugin/server/saved_objects'; import { FtrProviderContext } from '../../ftr_provider_context'; import { loadTestData } from './helper/load_test_data'; diff --git a/x-pack/test/api_integration/apis/slos/update_slo.ts b/x-pack/test/api_integration/apis/slos/update_slo.ts index 6727fa8c22241..53768327e7b49 100644 --- a/x-pack/test/api_integration/apis/slos/update_slo.ts +++ b/x-pack/test/api_integration/apis/slos/update_slo.ts @@ -7,7 +7,7 @@ import { cleanup } from '@kbn/infra-forge'; import expect from '@kbn/expect'; import type { CreateSLOInput } from '@kbn/slo-schema'; -import { SO_SLO_TYPE } from '@kbn/observability-plugin/server/saved_objects'; +import { SO_SLO_TYPE } from '@kbn/slo-plugin/server/saved_objects'; import { FtrProviderContext } from '../../ftr_provider_context'; import { loadTestData } from './helper/load_test_data'; diff --git a/x-pack/test/api_integration/services/slo.ts b/x-pack/test/api_integration/services/slo.ts index baa30067f4edf..4d28786df56a5 100644 --- a/x-pack/test/api_integration/services/slo.ts +++ b/x-pack/test/api_integration/services/slo.ts @@ -6,7 +6,7 @@ */ import { CreateSLOInput, FindSLODefinitionsResponse } from '@kbn/slo-schema'; -import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '@kbn/observability-plugin/common/slo/constants'; +import { SLO_SUMMARY_DESTINATION_INDEX_NAME } from '@kbn/slo-plugin/common/constants'; import { waitForIndexToBeEmpty } from '../apis/slos/helper/wait_for_index_state'; import { FtrProviderContext } from '../ftr_provider_context'; diff --git a/x-pack/test/apm_api_integration/tests/fleet/input_only_package.spec.ts b/x-pack/test/apm_api_integration/tests/fleet/input_only_package.spec.ts index 6d8cfb870d695..5d02209ca0aa6 100644 --- a/x-pack/test/apm_api_integration/tests/fleet/input_only_package.spec.ts +++ b/x-pack/test/apm_api_integration/tests/fleet/input_only_package.spec.ts @@ -88,13 +88,13 @@ export default function ApiTest(ftrProviderContext: FtrProviderContext) { registry.when('APM package policy', { config: 'basic', archives: [] }, () => { async function getAgentPolicyPermissions(agentPolicyId: string, packagePolicyId: string) { const res = await bettertest<{ - item: { output_permissions: { default: Record } }; + item: { output_permissions: { [key: string]: Record } }; }>({ pathname: `/api/fleet/agent_policies/${agentPolicyId}/full`, method: 'get', }); - return res.body.item.output_permissions.default[packagePolicyId]; + return Object.values(res.body.item.output_permissions)[0][packagePolicyId]; } describe('input only package', () => { diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts index 9fe3f24b14a73..c786b806b1b14 100644 --- a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy_datastream_permissions.ts @@ -110,7 +110,9 @@ export default function (providerContext: FtrProviderContext) { .set('kbn-xsrf', 'xxxx'); // Check that the privileges are correct - expect(fullAgentPolicy.output_permissions.default[packagePolicyId].indices).to.eql([ + expect( + (Object.values(fullAgentPolicy.output_permissions)[0] as any)[packagePolicyId].indices + ).to.eql([ { names: ['logs-*-*'], privileges: ['auto_configure', 'create_doc'] }, { names: ['metrics-*-*'], privileges: ['auto_configure', 'create_doc'] }, ]); diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts index 08a7b55e84dbe..b458574273e18 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts @@ -28,6 +28,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid after(async () => { await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); }); it('opens the flyout for the right dataset', async () => { diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts index 3d49e4fe3c197..ceaeaaf576ed6 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table.ts @@ -29,6 +29,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid after(async () => { await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); }); it('shows the right number of rows in correct order', async () => { diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts index 9d9eef1259de8..eee4cefeb1017 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_table_filters.ts @@ -28,6 +28,7 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid after(async () => { await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); }); it('hides inactive datasets when toggled', async () => { diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/constants.ts b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/constants.ts index e68380b6c01b8..df8e662e7a296 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/constants.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/constants.ts @@ -38,4 +38,5 @@ export const DATAFEED_CONFIG: Datafeed = { export const ML_EMBEDDABLE_TYPES = { ANOMALY_SWIMLANE: 'ml_anomaly_swimlane', ANOMALY_CHARTS: 'ml_anomaly_charts', + ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE: 'ml_single_metric_viewer', } as const; diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/index.ts b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/index.ts index 5713f77c8088c..e557dc27d0719 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/index.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/index.ts @@ -32,6 +32,7 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { }); loadTestFile(require.resolve('./anomaly_charts_dashboard_embeddables')); + loadTestFile(require.resolve('./single_metric_viewer_dashboard_embeddables')); loadTestFile(require.resolve('./anomaly_embeddables_migration')); loadTestFile(require.resolve('./lens_to_ml')); loadTestFile(require.resolve('./map_to_ml')); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/single_metric_viewer_dashboard_embeddables.ts b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/single_metric_viewer_dashboard_embeddables.ts new file mode 100644 index 0000000000000..1caa425d80ee4 --- /dev/null +++ b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/single_metric_viewer_dashboard_embeddables.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { JOB_CONFIG, DATAFEED_CONFIG, ML_EMBEDDABLE_TYPES } from './constants'; + +const testDataList = [ + { + type: 'testData', + suiteSuffix: 'with multi metric job', + panelTitle: `ML single metric viewer for ${JOB_CONFIG.job_id}`, + jobConfig: JOB_CONFIG, + datafeedConfig: DATAFEED_CONFIG, + dashboardTitle: `ML single metric viewer for fq_multi_1_ae ${Date.now()}`, + expected: { detectorInputValue: '0', entityInputLabel: 'airline', entityInputValue: 'AAL' }, + }, +]; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const ml = getService('ml'); + const PageObjects = getPageObjects(['common', 'timePicker', 'dashboard']); + const from = 'Feb 7, 2016 @ 00:00:00.000'; + const to = 'Feb 11, 2016 @ 00:00:00.000'; + + describe('single metric viewer in dashboard', function () { + this.tags(['ml']); + + before(async () => { + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); + await ml.testResources.createDataViewIfNeeded('ft_farequote', '@timestamp'); + await ml.testResources.setKibanaTimeZoneToUTC(); + await ml.securityUI.loginAsMlPowerUser(); + await PageObjects.common.setTime({ from, to }); + }); + + after(async () => { + await ml.api.cleanMlIndices(); + await ml.testResources.deleteDataViewByTitle('ft_farequote'); + await PageObjects.common.unsetTime(); + }); + + for (const testData of testDataList) { + describe(testData.suiteSuffix, function () { + before(async () => { + await ml.api.createAndRunAnomalyDetectionLookbackJob( + testData.jobConfig, + testData.datafeedConfig + ); + await PageObjects.dashboard.navigateToApp(); + }); + + after(async () => { + await ml.testResources.deleteDashboardByTitle(testData.dashboardTitle); + }); + + it('can open job selection flyout', async () => { + await PageObjects.dashboard.clickNewDashboard(); + await ml.dashboardEmbeddables.assertDashboardIsEmpty(); + await ml.dashboardEmbeddables.openAnomalyJobSelectionFlyout( + ML_EMBEDDABLE_TYPES.ANOMALY_SINGLE_METRIC_VIEWER_EMBEDDABLE_TYPE + ); + }); + + it('can select jobs', async () => { + await ml.dashboardJobSelectionTable.setRowRadioButtonState( + testData.jobConfig.job_id, + true + ); + await ml.dashboardJobSelectionTable.applyJobSelection(); + }); + + it('can configure single metric viewer panel', async () => { + await ml.dashboardEmbeddables.assertSingleMetricViewerEmbeddableInitializerExists(); + await ml.singleMetricViewer.assertDetectorInputExist(); + await ml.singleMetricViewer.assertDetectorInputValue( + testData.expected.detectorInputValue + ); + await ml.singleMetricViewer.assertEntityInputExist(testData.expected.entityInputLabel); + await ml.singleMetricViewer.selectEntityValue( + testData.expected.entityInputLabel, + testData.expected.entityInputValue + ); + }); + + it('create new single metric viewer panel', async () => { + await ml.dashboardEmbeddables.clickSingleMetricViewerInitializerConfirmButtonEnabled(); + await PageObjects.timePicker.pauseAutoRefresh(); + await ml.dashboardEmbeddables.assertDashboardPanelExists(testData.panelTitle); + await ml.singleMetricViewer.assertChartExist(); + await ml.singleMetricViewer.assertAnomalyMarkerExist(); + await PageObjects.dashboard.saveDashboard(testData.dashboardTitle); + }); + }); + } + }); +} diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts index c1c4887ccc99b..d2171544aa993 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_result_views/aggregated_scripted_job.ts @@ -18,7 +18,6 @@ export default function ({ getService }: FtrProviderContext) { suiteTitle: 'supported job with aggregation field', jobConfig: { job_id: `fq_supported_aggs_${ts}`, - job_type: 'anomaly_detector', description: '', analysis_config: { bucket_span: '30m', @@ -104,7 +103,6 @@ export default function ({ getService }: FtrProviderContext) { suiteTitle: 'supported job with scripted field', jobConfig: { job_id: `fq_supported_script_${ts}`, - job_type: 'anomaly_detector', description: '', analysis_config: { bucket_span: '15m', @@ -178,7 +176,6 @@ export default function ({ getService }: FtrProviderContext) { suiteTitle: 'unsupported job with bucket_script aggregation field', jobConfig: { job_id: `fq_unsupported_aggs_${ts}`, - job_type: 'anomaly_detector', description: '', analysis_config: { bucket_span: '15m', @@ -282,7 +279,6 @@ export default function ({ getService }: FtrProviderContext) { suiteTitle: 'unsupported job with partition by of a scripted field', jobConfig: { job_id: `fq_unsupported_script_${ts}`, - job_type: 'anomaly_detector', description: '', analysis_config: { bucket_span: '15m', @@ -359,8 +355,7 @@ export default function ({ getService }: FtrProviderContext) { }, ]; - // FAILING ES PROMOTION: https://github.com/elastic/kibana/issues/178562 - describe.skip('aggregated or scripted job', function () { + describe('aggregated or scripted job', function () { this.tags(['ml']); before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); diff --git a/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts b/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts index f7f2f669bc202..95176977818c3 100644 --- a/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts +++ b/x-pack/test/functional/apps/ml/data_visualizer/data_drift.ts @@ -13,7 +13,7 @@ export const farequoteKQLFiltersSearchTestData = { dateTimeField: '@timestamp', sourceIndexOrSavedSearch: 'ft_farequote_filter_and_kuery', chartClickCoordinates: [0, 0] as [number, number], - comparisonChartClickCoordinates: [1, 1] as [number, number], + comparisonChartClickCoordinates: [2, 1] as [number, number], dataViewName: 'ft_farequote', totalDocCount: '5,674', }; @@ -23,7 +23,7 @@ const dataViewCreationTestData = { isSavedSearch: true, dateTimeField: '@timestamp', chartClickCoordinates: [0, 0] as [number, number], - comparisonChartClickCoordinates: [1, 1] as [number, number], + comparisonChartClickCoordinates: [2, 2] as [number, number], totalDocCount: '86,274', }; @@ -85,8 +85,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await ml.dataDrift.runAnalysis(); } - // Failing: See https://github.com/elastic/kibana/issues/176882 - describe.skip('data drift', async function () { + describe('data drift', async function () { before(async () => { await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/ihp_outlier'); await ml.testResources.createDataViewIfNeeded('ft_ihp_outlier'); diff --git a/x-pack/test/functional/apps/reporting_management/report_listing.ts b/x-pack/test/functional/apps/reporting_management/report_listing.ts index bb0673938419d..3b735424d7998 100644 --- a/x-pack/test/functional/apps/reporting_management/report_listing.ts +++ b/x-pack/test/functional/apps/reporting_management/report_listing.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { REPORT_TABLE_ID } from '@kbn/reporting-plugin/common/constants'; +import { REPORT_TABLE_ID } from '@kbn/reporting-common'; import { FtrProviderContext } from '../../ftr_provider_context'; export default ({ getPageObjects, getService }: FtrProviderContext) => { diff --git a/x-pack/test/functional/es_archives/large_arrays/data.json.gz b/x-pack/test/functional/es_archives/large_arrays/data.json.gz new file mode 100644 index 0000000000000..cf8a2d67397b5 Binary files /dev/null and b/x-pack/test/functional/es_archives/large_arrays/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/large_arrays/mappings.json b/x-pack/test/functional/es_archives/large_arrays/mappings.json new file mode 100644 index 0000000000000..5d60a2fc149fb --- /dev/null +++ b/x-pack/test/functional/es_archives/large_arrays/mappings.json @@ -0,0 +1,23 @@ +{ + "type": "index", + "value": { + "index": "large_arrays", + "mappings": { + "properties": { + "@timestamp": { + "type": "date" + }, + "items": { + "type": "keyword" + } + } + }, + "settings": { + "index": { + "auto_expand_replicas": "0-1", + "number_of_replicas": "0", + "number_of_shards": "1" + } + } + } +} diff --git a/x-pack/test/functional/page_objects/ingest_pipelines_page.ts b/x-pack/test/functional/page_objects/ingest_pipelines_page.ts index c4800b55aa77c..d7a2e32f302d2 100644 --- a/x-pack/test/functional/page_objects/ingest_pipelines_page.ts +++ b/x-pack/test/functional/page_objects/ingest_pipelines_page.ts @@ -56,7 +56,11 @@ export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrP await pageObjects.header.waitUntilLoadingHasFinished(); }, - async getPipelinesList() { + async getPipelinesList(options?: { searchFor?: string }) { + if (options?.searchFor) { + await this.searchPipelineList(options.searchFor); + } + const pipelines = await testSubjects.findAll('pipelineTableRow'); const getPipelineName = async (pipeline: WebElementWrapper) => { @@ -67,6 +71,11 @@ export function IngestPipelinesPageProvider({ getService, getPageObjects }: FtrP return await Promise.all(pipelines.map((pipeline) => getPipelineName(pipeline))); }, + async searchPipelineList(searchTerm: string) { + await pageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.setValue('pipelineTableSearch', searchTerm); + }, + async clickPipelineLink(index: number) { const links = await testSubjects.findAll('pipelineDetailsLink'); await links.at(index)?.click(); diff --git a/x-pack/test/functional/page_objects/reporting_page.ts b/x-pack/test/functional/page_objects/reporting_page.ts index 1574a5b8df0ce..789421f1985d1 100644 --- a/x-pack/test/functional/page_objects/reporting_page.ts +++ b/x-pack/test/functional/page_objects/reporting_page.ts @@ -11,7 +11,8 @@ import path from 'path'; import type SuperTest from 'supertest'; import { format as formatUrl } from 'url'; import { promisify } from 'util'; -import { REPORT_TABLE_ID, REPORT_TABLE_ROW_ID } from '@kbn/reporting-plugin/common/constants'; + +import { REPORT_TABLE_ID, REPORT_TABLE_ROW_ID } from '@kbn/reporting-common'; import { FtrService } from '../ftr_provider_context'; const writeFileAsync = promisify(fs.writeFile); diff --git a/x-pack/test/functional/services/aiops/log_rate_analysis_data_generator.ts b/x-pack/test/functional/services/aiops/log_rate_analysis_data_generator.ts index bd1d6c94810b9..0c414db19a0ce 100644 --- a/x-pack/test/functional/services/aiops/log_rate_analysis_data_generator.ts +++ b/x-pack/test/functional/services/aiops/log_rate_analysis_data_generator.ts @@ -11,8 +11,6 @@ import { LOG_RATE_ANALYSIS_TYPE } from '@kbn/aiops-utils'; import { FtrProviderContext } from '../../ftr_provider_context'; -import { frequentItemSetsLargeArraysSource } from '../../apps/aiops/log_rate_analysis/test_data/__mocks__/frequent_item_sets_large_arrays'; - const LOG_RATE_ANALYSYS_DATA_GENERATOR = { KIBANA_SAMPLE_DATA_LOGS: 'kibana_sample_data_logs', FAREQUOTE_WITH_SPIKE: 'farequote_with_spike', @@ -324,44 +322,7 @@ export function LogRateAnalysisDataGeneratorProvider({ getService }: FtrProvider break; case 'large_arrays': - try { - await es.indices.delete({ - index: dataGenerator, - ignore_unavailable: true, - }); - } catch (e) { - log.info(`Could not delete index '${dataGenerator}' in before() callback`); - } - - // Create index with mapping - await es.indices.create({ - index: dataGenerator, - mappings: { - properties: { - items: { type: 'keyword' }, - '@timestamp': { type: 'date' }, - }, - }, - }); - - interface DocWithArray { - '@timestamp': number; - items: string[]; - } - - await es.bulk({ - refresh: 'wait_for', - body: frequentItemSetsLargeArraysSource.reduce((docs, items) => { - if (docs === undefined) return []; - docs.push({ index: { _index: dataGenerator } }); - docs.push({ - '@timestamp': 1562254538700, - items, - }); - return docs; - }, [] as estypes.BulkRequest['body']), - }); - + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/large_arrays'); break; default: @@ -389,7 +350,6 @@ export function LogRateAnalysisDataGeneratorProvider({ getService }: FtrProvider case 'artificial_logs_with_spike_textfield_zerodocsfallback': case 'artificial_logs_with_dip_zerodocsfallback': case 'artificial_logs_with_dip_textfield_zerodocsfallback': - case 'large_arrays': try { await es.indices.delete({ index: dataGenerator, @@ -399,6 +359,10 @@ export function LogRateAnalysisDataGeneratorProvider({ getService }: FtrProvider } break; + case 'large_arrays': + await esArchiver.unload('x-pack/test/functional/es_archives/large_arrays'); + break; + default: log.error(`Unsupported data generator '${dataGenerator}`); } diff --git a/x-pack/test/functional/services/ml/dashboard_embeddables.ts b/x-pack/test/functional/services/ml/dashboard_embeddables.ts index d6328b6aa72b5..587a5762f4487 100644 --- a/x-pack/test/functional/services/ml/dashboard_embeddables.ts +++ b/x-pack/test/functional/services/ml/dashboard_embeddables.ts @@ -16,6 +16,7 @@ export function MachineLearningDashboardEmbeddablesProvider( const retry = getService('retry'); const testSubjects = getService('testSubjects'); const find = getService('find'); + // const ml = getService('ml'); const dashboardAddPanel = getService('dashboardAddPanel'); const PageObjects = getPageObjects(['discover']); @@ -26,6 +27,22 @@ export function MachineLearningDashboardEmbeddablesProvider( }); }, + async assertSingleMetricViewerEmbeddableInitializerExists() { + await retry.tryForTime(10 * 1000, async () => { + await testSubjects.existOrFail('mlSingleMetricViewerEmbeddableInitializer', { + timeout: 1000, + }); + }); + }, + + async assertSingleMetricViewerEmbeddableInitializerNotExists() { + await retry.tryForTime(10 * 1000, async () => { + await testSubjects.missingOrFail('mlSingleMetricViewerEmbeddableInitializer', { + timeout: 1000, + }); + }); + }, + async assertAnomalyChartsEmbeddableInitializerNotExists() { await retry.tryForTime(10 * 1000, async () => { await testSubjects.missingOrFail('mlAnomalyChartsEmbeddableInitializer', { timeout: 1000 }); @@ -46,9 +63,7 @@ export function MachineLearningDashboardEmbeddablesProvider( }); }, - async assertInitializerConfirmButtonEnabled() { - const subj = 'mlAnomalyChartsInitializerConfirmButton'; - + async assertInitializerConfirmButtonEnabled(subj: string) { await retry.tryForTime(60 * 1000, async () => { await testSubjects.existOrFail(subj); await testSubjects.isEnabled(subj); @@ -58,12 +73,21 @@ export function MachineLearningDashboardEmbeddablesProvider( async clickInitializerConfirmButtonEnabled() { const subj = 'mlAnomalyChartsInitializerConfirmButton'; await retry.tryForTime(60 * 1000, async () => { - await this.assertInitializerConfirmButtonEnabled(); + await this.assertInitializerConfirmButtonEnabled(subj); await testSubjects.clickWhenNotDisabledWithoutRetry(subj); await this.assertAnomalyChartsEmbeddableInitializerNotExists(); }); }, + async clickSingleMetricViewerInitializerConfirmButtonEnabled() { + const subj = 'mlSingleMetricViewerInitializerConfirmButton'; + await retry.tryForTime(60 * 1000, async () => { + await this.assertInitializerConfirmButtonEnabled(subj); + await testSubjects.clickWhenNotDisabledWithoutRetry(subj); + await this.assertSingleMetricViewerEmbeddableInitializerNotExists(); + }); + }, + async assertDashboardIsEmpty() { await retry.tryForTime(60 * 1000, async () => { await testSubjects.existOrFail('emptyDashboardWidget'); @@ -101,7 +125,7 @@ export function MachineLearningDashboardEmbeddablesProvider( }, async openAnomalyJobSelectionFlyout( - mlEmbeddableType: 'ml_anomaly_swimlane' | 'ml_anomaly_charts' + mlEmbeddableType: 'ml_anomaly_swimlane' | 'ml_anomaly_charts' | 'ml_single_metric_viewer' ) { await retry.tryForTime(60 * 1000, async () => { await dashboardAddPanel.clickEditorMenuButton(); diff --git a/x-pack/test/functional/services/ml/dashboard_job_selection_table.ts b/x-pack/test/functional/services/ml/dashboard_job_selection_table.ts index e571a92fd92c0..376c41eeab2f0 100644 --- a/x-pack/test/functional/services/ml/dashboard_job_selection_table.ts +++ b/x-pack/test/functional/services/ml/dashboard_job_selection_table.ts @@ -18,6 +18,7 @@ export function MachineLearningDashboardJobSelectionTableProvider({ }: FtrProviderContext) { const retry = getService('retry'); const testSubjects = getService('testSubjects'); + const find = getService('find'); return { async assertJobSelectionTableExists(): Promise { @@ -71,6 +72,33 @@ export function MachineLearningDashboardJobSelectionTableProvider({ } }, + async assertRowRadioButtonCheckedState(jobId: string, expectedCheckState: boolean) { + const actualCheckState = await this.getRowRadioButtonCheckedState(jobId); + expect(actualCheckState).to.eql( + expectedCheckState, + `Table row for job '${jobId}' check state should be '${expectedCheckState}' (got '${actualCheckState}')` + ); + }, + + async getRowRadioButtonCheckedState(jobId: string): Promise { + const radioButtonInput = await find.byCssSelector( + `[data-test-subj="${jobId}-radio-button"] > input#${jobId}` + ); + const radioButtonChecked = await radioButtonInput.getAttribute('checked'); + return radioButtonChecked === 'true'; + }, + + async setRowRadioButtonState(jobId: string, expectCheckedState: boolean) { + const subj = this.rowSelector(jobId, `${jobId}-radio-button`); + const checkedState = await this.getRowRadioButtonCheckedState(jobId); + if (checkedState !== expectCheckedState) { + await retry.tryForTime(5 * 1000, async () => { + await testSubjects.clickWhenNotDisabledWithoutRetry(subj); + await this.assertRowRadioButtonCheckedState(jobId, expectCheckedState); + }); + } + }, + async assertApplyJobSelectionEnabled() { const subj = 'mlFlyoutJobSelectorButtonApply'; await testSubjects.existOrFail(subj); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/global_alerts_page.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/global_alerts_page.ts index 6fdc56761c5ea..ca3b40be16344 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/global_alerts_page.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/global_alerts_page.ts @@ -29,8 +29,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const supertest = getService('supertest'); const objectRemover = new ObjectRemover(supertest); - describe('Global alerts page', function () { - describe('Loads the page with limited privileges', () => { + // Failing: See https://github.com/elastic/kibana/issues/178887 + describe.skip('Global alerts page', function () { + // FLAKY: https://github.com/elastic/kibana/issues/178322 + describe.skip('Loads the page with limited privileges', () => { before(async () => { await security.testUser.setRoles(['alerts_and_actions_role']); }); diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/create_llm_proxy.ts b/x-pack/test/observability_ai_assistant_api_integration/common/create_llm_proxy.ts index aead4e6276c56..569065a734523 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/common/create_llm_proxy.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/common/create_llm_proxy.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { ToolingLog } from '@kbn/tooling-log'; import getPort from 'get-port'; import http, { type Server } from 'http'; import { once, pull } from 'lodash'; @@ -41,23 +42,18 @@ export class LlmProxy { interceptors: Array = []; - constructor(private readonly port: number) { + constructor(private readonly port: number, private readonly log: ToolingLog) { this.server = http - .createServer(async (request, response) => { - const interceptors = this.interceptors.concat(); + .createServer() + .on('request', async (request, response) => { + this.log.info(`LLM request received`); - const body = await new Promise((resolve, reject) => { - let concatenated = ''; - request.on('data', (chunk) => { - concatenated += chunk.toString(); - }); - request.on('close', () => { - resolve(concatenated); - }); - }); + const interceptors = this.interceptors.concat(); + const body = await getRequestBody(request); while (interceptors.length) { const interceptor = interceptors.shift()!; + if (interceptor.when(body)) { pull(this.interceptors, interceptor); interceptor.handle(request, response); @@ -68,6 +64,9 @@ export class LlmProxy { response.writeHead(500, 'No interceptors found to handle request: ' + request.url); response.end(); }) + .on('error', (error) => { + this.log.error(`LLM proxy encountered an error: ${error}`); + }) .listen(port); } @@ -83,18 +82,31 @@ export class LlmProxy { this.server.close(); } - intercept( + waitForAllInterceptorsSettled() { + return Promise.all(this.interceptors); + } + + intercept< + TResponseChunks extends Array> | string | undefined = undefined + >( name: string, - when: RequestInterceptor['when'] - ): { - waitForIntercept: () => Promise; - } { + when: RequestInterceptor['when'], + responseChunks?: TResponseChunks + ): TResponseChunks extends undefined + ? { + waitForIntercept: () => Promise; + } + : { + complete: () => Promise; + } { const waitForInterceptPromise = Promise.race([ - new Promise((outerResolve, outerReject) => { + new Promise((outerResolve) => { this.interceptors.push({ name, when, handle: (request, response) => { + this.log.info(`LLM request intercepted by "${name}"`); + function write(chunk: string) { return new Promise((resolve) => response.write(chunk, () => resolve())); } @@ -135,18 +147,50 @@ export class LlmProxy { }); }), new Promise((_, reject) => { - setTimeout(() => reject(new Error('Operation timed out')), 5000); + setTimeout(() => reject(new Error(`Interceptor "${name}" timed out after 5000ms`)), 5000); }), ]); + if (responseChunks === undefined) { + return { waitForIntercept: () => waitForInterceptPromise } as any; + } + + const parsedChunks = Array.isArray(responseChunks) + ? responseChunks + : responseChunks.split(' ').map((token, i) => (i === 0 ? token : ` ${token}`)); + return { - waitForIntercept: () => waitForInterceptPromise, - }; + complete: async () => { + const simulator = await waitForInterceptPromise; + for (const chunk of parsedChunks) { + await simulator.next(chunk); + } + await simulator.complete(); + }, + } as any; } } -export async function createLlmProxy() { +export async function createLlmProxy(log: ToolingLog) { const port = await getPort({ port: getPort.makeRange(9000, 9100) }); - return new LlmProxy(port); + return new LlmProxy(port, log); +} + +async function getRequestBody(request: http.IncomingMessage): Promise { + return new Promise((resolve, reject) => { + let data = ''; + + request.on('data', (chunk) => { + data += chunk.toString(); + }); + + request.on('close', () => { + resolve(data); + }); + + request.on('error', (error) => { + reject(error); + }); + }); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/common/create_openai_chunk.ts b/x-pack/test/observability_ai_assistant_api_integration/common/create_openai_chunk.ts index 9462eae3fb54d..3d7c64537ee5f 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/common/create_openai_chunk.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/common/create_openai_chunk.ts @@ -5,8 +5,8 @@ * 2.0. */ +import { CreateChatCompletionResponseChunk } from '@kbn/observability-ai-assistant-plugin/server/service/client/adapters/process_openai_stream'; import { v4 } from 'uuid'; -import { CreateChatCompletionResponseChunk } from '@kbn/observability-ai-assistant-plugin/common/utils/process_openai_stream'; export function createOpenAiChunk( msg: string | { content?: string; function_call?: { name: string; arguments?: string } } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/chat/chat.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/chat/chat.spec.ts index ef2fd5b6f9607..c501e0596cdad 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/chat/chat.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/chat/chat.spec.ts @@ -13,6 +13,7 @@ import { FtrProviderContext } from '../../common/ftr_provider_context'; export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); + const log = getService('log'); const CHAT_API_URL = `/internal/observability_ai_assistant/chat`; @@ -39,7 +40,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { let connectorId: string; before(async () => { - proxy = await createLlmProxy(); + proxy = await createLlmProxy(log); const response = await supertest .post('/api/actions/connector') @@ -89,7 +90,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { new Promise((resolve, reject) => { async function runTest() { const interceptor = proxy.intercept('conversation', () => true); - const receivedChunks: any[] = []; + const receivedChunks: Array> = []; const passThrough = new PassThrough(); supertest @@ -107,7 +108,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const simulator = await interceptor.waitForIntercept(); passThrough.on('data', (chunk) => { - receivedChunks.push(chunk.toString()); + receivedChunks.push(JSON.parse(chunk.toString())); }); for (let i = 0; i < NUM_RESPONSES; i++) { @@ -118,9 +119,25 @@ export default function ApiTest({ getService }: FtrProviderContext) { await new Promise((innerResolve) => passThrough.on('end', () => innerResolve())); - expect(receivedChunks.length).to.eql( + const chatCompletionChunks = receivedChunks.filter( + (chunk) => chunk.type === 'chatCompletionChunk' + ); + expect(chatCompletionChunks).to.have.length( NUM_RESPONSES, - 'received no of chunks did not match expected. This might be because of a 4xx or 5xx' + `received number of chat completion chunks did not match expected. This might be because of a 4xx or 5xx: ${JSON.stringify( + chatCompletionChunks, + null, + 2 + )}` + ); + + const tokenCountChunk = receivedChunks.find((chunk) => chunk.type === 'tokenCount'); + expect(tokenCountChunk).to.eql( + { + type: 'tokenCount', + tokens: { completion: 20, prompt: 33, total: 53 }, + }, + `received token count chunk did not match expected` ); } diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts index c4913ce3e41d2..1bffc0392a9a3 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/complete/complete.spec.ts @@ -6,23 +6,27 @@ */ import { Response } from 'supertest'; import { MessageRole, type Message } from '@kbn/observability-ai-assistant-plugin/common'; -import { omit } from 'lodash'; -import { PassThrough } from 'stream'; +import { omit, pick } from 'lodash'; +import { PassThrough, Readable } from 'stream'; import expect from '@kbn/expect'; import { ChatCompletionChunkEvent, ConversationCreateEvent, + ConversationUpdateEvent, MessageAddEvent, StreamingChatResponseEvent, StreamingChatResponseEventType, } from '@kbn/observability-ai-assistant-plugin/common/conversation_complete'; import type OpenAI from 'openai'; -import { createLlmProxy, LlmProxy } from '../../common/create_llm_proxy'; +import { ObservabilityAIAssistantScreenContextRequest } from '@kbn/observability-ai-assistant-plugin/common/types'; +import { createLlmProxy, LlmProxy, LlmResponseSimulator } from '../../common/create_llm_proxy'; import { createOpenAiChunk } from '../../common/create_openai_chunk'; import { FtrProviderContext } from '../../common/ftr_provider_context'; export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); + const log = getService('log'); + const observabilityAIAssistantAPIClient = getService('observabilityAIAssistantAPIClient'); const COMPLETE_API_URL = `/internal/observability_ai_assistant/chat/complete`; @@ -39,7 +43,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { '@timestamp': new Date().toISOString(), message: { role: MessageRole.User, - content: 'Good morning!', + content: 'Good morning, bot!', }, }, ]; @@ -48,14 +52,74 @@ export default function ApiTest({ getService }: FtrProviderContext) { let proxy: LlmProxy; let connectorId: string; + async function getEvents( + params: { screenContexts?: ObservabilityAIAssistantScreenContextRequest[] }, + cb: (conversationSimulator: LlmResponseSimulator) => Promise + ) { + const titleInterceptor = proxy.intercept( + 'title', + (body) => + (JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming).functions?.find( + (fn) => fn.name === 'title_conversation' + ) !== undefined + ); + + const conversationInterceptor = proxy.intercept( + 'conversation', + (body) => + (JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming).functions?.find( + (fn) => fn.name === 'title_conversation' + ) === undefined + ); + + const responsePromise = new Promise((resolve, reject) => { + supertest + .post(COMPLETE_API_URL) + .set('kbn-xsrf', 'foo') + .send({ + messages, + connectorId, + persist: true, + screenContexts: params.screenContexts || [], + }) + .end((err, response) => { + if (err) { + return reject(err); + } + return resolve(response); + }); + }); + + const [conversationSimulator, titleSimulator] = await Promise.all([ + conversationInterceptor.waitForIntercept(), + titleInterceptor.waitForIntercept(), + ]); + + await titleSimulator.status(200); + await titleSimulator.next('My generated title'); + await titleSimulator.complete(); + + await conversationSimulator.status(200); + await cb(conversationSimulator); + + const response = await responsePromise; + + return String(response.body) + .split('\n') + .map((line) => line.trim()) + .filter(Boolean) + .map((line) => JSON.parse(line) as StreamingChatResponseEvent) + .slice(2); // ignore context request/response, we're testing this elsewhere + } + before(async () => { - proxy = await createLlmProxy(); + proxy = await createLlmProxy(log); const response = await supertest .post('/api/actions/connector') .set('kbn-xsrf', 'foo') .send({ - name: 'OpenAI', + name: 'OpenAI Proxy', connector_type_id: '.gen-ai', config: { apiProvider: 'OpenAI', @@ -112,12 +176,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { await new Promise((resolve) => passThrough.on('end', () => resolve())); - const parsedEvents = receivedChunks - .join('') - .split('\n') - .map((line) => line.trim()) - .filter(Boolean) - .map((line) => JSON.parse(line) as StreamingChatResponseEvent); + const parsedEvents = decodeEvents(receivedChunks.join('')); expect(parsedEvents.map((event) => event.type)).to.eql([ StreamingChatResponseEventType.MessageAdd, @@ -185,80 +244,30 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); describe('when creating a new conversation', async () => { - let lines: StreamingChatResponseEvent[]; - before(async () => { - const titleInterceptor = proxy.intercept( - 'title', - (body) => - ( - JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming - ).functions?.find((fn) => fn.name === 'title_conversation') !== undefined - ); + let events: StreamingChatResponseEvent[]; - const conversationInterceptor = proxy.intercept( - 'conversation', - (body) => - ( - JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming - ).functions?.find((fn) => fn.name === 'title_conversation') === undefined - ); - - const responsePromise = new Promise((resolve, reject) => { - supertest - .post(COMPLETE_API_URL) - .set('kbn-xsrf', 'foo') - .send({ - messages, - connectorId, - persist: true, - screenContexts: [], - }) - .end((err, response) => { - if (err) { - return reject(err); - } - return resolve(response); - }); + before(async () => { + events = await getEvents({}, async (conversationSimulator) => { + await conversationSimulator.next('Hello'); + await conversationSimulator.next(' again'); + await conversationSimulator.complete(); }); - - const [conversationSimulator, titleSimulator] = await Promise.all([ - conversationInterceptor.waitForIntercept(), - titleInterceptor.waitForIntercept(), - ]); - - await titleSimulator.status(200); - await titleSimulator.next('My generated title'); - await titleSimulator.complete(); - - await conversationSimulator.status(200); - await conversationSimulator.next('Hello'); - await conversationSimulator.next(' again'); - await conversationSimulator.complete(); - - const response = await responsePromise; - - lines = String(response.body) - .split('\n') - .map((line) => line.trim()) - .filter(Boolean) - .map((line) => JSON.parse(line) as StreamingChatResponseEvent) - .slice(2); // ignore context request/response, we're testing this elsewhere }); it('creates a new conversation', async () => { - expect(omit(lines[0], 'id')).to.eql({ + expect(omit(events[0], 'id')).to.eql({ type: StreamingChatResponseEventType.ChatCompletionChunk, message: { content: 'Hello', }, }); - expect(omit(lines[1], 'id')).to.eql({ + expect(omit(events[1], 'id')).to.eql({ type: StreamingChatResponseEventType.ChatCompletionChunk, message: { content: ' again', }, }); - expect(omit(lines[2], 'id', 'message.@timestamp')).to.eql({ + expect(omit(events[2], 'id', 'message.@timestamp')).to.eql({ type: StreamingChatResponseEventType.MessageAdd, message: { message: { @@ -272,16 +281,21 @@ export default function ApiTest({ getService }: FtrProviderContext) { }, }, }); - expect(omit(lines[3], 'conversation.id', 'conversation.last_updated')).to.eql({ + expect(omit(events[3], 'conversation.id', 'conversation.last_updated')).to.eql({ type: StreamingChatResponseEventType.ConversationCreate, conversation: { title: 'My generated title', + token_count: { + completion: 7, + prompt: 2262, + total: 2269, + }, }, }); }); after(async () => { - const createdConversationId = lines.filter( + const createdConversationId = events.filter( (line): line is ConversationCreateEvent => line.type === StreamingChatResponseEventType.ConversationCreate )[0]?.conversation.id; @@ -299,10 +313,218 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - // todo - it.skip('updates an existing conversation', async () => {}); + describe('after executing a screen context action', async () => { + let events: StreamingChatResponseEvent[]; + + before(async () => { + events = await getEvents( + { + screenContexts: [ + { + actions: [ + { + name: 'my_action', + description: 'My action', + parameters: { + type: 'object', + properties: { + foo: { + type: 'string', + }, + }, + }, + }, + ], + }, + ], + }, + async (conversationSimulator) => { + await conversationSimulator.next({ + function_call: { name: 'my_action', arguments: JSON.stringify({ foo: 'bar' }) }, + }); + await conversationSimulator.complete(); + } + ); + }); + + it('closes the stream without persisting the conversation', () => { + expect( + pick( + events[events.length - 1], + 'message.message.content', + 'message.message.function_call', + 'message.message.role' + ) + ).to.eql({ + message: { + message: { + content: '', + function_call: { + name: 'my_action', + arguments: JSON.stringify({ foo: 'bar' }), + trigger: MessageRole.Assistant, + }, + role: MessageRole.Assistant, + }, + }, + }); + }); + + it('does not store the conversation', async () => { + expect( + events.filter((event) => event.type === StreamingChatResponseEventType.ConversationCreate) + .length + ).to.eql(0); + + const conversations = await observabilityAIAssistantAPIClient + .writeUser({ + endpoint: 'POST /internal/observability_ai_assistant/conversations', + }) + .expect(200); + + expect(conversations.body.conversations.length).to.be(0); + }); + }); + + describe('when updating an existing conversation', async () => { + let conversationCreatedEvent: ConversationCreateEvent; + let conversationUpdatedEvent: ConversationUpdateEvent; + + function getConversationCreatedEvent(body: Readable | string) { + const decodedEvents = decodeEvents(body); + return decodedEvents.find( + (event) => event.type === StreamingChatResponseEventType.ConversationCreate + ) as ConversationCreateEvent; + } + + function getConversationUpdatedEvent(body: Readable | string) { + const decodedEvents = decodeEvents(body); + return decodedEvents.find( + (event) => event.type === StreamingChatResponseEventType.ConversationUpdate + ) as ConversationUpdateEvent; + } + + before(async () => { + proxy + .intercept('conversation_title', (body) => isFunctionTitleRequest(body), [ + { + function_call: { + name: 'title_conversation', + arguments: JSON.stringify({ title: 'LLM-generated title' }), + }, + }, + ]) + .complete(); + + proxy + .intercept('conversation', (body) => !isFunctionTitleRequest(body), 'Good morning, sir!') + .complete(); + + const createResponse = await observabilityAIAssistantAPIClient + .writeUser({ + endpoint: 'POST /internal/observability_ai_assistant/chat/complete', + params: { + body: { + messages, + connectorId, + persist: true, + screenContexts: [], + }, + }, + }) + .expect(200); + + await proxy.waitForAllInterceptorsSettled(); + + conversationCreatedEvent = getConversationCreatedEvent(createResponse.body); + + const conversationId = conversationCreatedEvent.conversation.id; + const fullConversation = await observabilityAIAssistantAPIClient.readUser({ + endpoint: 'GET /internal/observability_ai_assistant/conversation/{conversationId}', + params: { + path: { + conversationId, + }, + }, + }); + + proxy + .intercept('conversation', (body) => !isFunctionTitleRequest(body), 'Good night, sir!') + .complete(); + + const updatedResponse = await observabilityAIAssistantAPIClient + .writeUser({ + endpoint: 'POST /internal/observability_ai_assistant/chat/complete', + params: { + body: { + messages: [ + ...fullConversation.body.messages, + { + '@timestamp': new Date().toISOString(), + message: { + role: MessageRole.User, + content: 'Good night, bot!', + }, + }, + ], + connectorId, + persist: true, + screenContexts: [], + conversationId, + }, + }, + }) + .expect(200); + + await proxy.waitForAllInterceptorsSettled(); + + conversationUpdatedEvent = getConversationUpdatedEvent(updatedResponse.body); + }); + + after(async () => { + await observabilityAIAssistantAPIClient + .writeUser({ + endpoint: 'DELETE /internal/observability_ai_assistant/conversation/{conversationId}', + params: { + path: { + conversationId: conversationCreatedEvent.conversation.id, + }, + }, + }) + .expect(200); + }); + + it('has correct token count for a new conversation', async () => { + expect(conversationCreatedEvent.conversation.token_count).to.eql({ + completion: 21, + prompt: 2262, + total: 2283, + }); + }); + + it('has correct token count for the updated conversation', async () => { + expect(conversationUpdatedEvent.conversation.token_count).to.eql({ + completion: 31, + prompt: 4522, + total: 4553, + }); + }); + }); // todo it.skip('executes a function', async () => {}); }); } + +function decodeEvents(body: Readable | string) { + return String(body) + .split('\n') + .map((line) => line.trim()) + .filter(Boolean) + .map((line) => JSON.parse(line) as StreamingChatResponseEvent); +} + +function isFunctionTitleRequest(body: string) { + const parsedBody = JSON.parse(body) as OpenAI.Chat.ChatCompletionCreateParamsNonStreaming; + return parsedBody.functions?.find((fn) => fn.name === 'title_conversation') !== undefined; +} diff --git a/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts b/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts index c7e790099a5ed..d5e726012c869 100644 --- a/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts +++ b/x-pack/test/observability_ai_assistant_api_integration/tests/connectors/connectors.spec.ts @@ -6,6 +6,7 @@ */ import expect from '@kbn/expect'; +import type { SuperTest, Test } from 'supertest'; import { FtrProviderContext } from '../../common/ftr_provider_context'; export default function ApiTest({ getService }: FtrProviderContext) { @@ -13,6 +14,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { const supertest = getService('supertest'); describe('List connectors', () => { + before(async () => { + await deleteAllActionConnectors(supertest); + }); + + after(async () => { + await deleteAllActionConnectors(supertest); + }); + it('Returns a 2xx for enterprise license', async () => { await observabilityAIAssistantAPIClient .readUser({ @@ -61,3 +70,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); } + +export async function deleteAllActionConnectors(supertest: SuperTest): Promise { + const res = await supertest.get(`/api/actions/connectors`); + + const body = res.body as Array<{ id: string; connector_type_id: string; name: string }>; + return Promise.all( + body.map(({ id }) => { + return supertest.delete(`/api/actions/connector/${id}`).set('kbn-xsrf', 'foo'); + }) + ); +} diff --git a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts index 5c33cd1891d24..2c9549b55ec83 100644 --- a/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts +++ b/x-pack/test/observability_ai_assistant_functional/tests/conversations/index.spec.ts @@ -22,6 +22,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte const browser = getService('browser'); const supertest = getService('supertest'); const retry = getService('retry'); + const log = getService('log'); const driver = getService('__webdriver__'); @@ -67,7 +68,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte await deleteConnectors(); await deleteConversations(); - proxy = await createLlmProxy(); + proxy = await createLlmProxy(log); await ui.auth.login(); @@ -212,10 +213,11 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte arguments: JSON.stringify({ queries: [], categories: [] }), }); - expect(pick(contextResponse, 'name', 'content')).to.eql({ - name: 'context', - content: JSON.stringify({ screen_description: '', learnings: [] }), - }); + expect(contextResponse.name).to.eql('context'); + + const parsedContext = JSON.parse(contextResponse.content || ''); + + expect(parsedContext.screen_description).to.contain('The user is looking at'); expect(pick(assistantResponse, 'role', 'content')).to.eql({ role: 'assistant', @@ -275,10 +277,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte arguments: JSON.stringify({ queries: [], categories: [] }), }); - expect(pick(contextResponse, 'name', 'content')).to.eql({ - name: 'context', - content: JSON.stringify({ screen_description: '', learnings: [] }), - }); + expect(contextResponse.name).to.eql('context'); expect(pick(assistantResponse, 'role', 'content')).to.eql({ role: 'assistant', @@ -303,7 +302,7 @@ export default function ApiTest({ getService, getPageObjects }: FtrProviderConte await deleteConversations(); await ui.auth.logout(); - await proxy.close(); + proxy.close(); }); }); } diff --git a/x-pack/test/scalability/config.ts b/x-pack/test/scalability/config.ts index 865be503c7665..ebfa91d4ce1e2 100644 --- a/x-pack/test/scalability/config.ts +++ b/x-pack/test/scalability/config.ts @@ -42,7 +42,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { } const journey: ScalabilityJourney = JSON.parse(fs.readFileSync(scalabilityJsonPath, 'utf8')); - const configPath = journey.configPath ?? 'x-pack/performance/journeys/login.ts'; + const configPath = journey.configPath ?? 'x-pack/performance/journeys_e2e/login.ts'; const baseConfig = (await readConfigFile(path.resolve(REPO_ROOT, configPath))).getAll(); diff --git a/x-pack/test/security_solution_api_integration/config/ess/config.base.ts b/x-pack/test/security_solution_api_integration/config/ess/config.base.ts index 00a133ab2a614..4d622d08d6b41 100644 --- a/x-pack/test/security_solution_api_integration/config/ess/config.base.ts +++ b/x-pack/test/security_solution_api_integration/config/ess/config.base.ts @@ -82,7 +82,6 @@ export function createTestConfig(options: CreateTestConfigOptions, testFiles?: s 'previewTelemetryUrlEnabled', 'riskScoringPersistence', 'riskScoringRoutesEnabled', - 'alertSuppressionForIndicatorMatchRuleEnabled', ])}`, '--xpack.task_manager.poll_interval=1000', `--xpack.actions.preconfigured=${JSON.stringify(PRECONFIGURED_ACTION_CONNECTORS)}`, diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts index f8e919d5e7536..137ee1f67b9b3 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/configs/serverless.config.ts @@ -17,8 +17,5 @@ export default createTestConfig({ 'testing_ignored.constant', '/testing_regex*/', ])}`, // See tests within the file "ignore_fields.ts" which use these values in "alertIgnoreFields" - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForIndicatorMatchRuleEnabled', - ])}`, ], }); diff --git a/x-pack/test/security_solution_cypress/config.ts b/x-pack/test/security_solution_cypress/config.ts index d8207d622bb47..fb34362f7fb9b 100644 --- a/x-pack/test/security_solution_cypress/config.ts +++ b/x-pack/test/security_solution_cypress/config.ts @@ -46,7 +46,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { '--xpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled=true', `--xpack.securitySolution.enableExperimental=${JSON.stringify([ 'chartEmbeddablesEnabled', - 'alertSuppressionForIndicatorMatchRuleEnabled', ])}`, // mock cloud to enable the guided onboarding tour in e2e tests '--xpack.cloud.id=test', diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index 51f2365e199be..ed8fe3793d60b 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -233,6 +233,21 @@ Note that the command will create the folder if it does not exist. Task [cypress/support/es_archiver.ts](https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts) provides helpers such as `esArchiverLoad` and `esArchiverUnload` by means of `es_archiver`'s CLI. +Archives used only for Cypress tests purposes are stored in `x-pack/test/security_solution_cypress/es_archives` and are used as follow on the tests. + +```typescript +cy.task('esArchiverLoad', { archiveName: 'overview' }); +cy.task('esArchiverUnload', { archiveName: 'overview'}); + +``` + +You can also use archives stored in `kibana/x-pack/test/functional/es_archives`. In order to do sow uste it on the tests as follow. + +```typescript +cy.task('esArchiverLoad', { archiveName: 'security_solution/alias' }, type: 'ftr'); +cy.task('esArchiverUnload', { archiveName: 'security_solution/alias', type:'ftr'}); +``` + ## Serverless Note that we use tags in order to select which tests we want to execute, if you want a test to be executed on serverless you need to add @serverless tag to it. diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts index 12173369c896b..022f1ba4fd72a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments.cy.ts @@ -45,7 +45,7 @@ describe('Alert user assignment - ESS & Serverless', { tags: ['@ess', '@serverle }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts index 169a2824167db..9b0768e1d798a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess.cy.ts @@ -24,7 +24,7 @@ describe('Alert user assignment - ESS', { tags: ['@ess'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts index c4ed1aa385eb7..ccd5b402ed7ea 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/assignments/assignments_ess_basic.cy.ts @@ -39,7 +39,7 @@ describe('Alert user assignment - Basic License', { tags: ['@ess'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts index 47f7b2c2dd570..b8a70ce7b13e8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/enrichments/alert_threat_enrichments.cy.ts @@ -43,8 +43,8 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'threat_indicator'); - cy.task('esArchiverUnload', 'suspicious_source_event'); + cy.task('esArchiverUnload', { archiveName: 'threat_indicator' }); + cy.task('esArchiverUnload', { archiveName: 'suspicious_source_event' }); }); beforeEach(() => { @@ -165,7 +165,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'threat_indicator2'); + cy.task('esArchiverUnload', { archiveName: 'threat_indicator2' }); }); it('Displays matched fields from both indicator match rules and investigation time enrichments on Threat Intel tab', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts index eed6577a73029..911168362c946 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/status/alert_status.cy.ts @@ -44,7 +44,7 @@ describe.skip('Changing alert status', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); context('Opening alerts', { tags: ['@ess', '@serverless'] }, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts index 99d4e8d314cc8..bd65420da35c2 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/detection_alerts/tags/alert_tags.cy.ts @@ -32,8 +32,8 @@ describe('Alert tagging', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'endpoint'); - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts index ceea266456acb..34fa454e7a641 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/endpoint_exceptions.cy.ts @@ -50,7 +50,7 @@ describe.skip( const ADDITIONAL_ENTRY = 'host.hostname'; beforeEach(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); login(); deleteAlertsAndRules(); @@ -62,7 +62,7 @@ describe.skip( }); after(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); }); it('Should be able to create and close single Endpoint exception from overflow menu', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts index 520ab19e9e5e8..788907e461526 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/auto_populate_with_alert_data.cy.ts @@ -47,7 +47,7 @@ describe.skip( const ADDITIONAL_ENTRY = 'host.hostname'; beforeEach(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); cy.task('esArchiverLoad', { archiveName: 'endpoint' }); login(); createRule(getEndpointRule()).then((rule) => visitRuleDetailsPage(rule.body.id)); @@ -55,11 +55,11 @@ describe.skip( waitForAlertsToPopulate(); }); after(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); deleteAlertsAndRules(); }); afterEach(() => { - cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', { archiveName: 'endpoint' }); }); it('Should create a Rule exception item from alert actions overflow menu and auto populate the conditions using alert Highlighted fields', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts index ffba394c407d4..6806ad1c776c1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/alerts_table_flow/rule_exceptions/closing_all_matching_alerts.cy.ts @@ -32,7 +32,7 @@ describe('Close matching Alerts ', { tags: ['@ess', '@serverless', '@skipInServe const ITEM_NAME = 'Sample Exception Item'; beforeEach(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); deleteAlertsAndRules(); cy.task('esArchiverLoad', { archiveName: 'exceptions' }); @@ -50,7 +50,7 @@ describe('Close matching Alerts ', { tags: ['@ess', '@serverless', '@skipInServe waitForAlertsToPopulate(); }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); // TODO: https://github.com/elastic/kibana/issues/161539 diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts index b7bb1317ef2b7..0bde78a14be55 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/flyout_validation.cy.ts @@ -100,7 +100,7 @@ describe.skip('Exceptions flyout', { tags: ['@ess', '@serverless', '@skipInServe }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); it('Validates empty entry values correctly', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts index 3a5b5c6cd98c9..d9afe7d5a25ce 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/match_any.cy.ts @@ -53,7 +53,7 @@ describe('Exceptions match_any', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); it('Creates exception item', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts index f8fb728dbf79a..4f7f1a2d68652 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/multiple_conditions.cy.ts @@ -45,7 +45,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); const exceptionName = 'My item name'; diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts index 34aee1bf8f0ea..c1679c43f85f7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/entry/use_value_list.cy.ts @@ -54,7 +54,7 @@ describe.skip('Use Value list in exception entry', { tags: ['@ess', '@serverless }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts index eef28b77e7ac5..66065e039b916 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts @@ -61,7 +61,7 @@ describe('Add endpoint exception from rule details', { tags: ['@ess', '@serverle }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts index b1115b5833bd0..bca260aebaed3 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception.cy.ts @@ -72,7 +72,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); beforeEach(() => { @@ -263,7 +263,7 @@ describe( }); afterEach(() => { - cy.task('esArchiverUnload', 'exceptions_2'); + cy.task('esArchiverUnload', { archiveName: 'exceptions_2' }); }); it('Cannot create an item to add to rule but not shared list as rule has no lists attached', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts index 18c75ce25cbfa..b986fc59deb23 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/exceptions/rule_details_flow/add_edit_exception_data_view.cy.ts @@ -56,7 +56,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'exceptions'); + cy.task('esArchiverUnload', { archiveName: 'exceptions' }); }); beforeEach(() => { @@ -74,7 +74,7 @@ describe( }); afterEach(() => { - cy.task('esArchiverUnload', 'exceptions_2'); + cy.task('esArchiverUnload', { archiveName: 'exceptions_2' }); }); it('Creates an exception item and close all matching alerts', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts index 4db690e282f4a..65cd15dbce8fe 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/overview/cti_link_panel.cy.ts @@ -48,7 +48,7 @@ describe.skip('CTI Link Panel', { tags: ['@ess', '@serverless', '@skipInServerle }); after(() => { - cy.task('esArchiverUnload', 'threat_indicator'); + cy.task('esArchiverUnload', { archiveName: 'threat_indicator' }); }); it('renders disabled dashboard module as expected when there are no events in the selected time period', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts index f02ec20ffd685..a2261d129d452 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/event_correlation_rule.cy.ts @@ -148,7 +148,7 @@ describe('EQL rules', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); it('Creates and enables a new EQL rule with a sequence', function () { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression.cy.ts index 1f544363d547e..42fb37184da1c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression.cy.ts @@ -40,16 +40,6 @@ describe( 'Detection rules, Indicator Match, Alert Suppression', { tags: ['@ess', '@serverless'], - // alertSuppressionForIndicatorMatchRuleEnabled feature flag is also enabled in a global config - env: { - ftrConfig: { - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForIndicatorMatchRuleEnabled', - ])}`, - ], - }, - }, }, () => { const rule = getNewThreatIndicatorRule(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression_serverless_essentials.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression_serverless_essentials.cy.ts index 59bf7e6d0d23b..239c1ba4e9682 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression_serverless_essentials.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/indicator_match_rule_suppression_serverless_essentials.cy.ts @@ -37,12 +37,6 @@ describe( { product_line: 'security', product_tier: 'essentials' }, { product_line: 'endpoint', product_tier: 'essentials' }, ], - // alertSuppressionForIndicatorMatchRuleEnabled feature flag is also enabled in a global config - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForIndicatorMatchRuleEnabled', - ])}`, - ], }, }, }, diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/indicator_match_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/indicator_match_rule.cy.ts index 66e697d7743e5..7d5a21b6f7c82 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/indicator_match_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_edit/indicator_match_rule.cy.ts @@ -48,16 +48,6 @@ describe( 'Detection rules, Indicator Match, Edit', { tags: ['@ess', '@serverless'], - // alertSuppressionForIndicatorMatchRuleEnabled feature flag is also enabled in a global config - env: { - ftrConfig: { - kbnServerArgs: [ - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForIndicatorMatchRuleEnabled', - ])}`, - ], - }, - }, }, () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts index 56c0264d00ee8..4919fe8557986 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/entity_analytics.cy.ts @@ -70,7 +70,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); describe('legacy risk score', () => { @@ -101,8 +101,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts_no_data'); - cy.task('esArchiverUnload', 'risk_users_no_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts_no_data' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users_no_data' }); }); it('shows no data detected prompt for host risk score module', () => { @@ -126,8 +126,8 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts_legacy_data'); - cy.task('esArchiverUnload', 'risk_users_legacy_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts_legacy_data' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users_legacy_data' }); }); it('shows enable host risk button', () => { @@ -150,7 +150,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('renders donut chart', () => { @@ -235,7 +235,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); it('renders donut chart', () => { @@ -338,7 +338,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new_no_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_no_data' }); }); it('shows no data detected prompt for host and user risk scores', () => { @@ -353,7 +353,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('renders donut chart', () => { @@ -446,7 +446,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('renders donut chart', () => { @@ -546,7 +546,7 @@ describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'network'); + cy.task('esArchiverUnload', { archiveName: 'network' }); }); it('should enable a job and renders the table with pagination', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts index 0da6597450126..410239309aeb1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/upgrade_risk_score.cy.ts @@ -54,8 +54,8 @@ describe('Upgrade risk scores', { tags: ['@ess', '@serverless'] }, () => { afterEach(() => { deleteRiskScore({ riskScoreEntity: RiskScoreEntity.host, spaceId }); deleteRiskScore({ riskScoreEntity: RiskScoreEntity.user, spaceId }); - cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); it('shows upgrade panel', () => { @@ -77,8 +77,8 @@ describe('Upgrade risk scores', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); deleteRiskScore({ riskScoreEntity: RiskScoreEntity.host, spaceId }); deleteRiskScore({ riskScoreEntity: RiskScoreEntity.user, spaceId }); deleteRiskEngineConfiguration(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts index 5a6fdc2f05532..3bd09ee00000f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/enrichments.cy.ts @@ -36,13 +36,13 @@ const ORIGINAL_HOST_RISK_LEVEL = 'Original host risk level'; describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); - cy.task('esArchiverUnload', 'risk_scores_new_updated'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_updated' }); cy.task('esArchiverLoad', { archiveName: 'risk_users' }); }); after(() => { - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); describe('Custom query rule', () => { @@ -59,8 +59,8 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_hosts'); - cy.task('esArchiverUnload', 'risk_hosts_updated'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts_updated' }); }); it('Should has enrichment fields from legacy risk', function () { @@ -78,7 +78,7 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { cy.get(ENRICHED_DATA_ROW).contains(ORIGINAL_HOST_RISK_LEVEL).should('not.exist'); closeAlertFlyout(); - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); cy.task('esArchiverLoad', { archiveName: 'risk_hosts_updated' }); expandFirstAlert(); cy.get(ENRICHED_DATA_ROW).contains('Critical'); @@ -99,8 +99,8 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); - cy.task('esArchiverUnload', 'risk_scores_new_updated'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_updated' }); }); it('Should has enrichment fields from legacy risk', function () { @@ -118,7 +118,7 @@ describe('Enrichment', { tags: ['@ess', '@serverless'] }, () => { cy.get(ENRICHED_DATA_ROW).contains(ORIGINAL_HOST_RISK_LEVEL).should('not.exist'); closeAlertFlyout(); - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); cy.task('esArchiverLoad', { archiveName: 'risk_scores_new_updated' }); expandFirstAlert(); cy.get(ENRICHED_DATA_ROW).contains('Low'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts index 24d13322f7d9d..f23480e52d0d1 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts @@ -56,7 +56,7 @@ describe( }); after(() => { - cy.task('esArchiverUnload', 'all_users'); + cy.task('esArchiverUnload', { archiveName: 'all_users' }); }); it('renders page as expected', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts index 90eb208f7d710..426fa29b7ac26 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_flyout.cy.ts @@ -74,8 +74,8 @@ describe( }); afterEach(() => { - cy.task('esArchiverUnload', 'risk_scores_new_complete_data'); - cy.task('esArchiverUnload', 'user_managed_data'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_complete_data' }); + cy.task('esArchiverUnload', { archiveName: 'user_managed_data' }); deleteAlertsAndRules(); // esArchiverUnload doesn't work properly when using with `useCreate` and `docsOnly` flags deleteCriticality({ idField: 'host.name', idValue: SIEM_KIBANA_HOST_NAME }); deleteCriticality({ idField: 'user.name', idValue: USER_NAME }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts index 3b81ccfdd36d7..d4fbb0dafb9f4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/host_details/risk_tab.cy.ts @@ -24,8 +24,8 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { deleteRiskEngineConfiguration(); }); - afterEach(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + after(() => { + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('renders risk tab', () => { @@ -50,15 +50,18 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { }); describe('with new risk score', () => { - beforeEach(() => { + before(() => { cy.task('esArchiverLoad', { archiveName: 'risk_scores_new_complete_data' }); cy.task('esArchiverLoad', { archiveName: 'query_alert', useCreate: true, docsOnly: true }); + }); + + beforeEach(() => { mockRiskEngineEnabled(); login(); }); - afterEach(() => { - cy.task('esArchiverUnload', 'risk_scores_new_complete_data'); + after(() => { + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new_complete_data' }); deleteAlertsAndRules(); // esArchiverUnload doesn't work properly when using with `useCreate` and `docsOnly` flags deleteRiskEngineConfiguration(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts index 2e6fa22be4302..6986580d689b6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/host_risk_tab.cy.ts @@ -39,7 +39,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('renders the table', () => { @@ -86,7 +86,7 @@ describe('risk tab', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('renders the table', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts index dfbb017efe0d2..5c9288bf4bb4f 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/hosts/hosts_risk_column.cy.ts @@ -24,7 +24,7 @@ describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); it('it renders risk column', () => { @@ -47,7 +47,7 @@ describe('All hosts table', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'risk_scores_new'); + cy.task('esArchiverUnload', { archiveName: 'risk_scores_new' }); }); it('it renders risk column', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts index 6b40e1d336186..a4370e9073509 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_alert_to_case.cy.ts @@ -17,6 +17,7 @@ import { visit } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; import { ATTACH_ALERT_TO_CASE_BUTTON, TIMELINE_CONTEXT_MENU_BTN } from '../../../screens/alerts'; import { LOADING_INDICATOR } from '../../../screens/security_header'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; const loadDetectionsPage = (role: SecurityRoleName) => { login(role); @@ -25,10 +26,11 @@ const loadDetectionsPage = (role: SecurityRoleName) => { }; describe('Alerts timeline', { tags: ['@ess'] }, () => { - before(() => { + beforeEach(() => { // First we login as a privileged user to create alerts. - login(); + deleteAlertsAndRules(); createRule(getNewRule()); + login(); visit(ALERTS_URL); waitForAlertsToPopulate(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts index a6e82d8e6aa97..04f50c5b7afb9 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/attach_timeline.cy.ts @@ -17,7 +17,7 @@ import { DESCRIPTION_INPUT, ADD_COMMENT_INPUT } from '../../../screens/create_ne import { getCase1 } from '../../../objects/case'; import { getTimeline } from '../../../objects/timeline'; import { createTimeline } from '../../../tasks/api_calls/timelines'; -import { deleteTimelines } from '../../../tasks/api_calls/common'; +import { deleteAllCasesItems, deleteTimelines } from '../../../tasks/api_calls/common'; import { createCase } from '../../../tasks/api_calls/cases'; describe('attach timeline to case', { tags: ['@ess', '@serverless'] }, () => { @@ -25,6 +25,7 @@ describe('attach timeline to case', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { login(); deleteTimelines(); + deleteAllCasesItems(); createTimeline(getTimeline()).then((response) => { cy.wrap(response.body.data.persistTimeline.timeline).as('myTimeline'); }); @@ -57,19 +58,16 @@ describe('attach timeline to case', { tags: ['@ess', '@serverless'] }, () => { }); context('with cases created', () => { - before(() => { + beforeEach(() => { login(); deleteTimelines(); + deleteAllCasesItems(); createTimeline(getTimeline()).then((response) => cy.wrap(response.body.data.persistTimeline.timeline.savedObjectId).as('timelineId') ); createCase(getCase1()).then((response) => cy.wrap(response.body.id).as('caseId')); }); - beforeEach(() => { - login(); - }); - it('attach timeline to an existing case', function () { visitTimeline(this.timelineId); attachTimelineToExistingCase(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/creation.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/creation.cy.ts index 698a97df6b5d6..780ce1168fa3a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/creation.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/creation.cy.ts @@ -53,10 +53,13 @@ import { visit, visitWithTimeRange } from '../../../tasks/navigation'; import { CASES_URL, OVERVIEW_URL } from '../../../urls/navigation'; import { ELASTICSEARCH_USERNAME } from '../../../env_var_names_constants'; +import { deleteAllCasesItems, deleteTimelines } from '../../../tasks/api_calls/common'; // Tracked by https://github.com/elastic/security-team/issues/7696 describe('Cases', { tags: ['@ess', '@serverless'] }, () => { - before(() => { + beforeEach(() => { + deleteTimelines(); + deleteAllCasesItems(); createTimeline(getCase1().timeline).then((response) => cy .wrap({ diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts index 7768a892d5d09..cd1781ddd5885 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/cases/privileges.cy.ts @@ -50,15 +50,9 @@ const testCase: TestCaseWithoutTimeline = { }; describe('Cases privileges', { tags: ['@ess'] }, () => { - before(() => { - createUsersAndRoles(usersToCreate, rolesToCreate); - }); - - after(() => { - deleteUsersAndRoles(usersToCreate, rolesToCreate); - }); - beforeEach(() => { + deleteUsersAndRoles(usersToCreate, rolesToCreate); + createUsersAndRoles(usersToCreate, rolesToCreate); login(); deleteAllCasesItems(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/filters/pinned_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/filters/pinned_filters.cy.ts index 516b776a86e3d..635f476bf4967 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/filters/pinned_filters.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/filters/pinned_filters.cy.ts @@ -21,15 +21,15 @@ import { openKibanaNavigation, } from '../../../tasks/kibana_navigation'; import { ALERTS_PAGE } from '../../../screens/kibana_navigation'; -import { postDataView } from '../../../tasks/api_calls/common'; +import { deleteDataView, postDataView } from '../../../tasks/api_calls/common'; import { navigateToAlertsPageInServerless } from '../../../tasks/serverless/navigation'; -describe('ESS - pinned filters', { tags: ['@ess'] }, () => { - before(() => { - postDataView('audit*'); - }); +const DATAVIEW = 'audit*'; +describe('ESS - pinned filters', { tags: ['@ess'] }, () => { beforeEach(() => { + deleteDataView(DATAVIEW); + postDataView(DATAVIEW); login(); }); @@ -55,11 +55,9 @@ describe('ESS - pinned filters', { tags: ['@ess'] }, () => { }); describe('SERVERLESS - pinned filters', { tags: ['@serverless'] }, () => { - before(() => { - postDataView('audit*'); - }); - beforeEach(() => { + deleteDataView(DATAVIEW); + postDataView(DATAVIEW); login(); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts index 93ce4f5861889..cebc67a78d2ef 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/guided_onboarding/tour.cy.ts @@ -28,13 +28,12 @@ import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; import { startAlertsCasesTour } from '../../../tasks/api_calls/tour'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; describe('Guided onboarding tour', { tags: ['@ess'] }, () => { - before(() => { - login(); - createRule(getNewRule({ query: 'user.name:*' })); - }); beforeEach(() => { + deleteAlertsAndRules(); + createRule(getNewRule({ query: 'user.name:*' })); login(); disableExpandableFlyout(); startAlertsCasesTour(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts index f61cf9943f5ee..bb44394c460ff 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts @@ -53,7 +53,7 @@ describe('Events Viewer', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); context('Fields rendering', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts index 3deabd6afa169..fbe1f5fe8c33a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/inspect/inspect_button.cy.ts @@ -40,8 +40,8 @@ describe.skip( }); after(() => { - cy.task('esArchiverUnload', 'risk_users'); - cy.task('esArchiverUnload', 'risk_hosts'); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); + cy.task('esArchiverUnload', { archiveName: 'risk_hosts' }); }); INSPECT_BUTTONS_IN_SECURITY.forEach(({ pageName, url, lensVisualizations, tables }) => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts index f926007482ad3..7d6ab6abdb8be 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/hover_actions.cy.ts @@ -36,7 +36,7 @@ describe('Hover actions', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'network'); + cy.task('esArchiverUnload', { archiveName: 'network' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts index 297f47ddaafa4..aafe4cf469e76 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/network/overflow_items.cy.ts @@ -44,7 +44,7 @@ describe('Overflow items', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'network'); + cy.task('esArchiverUnload', { archiveName: 'network' }); }); it('Shows more items in the popover', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts index b0b1a11bc69e0..28c7d49c6d1e8 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts @@ -27,7 +27,7 @@ describe('Overview Page', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'overview'); + cy.task('esArchiverUnload', { archiveName: 'overview' }); }); it('Host stats render with correct values', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts index a590cfc9383b1..37da9553b02a0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/pagination/pagination.cy.ts @@ -35,7 +35,7 @@ describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'host_uncommon_processes'); + cy.task('esArchiverUnload', { archiveName: 'host_uncommon_processes' }); }); it('pagination updates results and page number', () => { @@ -109,7 +109,7 @@ describe('Pagination', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'all_users'); + cy.task('esArchiverUnload', { archiveName: 'all_users' }); }); it(`reset all Hosts pagination when sorting column`, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts index f80453e809832..83321290917cd 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/users/users_tabs.cy.ts @@ -33,8 +33,8 @@ describe('Users stats and tables', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'users'); - cy.task('esArchiverUnload', 'risk_users'); + cy.task('esArchiverUnload', { archiveName: 'users' }); + cy.task('esArchiverUnload', { archiveName: 'risk_users' }); }); describe('Users page tabs', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts index b8e31186a1366..b6c9e8f7b443d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alert_table_action_column.cy.ts @@ -31,7 +31,7 @@ describe.skip('Alerts Table Action column', { tags: ['@ess', '@serverless'] }, ( }); after(() => { - cy.task('esArchiverUnload', 'process_ancestry'); + cy.task('esArchiverUnload', { archiveName: 'process_ancestry' }); }); it('should have session viewer button visible & open session viewer on click', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts index 0f24575d8a2a2..7f2fa13e0aa5e 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts @@ -65,12 +65,12 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { describe('With unmapped fields', () => { before(() => { - deleteAlertsAndRules(); cy.task('esArchiverLoad', { archiveName: 'unmapped_fields' }); - createRule({ ...getUnmappedRule(), investigation_fields: { field_names: ['event.kind'] } }); }); beforeEach(() => { + deleteAlertsAndRules(); + createRule({ ...getUnmappedRule(), investigation_fields: { field_names: ['event.kind'] } }); login(); disableExpandableFlyout(); visit(ALERTS_URL); @@ -79,7 +79,7 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { }); after(() => { - cy.task('esArchiverUnload', 'unmapped_fields'); + cy.task('esArchiverUnload', { archiveName: 'unmapped_fields' }); }); it.skip('should display user and system defined highlighted fields', () => { @@ -188,7 +188,6 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { before(() => { deleteAlertsAndRules(); - // It just imports an alert without a rule but rule details page should work anyway cy.task('esArchiverLoad', { archiveName: 'query_alert', useCreate: true, docsOnly: true }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts index 718feeca31533..1cede221c3632 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts @@ -23,7 +23,7 @@ describe('Alerts generated by building block rules', { tags: ['@ess', '@serverle }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts index 8a49b4eb02065..f173e78988638 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts @@ -46,7 +46,7 @@ describe('Changing alert status', { tags: ['@ess', '@brokenInServerless'] }, () }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_multiple'); + cy.task('esArchiverUnload', { archiveName: 'auditbeat_multiple' }); }); context('Opening alerts', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts index c8da8308b76a4..a225d08780166 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_detection.cy.ts @@ -26,7 +26,7 @@ describe('Ransomware Detection Alerts', { tags: ['@ess', '@serverless'] }, () => }); after(() => { - cy.task('esArchiverUnload', 'ransomware_detection'); + cy.task('esArchiverUnload', { archiveName: 'ransomware_detection' }); }); describe('Ransomware in Alerts Page', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts index 099f2e751458d..abc00b14c466a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/ransomware_prevention.cy.ts @@ -26,7 +26,7 @@ describe('Ransomware Prevention Alerts', { tags: ['@ess', '@serverless'] }, () = }); after(() => { - cy.task('esArchiverUnload', 'ransomware_prevention'); + cy.task('esArchiverUnload', { archiveName: 'ransomware_prevention' }); }); describe('Ransomware in Alerts Page', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts index 4ecbcd3dbf6db..da757f82673bc 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/resolver.cy.ts @@ -16,13 +16,12 @@ import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule'; import { login } from '../../../tasks/login'; import { visitWithTimeRange } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; describe.skip('Analyze events view for alerts', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - createRule(getNewRule()); - }); - beforeEach(() => { + deleteAlertsAndRules(); + createRule(getNewRule()); login(); visitWithTimeRange(ALERTS_URL); waitForAlertsToPopulate(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts index 5e99105c08e43..356f5fd4edcde 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/dasbhoards/detection_response.cy.ts @@ -51,12 +51,12 @@ const SIEM_KIBANA_HOST_NAME = 'siem-kibana'; // FLAKY: https://github.com/elastic/kibana/issues/168772 describe.skip('Detection response view', { tags: ['@ess', '@serverless'] }, () => { before(() => { - deleteAlertsAndRules(); cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); - createRule(getNewRule()); }); beforeEach(() => { + deleteAlertsAndRules(); + createRule(getNewRule()); login(); visit(DETECTION_AND_RESPONSE_URL); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timeline_templates/export.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timeline_templates/export.cy.ts index 603613892fcd3..caf9271adb19b 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timeline_templates/export.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timeline_templates/export.cy.ts @@ -16,9 +16,11 @@ import { import { TIMELINE_TEMPLATES_URL } from '../../../urls/navigation'; import { createTimelineTemplate } from '../../../tasks/api_calls/timelines'; import { searchByTitle } from '../../../tasks/table_pagination'; +import { deleteTimelines } from '../../../tasks/api_calls/common'; describe('Export timelines', { tags: ['@ess', '@serverless'] }, () => { - before(() => { + beforeEach(() => { + deleteTimelines(); createTimelineTemplate(getTimelineTemplate()).then((response) => { cy.wrap(response).as('templateResponse'); cy.wrap(response.body.data.persistTimeline.timeline.savedObjectId).as('templateId'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts index 0518326e4ca32..38b36ede1eee7 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/bulk_add_to_timeline.cy.ts @@ -9,6 +9,7 @@ import { getNewRule } from '../../../objects/rule'; import { SELECTED_ALERTS } from '../../../screens/alerts'; import { SERVER_SIDE_EVENT_COUNT } from '../../../screens/timeline'; import { selectAllAlerts, selectFirstPageAlerts } from '../../../tasks/alerts'; +import { deleteAlertsAndRules } from '../../../tasks/api_calls/common'; import { createRule } from '../../../tasks/api_calls/rules'; import { bulkInvestigateSelectedEventsInTimeline, @@ -25,19 +26,16 @@ import { ALERTS_URL, hostsUrl } from '../../../urls/navigation'; describe('Bulk Investigate in Timeline', { tags: ['@ess', '@serverless'] }, () => { before(() => { cy.task('esArchiverLoad', { archiveName: 'bulk_process' }); - login(); }); after(() => { - cy.task('esArchiverUnload', 'bulk_process'); + cy.task('esArchiverUnload', { archiveName: 'bulk_process' }); }); context('Alerts', () => { - before(() => { - createRule(getNewRule()); - }); - beforeEach(() => { + deleteAlertsAndRules(); + createRule(getNewRule()); login(); visitWithTimeRange(ALERTS_URL); waitForAlertsToPopulate(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts index ce2d261db5cad..7c75ce663840a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/notes_tab.cy.ts @@ -21,46 +21,30 @@ import { MODAL_CONFIRMATION_BTN } from '../../../screens/alerts_detection_rules' import { createTimeline } from '../../../tasks/api_calls/timelines'; import { login } from '../../../tasks/login'; -import { visit } from '../../../tasks/navigation'; -import { - addNotesToTimeline, - goToNotesTab, - openTimelineById, - refreshTimelinesUntilTimeLinePresent, -} from '../../../tasks/timeline'; +import { visitTimeline } from '../../../tasks/navigation'; +import { addNotesToTimeline, goToNotesTab } from '../../../tasks/timeline'; -import { TIMELINES_URL } from '../../../urls/navigation'; +import { deleteTimelines } from '../../../tasks/api_calls/common'; const text = 'system_indices_superuser'; const link = 'https://www.elastic.co/'; -describe.skip('Timeline notes tab', { tags: ['@ess', '@serverless'] }, () => { - before(() => { - login(); - visit(TIMELINES_URL); +describe('Timeline notes tab', { tags: ['@ess', '@serverless'] }, () => { + beforeEach(function () { + deleteTimelines(); createTimeline(getTimelineNonValidQuery()) .then((response) => response.body.data.persistTimeline.timeline.savedObjectId) - .then((timelineId: string) => - refreshTimelinesUntilTimeLinePresent(timelineId) - // This cy.wait is here because we cannot do a pipe on a timeline as that will introduce multiple URL - // request responses and indeterminism since on clicks to activates URL's. - .then(() => cy.wrap(timelineId).as('timelineId')) - ); - }); - - beforeEach(function () { - login(); - visit(TIMELINES_URL); - openTimelineById(this?.timelineId as string); + .then((timelineId: string) => { + login(); + visitTimeline(timelineId); + }); goToNotesTab(); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(1000); }); it('should render mockdown', () => { addNotesToTimeline(getTimelineNonValidQuery().notes); - cy.get(NOTES_TEXT_AREA).should('exist'); + cy.get(NOTES_TEXT_AREA).should('be.visible'); }); it('should contain notes', () => { @@ -80,7 +64,7 @@ describe.skip('Timeline notes tab', { tags: ['@ess', '@serverless'] }, () => { it('should be able to render code blocks', () => { addNotesToTimeline(`\`code\``); - cy.get(NOTES_CODE_BLOCK).should('exist'); + cy.get(NOTES_CODE_BLOCK).should('be.visible'); }); it('should render the right author', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx index e1ab38d669d03..16b6c58146915 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/overview.cy.tsx @@ -22,16 +22,15 @@ import { visit } from '../../../tasks/navigation'; import { createTimeline, favoriteTimeline } from '../../../tasks/api_calls/timelines'; import { TIMELINES_URL } from '../../../urls/navigation'; +import { deleteTimelines } from '../../../tasks/api_calls/common'; describe('timeline overview search', { tags: ['@ess', 'serverless'] }, () => { - before(() => { + beforeEach(() => { + deleteTimelines(); createTimeline(getFavoritedTimeline()) .then((response) => response.body.data.persistTimeline.timeline.savedObjectId) .then((timelineId) => favoriteTimeline({ timelineId, timelineType: 'default' })); createTimeline(getTimeline()); - }); - - beforeEach(() => { login(); visit(TIMELINES_URL); cy.get(TIMELINES_OVERVIEW_SEARCH).clear(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts index 4c64f23167578..d1d1bdb84bc23 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/pagination.cy.ts @@ -35,7 +35,7 @@ describe('Timeline Pagination', { tags: ['@ess', '@serverless'] }, () => { }); afterEach(() => { - cy.task('esArchiverUnload', 'timeline'); + cy.task('esArchiverUnload', { archiveName: 'timeline' }); }); it(`should paginate records correctly`, () => { diff --git a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts index 083b30b12ae51..63ae27669c320 100644 --- a/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts +++ b/x-pack/test/security_solution_cypress/cypress/support/es_archiver.ts @@ -54,10 +54,34 @@ export const esArchiver = ( baseDir: '../es_archives', }); + const ftrEsArchiverInstance = new EsArchiver({ + log, + client, + kbnClient, + baseDir: '../../functional/es_archives/security_solution', + }); + on('task', { - esArchiverLoad: async ({ archiveName, ...options }) => - esArchiverInstance.load(archiveName, options), - esArchiverUnload: async (archiveName) => esArchiverInstance.unload(archiveName), + esArchiverLoad: async ({ archiveName, type = 'cypress', ...options }) => { + if (type === 'cypress') { + return esArchiverInstance.load(archiveName, options); + } else if (type === 'ftr') { + return ftrEsArchiverInstance.load(archiveName, options); + } else { + throw new Error( + `Unable to load the specified archive: ${JSON.stringify({ archiveName, type, options })}` + ); + } + }, + esArchiverUnload: async ({ archiveName, type = 'cypress' }) => { + if (type === 'cypress') { + return esArchiverInstance.unload(archiveName); + } else if (type === 'ftr') { + return ftrEsArchiverInstance.unload(archiveName); + } else { + throw new Error('It is not possible to unload the archive.'); + } + }, }); return esArchiverInstance; diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/timeline.ts b/x-pack/test/security_solution_cypress/cypress/tasks/timeline.ts index dc5e1a048ac8b..0b6fb3c31cb6a 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/timeline.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/timeline.ts @@ -130,11 +130,9 @@ export const addNameAndDescriptionToTimeline = ( cy.get(TIMELINE_TITLE_INPUT).should('not.exist'); }; -export const goToNotesTab = (): Cypress.Chainable> => { +export const goToNotesTab = () => { cy.get(NOTES_TAB_BUTTON).click(); - cy.get(NOTES_TEXT_AREA).should('exist'); - - return cy.get(NOTES_TAB_BUTTON); + cy.get(NOTES_TEXT_AREA).should('be.visible'); }; export const goToEsqlTab = () => waitForTabToBeLoaded(ESQL_TAB); diff --git a/x-pack/test/security_solution_cypress/serverless_config.ts b/x-pack/test/security_solution_cypress/serverless_config.ts index f147c973d535b..d0ee1613f6e4c 100644 --- a/x-pack/test/security_solution_cypress/serverless_config.ts +++ b/x-pack/test/security_solution_cypress/serverless_config.ts @@ -34,9 +34,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { { product_line: 'endpoint', product_tier: 'complete' }, { product_line: 'cloud', product_tier: 'complete' }, ])}`, - `--xpack.securitySolution.enableExperimental=${JSON.stringify([ - 'alertSuppressionForIndicatorMatchRuleEnabled', - ])}`, ], }, testRunner: SecuritySolutionConfigurableCypressTestRunner, diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 71f6cf3db7c49..fe83912894be7 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -167,6 +167,8 @@ "@kbn/typed-react-router-config", "@kbn/ftr-common-functional-ui-services", "@kbn/infra-forge", + "@kbn/slo-plugin", + "@kbn/aiops-test-utils", "@kbn/observability-ai-assistant-app-plugin", ] } diff --git a/x-pack/test/usage_collection/plugins/stack_management_usage_test/kibana.jsonc b/x-pack/test/usage_collection/plugins/stack_management_usage_test/kibana.jsonc index a8645d8a2fd4e..8d608b77c5ef0 100644 --- a/x-pack/test/usage_collection/plugins/stack_management_usage_test/kibana.jsonc +++ b/x-pack/test/usage_collection/plugins/stack_management_usage_test/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/stack-management-usage-test-plugin", - "owner": "@elastic/platform-deployment-management", + "owner": "@elastic/kibana-management", "plugin": { "id": "stackManagementUsageTest", "server": false, diff --git a/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts b/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts index fe0ff5343bfb7..7b6ba09a398d1 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/fleet/default_setup.ts @@ -8,35 +8,38 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; const defaultFleetServerHostId = 'default-fleet-server'; -const defaultFleetServerHostUrl = 'https://localhost:8220'; const defaultElasticsearchOutputId = 'es-default-output'; -const defaultElasticsearchOutputHostUrl = 'https://localhost:9200'; export async function expectDefaultFleetServer({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const retry = getService('retry'); + let defaultFleetServerHostUrl: string = ''; await retry.waitForWithTimeout('get default fleet server', 30_000, async () => { const { body, status } = await supertest.get( `/api/fleet/fleet_server_hosts/${defaultFleetServerHostId}` ); - if (status === 200 && body.item.host_urls.includes(defaultFleetServerHostUrl)) { + if (status === 200 && body.item.host_urls.length > 0) { + defaultFleetServerHostUrl = body.item.host_urls[0]; return true; } else { throw new Error(`Expected default Fleet Server id ${defaultFleetServerHostId} to exist`); } }); + return defaultFleetServerHostUrl; } export async function expectDefaultElasticsearchOutput({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const retry = getService('retry'); + let defaultEsOutputUrl: string = ''; await retry.waitForWithTimeout('get default Elasticsearch output', 30_000, async () => { const { body, status } = await supertest.get( `/api/fleet/outputs/${defaultElasticsearchOutputId}` ); - if (status === 200 && body.item.hosts.includes(defaultElasticsearchOutputHostUrl)) { + if (status === 200 && body.item.hosts.length > 0) { + defaultEsOutputUrl = body.item.hosts[0]; return true; } else { throw new Error( @@ -44,6 +47,7 @@ export async function expectDefaultElasticsearchOutput({ getService }: FtrProvid ); } }); + return defaultEsOutputUrl; } export const kbnServerArgs = [ @@ -52,7 +56,7 @@ export const kbnServerArgs = [ id: defaultFleetServerHostId, name: 'Default Fleet Server', is_default: true, - host_urls: [defaultFleetServerHostUrl], + host_urls: ['https://localhost:8220'], })}]`, `--xpack.fleet.outputs=[${JSON.stringify({ id: defaultElasticsearchOutputId, @@ -60,6 +64,6 @@ export const kbnServerArgs = [ type: 'elasticsearch', is_default: true, is_default_monitoring: true, - hosts: [defaultElasticsearchOutputHostUrl], + hosts: ['https://localhost:9200'], })}]`, ]; diff --git a/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts b/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts index e20d2ef30d752..a93cdd048d21f 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts @@ -7,27 +7,45 @@ import expect from 'expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { RoleCredentials } from '../../../../shared/services'; export default function ({ getService }: FtrProviderContext) { const svlCommonApi = getService('svlCommonApi'); - const supertest = getService('supertest'); + const svlUserManager = getService('svlUserManager'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + let commonRequestHeader: Record; + let internalRequestHeader: Record; + let roleAuthc: RoleCredentials; describe('spaces', function () { + before(async () => { + // admin is the only predefined role that will work for all 3 solutions + roleAuthc = await svlUserManager.createApiKeyForRole('admin'); + commonRequestHeader = svlCommonApi.getCommonRequestHeader(); + internalRequestHeader = svlCommonApi.getInternalRequestHeader(); + }); + + after(async () => { + await svlUserManager.invalidateApiKeyForRole(roleAuthc); + }); + describe('route access', () => { describe('disabled', () => { it('#delete', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .delete('/api/spaces/space/default') - .set(svlCommonApi.getCommonRequestHeader()); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader); // normally we'd get a 400 bad request if we tried to delete the default space svlCommonApi.assertApiNotFound(body, status); }); it('#create', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .post('/api/spaces/space') - .set(svlCommonApi.getCommonRequestHeader()) + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader) .send({ id: 'custom', name: 'Custom', @@ -38,9 +56,10 @@ export default function ({ getService }: FtrProviderContext) { }); it('#update requires internal header', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .put('/api/spaces/space/default') - .set(svlCommonApi.getCommonRequestHeader()) + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader) .send({ id: 'default', name: 'UPDATED!', @@ -51,45 +70,50 @@ export default function ({ getService }: FtrProviderContext) { }); it('#copyToSpace', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .post('/api/spaces/_copy_saved_objects') - .set(svlCommonApi.getCommonRequestHeader()); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader); // without a request body we would normally a 400 bad request if the endpoint was registered svlCommonApi.assertApiNotFound(body, status); }); it('#resolveCopyToSpaceErrors', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .post('/api/spaces/_resolve_copy_saved_objects_errors') - .set(svlCommonApi.getCommonRequestHeader()); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader); // without a request body we would normally a 400 bad request if the endpoint was registered svlCommonApi.assertApiNotFound(body, status); }); it('#updateObjectsSpaces', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .post('/api/spaces/_update_objects_spaces') - .set(svlCommonApi.getCommonRequestHeader()); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader); // without a request body we would normally a 400 bad request if the endpoint was registered svlCommonApi.assertApiNotFound(body, status); }); it('#getShareableReferences', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .post('/api/spaces/_get_shareable_references') - .set(svlCommonApi.getCommonRequestHeader()); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader); // without a request body we would normally a 400 bad request if the endpoint was registered svlCommonApi.assertApiNotFound(body, status); }); it('#disableLegacyUrlAliases', async () => { - const { body, status } = await supertest + const { body, status } = await supertestWithoutAuth .post('/api/spaces/_disable_legacy_url_aliases') - .set(svlCommonApi.getCommonRequestHeader()); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader); // without a request body we would normally a 400 bad request if the endpoint was registered svlCommonApi.assertApiNotFound(body, status); @@ -101,9 +125,10 @@ export default function ({ getService }: FtrProviderContext) { let body: any; let status: number; - ({ body, status } = await supertest + ({ body, status } = await supertestWithoutAuth .get('/api/spaces/space/default') - .set(svlCommonApi.getCommonRequestHeader())); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader)); // expect a rejection because we're not using the internal header expect(body).toEqual({ statusCode: 400, @@ -114,9 +139,10 @@ export default function ({ getService }: FtrProviderContext) { }); expect(status).toBe(400); - ({ body, status } = await supertest + ({ body, status } = await supertestWithoutAuth .get('/api/spaces/space/default') - .set(svlCommonApi.getInternalRequestHeader())); + .set(internalRequestHeader) + .set(roleAuthc.apiKeyHeader)); // expect success because we're using the internal header expect(body).toEqual( expect.objectContaining({ @@ -130,9 +156,10 @@ export default function ({ getService }: FtrProviderContext) { let body: any; let status: number; - ({ body, status } = await supertest + ({ body, status } = await supertestWithoutAuth .get('/api/spaces/space') - .set(svlCommonApi.getCommonRequestHeader())); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader)); // expect a rejection because we're not using the internal header expect(body).toEqual({ statusCode: 400, @@ -143,9 +170,10 @@ export default function ({ getService }: FtrProviderContext) { }); expect(status).toBe(400); - ({ body, status } = await supertest + ({ body, status } = await supertestWithoutAuth .get('/api/spaces/space') - .set(svlCommonApi.getInternalRequestHeader())); + .set(internalRequestHeader) + .set(roleAuthc.apiKeyHeader)); // expect success because we're using the internal header expect(body).toEqual( expect.arrayContaining([ @@ -161,9 +189,10 @@ export default function ({ getService }: FtrProviderContext) { let body: any; let status: number; - ({ body, status } = await supertest + ({ body, status } = await supertestWithoutAuth .get('/internal/spaces/_active_space') - .set(svlCommonApi.getCommonRequestHeader())); + .set(commonRequestHeader) + .set(roleAuthc.apiKeyHeader)); // expect a rejection because we're not using the internal header expect(body).toEqual({ statusCode: 400, @@ -174,9 +203,10 @@ export default function ({ getService }: FtrProviderContext) { }); expect(status).toBe(400); - ({ body, status } = await supertest + ({ body, status } = await supertestWithoutAuth .get('/internal/spaces/_active_space') - .set(svlCommonApi.getInternalRequestHeader())); + .set(internalRequestHeader) + .set(roleAuthc.apiKeyHeader)); // expect success because we're using the internal header expect(body).toEqual( expect.objectContaining({ diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts b/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts index 913c0667895c3..547d16399bdab 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/fleet/fleet.ts @@ -17,9 +17,18 @@ export default function (ctx: FtrProviderContext) { const supertest = ctx.getService('supertest'); describe('fleet', function () { - it('rejects request to create a new fleet server hosts if host url is different from default', async () => { - await expectDefaultFleetServer(ctx); + let defaultFleetServerHostUrl: string = ''; + let defaultEsOutputUrl: string = ''; + + before(async () => { + defaultFleetServerHostUrl = await expectDefaultFleetServer(ctx); + expect(defaultFleetServerHostUrl).not.toBe(''); + defaultEsOutputUrl = await expectDefaultElasticsearchOutput(ctx); + expect(defaultEsOutputUrl).not.toBe(''); + }); + + it('rejects request to create a new fleet server hosts if host url is different from default', async () => { const { body, status } = await supertest .post('/api/fleet/fleet_server_hosts') .set(svlCommonApi.getInternalRequestHeader()) @@ -32,34 +41,30 @@ export default function (ctx: FtrProviderContext) { expect(body).toEqual({ statusCode: 403, error: 'Forbidden', - message: 'Fleet server host must have default URL in serverless: https://localhost:8220', + message: `Fleet server host must have default URL in serverless: ${defaultFleetServerHostUrl}`, }); expect(status).toBe(403); }); it('accepts request to create a new fleet server hosts if host url is same as default', async () => { - await expectDefaultFleetServer(ctx); - const { body, status } = await supertest .post('/api/fleet/fleet_server_hosts') .set(svlCommonApi.getInternalRequestHeader()) .send({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }), }); expect(status).toBe(200); }); it('rejects request to create a new elasticsearch output if host is different from default', async () => { - await expectDefaultElasticsearchOutput(ctx); - const { body, status } = await supertest .post('/api/fleet/outputs') .set(svlCommonApi.getInternalRequestHeader()) @@ -68,33 +73,29 @@ export default function (ctx: FtrProviderContext) { type: 'elasticsearch', hosts: ['https://localhost:9201'], }); - // in a non-serverless environment this would succeed with a 200 expect(body).toEqual({ statusCode: 400, error: 'Bad Request', - message: - 'Elasticsearch output host must have default URL in serverless: https://localhost:9200', + message: `Elasticsearch output host must have default URL in serverless: ${defaultEsOutputUrl}`, }); expect(status).toBe(400); }); it('accepts request to create a new elasticsearch output if host url is same as default', async () => { - await expectDefaultElasticsearchOutput(ctx); - const { body, status } = await supertest .post('/api/fleet/outputs') .set(svlCommonApi.getInternalRequestHeader()) .send({ name: 'Test output', type: 'elasticsearch', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test output', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }), }); expect(status).toBe(200); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/slos/create_slo.ts b/x-pack/test_serverless/api_integration/test_suites/observability/slos/create_slo.ts index 06059d3bfe0b4..f9fff99103f6b 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/slos/create_slo.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/slos/create_slo.ts @@ -8,13 +8,13 @@ import { cleanup, generate } from '@kbn/infra-forge'; import expect from '@kbn/expect'; import type { GetTransformsResponseSchema } from '@kbn/transform-plugin/common/api_schemas/transforms'; -import { SO_SLO_TYPE } from '@kbn/observability-plugin/server/saved_objects'; +import { SO_SLO_TYPE } from '@kbn/slo-plugin/server/saved_objects'; import { ALL_VALUE } from '@kbn/slo-schema'; import { getSLOSummaryPipelineId, SLO_SUMMARY_TEMP_INDEX_NAME, -} from '@kbn/observability-plugin/common/slo/constants'; +} from '@kbn/slo-plugin/common/constants'; import { FtrProviderContext } from '../../../ftr_provider_context'; interface ExpectedTransforms { diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/slos/delete_slo.ts b/x-pack/test_serverless/api_integration/test_suites/observability/slos/delete_slo.ts index 82bcaec6a8631..a275a23fcf281 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/slos/delete_slo.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/slos/delete_slo.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { SO_SLO_TYPE } from '@kbn/observability-plugin/server/saved_objects'; +import { SO_SLO_TYPE } from '@kbn/slo-plugin/server/saved_objects'; import { cleanup, generate } from '@kbn/infra-forge'; import expect from '@kbn/expect'; import { ALL_VALUE } from '@kbn/slo-schema'; @@ -13,11 +13,11 @@ import { getSLOSummaryTransformId, getSLOTransformId, getSLOSummaryPipelineId, -} from '@kbn/observability-plugin/common/slo/constants'; +} from '@kbn/slo-plugin/common/constants'; import { SLO_DESTINATION_INDEX_PATTERN, SLO_SUMMARY_DESTINATION_INDEX_PATTERN, -} from '@kbn/observability-plugin/common/slo/constants'; +} from '@kbn/slo-plugin/common/constants'; import { ElasticsearchClient } from '@kbn/core/server'; import { FtrProviderContext } from '../../../ftr_provider_context'; diff --git a/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts b/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts index 913c0667895c3..547d16399bdab 100644 --- a/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts +++ b/x-pack/test_serverless/api_integration/test_suites/security/fleet/fleet.ts @@ -17,9 +17,18 @@ export default function (ctx: FtrProviderContext) { const supertest = ctx.getService('supertest'); describe('fleet', function () { - it('rejects request to create a new fleet server hosts if host url is different from default', async () => { - await expectDefaultFleetServer(ctx); + let defaultFleetServerHostUrl: string = ''; + let defaultEsOutputUrl: string = ''; + + before(async () => { + defaultFleetServerHostUrl = await expectDefaultFleetServer(ctx); + expect(defaultFleetServerHostUrl).not.toBe(''); + defaultEsOutputUrl = await expectDefaultElasticsearchOutput(ctx); + expect(defaultEsOutputUrl).not.toBe(''); + }); + + it('rejects request to create a new fleet server hosts if host url is different from default', async () => { const { body, status } = await supertest .post('/api/fleet/fleet_server_hosts') .set(svlCommonApi.getInternalRequestHeader()) @@ -32,34 +41,30 @@ export default function (ctx: FtrProviderContext) { expect(body).toEqual({ statusCode: 403, error: 'Forbidden', - message: 'Fleet server host must have default URL in serverless: https://localhost:8220', + message: `Fleet server host must have default URL in serverless: ${defaultFleetServerHostUrl}`, }); expect(status).toBe(403); }); it('accepts request to create a new fleet server hosts if host url is same as default', async () => { - await expectDefaultFleetServer(ctx); - const { body, status } = await supertest .post('/api/fleet/fleet_server_hosts') .set(svlCommonApi.getInternalRequestHeader()) .send({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test Fleet server host', - host_urls: ['https://localhost:8220'], + host_urls: [defaultFleetServerHostUrl], }), }); expect(status).toBe(200); }); it('rejects request to create a new elasticsearch output if host is different from default', async () => { - await expectDefaultElasticsearchOutput(ctx); - const { body, status } = await supertest .post('/api/fleet/outputs') .set(svlCommonApi.getInternalRequestHeader()) @@ -68,33 +73,29 @@ export default function (ctx: FtrProviderContext) { type: 'elasticsearch', hosts: ['https://localhost:9201'], }); - // in a non-serverless environment this would succeed with a 200 expect(body).toEqual({ statusCode: 400, error: 'Bad Request', - message: - 'Elasticsearch output host must have default URL in serverless: https://localhost:9200', + message: `Elasticsearch output host must have default URL in serverless: ${defaultEsOutputUrl}`, }); expect(status).toBe(400); }); it('accepts request to create a new elasticsearch output if host url is same as default', async () => { - await expectDefaultElasticsearchOutput(ctx); - const { body, status } = await supertest .post('/api/fleet/outputs') .set(svlCommonApi.getInternalRequestHeader()) .send({ name: 'Test output', type: 'elasticsearch', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }); expect(body).toEqual({ item: expect.objectContaining({ name: 'Test output', - hosts: ['https://localhost:9200'], + hosts: [defaultEsOutputUrl], }), }); expect(status).toBe(200); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts index 5657b1aebfee5..49f1e5ff6da4f 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields.ts @@ -16,8 +16,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects(['settings', 'common']); const testSubjects = getService('testSubjects'); - // Failing: See https://github.com/elastic/kibana/issues/173558 - describe.skip('runtime fields', function () { + describe('runtime fields', function () { + // Bug: https://github.com/elastic/kibana/issues/178939 + this.tags('failsOnMKI'); before(async function () { await browser.setWindowSize(1200, 800); await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); @@ -37,7 +38,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('app-card-dataViews'); await PageObjects.settings.clickIndexPatternLogstash(); const startingCount = parseInt(await PageObjects.settings.getFieldsTabCount(), 10); - await log.debug('add runtime field'); + log.debug('add runtime field'); await PageObjects.settings.addRuntimeField( fieldName, 'Keyword', @@ -45,7 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { false ); - await log.debug('check that field preview is rendered'); + log.debug('check that field preview is rendered'); expect(await testSubjects.exists('fieldPreviewItem', { timeout: 1500 })).to.be(true); await PageObjects.settings.clickSaveField(); @@ -64,6 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('flyoutTitle'); }); await PageObjects.settings.setFieldType('Long'); + await new Promise((r) => setTimeout(r, 500)); await PageObjects.settings.setFieldScriptWithoutToggle('emit(6);'); await PageObjects.settings.toggleRow('formatRow'); await PageObjects.settings.setFieldFormat('bytes'); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields_composite.ts b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields_composite.ts index 5eabfb65a87fc..79d190295eec8 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields_composite.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/data_views/_runtime_fields_composite.ts @@ -17,7 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); describe('runtime fields', function () { - // https://github.com/elastic/kibana/issues/178733 + // Bug: https://github.com/elastic/kibana/issues/178939 this.tags('failsOnMKI'); before(async function () { await browser.setWindowSize(1200, 800); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts b/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts index 5a7c13c6a4b56..3b0c9b01907da 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/ingest_pipelines.ts @@ -59,7 +59,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { it('Displays the test pipeline in the list of pipelines', async () => { log.debug('Checking that the test pipeline is in the pipelines list.'); await pageObjects.ingestPipelines.increasePipelineListPageSize(); - const pipelines = await pageObjects.ingestPipelines.getPipelinesList(); + const pipelines = await pageObjects.ingestPipelines.getPipelinesList({ + searchFor: TEST_PIPELINE_NAME, + }); expect(pipelines).to.contain(TEST_PIPELINE_NAME); }); @@ -83,7 +85,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.ingestPipelines.closePipelineDetailsFlyout(); await pageObjects.ingestPipelines.increasePipelineListPageSize(); - const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList(); + const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList({ + searchFor: TEST_PIPELINE_NAME, + }); const newPipelineExists = Boolean( pipelinesList.find((pipelineName) => pipelineName === PIPELINE.name) ); @@ -96,7 +100,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await pageObjects.ingestPipelines.closePipelineDetailsFlyout(); await pageObjects.ingestPipelines.increasePipelineListPageSize(); - const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList(); + const pipelinesList = await pageObjects.ingestPipelines.getPipelinesList({ + searchFor: TEST_PIPELINE_NAME, + }); const newPipelineExists = Boolean( pipelinesList.find((pipelineName) => pipelineName === PIPELINE.name) ); diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts index 6b5b9f017c469..068e0b04088a1 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts @@ -31,6 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); }); it('opens the flyout for the right dataset', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts index c4de6141d6d10..b8d8fb23dcff1 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_summary.ts @@ -21,7 +21,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const to = '2024-01-01T12:00:00.000Z'; - describe('Dataset quality summary', () => { + // Failing: See https://github.com/elastic/kibana/issues/178874 + // Failing: See https://github.com/elastic/kibana/issues/178884 + describe.skip('Dataset quality summary', () => { before(async () => { await synthtrace.index(getInitialTestLogs({ to, count: 4 })); await PageObjects.svlCommonPage.loginWithRole('admin'); diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts index e5b1ad738341d..61db9caeb05fc 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table.ts @@ -32,6 +32,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); }); it('shows the right number of rows in correct order', async () => { diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts index 6f08488dcf51e..5ed86ab3c711a 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_table_filters.ts @@ -31,6 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { after(async () => { await synthtrace.clean(); + await PageObjects.observabilityLogsExplorer.removeInstalledPackages(); }); it('hides inactive datasets when toggled', async () => { diff --git a/x-pack/test_serverless/shared/config.base.ts b/x-pack/test_serverless/shared/config.base.ts index 9c2454d4e7a39..45e30f146cfe0 100644 --- a/x-pack/test_serverless/shared/config.base.ts +++ b/x-pack/test_serverless/shared/config.base.ts @@ -60,6 +60,10 @@ export default async () => { `xpack.security.authc.realms.native.native1.enabled=false`, `xpack.security.authc.realms.native.native1.order=-97`, + // Enable strict request validation for security related ES APIs. + 'xpack.security.authz.has_privileges.strict_request_validation.enabled=true', + 'xpack.security.authc.api_key.strict_request_validation.enabled=true', + 'xpack.security.authc.realms.jwt.jwt1.allowed_audiences=elasticsearch', `xpack.security.authc.realms.jwt.jwt1.allowed_issuer=https://kibana.elastic.co/jwt/`, `xpack.security.authc.realms.jwt.jwt1.allowed_signature_algorithms=[RS256]`, diff --git a/x-pack/test_serverless/shared/services/index.ts b/x-pack/test_serverless/shared/services/index.ts index 90c9460213379..b8cfbaffc3683 100644 --- a/x-pack/test_serverless/shared/services/index.ts +++ b/x-pack/test_serverless/shared/services/index.ts @@ -10,6 +10,8 @@ import { SvlCommonApiServiceProvider } from './svl_common_api'; import { SvlReportingServiceProvider } from './svl_reporting'; import { SvlUserManagerProvider } from './svl_user_manager'; +export type { RoleCredentials } from './svl_user_manager'; + export const services = { supertest: SupertestProvider, supertestWithoutAuth: SupertestWithoutAuthProvider, diff --git a/x-pack/test_serverless/shared/services/svl_user_manager.ts b/x-pack/test_serverless/shared/services/svl_user_manager.ts index 2299b4d78e974..54cffe1748ea0 100644 --- a/x-pack/test_serverless/shared/services/svl_user_manager.ts +++ b/x-pack/test_serverless/shared/services/svl_user_manager.ts @@ -11,11 +11,20 @@ import { readRolesFromResource } from '@kbn/es'; import { resolve } from 'path'; import { Role } from '@kbn/test/src/auth/types'; import { isServerlessProjectType } from '@kbn/es/src/utils'; +import expect from '@kbn/expect'; import { FtrProviderContext } from '../../functional/ftr_provider_context'; +export interface RoleCredentials { + apiKey: { id: string; name: string }; + apiKeyHeader: { Authorization: string }; + cookieHeader: { Cookie: string }; +} + export function SvlUserManagerProvider({ getService }: FtrProviderContext) { const config = getService('config'); const log = getService('log'); + const svlCommonApi = getService('svlCommonApi'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); const isCloud = !!process.env.TEST_CLOUD; const kbnServerArgs = config.get('kbnTestServer.serverArgs') as string[]; const projectType = kbnServerArgs @@ -72,6 +81,44 @@ export function SvlUserManagerProvider({ getService }: FtrProviderContext) { async getUserData(role: string) { return sessionManager.getUserData(role); }, + async createApiKeyForRole(role: string): Promise { + const cookieHeader = await this.getApiCredentialsForRole(role); + + const { body, status } = await supertestWithoutAuth + .post('/internal/security/api_key') + .set(svlCommonApi.getInternalRequestHeader()) + .set(cookieHeader) + .send({ + name: 'myTestApiKey', + metadata: {}, + role_descriptors: {}, + }); + expect(status).to.be(200); + + const apiKey = body; + const apiKeyHeader = { Authorization: 'ApiKey ' + apiKey.encoded }; + + return { apiKey, apiKeyHeader, cookieHeader }; + }, + async invalidateApiKeyForRole(roleCredentials: RoleCredentials) { + const requestBody = { + apiKeys: [ + { + id: roleCredentials.apiKey.id, + name: roleCredentials.apiKey.name, + }, + ], + isAdmin: true, + }; + + const { status } = await supertestWithoutAuth + .post('/internal/security/api_key/invalidate') + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleCredentials.cookieHeader) + .send(requestBody); + + expect(status).to.be(200); + }, DEFAULT_ROLE, }; } diff --git a/x-pack/test_serverless/tsconfig.json b/x-pack/test_serverless/tsconfig.json index 0aafa5212e6df..3cbecb37dcebd 100644 --- a/x-pack/test_serverless/tsconfig.json +++ b/x-pack/test_serverless/tsconfig.json @@ -92,5 +92,6 @@ "@kbn/es", "@kbn/infra-forge", "@kbn/reporting-common", + "@kbn/slo-plugin", ] } diff --git a/yarn.lock b/yarn.lock index 8fcbda1afc1e9..762ffdb748063 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1343,7 +1343,7 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.19.4", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.24.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.3", "@babel/runtime@^7.19.4", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.24.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.3", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.24.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.0.tgz#584c450063ffda59697021430cb47101b085951e" integrity sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw== @@ -2405,25 +2405,6 @@ protobufjs "^7.0.0" yargs "^17.7.2" -"@gulp-sourcemaps/identity-map@1.X": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz#1e6fe5d8027b1f285dc0d31762f566bccd73d5a9" - integrity sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ== - dependencies: - acorn "^5.0.3" - css "^2.2.1" - normalize-path "^2.1.1" - source-map "^0.6.0" - through2 "^2.0.3" - -"@gulp-sourcemaps/map-sources@1.X": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" - integrity sha1-iQrnxdjId/bThIYCFazp1+yUW9o= - dependencies: - normalize-path "^2.0.1" - through2 "^2.0.3" - "@gulpjs/to-absolute-glob@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@gulpjs/to-absolute-glob/-/to-absolute-glob-4.0.0.tgz#1fc2460d3953e1d9b9f2dfdb4bcc99da4710c021" @@ -2745,11 +2726,6 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== -"@icons/material@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@icons/material/-/material-0.2.4.tgz#e90c9f71768b3736e76d7dd6783fc6c2afa88bc8" - integrity sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw== - "@isaacs/cliui@^8.0.2": version "8.0.2" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" @@ -3121,6 +3097,10 @@ version "0.0.0" uid "" +"@kbn/aiops-test-utils@link:x-pack/packages/ml/aiops_test_utils": + version "0.0.0" + uid "" + "@kbn/aiops-utils@link:x-pack/packages/ml/aiops_utils": version "0.0.0" uid "" @@ -6189,6 +6169,10 @@ version "0.0.0" uid "" +"@kbn/slo-plugin@link:x-pack/plugins/observability_solution/slo": + version "0.0.0" + uid "" + "@kbn/slo-schema@link:x-pack/packages/kbn-slo-schema": version "0.0.0" uid "" @@ -6197,6 +6181,14 @@ version "0.0.0" uid "" +"@kbn/solution-nav-es@link:packages/solution-nav/es": + version "0.0.0" + uid "" + +"@kbn/solution-nav-oblt@link:packages/solution-nav/oblt": + version "0.0.0" + uid "" + "@kbn/some-dev-log@link:packages/kbn-some-dev-log": version "0.0.0" uid "" @@ -6889,11 +6881,6 @@ resolved "https://registry.yarnpkg.com/@math.gl/types/-/types-3.6.3.tgz#9fa9866feabcbb76de107d78ff3a89c0243ac374" integrity sha512-3uWLVXHY3jQxsXCr/UCNPSc2BG0hNUljhmOBt9l+lNFDp7zHgm0cK2Tw4kj2XfkJy4TgwZTBGwRDQgWEbLbdTA== -"@mattiasbuelens/web-streams-adapter@~0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@mattiasbuelens/web-streams-adapter/-/web-streams-adapter-0.1.0.tgz#607b5a25682f4ae2741da7ba6df39302505336b3" - integrity sha512-oV4PyZfwJNtmFWhvlJLqYIX1Nn22ML8FZpS16ZUKv0hg7414xV1fjsGqxQzLT2dyK92TKxsJSwMOd7VNHAtPmA== - "@mdx-js/mdx@^1.6.22": version "1.6.22" resolved "https://registry.yarnpkg.com/@mdx-js/mdx/-/mdx-1.6.22.tgz#8a723157bf90e78f17dc0f27995398e6c731f1ba" @@ -7265,14 +7252,6 @@ dependencies: "@octokit/openapi-types" "^18.0.0" -"@openpgp/web-stream-tools@^0.0.10": - version "0.0.10" - resolved "https://registry.yarnpkg.com/@openpgp/web-stream-tools/-/web-stream-tools-0.0.10.tgz#4496390da9715c9bfc581ad144f9fb8a36a37775" - integrity sha512-1ONZADML0fb0RJR5UiGYPnRf9VaYBYUBc1gF9jyq57sHkr58cp5/BQHS+ivrqbRw21Sb70FKTssmJbRe71V+kw== - dependencies: - "@mattiasbuelens/web-streams-adapter" "~0.1.0" - web-streams-polyfill "~3.0.3" - "@opentelemetry/api-metrics@0.31.0", "@opentelemetry/api-metrics@^0.31.0": version "0.31.0" resolved "https://registry.yarnpkg.com/@opentelemetry/api-metrics/-/api-metrics-0.31.0.tgz#0ed4cf4d7c731f968721c2b303eaf5e9fd42f736" @@ -7947,7 +7926,7 @@ ts-dedent "^2.0.0" util-deprecate "^1.0.2" -"@storybook/addon-controls@6.5.16", "@storybook/addon-controls@^6.5.16": +"@storybook/addon-controls@6.5.16": version "6.5.16" resolved "https://registry.yarnpkg.com/@storybook/addon-controls/-/addon-controls-6.5.16.tgz#5017805b8ca413edf6e9d87b90a9436e79eb5e59" integrity sha512-kShSGjq1MjmmyL3l8i+uPz6yddtf82mzys0l82VKtcuyjrr5944wYFJ5NTXMfZxrO/U6FeFsfuFZE/k6ex3EMg== @@ -9368,11 +9347,6 @@ resolved "https://registry.yarnpkg.com/@types/deep-freeze-strict/-/deep-freeze-strict-1.1.0.tgz#447a6a2576191344aa42310131dd3df5c41492c4" integrity sha1-RHpqJXYZE0SqQjEBMd099cQUksQ= -"@types/delete-empty@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/delete-empty/-/delete-empty-2.0.0.tgz#1647ae9e68f708a6ba778531af667ec55bc61964" - integrity sha512-sq+kwx8zA9BSugT9N+Jr8/uWjbHMZ+N/meJEzRyT3gmLq/WMtx/iSIpvdpmBUi/cvXl6Kzpvve8G2ESkabFwmg== - "@types/diff@^5.0.8": version "5.0.8" resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.8.tgz#28dc501cc3e7c62d4c5d096afe20755170acf276" @@ -9498,13 +9472,6 @@ resolved "https://registry.yarnpkg.com/@types/fnv-plus/-/fnv-plus-1.3.0.tgz#0f43f0b7e7b4b24de3a1cab69bfa009508f4c084" integrity sha512-ijls8MsO6Q9JUSd5w1v4y2ijM6S4D/nmOyI/FwcepvrZfym0wZhLdYGFD5TJID7tga0O3I7SmtK69RzpSJ1Fcw== -"@types/fs-extra@^9.0.13": - version "9.0.13" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" - integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== - dependencies: - "@types/node" "*" - "@types/geojson@*", "@types/geojson@^7946.0.10", "@types/geojson@^7946.0.7": version "7946.0.10" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249" @@ -9523,7 +9490,7 @@ "@types/glob" "*" "@types/node" "*" -"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3", "@types/glob@^7.2.0": +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": version "7.2.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== @@ -10472,11 +10439,6 @@ "@types/node" "*" minipass "^4.0.0" -"@types/tempy@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@types/tempy/-/tempy-0.2.0.tgz#8b7a93f6912aef25cc0b8d8a80ff974151478685" - integrity sha512-YaX74QljqR45Xu7dd22wMvzTS+ItUiSyDl9XJl6WTgYNE09r2TF+mV2FDjWRM5Sdzf9C9dXRTUdz9J5SoEYxXg== - "@types/testing-library__jest-dom@^5.14.7", "@types/testing-library__jest-dom@^5.9.1": version "5.14.7" resolved "https://registry.yarnpkg.com/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.7.tgz#fff92bed2a32c58a9224a85603e731519c0a9037" @@ -10650,7 +10612,7 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^17.0.10", "@types/yargs@^17.0.8": +"@types/yargs@^17.0.8": version "17.0.24" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.24.tgz#b3ef8d50ad4aa6aecf6ddc97c580a00f5aa11902" integrity sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw== @@ -11113,14 +11075,6 @@ resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== -JSONStream@1.3.5: - version "1.3.5" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" - integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== - dependencies: - jsonparse "^1.2.0" - through ">=2.2.7 <3" - abab@^2.0.4, abab@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" @@ -11188,11 +11142,6 @@ acorn-walk@^8.0.0, acorn-walk@^8.0.2, acorn-walk@^8.1.1, acorn-walk@^8.2.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@5.X, acorn@^5.0.3: - version "5.7.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" - integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== - acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -11376,13 +11325,6 @@ ansi-gray@^0.1.1: dependencies: ansi-wrap "0.1.0" -ansi-green@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-green/-/ansi-green-0.1.1.tgz#8a5d9a979e458d57c40e33580b37390b8e10d0f7" - integrity sha1-il2al55FjVfEDjNYCzc5C44Q0Pc= - dependencies: - ansi-wrap "0.1.0" - ansi-html-community@0.0.8, ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" @@ -12878,7 +12820,7 @@ cacache@^12.0.2: unique-filename "^1.1.1" y18n "^4.0.0" -cacache@^15.0.4, cacache@^15.0.5: +cacache@^15.0.5: version "15.3.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== @@ -13891,7 +13833,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@1.X, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.6.0, convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== @@ -13959,23 +13901,6 @@ copy-to-clipboard@^3.0.8, copy-to-clipboard@^3.2.0, copy-to-clipboard@^3.3.1: dependencies: toggle-selection "^1.0.6" -copy-webpack-plugin@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-6.0.2.tgz#10efc6ad219a61acbf2f5fb50af83da38431bc34" - integrity sha512-9Gm8X0c6eXlKnmltMPFCBeGOKjtcRIyTt4VaO3k1TkNgVTe5Ov2lYsYVuyLp0kp8DItO3apewflM+1GYgh6V2Q== - dependencies: - cacache "^15.0.4" - fast-glob "^3.2.2" - find-cache-dir "^3.3.1" - glob-parent "^5.1.1" - globby "^11.0.1" - loader-utils "^2.0.0" - normalize-path "^3.0.0" - p-limit "^2.3.0" - schema-utils "^2.7.0" - serialize-javascript "^3.1.0" - webpack-sources "^1.4.3" - core-js-compat@^3.31.0, core-js-compat@^3.34.0, core-js-compat@^3.8.1: version "3.36.0" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.36.0.tgz#087679119bc2fdbdefad0d45d8e5d307d45ba190" @@ -14171,11 +14096,6 @@ crypto-js@^4.0.0: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== -crypto-random-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" - integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= - crypto-random-string@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-4.0.0.tgz#5a3cc53d7dd86183df5da0312816ceeeb5bb1fc2" @@ -14281,7 +14201,7 @@ css.escape@^1.5.1: resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== -css@2.X, css@^2.2.1, css@^2.2.4: +css@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw== @@ -14830,15 +14750,6 @@ dayjs@1.11.10, dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0" integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ== -debug-fabulous@1.X: - version "1.1.0" - resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-1.1.0.tgz#af8a08632465224ef4174a9f06308c3c2a1ebc8e" - integrity sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg== - dependencies: - debug "3.X" - memoizee "0.4.X" - object-assign "4.X" - debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -14846,13 +14757,6 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" -debug@3.X, debug@^3.0.0, debug@^3.1.0, debug@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -14867,6 +14771,13 @@ debug@4.3.1: dependencies: ms "2.1.2" +debug@^3.0.0, debug@^3.1.0, debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -15125,15 +15036,6 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -delete-empty@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/delete-empty/-/delete-empty-2.0.0.tgz#dcf7c4f93a98445119acd57b137d13e7af78fa39" - integrity sha512-voZ8OiMkVR9MOTTHZ5P0DaMDtIW6xEbXZeADp6U8uwxIJFhs2hRwyIlUZIs5hR4YIp9VYBURqZrV6Yz0ozhVpg== - dependencies: - log-ok "^0.1.1" - relative "^3.0.2" - rimraf "^2.6.2" - depd@^1.1.2, depd@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" @@ -15204,11 +15106,6 @@ detect-libc@^2.0.0, detect-libc@^2.0.1, detect-libc@^2.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== -detect-newline@2.X: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - detect-newline@3.1.0, detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -15589,22 +15486,6 @@ downshift@^3.2.10: prop-types "^15.7.2" react-is "^16.9.0" -dpdm@3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/dpdm/-/dpdm-3.9.0.tgz#48d8236d7a054ee84cf13423ecf300f64da1393b" - integrity sha512-k6VpCyjVUMFVBa6w+TO9bYQdbYkAx6oivUC857757EUtri9CFsj2VpLPkOLrbbLggwRFqLbNHHL3XGPYRovULg== - dependencies: - "@types/fs-extra" "^9.0.13" - "@types/glob" "^7.2.0" - "@types/yargs" "^17.0.10" - chalk "^4.1.2" - fs-extra "^10.0.1" - glob "^7.2.0" - ora "^5.4.1" - tslib "^2.3.1" - typescript "^4.6.3" - yargs "^17.4.0" - duplexer2@^0.1.2, duplexer2@~0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" @@ -16108,7 +15989,7 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.45, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14, es5-ext@~0.10.2, es5-ext@~0.10.46: +es5-ext@^0.10.35, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14: version "0.10.64" resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== @@ -16128,7 +16009,7 @@ es6-error@^4.0.1: resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== -es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.1: +es6-iterator@^2.0.3, es6-iterator@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= @@ -16191,16 +16072,6 @@ es6-symbol@^3.1.1, es6-symbol@^3.1.3, es6-symbol@~3.1.1: d "^1.0.2" ext "^1.7.0" -es6-weak-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - integrity sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8= - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - esbuild@^0.18.11: version "0.18.20" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" @@ -17007,7 +16878,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.2, fast-glob@^3.2.9, fast-glob@^3.3.2: +fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.9, fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -17614,7 +17485,7 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^10.0.0, fs-extra@^10.0.1: +fs-extra@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== @@ -17963,7 +17834,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.1.1, glob-parent@^5.1.2, glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -18239,7 +18110,7 @@ graceful-fs@4.2.10: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@4.X, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.8, graceful-fs@^4.2.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.11, graceful-fs@^4.2.2, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.8, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -18286,23 +18157,6 @@ gulp-postcss@^9.0.1: postcss-load-config "^3.0.0" vinyl-sourcemaps-apply "^0.2.1" -gulp-sourcemaps@2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz#a3f002d87346d2c0f3aec36af7eb873f23de8ae6" - integrity sha512-SYLBRzPTew8T5Suh2U8jCSDKY+4NARua4aqjj8HOysBh2tSgT9u4jc1FYirAdPx1akUxxDeK++fqw6Jg0LkQRg== - dependencies: - "@gulp-sourcemaps/identity-map" "1.X" - "@gulp-sourcemaps/map-sources" "1.X" - acorn "5.X" - convert-source-map "1.X" - css "2.X" - debug-fabulous "1.X" - detect-newline "2.X" - graceful-fs "4.X" - source-map "~0.6.0" - strip-bom-string "1.X" - through2 "2.X" - gulp-terser@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/gulp-terser/-/gulp-terser-2.1.0.tgz#149b693a1adbde922807b60b844bb7351dafbde1" @@ -18609,14 +18463,6 @@ hat@0.0.3: resolved "https://registry.yarnpkg.com/hat/-/hat-0.0.3.tgz#bb014a9e64b3788aed8005917413d4ff3d502d8a" integrity sha1-uwFKnmSzeIrtgAWRdBPU/z1QLYo= -hdr-histogram-js@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/hdr-histogram-js/-/hdr-histogram-js-1.2.0.tgz#1213c0b317f39b9c05bc4f208cb7931dbbc192ae" - integrity sha512-h0YToJ3ewqsaZ3nFTTa6dLOD7sqx+EgdC4+OcJ9Ou7zZDlT0sXSPHHr3cyenQsPqqbVHGn/oFY6zjfEKXGvzmQ== - dependencies: - base64-js "^1.2.0" - pako "^1.0.3" - hdr-histogram-js@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz#0b860534655722b6e3f3e7dca7b78867cf43dcb5" @@ -19774,7 +19620,7 @@ is-primitive@^3.0.1: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-3.0.1.tgz#98c4db1abff185485a657fc2905052b940524d05" integrity sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w== -is-promise@^2.1, is-promise@^2.1.0: +is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= @@ -20961,11 +20807,6 @@ jsonify@~0.0.0: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= -jsonparse@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" - integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= - jsonpointer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" @@ -21647,19 +21488,11 @@ lodash.uniq@4.5.0, lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@>4.17.4, lodash@^4.0.1, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-ok@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/log-ok/-/log-ok-0.1.1.tgz#bea3dd36acd0b8a7240d78736b5b97c65444a334" - integrity sha1-vqPdNqzQuKckDXhza1uXxlREozQ= - dependencies: - ansi-green "^0.1.1" - success-symbol "^0.1.0" - log-symbols@4.1.0, log-symbols@^4.0.0, log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -21821,13 +21654,6 @@ lru-cache@^7.14.1: resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== -lru-queue@0.1: - version "0.1.0" - resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" - integrity sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM= - dependencies: - es5-ext "~0.10.2" - lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" @@ -21838,11 +21664,6 @@ luxon@^1.25.0: resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.1.tgz#528cdf3624a54506d710290a2341aa8e6e6c61b0" integrity sha512-gYHAa180mKrNIUJCbwpmD0aTu9kV0dREDrwNnuyFAsO1Wt0EVYSZelPnJlbj9HplzXX/YWXHFTL45kvZ53M0pw== -luxon@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/luxon/-/luxon-2.5.2.tgz#17ed497f0277e72d58a4756d6a9abee4681457b6" - integrity sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA== - lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -22023,11 +21844,6 @@ marked@^4.0.15: resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== -material-colors@^1.2.1: - version "1.2.5" - resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.5.tgz#5292593e6754cb1bcc2b98030e4e0d6a3afc9ea1" - integrity sha1-UpJZPmdUyxvMK5gDDk4Najr8nqE= - mathml-tag-names@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" @@ -22238,20 +22054,6 @@ memoize-one@^6.0.0: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== -memoizee@0.4.X: - version "0.4.14" - resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.14.tgz#07a00f204699f9a95c2d9e77218271c7cd610d57" - integrity sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg== - dependencies: - d "1" - es5-ext "^0.10.45" - es6-weak-map "^2.0.2" - event-emitter "^0.3.5" - is-promise "^2.1" - lru-queue "0.1" - next-tick "1" - timers-ext "^0.1.5" - memoizerific@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/memoizerific/-/memoizerific-1.11.3.tgz#7c87a4646444c32d75438570905f2dbd1b1a805a" @@ -22740,14 +22542,6 @@ mocha-junit-reporter@^2.0.2: strip-ansi "^6.0.1" xml "^1.0.0" -mocha-multi-reporters@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz#c73486bed5519e1d59c9ce39ac7a9792600e5676" - integrity sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg== - dependencies: - debug "^4.1.1" - lodash "^4.17.15" - mocha@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.1.0.tgz#dbf1114b7c3f9d0ca5de3133906aea3dfc89ef7a" @@ -22858,7 +22652,7 @@ moment-timezone@^0.5.43: dependencies: moment "^2.29.4" -moment@>=1.6.0, moment@>=2.14.0, moment@^2.10.6, moment@^2.29.4: +moment@>=2.14.0, moment@^2.10.6, moment@^2.29.4: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== @@ -23161,7 +22955,7 @@ next-line@^1.1.0: resolved "https://registry.yarnpkg.com/next-line/-/next-line-1.1.0.tgz#fcae57853052b6a9bae8208e40dd7d3c2d304603" integrity sha1-/K5XhTBStqm66CCOQN19PC0wRgM= -next-tick@1, next-tick@^1.1.0: +next-tick@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== @@ -23437,7 +23231,7 @@ normalize-path@3.0.0, normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= @@ -23614,7 +23408,7 @@ oas-validator@^5.0.8: should "^13.2.1" yaml "^1.10.0" -object-assign@4.X, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -24042,7 +23836,7 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= -p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2, p-limit@^2.3.0: +p-limit@^2.0.0, p-limit@^2.2.0, p-limit@^2.2.2: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== @@ -24673,11 +24467,6 @@ plur@^4.0.0: dependencies: irregular-plurals "^3.2.0" -pluralize@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-3.1.0.tgz#84213d0a12356069daa84060c559242633161368" - integrity sha1-hCE9ChI1YGnaqEBgxVkkJjMWE2g= - pluralize@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" @@ -25298,7 +25087,7 @@ prompts@^2.0.1, prompts@^2.4.0, prompts@~2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.0, prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.0, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.2, prop-types@^15.7.0, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -25748,18 +25537,6 @@ react-clientside-effect@^1.2.6: dependencies: "@babel/runtime" "^7.12.13" -react-color@^2.13.8: - version "2.17.0" - resolved "https://registry.yarnpkg.com/react-color/-/react-color-2.17.0.tgz#e14b8a11f4e89163f65a34c8b43faf93f7f02aaa" - integrity sha512-kJfE5tSaFe6GzalXOHksVjqwCPAsTl+nzS9/BWfP7j3EXbQ4IiLAF9sZGNzk3uq7HfofGYgjmcUgh0JP7xAQ0w== - dependencies: - "@icons/material" "^0.2.4" - lodash ">4.17.4" - material-colors "^1.2.1" - prop-types "^15.5.10" - reactcss "^1.2.0" - tinycolor2 "^1.4.1" - react-colorful@^5.1.2: version "5.5.1" resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.5.1.tgz#29d9c4e496f2ca784dd2bb5053a3a4340cfaf784" @@ -25980,13 +25757,6 @@ react-markdown@^6.0.3: unist-util-visit "^2.0.0" vfile "^4.0.0" -react-moment-proptypes@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/react-moment-proptypes/-/react-moment-proptypes-1.7.0.tgz#89881479840a76c13574a86e3bb214c4ba564e7a" - integrity sha512-ZbOn/P4u469WEGAw5hgkS/E+g1YZqdves2BjYsLluJobzUZCtManhjHiZKjniBVT7MSHM6D/iKtRVzlXVv3ikA== - dependencies: - moment ">=1.6.0" - react-monaco-editor@^0.54.0: version "0.54.0" resolved "https://registry.yarnpkg.com/react-monaco-editor/-/react-monaco-editor-0.54.0.tgz#ec9293249a991b08264be723c1ec0ca3a6d480d8" @@ -26228,15 +25998,6 @@ react-tabs@^4.3.0: react-shallow-renderer "^16.13.1" scheduler "^0.20.2" -react-textarea-autosize@^8.3.4: - version "8.3.4" - resolved "https://registry.yarnpkg.com/react-textarea-autosize/-/react-textarea-autosize-8.3.4.tgz#270a343de7ad350534141b02c9cb78903e553524" - integrity sha512-CdtmP8Dc19xL8/R6sWvtknD/eCXkQr30dtvC4VmGInhRsfF8X/ihXCq6+9l9qbxmKRiq407/7z5fxE7cVWQNgQ== - dependencies: - "@babel/runtime" "^7.10.2" - use-composed-ref "^1.3.0" - use-latest "^1.2.1" - react-transition-group@^4.3.0: version "4.4.1" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" @@ -26312,13 +26073,6 @@ react@^17.0.2: loose-envify "^1.1.0" object-assign "^4.1.1" -reactcss@^1.2.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/reactcss/-/reactcss-1.2.3.tgz#c00013875e557b1cf0dfd9a368a1c3dab3b548dd" - integrity sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A== - dependencies: - lodash "^4.0.1" - read-installed@~4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" @@ -26728,13 +26482,6 @@ relative-microtime@^2.0.0: resolved "https://registry.yarnpkg.com/relative-microtime/-/relative-microtime-2.0.0.tgz#cceed2af095ecd72ea32011279c79e5fcc7de29b" integrity sha512-l18ha6HEZc+No/uK4GyAnNxgKW7nvEe35IaeN54sShMojtqik2a6GbTyuiezkjpPaqP874Z3lW5ysBo5irz4NA== -relative@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/relative/-/relative-3.0.2.tgz#0dcd8ec54a5d35a3c15e104503d65375b5a5367f" - integrity sha1-Dc2OxUpdNaPBXhBFA9ZTdbWlNn8= - dependencies: - isobject "^2.0.0" - release-zalgo@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" @@ -27161,7 +26908,7 @@ rgbcolor@^1.0.1: resolved "https://registry.yarnpkg.com/rgbcolor/-/rgbcolor-1.0.1.tgz#d6505ecdb304a6595da26fa4b43307306775945d" integrity sha1-1lBezbMEplldom+ktDMHMGd1lF0= -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -27670,13 +27417,6 @@ serialize-javascript@6.0.0, serialize-javascript@^6.0.0: dependencies: randombytes "^2.1.0" -serialize-javascript@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-3.1.0.tgz#8bf3a9170712664ef2561b44b691eafe399214ea" - integrity sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg== - dependencies: - randombytes "^2.1.0" - serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -28387,7 +28127,7 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -spec-change@^1.10.0, spec-change@^1.7.1: +spec-change@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/spec-change/-/spec-change-1.10.0.tgz#09770b40402a06d0aac8cdb550ecaade38590d05" integrity sha512-IMhfPFDbpLBBT/bjSVPLmRxPcCd43XH1MuSGgd3BxBeOLYIVvaca65C3T6cR5ouB+xKOERwsk3Y1RF46JmaquA== @@ -28838,11 +28578,6 @@ strip-ansi@^7.0.1, strip-ansi@^7.1.0: dependencies: ansi-regex "^6.0.1" -strip-bom-string@1.X: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" - integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= - strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -29032,11 +28767,6 @@ stylus-lookup@^5.0.1: dependencies: commander "^10.0.1" -success-symbol@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" - integrity sha1-JAIuSG878c3KCUKDt2nEctO3KJc= - superagent@^8.0.5, superagent@^8.1.2: version "8.1.2" resolved "https://registry.yarnpkg.com/superagent/-/superagent-8.1.2.tgz#03cb7da3ec8b32472c9d20f6c2a57c7f3765f30b" @@ -29331,20 +29061,6 @@ telejson@^6.0.8: lodash "^4.17.21" memoizerific "^1.11.3" -temp-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" - integrity sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - -tempy@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/tempy/-/tempy-0.3.0.tgz#6f6c5b295695a16130996ad5ab01a8bd726e8bf8" - integrity sha512-WrH/pui8YCwmeiAoxV+lpRH9HpRtgBhSR2ViBPgpGb/wnYDzp21R4MN45fsCGvLROvY67o3byhJRYRONJyImVQ== - dependencies: - temp-dir "^1.0.0" - type-fest "^0.3.1" - unique-string "^1.0.0" - terminal-link@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" @@ -29464,14 +29180,6 @@ throttleit@^1.0.0: resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= -through2@2.X, through2@^2.0.0, through2@^2.0.3, through2@~2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - through2@^0.6.3: version "0.6.5" resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" @@ -29480,6 +29188,14 @@ through2@^0.6.3: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" +through2@^2.0.0, through2@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + through2@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" @@ -29502,7 +29218,7 @@ through2@~0.4.1: readable-stream "~1.0.17" xtend "~2.1.1" -"through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8, through@~2.3.4: +through@^2.3.6, through@^2.3.8, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -29524,14 +29240,6 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" -timers-ext@^0.1.5: - version "0.1.7" - resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" - integrity sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ== - dependencies: - es5-ext "~0.10.46" - next-tick "1" - tiny-inflate@^1.0.0, tiny-inflate@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/tiny-inflate/-/tiny-inflate-1.0.3.tgz#122715494913a1805166aaf7c93467933eea26c4" @@ -29547,7 +29255,7 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.2: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tinycolor2@1.4.1, tinycolor2@^1.0.0, tinycolor2@^1.4.1: +tinycolor2@1.4.1, tinycolor2@^1.0.0: version "1.4.1" resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8" integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g= @@ -29926,11 +29634,6 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -type-fest@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" - integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== - type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -30044,7 +29747,7 @@ typescript-tuple@^2.2.1: dependencies: typescript-compare "^0.0.2" -typescript@4.9.5, typescript@^3.3.3333, typescript@^4.6.3, typescript@^5.0.4: +typescript@4.9.5, typescript@^3.3.3333, typescript@^5.0.4: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -30245,13 +29948,6 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" -unique-string@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" - integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= - dependencies: - crypto-random-string "^1.0.0" - unique-string@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-3.0.0.tgz#84a1c377aff5fd7a8bc6b55d8244b2bd90d75b9a" @@ -30493,23 +30189,11 @@ use-callback-ref@^1.3.0: dependencies: tslib "^2.0.0" -use-composed-ref@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.3.0.tgz#3d8104db34b7b264030a9d916c5e94fbe280dbda" - integrity sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ== - -use-isomorphic-layout-effect@^1.1.1, use-isomorphic-layout-effect@^1.1.2: +use-isomorphic-layout-effect@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== -use-latest@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.1.tgz#d13dfb4b08c28e3e33991546a2cee53e14038cf2" - integrity sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw== - dependencies: - use-isomorphic-layout-effect "^1.1.1" - use-memo-one@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" @@ -31261,11 +30945,6 @@ web-streams-polyfill@^4.0.0: resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0.tgz#74cedf168339ee6e709532f76c49313a8c7acdac" integrity sha512-0zJXHRAYEjM2tUfZ2DiSOHAa2aw1tisnnhU3ufD57R8iefL+DcdJyRBRyJpG+NUimDgbTI/lH+gAE1PAvV3Cgw== -web-streams-polyfill@~3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.0.3.tgz#f49e487eedeca47a207c1aee41ee5578f884b42f" - integrity sha512-d2H/t0eqRNM4w2WvmTdoeIvzAUSpK7JmATB8Nr2lb7nQ9BTIJVjbQ/TRFVEh2gUH1HwclPdoPtfMoFfetXaZnA== - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -31985,7 +31664,7 @@ yargs@17.0.1: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@17.7.2, yargs@^17.0.1, yargs@^17.2.1, yargs@^17.3.1, yargs@^17.4.0, yargs@^17.7.1, yargs@^17.7.2: +yargs@17.7.2, yargs@^17.0.1, yargs@^17.2.1, yargs@^17.3.1, yargs@^17.7.1, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==